Headless Runs (row-bot run)
row-bot run gives Row-Bot one task, runs it to the end and exits. There's no window, server or tray. It's for scripts, CI jobs and benchmark harnesses such as Harbor (Terminal-Bench, DeepSWE), which install an agent into a task container, hand it a task and read back what it did.
The task runs as one conversation, with Row-Bot's normal prompts and tools. When the turn ends, Row-Bot can send one follow-up of its own, as the app does. It does this when the reply stopped on its next step, or when the reply names files it says it saved that aren't there.
row-bot run --task-file task.txt --workspace /app \
--base-url https://models.example/v1 --model glm-5.3-flash --api-key-env MODEL_API_KEY \
--approval hands-off --output-dir /tmp/row-bot
What It Never Does
- No profile access by default. Each run gets a fresh, empty data folder, which is deleted when the run ends. This holds even when
ROW_BOT_DATA_DIRis set. Your conversations, memories, settings and keys aren't read or written.--data-dir DIRuses a folder you name instead; Row-Bot keeps it, and it's refused while Row-Bot (or its server) has that folder open. - No telemetry. No install-count ping is sent, and
ROW_BOT_INSTALL_COUNTis set to0for the run. - No update check. The updater doesn't run.
- No server. No web app, tray, window or remote access starts.
- No model download. The first run downloads nothing. If the local embedding model isn't already on the machine, memory search falls back to matching words.
- No network beyond the model. With
--base-url, Row-Bot calls only that endpoint. With a configured provider, it calls only that provider, which also lists its models. The agent's own tools reach the network only when the task asks for it: a shell command, or web search where it's on. - No Learning. Learning never records a headless run. A throwaway folder starts with Learning switched off. A
--data-dirfolder where Learning is on is refused.
Choosing The Model
Your own endpoint. --base-url is the endpoint's address, and --model is the model's name there.
--api-style is the request format the endpoint speaks:
chat: OpenAI Chat Completions (the default);responses: OpenAI Responses;anthropic: Anthropic Messages.
For chat and responses, give the address that ends in /v1. For anthropic, give the address before /v1.
Row-Bot doesn't test the endpoint first. It takes the endpoint at its word that the model can chat and call tools, and the first call shows whether it can.
A provider Row-Bot knows. --model is provider:model, for example:
ollama:qwen3:8b(Ollama atOLLAMA_HOST);anthropic:<model>;openai:<model>;openrouter:<author>/<model>.
The key. --api-key-env NAME names the environment variable that holds the key. Never put the key itself on the command line. Without --base-url, it defaults to the provider's own variable, such as ANTHROPIC_API_KEY or OPENROUTER_API_KEY.
Row-Bot reads the key, then removes it from its environment before the agent runs anything. Commands the agent starts can't read it. On Linux, other programs running as the same user can't read the environment Row-Bot started with either. The key is kept in memory only, never in a keychain or a file.
Approvals
Nobody is there to approve an action, so --approval decides what happens:
--approval | An action that needs approval |
|---|---|
ask (the default) | Refused. It doesn't run, and the agent is told that no person is available to approve it, then carries on without it. The run exits 3. |
auto | Row-Bot's reviewer approves what clearly matches the task. Anything it would ask the person about is refused. |
hands-off | Allowed, and recorded. Used only when you pass it: it can't come from an environment variable. |
Shell command checks, the sandbox and MCP safety work as in the app. Some actions only the person can approve, whatever the level, so a headless run always refuses them. If the agent asks the person a question, it's told that no person is available to answer, and it goes on with the option it recommended.
The trajectory and summary.json list each refused action.
The text a run adds
The model reads Row-Bot's normal prompts. A headless run changes only four lines, the ones that would otherwise send it to a person:
- the result of a refused action;
- the answer to a question;
- the wrap-up at the
--max-roundsceiling; - Row-Bot's own follow-up when a reply stopped on its next step.
summary.json and the trajectory's agent.extra record these lines as harness_text, with their SHA-256. A published result can then say exactly which harness text it ran with.
Flags
| Flag | What it sets |
|---|---|
--task TEXT / --task-file PATH | The task. Use --task-file - to read it from standard input. |
--workspace DIR | The folder the agent works in. File tools and the shell start here. The default is the current folder. |
--model REF | The model, as above. |
--base-url URL, --api-style STYLE, --api-key-env NAME | Your own endpoint, and the variable that holds its key. |
--context-window TOKENS | The context window to work within. Older messages are trimmed or summarised to fit. |
--max-output-tokens TOKENS | The longest reply the model may write. |
--reasoning-effort LEVEL | The model's reasoning effort, where it has one (low, medium, high, ...). |
--timeout SECONDS | Stops the run after this long. |
--max-rounds N | The most model rounds the turn may take. The default is 1,000. |
--approval LEVEL | ask, auto or hands-off, as above. |
--output-dir DIR | Where the output files go. |
--data-dir DIR | A data folder to keep, instead of a throwaway one. |
Every flag except --task, --task-file, --workspace, --approval and --data-dir can also come from an environment variable, ROW_BOT_RUN_<FLAG>. For example, ROW_BOT_RUN_MODEL, ROW_BOT_RUN_BASE_URL, ROW_BOT_RUN_API_STYLE, ROW_BOT_RUN_API_KEY_ENV or ROW_BOT_RUN_CONTEXT_WINDOW.
With --data-dir, the run saves its endpoint, context window and workspace in that folder's settings.
Output
The final answer is printed on standard output. Standard error shows warnings and, if the run didn't finish cleanly, a line saying why.
With --output-dir, the folder gets:
trajectory.json: the conversation as an ATIF trajectory, Harbor's Agent Trajectory Interchange Format. It has the task, each model reply with its reasoning and tool calls, each tool result tied to its call, and per-reply token counts.final_metricstotals every model call in the run, background ones included: prompt, completion and cached tokens, and the cost where the provider reports one.answer.md: the final answer.summary.json: the status, exit code and reason, the model and settings, refused actions, the token and cost totals by purpose, the harness text, and timings.row-bot.log: the run's log.
Exit Codes
| Code | Meaning |
|---|---|
0 | Done. |
1 | Row-Bot failed. See row-bot.log. |
2 | The command line is wrong: a flag, the task file, or the key's variable. Nothing was run. |
3 | Finished, but at least one action that needed approval was refused, so the answer may be incomplete. |
4 | A budget ran out: --timeout, or the --max-rounds ceiling. This code is also used when the turn stopped because it kept repeating the same action. |
5 | The model endpoint failed: it was unreachable, refused the key, hit a rate limit, or the model can't run there. |
Installing A Pinned Version On Plain Linux
Install from a release tag with the locked dependencies. This needs git, curl and Python 3.12 or 3.13, which uv can download.
curl -LsSf https://astral.sh/uv/install.sh | sh
git clone --depth 1 --branch vX.Y.Z https://github.com/siddsachar/row-bot.git /opt/row-bot
cd /opt/row-bot && uv sync --locked --no-dev --python 3.13
/opt/row-bot/.venv/bin/row-bot run --help
--no-dev leaves out the test tools. The optional extras (voice, designer, browser and others) aren't needed for a headless run. A tool whose extra isn't installed is simply unavailable.
uv tool install from git isn't supported yet, because building a wheel needs the web client built first.