AGENT.RUN() / GET STARTED

Set up AgentRun
with your agent.

Follow the AgentRun quickstart with your coding agent. Open the prompt in an app, or copy it into your terminal agent.

Download Markdown

DOCUMENTATION / PLATFORM REFERENCE

Based on AgentRun release · Synced .

@parcha/agentrun-serve

The AgentRun server: the process you deploy to run AgentRun, the open-source platform that supercharges your agents. agentrun-serve serves the /v2 API (agentrun.v2/0) and the console over one store (SQLite in its data directory, or Postgres): many agents, each with revisions written once (an agentic prompt, or an agentrun-dsl workflow), and every run pinned to the revision it ran. Runners claim runs from that store and run them; by default one runner starts beside the server. The capabilities document (GET /v2/capabilities) says what this server offers.

npx @parcha/agentrun starts it, with its console, on your machine; the container image runs it on a server (below).

Already use Claude Code or Codex? Choose Connect agent in the console and select your coding agent from the dropdown. Its skill asks whether to connect for future jobs, import past history, or both, then confirms the source project and machine. No destination model key is needed for this connection: a live agent uses its existing native sign-in and configuration. Turn Self-improving On separately to give later runs your owner-written corrections. Eligible server-run and SDK agents can also compile checked workflows; CLI capture has no workflow bridge. Imported history stays historical and does not automatically train the agent.

For a source on a different laptop, VM or container, choose Connection setup → Another machine and use the matching Python source connector. Remote execution currently needs the server and connector from the same reviewed development checkout; the published observation-only CLI does not include it. The source worker must stay online. See Native agents for setup, history scopes and runtime limits. Connected agents use ordinary agent revisions; each connection declares whether it can launch runs and execute checked workflows. The console shows server-run and source-connected agents in one inventory, with their actual connection and activity state. A CLI capture profile linked to a source appears with that source; an unlinked profile remains visible. A source session is not itself a recorded run. Managed adapter isolation is unchanged.

GET /v2/observations also reports learning for each observed session: on, off, setup_required, unknown or unsupported, with a reason and verified profile IDs when available. Polling sources advertise support through cli_learning.session_association in /api/v2/control/connectors/capabilities. A source may attach metadata.cli_learning after matching the exact canonical project, runtime and server origin to an existing private CLI learning connection. Its proof binds the connector, selected source, observed session, runtime, connection, readiness, native-session hash and sequence using that connection's scoped credential. The receiver stores verified identifiers, never the credential or proof, and returns no source paths or native session hashes. On requires configured hooks and an accepted hook window for that exact native session; configuration alone is unknown with awaiting_activation. Agent and server learning settings are read live. Missing support, invalid proofs or revoked credentials do not interrupt activity or usage reporting. Delegated subagents report unsupported. Observing a session never enrolls its project or changes its learning setting.

Quick start (no key, no network)

Node 24.22.3 or later. In a checkout of this repository:

Sandbox in 60 seconds

An agent with a shell, in a Docker container of its own: on a machine with Docker, in a checkout built as above, with a model key. Start the server; the Docker box is on by default wherever Docker answers:

export AGENT_MODEL=openrouter/anthropic/claude-sonnet-5.5 OPENROUTER_API_KEY=...
node packages/serve/dist/cli.js

Its log says event=boxes available=docker, and its banner's last line reads Boxes: docker (on by default; set AGENTRUN_BOXES to change). docker boxes reach only pypi.org, files.pythonhosted.org, registry.npmjs.org, registry.yarnpkg.com, github.com, and codeload.github.com. on Linux; elsewhere it says why the box has no network (Sandbox). The first sandbox run builds the box's image (python 3.12, git, curl, node, npm and rg, about 300 MB, a minute or two, the build alone on the network), with a row on its timeline saying so; a later run finds it built. In a second shell, export the two AGENTRUN_ lines it printed (a later start prints where the key is: export AGENTRUN_API_KEY=$(cat ~/.local/share/agentrun/agents/.token)). Then make a sandbox agent, run it, watch it, and read the file it wrote:

H="authorization: Bearer $AGENTRUN_API_KEY"; J='content-type: application/json'
curl -s "$AGENTRUN_BASE_URL/agents" -H "$H" -H "$J" -d '{"definition":{"id":"boxed","name":"Boxed","instructions":"Do each step with bash.","place":{"mode":"sandbox","box":"docker"},"tools":["bash","write","read"]}}'
run=$(curl -s "$AGENTRUN_BASE_URL/agents/boxed/runs" -H "$H" -H "$J" -d '{"input":{"content":"Save what cat /etc/os-release prints in out.txt."}}' | node -p 'JSON.parse(require("fs").readFileSync(0)).run_id')
curl -sN "$AGENTRUN_BASE_URL/runs/$run/timeline" -H "$H" -H 'accept: text/event-stream' | grep -o '"summary":"[^"]*"'
curl -s "$AGENTRUN_BASE_URL/runs/$run/files" -H "$H"; curl -s "$AGENTRUN_BASE_URL/runs/$run/files/out.txt" -H "$H"

The place above is what a new agent gets anyway on a server with docker, so a definition that names only its name and instructions lands in the box too, with bash as its one tool (Place).

The timeline ends when the run does. out.txt names the image's Debian, whatever this machine runs, and it is in the run's work/, the one directory the container binds. No key? Start the server with --faux box.mjs, a faux model that makes one bash call and then answers, and run the same commands:

cat > box.mjs <<'JS'
export default (context, faux) => context.messages.some((m) => m.role === "toolResult") ? faux.message("Saved out.txt.")
  : faux.message(faux.toolCall("bash", { command: "cat /etc/os-release | tee out.txt" }), { stopReason: "toolUse" });
JS
node packages/serve/dist/cli.js --faux box.mjs

The box has python 3.12, git, curl, node, npm and rg. On Linux it reaches Python's and npm's package registries and GitHub, and nothing else: pip install and npm install work in it. The box's image says how to give it more. The rest is under Sandbox.

Logs

stdout gets one line per event, at=<time> event=<name> key=value ... (a value with a space is quoted):

at=2026-10-25T21:04:05.120Z event=request method=POST path=/v2/agents/calc/runs status=202 ms=41
at=2026-10-25T21:04:05.121Z event=run_started run=01a1... agent=calc kind=agentic
at=2026-10-25T21:04:06.802Z event=run_ended run=01a1... agent=calc status=completed cost_usd=0.0012
at=2026-10-25T21:04:09.010Z event=auth_failed route=/v2/runs reason=wrong_token

A request's path has no query. auth_failed names the route and why (no_credential, wrong_token, wrong_launch_code, wrong_password, sign_in_table_full), never the token given nor any part of it. AGENTRUN_LOG=quiet leaves out the request lines; the run and auth_failed lines stay. A run whose process failed at its start says why in its error.message, in words. One line at start, event=boxes, says which boxes this server has (Sandbox); quiet keeps it too. event=harness_offers why=start ms=<n> says how long the server took to check what each harness offers (each CLI's package and pins; harnesses), the bulk of its start; quiet keeps it too. It is made at the start only: a PUT of /settings/tools and a save or delete of a tool key change no harness's offer, so they remake capabilities at once without checking again (a key some harness reads would, with why=key). event=cost_heal read=<n> healed=<n> failed=<n> says, once after the start, what the start's sweep did: the ended runs whose stored cost was unknown that it read, those whose priced booking it wrote back, and those it could not read (each heals on its next read). The rest stay unknown: a charge of no known cost, or a booking with no request to read. It names no run, and a store with no such run says nothing; quiet keeps it too.

Anonymous usage counts

The server sends three anonymous events: server_started, a daily heartbeat and first_run_completed. Each holds a random id kept in the data directory (.telemetry.json), the version, the platform and how many runs ended as a range; never a prompt, a file, a key or a name. AGENTRUN_TELEMETRY=0 or DO_NOT_TRACK=1 turns it off, as do CI, a test runner (node --test) and --faux; AGENTRUN_TELEMETRY=debug prints each event on stderr and sends none. The start that first could send prints one notice and sends nothing at that start. docs/telemetry.md lists every field.

In a container

The image is public: ghcr.io/parcha-ai/agentrun-server (:beta, or an exact version such as :v0.1.0-beta.27). compose.yaml at the repository's root is the one way to run it: the server, its data on a named volume, and the host's Docker socket, so each run's Docker sandbox is a container beside the server's, its run's folder mounted from that volume (in the published image). It takes Docker Engine 26 or later, which mounts a volume's subpath.

The disk, and earlier data directories

The data directory has two parts. Its own files, the control plane, hold the agent store (DIR/store.sqlite, where each run's row keeps its claim: an epoch and its holder), the token and the server's settings; only the server and its runners open them. Everything the agents make is on the disk, DIR/disk/: one folder per agent, DIR/disk/agents/<agent>/ (its id in lower case, a dash and 16 hex digits of its SHA-256), with its learning folder (learning/) and its runs (runs/<id>/, each with work/, where its tools work). Nothing is copied in or out of a run's folder: where it works, it works in that folder. A run's record is not in its folder: its row, its claim and its journal (what the run did, in order) are rows of the store.

A data directory an earlier version wrote, with its runs under DIR/runs/ (or a store of store version 1), is refused at start, saying so: this version neither reads nor moves it. Keep it with that version, or start this one on a new data directory (an empty folder, or a new volume).

When a run's folder is on the owner's Archil disk and the run has no computer, a command runs through Archil's serverless exec, for at most 295 s. A known limit: a command, once sent, cannot be stopped. Stopping the call answers at once, but the command runs on to its own deadline, and the run's next command, or a write to its folder, waits until it has ended. A command not yet sent when the call is stopped is never sent.

Upgrading from 0.1.0-beta.26

0.1.0-beta.27 keeps every agent in one store, DIR/store.sqlite, with its revisions (and this version also keeps each run on the disk, above). 0.1.0-beta.26 and earlier kept one agent home per agent, DIR/<agent>/agent.sqlite, and this version does not read those. So it refuses to start on a data directory that holds one, and names each home it found, instead of serving it as if it had no agents.

To keep those agents and their runs, keep the earlier version on that data directory. To start this version, give it a new data directory (a new volume), or move the old homes out of the one you have. Then create the agents again, here or through POST /v2/agents. Their earlier runs stay readable where you moved them, with the earlier version.

Capacity and health

A run is held by a runner, and how much memory it takes depends on its harness. Capabilities size what a host holds by memory: each run reserves its harness's size out of the container's limit when it has one (cgroup), else the machine's, less the server's own 128 MiB. The server does not refuse a start for memory: a start inserts a queued run, and a runner claims it when it has a free loop (300 at once by default; agentrun-serve runner --loops N sets it for a runner you start yourself).

Start-time switches

Some of what the server reaches is set only by its operator, in its environment when it starts. No route and no console page sets these, so no caller of the API can widen what the server reaches; each takes a restart. A refusal one of them causes names the variable, the value that allows it and the restart (restart the server with AGENTRUN_WEBHOOK_PRIVATE_TARGETS=1 to allow it, only on a machine you alone use), with its usual error code. GET /v2/capabilities lists them under switches, each with on, the value the server read and what it allows.

Variable What it allows Default Why at the start only
AGENTRUN_MCP_ALLOW_LOOPBACK=1 An MCP server on this machine's loopback (MCP servers) off Loopback is this machine's other services too: set it only on a machine you alone use
AGENTRUN_WEBHOOK_PRIVATE_TARGETS=1 The outbound webhook to a private network or this machine (Webhooks) off Whoever may set the webhook could make the server POST inside its network: only on a machine you alone use
AGENTRUN_PRIVATE_HOSTS Bounds the private-network hosts an owner may allow an MCP server or a calendar on (Settings → MCP servers): none allows none (and only an empty list can be saved), or a comma list of address ranges (10.20.0.0/16,fd12:3456::/32) every listed host's address must also fall in. Loopback, link-local (cloud metadata) and this machine's addresses stay refused whatever it says. A value that is neither reads as none unset: the owner's list holds On a server or runner many customers share, an owner's list would reach the operator's own private network: set none there, on the server and on each runner (each process holds to its own)
AGENTRUN_BOX_ALLOW The hosts a run's computer may reach: a comma list, or none (A run in a Docker box) the package registries and GitHub A run's network is the operator's policy, not a caller's
AGENTRUN_BOX_CPUS, AGENTRUN_BOX_MEMORY, AGENTRUN_BOX_PIDS A Docker computer's size (Computers) 2 CPUs, 4 GiB, 1,024 processes The machine's capacity is the operator's

On a server the installer runs as a service, agentrun service install --env AGENTRUN_MCP_ALLOW_LOOPBACK=1 --env AGENTRUN_WEBHOOK_PRIVATE_TARGETS=1 saves the two yes-or-no switches in the service and restarts it; --env KEY= takes one off.

Sandbox

A sandbox agent's bash runs in a box, a machine apart from this server. Docker is the default box and the only one offered with no setup: a Docker container made for each run, which binds the run's work/ and nothing else. A Daytona or Modal box runs on a computer from that provider, offered once AGENTRUN_BOXES lists it and the keys its computer provider needs are set (the environment, or Settings → Computers). No box holds a key. A Docker box on Linux reaches the package registries and GitHub through a proxy, and nothing else; so does a Daytona or Modal box, through the egress proxy its computer's init starts, and capabilities say so in its places.boxes entry. Its read, write and edit work on that same work/: on this server, where the box binds it and this server holds directory handles (Docker on Linux), else in the box. The agent's loop, its log, its model calls and every key stay on the server. An agent says so in its place; the server says which boxes it has (places.boxes in its capabilities); a run in a Docker box is what the container gets; the box's image is what it starts from. Sandbox in 60 seconds is all of it end to end. The published image hosts Docker boxes through the host's Docker socket.

Models

An agentic revision names its model as provider/model-id ("model" in its definition), or names none and runs on this host's default, AGENT_MODEL. With no AGENT_MODEL, a model provider's key, the server's own or saved as a tool key, gives the default, the first of: anthropic/claude-sonnet-5-5 with ANTHROPIC_API_KEY, openai/gpt-6.1-sol with OPENAI_API_KEY, particle/particle-1 with PARTICLE_API_KEY, then openrouter/openai/gpt-6.1-sol with OPENROUTER_API_KEY. Set AGENT_MODEL for another. Direct Particle runs on Pi; claude-agent takes the Anthropic one and codex the OpenAI one. A workflow revision names no model: each model node names a tier (fast, default or strong), and the host maps it, fast to AGENT_MODEL_FAST and strong to AGENT_MODEL_STRONG, each falling back to AGENT_MODEL. Capabilities show the mapping in models ({source, route_prefix, fast, default, strong}): source is gateway, providers, chatgpt or faux (the published document marks gateway and providers as models/2, beyond the contract's managed, chatgpt, env and faux), and route_prefix is the routing prefix this server puts before a gateway's model ids (agent-model), which a client takes off to show the gateway's own id, and null with any other source. models also says ready, whether a revision that names no model runs here, and when it does not, needs: key (no model provider's key and no ChatGPT sign-in, or none for the default's provider) or model (AGENT_MODEL names one this server does not know); and priced, whether that model has a price here, which a run's max_cost_usd needs (false for a gateway model with no price set that the catalog does not list in any form; null while ready is false, with no model to price). Where the models come from:

Tools

A revision names its tools from one closed table (src/tools.ts): each name is how the run's process binds it and the variables of this server's environment it needs. Nothing outside the table can be named, and no tool is loaded from anywhere else. GET /capabilities lists every one in tools, available: true or false with the variables it is missing (their names, never their values), nodes for whether a workflow's model node may name it, and calls for whether a workflow's call node via: "tool" may run it. A run of a revision that names a tool outside the table, or one whose variables are not set, is refused before it starts (409 agent_not_runnable, with details.unbound and details.missing).

Tool keys

A tool's key comes from one of two places. The server's own environment, through its launcher: PARALLEL_API_KEY, MONID_API_KEY, BROWSERBASE_API_KEY and KERNEL_API_KEY are among the secrets it hands the server over its pipe. Or the page, by name: PUT /v2/settings/tool-keys/{id} with {values: {NAME: "..."}} saves one, field by field (parallel takes PARALLEL_API_KEY, monid MONID_API_KEY, browserbase BROWSERBASE_API_KEY and BROWSERBASE_PROJECT_ID, kernel KERNEL_API_KEY, typesafe TYPESAFE_API_KEY, which unlocks Jev's decisions, decisions.jev), and DELETE forgets it. A model provider's key is saved the same way (anthropic, openai, particle and openrouter, each kind: "model", the others "tool"): a run gets only its model providers' keys, and with no AGENT_MODEL a key gives the default model (models); its harnesses are pi and the harnesses that talk to that provider's API (OpenAI's: codex and opencode; Particle's, Pi only; OpenRouter's, all four), of those this server runs or would run once the key is set, so a row names them before it is saved: one left out is one this server cannot run for another reason (not installed, not the pinned build, more than this host's memory). GET /v2/settings/tool-keys lists each key, what it unlocks and the harnesses that run that, and each field's set and source (server, stored or null): never a value, nor any part of one. unlocks holds only what capabilities show this server binds, its tools and workflows.decisions.providers (as decisions.<id>): a key whose tools it binds none of still lists, with nothing in unlocks. A field the server is started with is the server's, and wins: saving it is 409 key_set_by_server. A value is text of at most 1024 bytes with no control character (422 otherwise).

MCP servers

Add a remote MCP server once, with its credential, and see its tools before you keep it. An agent that grants one of its tools calls it on pi and on claude-agent (below). Which kind of server to choose for a service's CLI, and why its token never goes in the box: Give an agent tools.

Webhooks

One URL hears of your runs without anyone watching the page. PUT /v2/settings/webhook with {url} sets it: an http or https address, with no user or password in it, on a public host: a loopback or private-network address is refused unless the operator allows it (AGENTRUN_WEBHOOK_PRIVATE_TARGETS=1, below; start-time switches). Two kinds of message are POSTed to it about runs: run.needs_input when a run comes to need its person (input_required: a question, a call held for approval, a pause at its cap, an ask for its person in its browser, desktop or phone, or a stopped turn) and run.ended when it ends (completed, failed or cancelled, once the run's end is written). A schedule whose firing fails sends a third, trigger.failed; a server with no triggers never sends one.

Schedules

A schedule starts an agent's runs with no one there. POST /v2/triggers with a source and a target:

Templates

A template package makes a working agent in one call: its definition, its skills and rules, and its triggers, from a folder the server ships. GET /v2/templates lists them; POST /v2/templates/{name}/apply with {parameters, overrides?: {model}} makes one, or nothing when a check fails (a trigger refused archives the agent it made). A package's version is SemVer and never definition.version, the agent's revision number. A package's composio trigger names its need's toolkit as its server (server: github for a required {source: composio, toolkit: github} need), and apply makes it on the saved Composio server that need maps to, its config filled from the parameters it names (repo: "${parameters.repo}"); one this server can't set up yet (no public URL, say) is skipped with a warning, as a github trigger is with GitHub not connected. The first package is code-review, a code review agent for one GitHub repository. The format and the rules of an apply are in templates/README.md; agentrun template validate DIR checks a folder as the server does.

agentrun template eval DIR (agentrun-serve eval-template DIR) runs a package's eval cases as real runs of its agent and grades each run with the case's graders: by default on a server of its own over a temp data directory, so it never touches yours, with each case's fake MCP servers on loopback and its corrections seeded through the learning API. Real models cost money: each run is capped at its case's max_cost_usd. It exits 0 when every case passed, 1 when one failed, 2 when nothing ran. The runner, the graders and the report are in templates/README.md.

eval-template flag What
--case NAME A case to run; repeat it. Without one, every case.
--runs N Runs of each case, in place of each case's runs.
--server URL Run on that server, its token in AGENTRUN_API_KEY (the launcher hands it over its pipe; never printed). The agents the eval makes are archived at the end.
--grader-model PROVIDER/MODEL The llm graders' model; default the server's.
--report FILE The whole report as JSON (per case, run and grader: pass, reason, cost); a summary goes to stdout, progress to stderr.
--faux MODULE Answer every model request from the module, as the server's --faux does. Not with --server.

What it serves

Uploads

A run's input files. Send one in one call, its bytes the body and its path in the query:

Agent home

Each agent has a home, a directory of its own at <data>/homes/<key>/, kept across its runs; runs do not see it yet. The key is the agent's id in lower case and 16 hex digits of the id's SHA-256, so two ids that differ only in case (keeper, Keeper) never share a home on a disk that folds case, as macOS's does by default. GET /v2/agents/{id}/home/files lists every file in it, recursively, in the shape of a run's file list (with agent_id in place of run_id), and a home never written to lists none. Below it, a file's own path: GET reads the file as a run's file is read, and PUT writes the raw body as the file, whole (a temporary file renamed over it, 0600), making the directories on the way and the home itself on the first write, and answers its entry; of two writes at once, the last wins. A body over capabilities.home.max_file_bytes (limits.max_body_bytes) is 413. DELETE removes a file (204; 404 when it is not there) and leaves an emptied directory in place. Paths are checked as a run's are, a write goes at most 16 directories deep (as deep as the list goes), and a link anywhere on the way is never followed: a read is 404, a write or a delete 403 system_file_forbidden. learning/ and sign-ins/ (the agent's saved sign-ins) are the server's alone (capabilities.home.host_owned): the list shows each as one entry, {"path": "learning", "host_owned": true}, with none of what is in it, and a GET, PUT or DELETE at or under one, however the path is spelled (./Learning/x), is 403 system_file_forbidden (details.reason host_owned). A read's refusal names where to read it instead: the learning API (/v2/agents/{id}/learning) on a server that has that route (on one that does not, the server keeps learning/ for itself; this server has no learning API yet), and /v2/agents/{id} for sign-ins/. A host-owned name is matched by its first segment folded (compatibility form, any case, no combining marks) and, where that segment and learning/ are both on disk, by identity (the same device and inode), so a disk that takes another spelling for one name is refused the same way. A path takes only plain segments: each its own NFC form, with no default-ignorable code point, or it is 400 invalid_file_path. An archived agent's home is read and written as its definition is. A write is held to its directory through /proc/self/fd; where there is none (macOS), capabilities.home.writes is false and PUT and DELETE are 501 unsupported_here, as Node has no openat to write safely by path, while the list and reads still work. GET and PUT /agents/{id}/home, the contract's packed home, are not served (404).

For coding agents

A coding agent (Claude Code, Codex) sets the server up and drives it with skills/agentrun-serve/SKILL.md, shipped in this package. GET /llms.txt, at the server's root and without a credential, is the API in brief (src/llms.txt), with no data of the server's.

POST /v2/mcp is the MCP endpoint: Streamable HTTP in its simplest form, one JSON-RPC message per POST answered as JSON, with no stream and no session. Its ten tools:

Tool Routes
whoami GET /capabilities: the token checked, and what this server runs.
agents_list, agents_create GET /agents, POST /agents (the arguments are the definition; definition carries any other field, checked by the route).
agents_revise GET /agents/{id}, then PUT /agents/{id}/definition with the fields given changed, on that revision (If-Match).
runs_start POST /agents/{id}/runs, answered at once.
runs_get GET /runs/{id} (its pending is a waiting run's question), with console_url.
runs_events GET /runs/{id}/timeline with limit (100 by default).
runs_files GET /runs/{id}/files, or one file's text up to 64 KiB.
runs_respond, runs_cancel POST /runs/{id}/messages, POST /runs/{id}/cancel.

Each tool calls its routes in process, with the caller's token, so it checks and answers as they do: the route's JSON is the result's structured content (and its text), and a refusal is a result with isError holding the route's error. A run is started, then polled with runs_get; no call is held open for one, and a question a run asks waits as its input_required state, for runs_respond or a person in the console. The endpoint takes the Bearer token only (the page's session cookie is never taken there), refuses a browser Origin other than this server's own, and on loopback refuses a Host that is not a loopback name, as every route does.

claude mcp add --transport http agentrun "$AGENTRUN_BASE_URL/mcp" --header "Authorization: Bearer $AGENTRUN_API_KEY"
codex mcp add agentrun --url "$AGENTRUN_BASE_URL/mcp" --bearer-token-env-var AGENTRUN_API_KEY

Harnesses

A definition names the harness that runs it: pi (the default, and what a definition that names none gets), claude-agent, codex, opencode, or one of this server's harness modules adds (below). Any other is 422 input_invalid on definition.harness. Every answer names it. An edit (PUT /agents/{id}/definition) that names no harness keeps the agent's, as it keeps its skill files; name pi to move it back. GET /v2/capabilities lists each in harnesses, with available and, when not, the reason, and default_model: the model the harness runs when a definition names none (provider/model-id, as a save and a run resolve it), or null where it runs none (the harness does not run here, or no default model here runs on it: claude-agent never takes a gateway's model). A definition naming a harness this server does not run yet saves with a warning on definition.harness, and a run of it is 409 agent_not_runnable with details.harness; it never runs on pi instead. This server runs pi always, and claude-agent, codex and opencode when each adapter's package, pins and provider endpoint check out; the harness's reason says what is missing. With a ChatGPT plan signed in, pi and codex need no key (on a ChatGPT plan); claude-agent and opencode still do. claude-agent and codex install themselves on first use: AgentRun never ships the Claude Agent SDK or the Codex CLI, and the first run on each (or the first agent saved on it) installs the version AgentRun pins (@anthropic-ai/claude-agent-sdk@0.3.286, @openai/codex@0.164.0) from npm into <data>/harnesses/claude-agent or <data>/harnesses/codex, with the npm that runs the server, once. Each install is pinned by the lock the server ships, harnesses/claude-agent/ or harnesses/codex/ (a package.json that names the package at the pin, and npm's lock for it: every package of the tree, the platform packages that hold the Claude CLI or the Codex binary and the peers' dependencies included, by sha512), which npm ci --ignore-scripts --include=optional holds every tarball to, from whichever registry the person's npm config names; a config that omits optional packages still gets this platform's CLI. It lands whole or not at all: npm writes into a fresh directory beside the install's own, the result is checked there (the package at the pin, its entry, this platform's CLI or binary, and for Claude the MCP library), then it is renamed into place and made read-only. node scripts/harness-locks.mjs makes the locks again when a pin moves (--check checks them). Every run that needs one waits for that one install, its ready time counted from the install's end, and shows a phase row, Installing Claude Code (first use)… or Installing Codex (first use)…, while it does. Each run then loads the harness from its own packages inside its install and nowhere else, never from a node_modules above it; a tree that is not whole is installed again. Until it is installed, capabilities list the harness with installs: "on_first_use". When npm fails, the run fails and its error names the command that installs it by hand, the same locked install: the shipped package.json and package-lock.json copied into a fresh <data>/harnesses/<harness>.new, npm ci --ignore-scripts --include=optional there, then that directory put in place of <data>/harnesses/<harness> (made writable first: the server leaves its install read-only). A server that stops mid-install stops its npm (SIGTERM). opencode needs opencode-ai@1.19.5 installed beside the server (an exact optional peer of it), and its model goes where codex's does: the gateway at AGENT_MODEL_BASE_URL, or OpenAI with OPENAI_API_KEY, on the Responses API. The packages and pins are checked once, at the start (event=harness_offers why=start): a harness installed after it, or put back on its pinned build, stays unavailable until AgentRun restarts, and its reason ends saying so, once it is installed, restart AgentRun to pick it up or once the pinned build is installed, restart AgentRun. Run from npx, a reason whose install line is the npx line that starts the server with what is missing needs no such clause: running that line is the restart. A reason a setting fixes (a model key, say) names no restart.

Decision workflows

A workflow's typed questions (its judge, pick, sift, route and ask nodes) run on a decision provider when this server's environment sets the provider's key. They are fast decisions, not agent turns: one request per node, with typed answers and their probabilities.

Archiving

Archiving an agent made here or a run hides it and keeps everything of it; purging removes what it was given and did, its cost kept, and an agent made here is purged only once archived (an agent another system owns is deleted, and is never archived here). These routes are this server's own, outside the /v2 contract, like GET /runs and an agent's revisions; capabilities list them in features.archive.

  • POST /v2/agents/{id}/archive hides the agent and its runs from GET /agents, GET /runs and GET /agents/{id}/runs; POST /v2/runs/{id}/archive hides one run. .../unarchive shows them again. Each is idempotent (archiving again keeps the first time), takes no body, and answers what it changed.
  • Archiving an agent turns off every trigger that runs as it (a start_run of it, a message_run to one of its runs) with the archive, in one write: disabled: {reason: "agent_archived", detail}, and the answer lists them in triggers_off: [{id, name}]. From then no firing starts a run of it: one that comes due anyway (waiting on its max_active_runs, or on a retry) is skipped, "The agent <name> is archived.". While it is archived, a trigger made on, turned on or aimed at it is 409 agent_archived. Unarchiving turns none on: its answer lists those still off, and PATCH /v2/triggers/{id} {enabled: true} turns each on.
  • Each list takes archived=true to list only archived ones (false, the default, lists the others).
  • Every read by id still answers, with archived_at (null when it is not archived; a run's is its own, else its agent's): GET /agents/{id}, GET /runs/{id}, its timeline and its files. /usage still counts archived runs: the spend happened.
  • A new run of an archived agent is 409 agent_not_runnable, saying it is archived (details.archived_at); a run already going when its agent is archived keeps going.
  • The store keeps an archive as archived_at on the agent's or the run's row, null when it is not archived.

Purging a run or an agent made here

An owner must be able to delete what a run read. DELETE /v2/runs/{id} purges a run that is not live; what it cost stays in every total.

Deleting an agent another system owns

An agent made by an inline run (POST /v2/runs with external) belongs to the system that sent it, which may have to delete what it sent. DELETE /v2/agents/{id} deletes such an agent whole, in three steps, each done before the next:

  1. The agent refuses new runs: its archived_at is set (only this delete sets it on such an agent, whose archive route is refused) and its triggers are turned off in the same write, so the refusal outlives a restart. From then a run of it, an inline run of its reference, a trigger's firing, an SDK run and a message that would open one of its finished runs again are 409 agent_not_runnable, saying it is being deleted; so is a new trigger of it (off too), a trigger moved to it or one of its turned on, and a write to its home or its learning (a home file's write or delete, a corrections.md edit, a learned workflow's approve, retire or restore, a run's grade, a replay). Such a write sent while a DELETE runs waits for it, then finds the agent gone (404), so none lands after its learning went. Each of its runs still going, its learning runs included, is cancelled as POST /runs/{id}/cancel cancels it, and the delete waits until every one has ended.
  2. Its learning is deleted by the learning module: every file of its learning folder, then its promotions and grades. It refuses while learning work of the agent is in flight: 409 learning_busy, naming that work in details.runs.
  3. The rest: its triggers (and what each registered at its source), its saved sign-ins (and each object at its vendor), its own computer, its Archil disk, each run with everything kept of it (its journal, launch record, messages, origin, live view, channel posts, kept learning, files and scratch folders, and the answers kept under its idempotency keys; a request still at work under a key when its run went keeps no answer, so a key never replays a deleted run), its revisions and the agent. A run whose launch named an Archil disk (archil_disk, the caller's) kept its folder there, under the agent's own folder: that folder is deleted on the disk, and the disk and everything else on it are kept; a disk Archil says is gone has nothing left to delete. Shared things are kept: MCP servers, keys, paired computers and uploads. What the agent owns elsewhere is deleted there before the record here that names it (a trigger's registration and its settings before its row, a sign-in's object at its vendor before its tombstone, the disk at Archil before it is forgotten, a run's folder on a disk its launch named before its launch record), so a failure or a crash never leaves one with nothing here to reach it.

204 once it is gone; a second DELETE, or one of an unknown agent, is 404. 409 runs_in_flight (a run did not end within 30 s, or only its application ends it, as an SDK run), 409 learning_busy and 503 unavailable leave the agent refusing runs: send the DELETE again. 503 says which thing it owns elsewhere is not deleted there yet: a trigger's registration (Composio failed), a saved sign-in (its vendor failed), its own computer (its provider has not deleted it), its Archil disk (Archil failed or was not reached, a run of another agent is on it, or Archil is off on this server with a disk still stored on the agent: turn Archil on again first), or a run's folder on a disk its launch named (Archil failed, a computer still holds the folder, or Archil is off), or a trigger that reached the agent after the delete removed its triggers (the next DELETE removes it, its registration upstream first). A delete stopped part way (a crash) is finished the same way: every step is safe to do again.

The console

Open the link the server prints, once, in a browser. / is the console (apps/console in the repository), on the server's own origin, under a CSP that allows that origin only, but for the provider icons on the Keys page (below):

  • Mission Control: the store's counts, imported history, analytics and the latest runs, available before the first server-run agent and without a model-provider key. Its introduction is dismissible. Connect agent and Query use the coding-agent selector; the page refreshes when you return from your coding agent.
  • Agents: Build opens a description composer and local starter templates; Connected agents lists definitions, with archived ones behind Archived. Build, edit and run actions share the remembered coding-agent dropdown, including API playground. Choosing a template prepares its full definition without creating or running it. Each agent opens an overview beside its runs, versions and supported workflow, learning and analytics tabs.
  • Learning Dojo (#/dojo): learning across connected agents, read from this server. It shows each agent's corrections and learned workflows, workflows waiting for review, and recent changes with their source runs. Open an agent's Learning tab to inspect its knowledge, enable learning, or review a pending change. Counts say when a read is incomplete; missing results are not shown as zero.
  • API playground: create an agent with POST /v2/agents, edit its definition with PUT /v2/agents/{id}/definition, query runs with GET /v2/runs (or one agent's runs), or start a run on the revision you pick and follow it live. Query links retain the agent, state and archive filters. Build descriptions and templates carry into the editable create request. Edits preserve other configuration and use If-Match (412 when another revision came first). Definition management does not require a model-provider key. The existing detailed editor remains available at #/agents/{id}/edit, including making an older revision current.
  • Runs: every run, newest first, filtered by agent and by state, archived runs behind Archived; the address keeps the filters. A run's page follows GET /v2/runs/{id}/timeline with a long poll, sends messages (an answer while it waits on ask_person), stops or cancels the run, shows its files and a workflow's graph, and has Archive or Unarchive.
  • Settings → MCP servers: add a remote MCP server (its name, address and credential: none, a bearer token, headers, or Sign in with OAuth), Preview its tools and protocol, then Save; each saved one with its tool count and its credential's state, Refresh, Change (a credential left empty keeps the saved one) and Delete. An agent's Tools step lists each saved server's tools; a box ticked grants mcp:<server>/<tool>.

A run that reports learning also has a Learning result panel: the outcome, the corrections and workflow it kept, the checks' problems, and the seed and merge revisions. Its changed files remain available beside the result. The agent's Learning tab refreshes after returning to the console and while visible, without replacing an open edit or review.

Its files (index.html, and Vite's hashed files under /assets/) are public and hold no data: everything it shows comes through /v2. With accounts on (the default) the console asks for the owner's password (your password) and the browser holds the owner's session cookie; a ?token= link sets no cookie: the token is for scripts and the CLI. With AGENTRUN_ACCOUNTS=0, the printed link (/?launch=<code>, a code each start makes at random) gives the browser a console session: a cookie (HttpOnly, SameSite=Strict, Path=/, and Secure when X-Forwarded-Proto says https) whose value is an id made at random and kept by the server, and sends the browser to the same address without the code. Nothing about it is derived from the API token, and a ?token= link sets no cookie there either, so the token alone never holds a console session (and so never writes a secret, below). The session lasts until the browser closes or the server stops; the next start prints its own link. Without it, the console says to open the link. Either cookie takes the place of Authorization: Bearer on /v2: for a GET, and for any other method only when the request's Origin is the server's own origin and its body is application/json, or, on a PUT or POST to a route that takes bytes (PUT /v2/files/{id}, POST /v2/files), of any content type. A request that sends an Authorization header is checked on that header alone.

The repository's npm ci && npm run build builds the console (apps/console) first, and the server's build copies it into dist/console; the image always carries it. A server built without it answers / with a 404 that says so. /console/ (the console's address before) and /setup and /sign-in (the old page's, which the printed setup link still names) send the browser to /, which keeps a link's #code.

Your password

AgentRun Server is for one person, who signs in to the console with a password (AGENTRUN_ACCOUNTS=0 turns this off). With no AGENTRUN_PUBLIC_URL, listening on loopback (the default), the start prints Set your password: <url>/setup, and the first visit sets it, 12 characters or more. With a public address, or listening on any other address (0.0.0.0 in the image, a LAN address), the start prints Set up this server: <url>/setup#code=<code>, and setup takes that code (or the token, in the code field or as the Bearer): anyone who reaches the port could otherwise set the password first. A code works once and lasts 30 minutes. POST /v2/setup/code, with no credential (the console's Get a new code), prints a new one to the log when the last is expired or spent and keeps one still good, so this request never voids a link someone holds; it answers {printed, expires_at}, never the code, and 403 once the password is set, while it is being set, or where setup takes no code. A restart prints a new code too. The server keeps a scrypt hash of the password, never the password, in DIR/owner.json, and signs its session cookies with the key in DIR/.session-secret; both are 0600, and no run reaches either. A session lasts 30 days. Sign out (POST /v2/auth/sign-out) signs out this browser: its session is revoked on the server (a copy of its cookie stops working too) and its cookie cleared, and every other browser stays signed in. Sign out everywhere (POST /v2/auth/sign-out-everywhere) ends every session on every browser and phone, this one too.

Sign-in tries are limited, and never for good. Each address (an IPv6 one by its /64) has ten tries in 15 minutes; past them each next try waits a second after the last, twice that the time after, never more than a minute. The whole server takes 100 wrong passwords in 15 minutes; past them every try, from any address, waits the same way after the last wrong one. A refused try is a 429 that says how long (retry-after, retry_after_ms). The limit counts up to 10,000 addresses at once; a new one past that is held by the server's budget only, and no address counted is ever dropped to make room. Behind a proxy every visitor would be the proxy's address, so one guesser would hold the owner too: set AGENTRUN_TRUSTED_PROXIES to the proxy's addresses or ranges (comma-separated, or loopback, linklocal, uniquelocal), and a request from one of them counts under the client its X-Forwarded-For names (the nearest address that is not itself a trusted proxy). Unset, that header is never read. A trusted proxy only changes which address a sign-in try counts against, never who the request is: X-Forwarded-For signs no one in, and the whole server's 100 wrong passwords still hold. So with a wide setting such as uniquelocal (10/8, 172.16/12, 192.168/16 and fc00::/7; the VPS installer's tailnet mode sets it, since tailscale serve reaches the server through Docker's private bridge), anything on those ranges that fakes the header, an agent's Docker box among them, can only spread its tries over more addresses. The owner's first sign-in of a start (the right password) that comes with X-Forwarded-For from an address the server doesn't trust is logged once, with that address (event=forwarded_untrusted peer=<address>; a server from a release after 0.1.0-beta.32). Only the right password logs it, so the address is the one that carried the owner's own request: behind a proxy, the proxy's. render.yaml leaves it unset, as Render publishes no address for its proxy: after a deploy, sign in, read the forwarded_untrusted line in the service's Logs, and set AGENTRUN_TRUSTED_PROXIES to that address (or its range, when Render's proxy reaches the service from more than one; sign in again after a redeploy to see whether it moved).

Forgot it: run agentrun-serve reset-password --data DIR where the data directory is (docker exec agentrun node /opt/agentrun/packages/serve/dist/cli.js reset-password --data /data in the image). It clears the password and signs every browser out, and the next visit sets a new one. The token works for scripts and the CLI either way.

A browser's writes must come from the server's own origin. Serve the image on another address or port behind a proxy, and set AGENTRUN_PUBLIC_URL to the address people open. Behind a proxy every sign-in comes from the proxy's address, so the limit is one for everyone: ten wrong tries in 15 minutes, from anyone, keep the owner out until the window passes (the token still works for scripts meanwhile). Serve it over https where you can: on plain http a browser sends the session cookie to every server on the same host name, whatever its port, so another app on that host could read it.

Importing your sessions

For completed history on another machine, use Connect agent → Another machine with History only scope. The matching source connector previews the selected project and runtime, then uploads only with the source operator's approval and a destination owner grant that permits history. It starts no execution worker or paid task. See the remote history guide. Imports remain history, not live connections or automatic learning.

The separate local-store CLI importer below requires an approved maintenance window. Verify the source machine, this server's actual data directory, store configuration, seal key and supervisor without exposing credentials. Preview the scope with a dry run and inspect active work before stopping the existing server and runners through their supervisor. Import into the same store, then restart and verify that service, including after an import failure. Never bypass the store lock. This local-store operation has no server endpoint that reads sessions from the browser's machine; importing into a different local store does not populate a remote console. Build, edit, run, query and connection handoffs use the shared coding-agent selector and target this server's matching skill, MCP endpoint and API.

agentrun-serve import --data DIR reads the Claude Code, Codex and pi sessions in your own home (~/.claude/projects, ~/.codex/sessions, ~/.pi/agent/sessions) into the data directory, once. Each project folder becomes an agent, with its CLAUDE.md or AGENTS.md and its skill folders, and each session becomes a run you can read but not continue. Nothing leaves this machine, and the values of key-shaped environment variables are cut out of what it writes. Run it again and it takes only what it has not taken already. Sessions written in the last 10 minutes wait for the next import.

A run's cost is what its source recorded (Claude Code's and pi's). A session its source did not price, such as a Codex session, keeps the model catalog's estimate for its tokens beside an unknown cost, and every place that shows a run's cost reads that estimate, as an estimate: the run (cost.usd, basis estimate), its usage row, GET /stats and its analytics, and GET /usage. A session on a model the catalog does not price stays unknown.

  • --dry-run lists what it would import and writes nothing.
  • --from claude-code,codex,pi picks the sources.
  • --include-deleted also imports the sessions of project folders that no longer exist, such as a git worktree you deleted. Each such folder is still its own agent, with no instructions or skills to read.
  • --all keeps those too, as well as sessions of temporary folders and sessions with no message of yours.
  • --verbose lists each file it leaves out, and why.

The dry run and the import both end by counting what they left out, by why, with the flag that brings each kind in:

left out: 84 sessions from folders that no longer exist (--include-deleted imports them too)
left out: 2 sessions still being written: they come in next time

A run's life

Learning

Learning is off unless an agent's definition says learning: true (an agentic one: a workflow refuses the field). A definition that sets it keeps it on its revision, false included, and an edit that leaves it out keeps the agent's; one that never sets it stores nothing, so its revision id is the one it had before the switch. The server's --learning off turns learning off for every run it starts, whatever the agent says.

A run's cost: its tokens and its basis

A run's cost (on GET /runs/{id} and on each row of GET /runs, costbasis/1) carries its model requests' tokens and says how its figure was reached.

  • tokens: input (cached input left out: the whole input is input + cache_read + cache_write), output, cache_read, cache_write, requests (every model request the run's model proxy booked: its turns, its subagents, its side calls) and unmetered (those that reported no tokens: refused, cut or never answered). Read from each answer's usage as the provider or gateway reported it: OpenAI's Responses usage.input_tokens and output_tokens, Anthropic's Messages usage with its cache reads and writes, streamed or whole. Absent while the run has booked no model request and stored none; a native or SDK run reports its whole task's tokens at its end, with no request count, and none while any count is unknown. The model proxy forwards only those two APIs (/v1/responses, /v1/messages); no harness here sends Chat Completions through it.
  • basis: reported when every request priced had its provider's or gateway's own figure (LiteLLM's x-litellm-response-cost header, OpenRouter's usage cost); estimate when any was priced from a price table (the model catalog, AGENT_MODEL_PRICE, a cut request counted at its hold); unpriced when no request was priced (none sent, every one refused at $0, or none with a known figure). Paid tool calls and decisions are charged at their own figures and do not change it. A native, SDK or imported run's figure is its harness's own, an estimate; so is an imported session's catalog estimate where its source priced none (importing your sessions). LiteLLM writes no cost into a streamed answer's headers, so a run whose answers stream through LiteLLM reads estimate.
  • tools_usd (on GET /runs/{id} alone, toolsusd/1; Parallel's decisions in it since toolsusd/2): the part of usd its paid tool calls cost (monid's endpoints, MCP tools with a saved price, Parallel behind web_search and web_fetch, browser time, and a workflow decision Parallel answered on its own API, on PARALLEL_API_KEY, at Parallel's list price), as the run's ledger booked them, rounded as usd is. It is inside usd, never added to it: usd less tools_usd is what its model requests and its other decisions cost (Jev's, an OpenRouter model's, Parallel's model reached through OpenRouter). A paid call in a learning run's end-of-run turn is learning's (in learning_usd), never in tools_usd. 0 when it made no paid call. Null while a paid call's charge is unknown (as usd is then); while the run is at work (until it ended, stopped or failed); for a learning run a follow-up opened again, whose usd is what its first round had cost; and for an imported, native or SDK run, whose usd is its import's or its harness's own figure and whose tool calls the server never books. Each call's own charge is its span's usd on GET /runs/{id}/trace.
  • GET /stats (cost.basis) and GET /usage (basis) say the same words over the runs they sum: estimate when any run's is, else reported when any run's is, else unpriced. A run whose end stored no basis (one that ended before this, or a workflow run: its run read still says its basis from its booking) counts as estimate when it cost anything.

The console shows the tokens beside the run's cost, and the figure says its basis: $0.0042 est., $0.0042 reported.

A run's cost, line by line

GET /runs/{id}/usage (runusage/1) says what one run cost and where each part goes: its model requests by model, its paid tool calls by who charged for them, its browser time by browser provider. It answers "what did this run cost, and whose invoice does each part land on?" for every run that books its cost: a pi run, a run on a CLI harness that sends its model requests through this server, and a workflow run with its decisions. The console's Dev tools tab shows it under "Cost by line". Each line has its quantity as measured, its dollars as the run's booking holds them, and how those were reached. Nothing is priced here, and nothing is rounded to a billing increment or topped up to a minimum.

Spend cap

A run may name max_cost_usd, an agentic run or a workflow run (below). A run that names none takes its agent's default, the max_cost_usd of the revision it runs, kept with the revision; a run's own cap wins, since its caller chose it. A definition's max_cost_usd above 0 sets that default, and 0 clears it (no default); anything else is 422. An edit that leaves the field out keeps the agent's default, as it keeps its harness and place: leaving a field out never removes a spend limit. A workflow definition keeps one the same way. The cap is checked in the run's own process before each model request, the agent's and a compaction's alike, on every harness: what the run has spent so far, plus what each request still in flight is held at, plus the most this request can cost must stay within it, or the request is not sent and the run pauses (below). The cap is a hard stop for everything but the charge of a monid call priced by usage, which can pass the estimate it was held at: when it does, the run stops at once (monid). An MCP tool counts only at the price saved for it (its server's prices); one with none is not metered and bills its own account outside the cap. fal is counted: a job sent to a fal server (one saved with the toolkit fal, or at mcp.fal.ai) through run_model, submit_job or submit_jobs is priced before it is sent, at fal's unit price for its endpoint (the server's own get_pricing, read with the run's credential and kept five minutes) times the units the job's input states: its images, their megapixels, its text's characters, the seconds it names, or the length of the audio or video it is given, read from the file first. That price is held under the cap, a job the cap can't take is refused before it is submitted, and the job is booked as the run's tool cost, charged by the server, with the price and the count it came from. It is an estimate at fal's list price, not fal's invoice: fal reports no cost for a job, and a minimum charge, a discount or a rate that depends on a setting get_pricing does not list are not in it. A job whose units can't be known before it runs (one billed by compute time or tokens, one that names no size or length, media whose length can't be read, an endpoint with no listed price) is refused under a cap, in words that say why; with no cap it runs, booked as an unknown charge. A price saved for a fal tool takes the place of this. A request costs its input, plus the output it is sent with at the output price, plus any fee its tokens do not show (below). Its input is priced at its worst case: every input token at the higher of the input and cache-write prices, since the provider may bill any of it as a cache write and a cache can miss at any request. So no request passes the cap, a cache miss included: a request costs at most what it was held at. A request whose cost never comes in (cut, stopped, lost) counts at that hold, in this process and after a restart alike. A run whose requests read the cache spends less than its holds, so it pauses before it has spent its whole cap; output is clamped to what is left after the input (below), so a run is parked only when what is left cannot pay its next request's whole input and a least answer.

The faux model

--faux MODULE loads MODULE in each run's process. Its default export is called for every model request with the transcript (context.messages, pi's messages) and helpers, and returns pi's assistant message:

export default function reply(context, faux) {
  const asked = context.messages.filter((m) => m.role === "user").length;
  if (asked === 1) return faux.message(faux.toolCall("ask_person", { question: "Which region?" }), { stopReason: "toolUse" });
  return faux.message([faux.thinking("They answered."), faux.text("Using that region.")]);
}

startServe({ faux, fauxBrowser, fauxWeb }) also names modules whose default exports give the browser tool's { provider, driver } (fauxBrowser, which the CLI takes as --faux-browser MODULE; the others are the tests' alone) in place of Browserbase's or Kernel's (pi-browser's fake backend, told the vendor the run's plane names and the saved sign-in the run was handed: test/fixtures/faux-browser.mjs), web_fetch's direct fetch's { lookup, fetchImpl } in place of the system's resolver and undici (a table of names and pages, test/fixtures/faux-web.mjs), and, as fauxMonid, the fetch the monid tools send through in place of monid's API (test/fixtures/faux-monid.mjs). Each is honored only with faux.

faux.message, faux.text, faux.thinking and faux.toolCall are pi-ai's faux helpers; faux.signal is aborted when the turn is stopped. A workflow's model node offers the submit tool (in its system message's toolsAdded), and delivers its record by calling it. A module may also export cost ({input, output, cacheRead, cacheWrite} in USD per million tokens) to price the faux usage; unpriced, every run's estimate is $0, and with cost = "unknown" its usage carries no cost at all, as from a provider that does not price the model. The tests' module is test/fixtures/faux-model.mjs.

Safety

Test

npm run build
npm test -w @parcha/agentrun-serve

The tests start a real runner on the faux model, both kinds of run: no key, no network.