Based on AgentRun release · Synced .
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 | What it does | Needs | A workflow's model node may name it, a call node run it |
|---|---|---|---|
read |
Read a file in the run's work/; in a box, also an image (png, jpg, gif, webp, by its bytes) at any absolute path in the box, such as one rendered to /tmp, read through the box and never from the host |
nothing | yes, no |
write |
Write a file in the run's work/ |
nothing | yes, no |
edit |
Edit a file in the run's work/ |
nothing | yes, no |
bash |
Run a shell command in the run's box, from its work/: pi's {command, timeout?}, 120 s when the call names no timeout and at most 600 s (a longer one runs at 600 s and says so; longer work is bash_background) |
an agentic definition whose place is a sandbox (Sandbox), or one on the runner in Mode 2 (Archil's serverless exec, at most 295 s) | no, no |
bash_background |
Start a shell command in the background in the run's box, from its work/, and answer its id at once: {command, tty?} in, tty: true for a terminal. Its stdout and stderr go to work/background/<id>/output.log, the first 16 MiB; at most 8 run at once (background processes) |
an agentic definition whose place is a sandbox | no, no |
bash_output |
Read a background process's output from a byte offset: {id, offset?, max_bytes?} in (at most 48 KiB a call), its state, exit code, the log's size and the next offset out |
an agentic definition whose place is a sandbox | no, no |
bash_input |
Write to a running background process's stdin: {id, text, close?} (at most 64 KiB a call) |
an agentic definition whose place is a sandbox | no, no |
bash_signal |
Send a background process's group TERM, INT or KILL: {id, signal} |
an agentic definition whose place is a sandbox | no, no |
bash_list |
List the run's background processes: id, state or exit code, output size, start time and command | an agentic definition whose place is a sandbox | no, no |
ask_person |
Ask the person who started the run; the turn ends until a message answers | nothing | no, no |
web_fetch |
Read one web page from a public host through the guarded direct fetch, or through Parallel's extract where Parallel is picked (search and fetch), a part at a time: {url, offset?, max_chars?} in, a Page out, {ok, url, status, title, text, chars, truncated?, original_chars?, beyond_read?, offset?, next_offset?, html_chars?, converted?, links, links_omitted?, via, parallel?, refused?, error?} |
nothing (PARALLEL_API_KEY for Parallel, one billed extract a page a run) |
yes, yes |
web_search |
Search the web, natively where the harness or the model's provider can, else through Parallel where the server holds its key, else keyless through Exa, or through the provider picked (search and fetch): {query, n?} in, {provider, query, results: [{url, title, snippet, published?}], text?} or {error} out |
nothing (PARALLEL_API_KEY for Parallel) |
yes, yes |
web_save |
Download one file from a public URL into the run's work/ and keep it there, for a link that expires (a generated image, audio or video): {url, path} in, path relative to work/ and a bare name under media/; {ok: true, path, bytes, content_type, duration_s?, url} or {ok: false, url, refused | error} out, duration_s an mp3, wav, mp4 or m4a's length in seconds read from its bytes. Never overwrites |
nothing | no, no |
browser |
A hosted browser, Browserbase's or Kernel's, on pi-browser's durable adapter: snapshot, run, screenshot, browser_read, browser_release, browser_relaunch, browser_downloads and browser_upload (into and from the run's work/); Kernel keeps no downloads, so a run on Kernel has no browser_downloads |
BROWSERBASE_API_KEY and BROWSERBASE_PROJECT_ID, or KERNEL_API_KEY |
yes, no |
monid:<provider>/<endpoint>, monid:<provider>/* |
One monid endpoint, or every endpoint monid lists for a provider (at most 50), each pinned at the save and run as a tool of its own, paid per call from the monid wallet: {body?, queryParams?, pathParams?} in, the run's output, price and cost out (monid) |
MONID_API_KEY |
no, no |
pdf_pages |
A workflow call only: {path, maxPages?, dpi?} in, {name, pageCount, dpi, pages: [{page, image}], text} out. Draws a document's first pages (3 by default, at 110 dpi) as PNGs under the run's work/pages/<stem>/<dpi>/ (<stem>: the document's path below its directory made one name, with a short hash, so two documents of one file name never share pages), the dpi lowered so a page's long side is at most 1568 px, with its text (pdftotext, cut at 20,000 characters). A PNG or JPEG passes through as one page, scaled down to 1568 px. path is under --documents or the run's work/, never outside |
pdftoppm, pdftotext |
no, yes |
llm |
A workflow call only: {prompt, system?, maxTokens?, tier?} in, {text, model, usage, cost_usd} out. One completion on the run's model of the tier (default; a tier the state fills in, such as "{requestedTier}", may be any of the three, and a tier with no model fails the call), no tools and no loop; cost_usd is null when the model has no price, never 0 |
a model | no, yes |
subagent |
pi only: {prompt, tools?, model?, effort?} in, the child's last text out, bounded like a host tool's result. Runs a fresh conversation whose whole task is prompt, with tools a subset of the agent's own (by catalog or session name, MCP tools and bash included; absent, none), on the agent's own model or the tier model names (fast or strong: the definition's model_tiers, else AGENT_MODEL_FAST / AGENT_MODEL_STRONG, else the agent's own model) (subagents) |
a pi run | no, no |
bash and the background tools run only in a box: a runner agent, and a workflow, get no shell on this machine (see Safety). In a
sandbox place read, write and edit run in the box too.
A call tool that fails on its own (an unreadable PDF, a model's refusal) fails its call node; inside a map with
onItemFailure: "collect" it fails that item, and the other items go on. A cancel or the node's deadline still
stops the run.
web_fetch's direct fetch reaches public hosts only, through pi-browser's guard (publicFetch): each redirect hop is
resolved, every address it resolves to is checked, and the connection is dialled at the address checked, so a
loopback, private, link-local, carrier-grade or metadata address (127.0.0.1, 10.x, 169.254.169.254, fc00::,
::ffff:127.0.0.1 and the like), a name such as localhost, a public name that resolves to one of them and a
redirect to one are all refused, as is any scheme but http(s). A URL on a port other than 80 or 443, or longer than
4,096 characters, is refused before the guard is asked. A body is at most 5 MiB and a fetch at most 30 s. A Page holds
a part of the page's text: about max_chars characters from offset (20,000 by default, at least 200, at most
50,000; a quote or a line break counts two, as the JSON answer holds it, and a part holds one character at least, so
it always advances), its length as chars. A part that is not the whole page says so: truncated while more follows,
next_offset where it begins, original_chars the page's whole length where it is known, and for an agent a line
after the JSON says which characters these are and the call that reads on. A page whose HTML is longer than 1,000,000
characters (scripts and styles aside) is cut before it is read: every part gives html_chars, the page's whole
length, and no original_chars, its text is the start of the page, and the last part's line says The page was cut at 1,000,000 characters of HTML before reading; the rest wasn't read. converted: "text" says the text is the page's
plain text, its conversion to markdown having run out of time. A page is read to its first 1,000,000 characters: an
offset at or past them is refused, and the last part a read reaches of a longer page has beyond_read. The links,
absolute http(s) only, each once without its fragment, are the page's link targets and the URLs written out in its
text (a JSON body's: those of its string values, so an API's url or shortlink field is one; an XML body's, an Atom
or RSS feed's, read with its entities undone, so an entry's <link href> is one); an HTML page fetched
directly gives its link targets alone. They come with the part at offset 0: at most 200, in 20,000 characters, with
links_omitted counting those left out. A page is fetched once a run, at the first call for its URL, through either provider, and the
run keeps what it read of its last 8 pages by the URL asked for: every later part of that URL comes from it, with no
request, so a page's parts are always one read's. Through Parallel that is one billed extract a page a run, asked for
its first 1,000,001 characters (the extract has no offset: its text always starts at the page's start). A refusal or a
failure is a Page with ok: false and refused or error, never a thrown error: an agent reads why, and a workflow
can branch on it. An agent gets the Page as JSON text; a workflow's call node via: "tool", tool: "web_fetch" gets
it as its output (args: {url, offset?, max_chars?}, 50,000 characters of text by default, out a schema of that
shape). A call node naming a tool the table cannot run that way is refused before the run starts (409).
web_save {url, path} downloads one public file through the same guard (pi-browser's publicDownload, the same hop
loop), at most 200 MiB in at most 10 minutes, into the run's Workspace (a bare name goes under media/), so .., an
absolute path and a link are refused, and a path already in use is refused, never overwritten. The file is written once,
after the whole download, so a failed one leaves nothing. An image, audio or video is saved only when its bytes, the
declared type and the path's extension agree (media/card.png, never media/card); any other type only to a path whose
extension names the declared type. A saved mp3, wav, mp4 or m4a answers its length in seconds, duration_s, read from
its bytes (media-duration.ts); other files answer none. It makes no paid request and is never run again after a crash.
Only an agent that names web_save has it; no workflow node or call node may name it.
On another harness, every host tool's result reaches the model within the host's bound of 120,000 characters
(HOST_RESULT_MAX_CHARS, @parcha/agentrun-kernel): the kernel's tool bridge cuts a longer one, its start with a line
saying where it was cut, and flags the call truncated. Each CLI adapter tells its CLI to pass a result that long to
the model whole: the Claude Agent CLI would otherwise save a result past 50,000 characters to a file and tell the model
to read it, which a run's confinement refuses, Codex keeps only the ends of a result past 10,000 tokens, and OpenCode
would cut one past 2,000 lines or 51,200 bytes and save the rest to a file the session has no tool to read. A
web_search answer past 100,000 characters leaves out its least relevant results, omitted counting them.
Finding and calling the run's tools
A run lists every tool to the model in full until its catalog tools (an MCP server's, a monid one) pass 20
(DEFER_CATALOG_OVER, defersCatalog in the kernel). Then they are deferred: not listed, found with tools_search and
run with tools_call (built-ins and pi's own tools are always listed). Under 20, there is no search or call: they
would find tools the model already has, at about 640 tokens on every request. Claude Code defers MCP tools itself (its
ToolSearch), so it is offered neither of the two; Codex has them and keeps its own code mode. The server makes one
decision for every harness (SessionSpec.deferCatalog: past 20, with both tools_search and tools_call allowed), and
Claude Code's adapter turns its ToolSearch on exactly then (ENABLE_TOOL_SEARCH, claudeToolSearch). codemode is
offered on every run (not Codex). Each of the three has a tool-settings key of its own, allow by default: set to deny,
it is not offered at all, and a call to it is refused. A deny of tools_search or tools_call therefore lists every
tool in full, on Claude Code too, where its ToolSearch is off. Settings → Tools lists the three (in
capabilities.tools with meta: true), each allow or deny; no agent grants them, so the agent editor does not offer
them. None of them goes around the run's tool settings:
tools_search {query, limit?}ranks the run's tools by what they do and answers each match's name, description and input schema (8 by default, at most 25). It finds only tools the run may call: never one set to deny, and never these three.tools_call {name, args}calls one of the run's tools by name. The call is the tool's own: it is asked about at the gate by that tool's name, and recorded and booked under<callId>/call. An ask parks the run, a deny refuses it in the gate's words, and a name the run has no tool by (or one of these three) is refused in words with nothing run.codemode {script}runs a JavaScript script (the body of an async function) in a QuickJS sandbox. Itsawait tools.<name>(args)calls are each the tool's own call, under<callId>/s<n>, answered one at a time. A tool is named asALL_TOOLSgives it; the description shows the first three (tools.<name>) and says to leave off the prefix a harness shows in the model's own tool list (hands_,mcp__hands__). The sandbox has the tools and nothing else of the run: no environment, key, file, network or timer. A tool's image (a screenshot) reaches the script with its pixels:image(shot)shows it to the model, and a returned one is the answer's image, its data never in the answer's text. A script runs at most 10 minutes in 256 MiB. A call that needs approval parks the run, and the script follows Codex's rule. Once a person answers, the script runs again from its start, and the calls it already made answer from their records. The parked call runs once (or is refused), its outcome is the script's answer, and the rest of the script does not run. The answer lists each call before it with its result as the script read it: a JSON value as itself, never quoted. A refused call ends the script with the refusal. A call cut off by a crash is told as possibly done and never run again.
A paid call made through tools_call or a script is held at its price before it is sent and settled once, as a direct
call is, so the cap holds it. A run with a desktop or a phone has this same codemode, its computer's tools among
the ones a script calls (see Computers).
Subagents
subagent is one primitive: a prompt, a fresh context and a subset of the agent's own tools, on the agent's own model
unless the call names a tier. A child keeps the run's gate, so the agent's permissions and bash policy (read-only)
hold its tool calls too, and every request it makes books on the run's one cap. It goes one level deep (a child is never
given subagent or ask_person), and at most 4 children of a run work at once; more wait. The run's timeline nests each
child under its call, and the run's cost counts every child's requests. How to split work and merge answers is the
agent's own instructions, never the engine's.
A call may set its child's effort (low, medium or high), its thinking level; absent, the child thinks as the agent
does. So one template can run wide reviewers at medium and deep ones at high. The run's cap bounds every child's work.
A child is a conversation in the run's own journal, owned by its call, so it lives and ends with the run:
- A restart or a moved claim resumes it. The next claim finds the same child, which answers its call once. A request
it had finished is never sent again, and one the stop cut is sent again. A child on a tier whose model changed in the
meantime (the server's
AGENT_MODEL_STRONG, say) resumes on the tier's model now. - A cancel stops every child with the run: their requests are aborted, and nothing more is asked.
- The cap. When the run's cap refuses a child's request, the child stops and its call fails in the cap's words
(
subagent: it stopped before it answered: ... spend_cap_reached). The run's next request is refused the same way, so the run parks at its cap (input_required, abudgetpending) and sends nothing more. A raise resumes the run, not the child: the agent reads the failed call on its next turn and may callsubagentagain, which starts a fresh child. On a capped run, a call on a tier whose model has no known price is refused before any child starts.
Patterns
Sample K, merge, verify. One pass misses what a second finds, and states things neither would confirm. A template's skill can ask for K passes and check their union, with no engine support beyond the tool:
- In one turn, make K
subagentcalls with the same prompt and tools (K of 3 or 4 run at once; more wait their turn). Each starts from a fresh context, so the answers vary the way independent samples do. - Merge the K answers: dedupe the items that say the same thing about the same place, and keep how many children found each.
- Before acting on a kept item, re-check it with the parent's own tools: open the file, page or record it cites and confirm it says what the item claims. Drop what does not hold. Agreement between children orders the checks; it is never the check.
It fits any agent whose answer is a list:
- Research: children answer with
web_searchandweb_fetch; the parent re-fetches each cited source before it writes. - QA: children run one test plan with
browser; the parent reproduces each finding before it files it. - Extraction: children pull a document's fields with
read; the parent reads the page again for any value they differ on. - Code review: children read a diff with read-only
bash; the parent re-reads each finding's lines before it posts.
Each child books on the run's cap, so size the cap for K passes, not one.
Search and fetch
web_search and web_fetch work on every harness with only a model key. Each resolves, for a run, in one order: (1) the
provider the user picked, optional: the agent's own (definition.tool_settings) over the server's
(PUT /settings/tools); (2) the native tool, the harness's own or its model provider's hosted one (on claude-agent
only where it is picked: auto there skips Claude's own search, an explicit native pick); (3) for
web_search, Parallel, where the server holds a Parallel key (PARALLEL_API_KEY in its environment, or one saved on Tool
keys): auto then uses that key and bills it, each search booked as the run's cost ($0.001 a search); (4) the kernel's
keyless fallback. A revision's tools (and a pack's grant) names the capability, never a provider. On codex, auto is
Codex's own search, except behind a gateway, on OpenRouter (which runs neither Codex's nor Claude's own search, and
counts no searches to price) or under a spend cap (its request has no input bound, which a cap cannot
admit), where it is Parallel on the server's key, else keyless Exa. off turns web_search off: nothing is searched,
and an agent naming it is refused (409) until it is turned on again. A pick of exa-keyless is keyless Exa alone,
the key held or not.
A workflow's model nodes may each run on another tier's model, so a workflow's web_search never searches natively:
it is Parallel on the server's key, else keyless Exa, or the provider picked, and a pick of native alone is
unavailable for a workflow.
claude-agent |
codex |
pi | |
|---|---|---|---|
web_search, auto (the default) |
Parallel on the server's key, else keyless Exa: Claude's own WebSearch is the native pick |
Codex's own search, each search booked; behind a gateway, on OpenRouter or under a spend cap, Parallel on the server's key, else keyless Exa, a host tool | one request to the run's own model provider with its hosted search (Anthropic, OpenAI direct); behind a gateway (AGENT_MODEL_BASE_URL) or on another provider, Parallel on the server's key, else keyless Exa |
web_search, native |
Claude's own WebSearch, unavailable on OpenRouter or under a spend cap | the same, unavailable behind a gateway, on OpenRouter or under a spend cap | the same, unavailable where there is none: never keyless Exa |
web_search, off |
unavailable (web_search is turned off in settings): nothing is searched |
the same | the same |
web_search, exa-keyless |
Exa's public MCP search, a host tool | the same | the same |
web_fetch, kernel (the default) |
the guarded direct fetch | the same | the same |
either, parallel |
Parallel's search and extract, host tools | the same | the same |
GET /settings/tools answers the server's settings, {web_search: {provider}, web_fetch: {provider}, browser: {provider}}, the default
where none is set; PUT /settings/tools takes the same map and replaces it (a capability it leaves out takes its
default). An agent's definition.tool_settings has the same shape and is over the server's. A provider is one offered
for its capability (auto, native, exa-keyless or parallel for web_search; kernel or parallel for web_fetch;
auto, browserbase, kernel or chrome for browser, below); an
unknown capability or provider is 422. Any tool's settings also take a permission, allow, ask or deny, which the
tool gate holds every call to (an ask parks the run for the owner's approval), and an MCP tool's a pin, the arguments
its calls must carry (MCP servers, 422 for one that is not one); a workflow's call node, which cannot wait
for an approval, refuses its run when its tool is set to ask or deny (409, details.asks or details.denied). The
settings are kept in the data directory
(tool-settings.json, 0600, written whole and durably), not a secret, and read by every run launched from then on.
GET /capabilities is the one tool catalog: each of the three tools there gives the providers offered (providers), the
server's (provider, its default where it sets none), the built-in default (default_provider) and resolves, what it
resolves to on each harness under the server's settings and default model (native, kernel, exa-keyless,
parallel, or unavailable: <reason>), with why, keyed the same, one plain sentence for each (Codex's own search,
behind a gateway Codex has no own search; your Parallel key (saved), where saved is a key saved on Tool keys and
server one in the server's environment), both recomputed at each PUT and each key saved or deleted. GET /agents/{id} projects it onto the agent:
tools, each tool its current revision grants in the same order, and for one with a choice the provider in force,
provider_from (agent, its own tool_settings; server; or default), default_provider (the server's) and
resolved, on its harness and model. Parallel picked where
the server holds no PARALLEL_API_KEY resolves unavailable: parallel picked, no PARALLEL_API_KEY, never to another
provider: a revision naming the tool saves with a warning, and its run is 409 with details.missing.
The server resolves a run's tools at its first launch, from its pinned revision and the settings then, keeps the outcome
in the run's serve.json for the run's life (a later PUT changes the next runs, never a run already started; a
Parallel key gone since makes Parallel unavailable, never another provider), and hands its process the outcome as a
description with no secret in it (AGENTRUN_SERVE_TOOL_PLANE); the run reads its providers there, never from a request.
A workflow's tools are those its revision lists and those its model and call nodes name.
Upgrading to the tool gate: a workflow whose call node's tool is set to ask, by a setting or a default, now refuses its
run (409 with details.asks); set that tool to allow for the agent (definition.tool_settings). Built-in tools are
allowed by default; catalog (monid:<provider>/<endpoint>) and MCP tools, which ask by default, are no call node's tools here.
Upgrading: a server holding PARALLEL_API_KEY used to read every web_fetch page through Parallel's extract on its own.
Now web_fetch is the guarded direct fetch unless Parallel is picked; to keep the old behaviour, set
PUT /v2/settings/tools {"web_fetch": {"provider": "parallel"}} once (or tool_settings in an agent). Parallel's key reaches an agentic run only when one of its capabilities resolves to Parallel (see
Decision workflows), and a web tool reaches Parallel only where its own capability does.
pi's native web_search is one standalone request, as Claude's CLI runs its WebSearch: one user turn carrying the
query and an instruction to answer with sources, on the run's own model and key, with the provider's hosted tool added
and nothing else (Anthropic's {"type": "web_search_20250305", "name": "web_search", "max_uses": 5}, OpenAI's Responses
{"type": "web_search"}). The results, their citations and the search count are read from the provider's own events;
nothing of the request enters the run's conversation but the tool's answer, with text, the provider's own short
answer with its sources. A pause_turn
answers what it has, and nothing is retried. It is booked as one of the run's requests: its tokens at the model's price
plus $10 per 1,000 searches (Anthropic) or calls (OpenAI).
With no native search and no Parallel key, web_search falls back to Exa's public keyless MCP endpoint, a third-party
service with its own rate limits (unpublished) and its own terms (https://exa.ai/terms). To turn it off, set
web_search to native (native only) for the server (PUT /v2/settings/tools) or for an agent (tool_settings). To
search with a key instead, save a Parallel key on Tool keys (or set PARALLEL_API_KEY): auto then searches through
Parallel and bills the key.
Keyless Exa is one exchange with Exa's public MCP endpoint (https://mcp.exa.ai/mcp, its web_search_exa tool, at most
8 results, no key), dialled over IPv4 alone: the server looks Exa's name up for IPv4 and connects to that address, since
Exa takes keyless use only over IPv4, straight to its endpoint (through a proxy it answers 403, said by name). Past its
free limit Exa answers a 429 with a Retry-After, or a tool result it marks rate-limited (ai.exa/rateLimited); the
search is tried once more after a jittered 1 to 3 s, or the Retry-After Exa names when it is 5 s or less (a longer one, as
for its daily limit, is not waited out). Still limited, the tool answers {error} in our words: Free web search is rate-limited right now. Try again in a minute; add the free Parallel Search server in Settings → MCP servers and grant the agent its web_search; or add a Parallel key in Settings → Tool keys to search with a key. Any
other failure Exa answers reads Free web search failed. Exa said: "<the first sentence of its text>", cut at 120
characters; Exa's own instructions (a key for its MCP URL) are never passed on.
Every provider answers one shape, {provider, query, results: [{url, title, snippet, published?}], text?}, provider
naming the one that served it (native, exa-keyless, parallel), each snippet cut at 3,000 characters; the answer
the model reads ends with one line asking it to cite the URL of each result it relies on.
web_fetch answers a Page with via, a part of the page at a time (offset, max_chars, as above). With Parallel
picked the page is read through Parallel's extract (POST https://api.parallel.ai/v1/extract, its full content as the
text, about $0.001 an extract, one a page a run) and via is
"parallel", with status 200 and the absolute links of its markdown; when Parallel lists the URL in its errors, answers
with no content, a 5xx or not within 60 s, it is the guarded direct fetch, via: "direct", with parallel saying why
Parallel gave no page (refused the key (401), answered 503, timed out, listed the URL in errors, not tried: refused earlier in this run), and the model reads a line saying so; a 401 or 403 stops Parallel for the rest of the
run. A fetch Parallel was not picked for says nothing of it. A URL passes the guard's own check before anything is sent to Parallel: a URL the guard
refuses is refused and never leaves the machine. A call stopped before its page arrived answers ok: false with
via: "stopped": no page came for it (the run's read of the URL goes on for its other calls).
web_search through Parallel uses its Search API (POST https://api.parallel.ai/v1/search, its fast mode, about
$0.001 a search). On every provider the query is cut at 200 characters and n is 1 to 25 (10 by default). A result is a lead: the agent reads the page with web_fetch. A failure answers
{error}, with nothing searched instead; a 401 or 403 to either web tool stops Parallel for both for the rest of the run.
Parallel's fees are the run's spend, booked as monid's are: each search and each page Parallel extracts is marked in the
run's records before it is sent (agentrun.tool_started, held at its price) and settled once Parallel answers
(agentrun.tool_cost: tool web_search or web_fetch, charged_by "parallel", usd), shown on its timeline
(Tool cost: parallel charged $0.0010 for web_search), summed into its cost and under /usage's tools meter. Parallel
answers what it used as counts, never an amount, so each is booked at Parallel's published price
(docs.parallel.ai/resources/pricing, read 2026-11-20), an estimate: a
search by its mode, turbo or fast $0.001 and basic or advanced $0.005, each for up to 10 results, and $0.001 for
each result past them (web_search always searches fast); an extract $0.001 a URL. A search in a mode with no price
here, or naming none, is never sent, as an endpoint with no price is not; on a 4xx other than a 408 nothing (Parallel refused it), and on a 408, a 5xx, a timeout or a lost
connection its price (Parallel may have billed it). Under a spend cap each is a paid call: sent only when
what the run has spent and holds, plus its price, fits the cap. Otherwise nothing reaches Parallel: a search answers the
cap's refusal (spend_cap_reached: Not sent: this run has spent $0 of its $0.0009 cap, and the next step, Parallel's search, could cost up to $0.001 …) and a page is the
guarded direct fetch, with parallel giving the same words. One sent holds its price until Parallel answers: a model
request checked meanwhile, from any branch, tool round or harness, counts it beside what the run has spent, so the two
never pass the cap together. A workflow's call node naming either tool is booked the same way, under the node's own
call (its execution path).
Keyless Exa, where web_search resolves to it, searches through Exa's public MCP endpoint (https://mcp.exa.ai/mcp, its
web_search_exa tool), with no key. What leaves the server is
the search query (cut at 200 characters) and the number of results asked for (1 to 8, 5 by default), nothing else
from the run, and no key. It goes to Exa over IPv4, straight from the run's process. Exa is a third party: its free,
keyless use has a rate limit it does not publish, and its own terms. Past that limit the search is tried once more, and
then is a tool error in our words (above): the model reads why and answers without it, and the run's later searches
are held for the wait. Exa answers its daily count running out the same way, naming no wait, so a second limit naming no
wait after a wait has passed (a 429 with Retry-After is a timed limit, and only waits), in the same run and with no search succeeding since, turns search off for the rest of that run. A search ends at 60 s, its retry
included, so a call never hangs. The answer is the query and its results, each a URL, a title, a
snippet of at most 3,000 characters and its date when Exa knows it, then a line asking the model to cite the URLs it
relies on. Keyless Exa is the default for a harness with no native search when the server holds no Parallel key; off
turns web_search off, keyless Exa included.
The browser tool runs hosted sessions, at Browserbase or at Kernel, never a Chrome on this machine. Which one is
picked like web_search's provider: the agent's own (definition.tool_settings.browser.provider) over the server's
(PUT /settings/tools), one of auto (the default), browserbase, kernel and chrome. auto is Browserbase where
the server holds its keys (BROWSERBASE_API_KEY and BROWSERBASE_PROJECT_ID), else Kernel where it holds
KERNEL_API_KEY, else unavailable, saying which keys would do. A vendor picked is that vendor alone: without its key
it is unavailable, never the other one. chrome, a Chrome on the server's own host, is in the list but not set up on
any server yet: it reads unavailable (a local Chrome is not set up on this server), and a run that would get it is
409. Capabilities' tools[] give the browser's providers, the server's pick and what it resolves to; a run keeps the
vendor its first launch resolved for its life, and one whose vendor's key is gone since is refused each browser call,
saying why. Kernel's browsers run headless, and keep no downloads, so a run on Kernel has no browser_downloads. The keys come from the server's environment or Tool keys and reach the
run's process over its pipe, as the rest do. A session's custody (its lease, its tag, what it was
doing) is kept in the run's own store, so a run opened again on its directory reconciles the sessions it held. Each
page it reads is filed under the run's work/evidence/, each read in a file of its own (0001-browser_read.md, ...),
reads at once included. No vendor records it; an agent whose browser computer says record: true gets its own video
of each session (A video of each run). The owner watches the browser live, takes it over and hands it back, and
the agent can ask them to (below). When the run is let go (its work done, or a SIGTERM)
the sessions it still holds are released at their vendor. An agent's browser stays signed in from one run to the next
(saved sign-ins).
A session's time is the run's spend, as a paid tool's charge is: each browser call books what its session ran since the
last charge, and the release books the rest, topped up to the provider's minimum. Each is part of its cost.usd and
/usage's browser_time meter (dollars, and seconds once the run has ended). On the timeline a charge has no row of its
own: it shows on the row of the browser call it was booked under, that call's tool_use row, as usage
({"usd": 0.0017, "requests": 0}, every charge of that call summed). The release's charge goes under the session's
last call, so it lands on that call's row. Booked after the answer, it is served as a change of that row (the same id,
its new usage), never a new row. Prices are by provider (pi-browser's provider name):
| Provider | List price | Minimum | Its own price |
|---|---|---|---|
browserbase |
$0.12 an hour | 60 s | AGENTRUN_BROWSER_USD_PER_HOUR_BROWSERBASE |
kernel (headless) |
about $0.06 an hour, by the second | none | AGENTRUN_BROWSER_USD_PER_HOUR_KERNEL |
cdp (a local Chrome) |
$0 | none | AGENTRUN_BROWSER_USD_PER_HOUR_CDP |
A variable gives the provider's price in US dollars an hour (a contract rate; the minimum stays). A provider with no price, or a variable that is not a non-negative decimal, has no price: its time is booked as an unknown cost, and under a cap every browser call is refused. Under a cap the browser's time is held before it runs (see Spend cap).
The browser's live view
The owner watches a run's browser live from the console, and takes it over: the same view for every vendor (pi-browser's
own viewer, a screencast of the page the agent is on), never the vendors' own live-view links, which stay in the run's
process. As a session opens, the run's process runs its viewer on a loopback port of its own and hands it to the server in
one file in the run's directory, outside work/ (browser-live/<session>.json, one file per session, 0600), which goes
when that session ends: a session's end never touches another's, so a relaunch's old session never hides its new one's
view. A session a restarted process keeps (it was still running at the vendor) gets its viewer handed over again by the
new process, with a new token, and nobody holding the browser. GET /v2/runs/{id}/browser answers {state: "live", viewer} while a session is open (viewer, a link on this server
with its token in the fragment), {state: "none"} when the run has a browser but no session is open, and
{state: "off", reason} when it has none: its agent has no browser tool, or its browser resolves unavailable here (the
tool plane's words, a local Chrome is not set up on this server, or for Kernel with no key, that it needs a Kernel key). The
same view is the computer family's too, one for every kind (browser, desktop, phone), read through the same code:
GET /v2/runs/{id}/computer answers {state: "live", kind, viewer, hold} (the link under /v2/runs/{id}/computer/live/),
{state: "none", kind, hold} or {state: "off", hold, why}; hold says who drives now (agent, pending or person). It takes the owner's
password session in the console: a token, which a run's process, an MCP client or a script may hold, is 403.
The viewer lives under /v2/runs/{id}/browser/live/. Its page, script and style are this server's own (the files of the
pi-browser it has installed), framed by this server's own origin alone (frame-ancestors 'self', the console's 'none'
everywhere else); only its WebSocket goes to the run's port, taken only from this server's own origin (as the request
reaches it, or the public address, AGENTRUN_PUBLIC_URL, for a TLS proxy that rewrites Host) with the owner's session,
and on a loopback address only at one of its names, as every route is (a rebound name is refused, whatever its Origin).
One viewer at a time: a second is refused (viewer_in_use). A browser with no page yet (Kernel's headless one starts with
none) shows "No page yet" until one opens. The token dies with the session: the answer says none and the old link opens
nothing. The token is in no record, timeline row, run view, run file, home, log or the model's context.
Take over, hand back. The viewer watches until the owner presses Take over in it; until then the run drops its
input before the browser (held not_taken). Take over holds the browser for the owner until they press Hand back,
the viewer has been gone 2 minutes, or 15 minutes pass with no input from them. While they hold it, their input is the only
input; the agent's browser calls wait inside the tool (they do not fail), then go on with the page's old element ids
dropped, and the model is told in plain words that the person had the browser and the page may have changed. A call that
was under way at the take acts no more: each change of hands moves the session's epoch, and an act from before it is
refused, each action of a run checked on its own; the act already in the browser (a run's code is one batch there) ends
first, and only then does the owner's input reach the browser. The run stays working; its timeline says "You took over the browser" and how it came back ("You handed the
browser back", or that it went back to the agent after the idle or away window), each row at the time it happened, and a
browser call that waited for the hand-back reads "Waited for you 11 s, then opened …". The owner's time counts: Take over holds
the next 15 minutes of session time at the provider's price under the run's cap first, and with no room it is refused in
the cap's words, shown in the viewer. A take-over that input keeps alive is held again every 15 minutes, and with no room
the browser goes back to the agent at the cap ("The browser went back to the agent at the run's spend cap", in the viewer
and on the timeline, with the cap's words). A take-over and an ask on the same session share one hold; an ask that joins it holds the extra stretch its own expiry needs
(refused in the cap's words without room), and a re-hold the cap refuses ends both: the take-over goes back to the agent,
and the ask expires, the agent told the cap's words. When the
browser comes back, what was held up front goes, and the time the person had stays held, at the provider's price, until
the session's next charge books it: take-overs given back with no browser call between them still meet the cap.
The run waits for you, its browser kept. When the agent asks the person a question (ask_person) with its browser open,
the run waits for the answer with that browser kept open for them: its page, the live view and Take over stay there. The
browser's own idle release (a few minutes with no browser call) doesn't apply while it waits. It is kept for the person's
window, AGENTRUN_BROWSER_PERSON_WAIT_MIN (whole minutes, 1 to 360; 15 by default), the same setting that bounds a
take-over with no input and an agent's hand-over ask (above, 15 minutes each by default), so the three never drift apart.
The window's session time is held under the run's cap first, at the provider's price, like a take-over's: while the run
waits, its cost grows by the browser's session time only, never by model time, and with no room under the cap the run
parks at once. An answer inside the window goes back to the agent on the same page. At the window's end the run parks and
the browser is released ("The browser was released after 15 min waiting for you" on the timeline, and the Screen tab says
so, with when, until a browser opens again), so its billing stops there. An answer after that goes on with a new
browser, opened at the agent's next browser call. A browser its provider ends before the answer says so too ("The browser
session ended while the run waited for you"). A provider's own session timeout still applies: keep the window under it.
The agent asks. The agent may ask the owner to do something in its browser (browser_request_handoff: an instruction
and how it will know it is done, such as signing in). Its person's time is held the same way first; with no room no ask is
made, and the tool's result says why. The run then reads input_required/waiting with
pending: {kind: "browser", instruction, completion_condition, asked_at, expires_at}, its timeline shows "Waiting for you:
<instruction>", and the webhook's run.needs_input says pending.kind: "browser"; the agent's turn waits inside the tool
call. The owner takes over in the viewer, does it, and answers POST /v2/runs/{id}/browser/hand-back with
{outcome: "done"} or {outcome: "cancelled"} (the owner's password session alone, as above). The first answer wins: the
same answer again is 200, a different one 409 handoff_answered with the answer it has. Any answer hands the browser back
to the agent. Unanswered for 15 minutes, the ask expires: the agent hears expired, and a later answer is 409 with
outcome: "expired". The ask's record is one 0600 file in the run's directory (browser-ask/, never work/): the
instruction, the done-when condition and the ask's times, never the viewer's link or token. A run's process that dies
while the ask waits is started again, as a working run's is, and the new process takes the wait up: it reads the owner's
answer, or writes the expiry. The record goes when the run ends, or when its process lets its browser sessions go.
Saved sign-ins
Sign in once in one of an agent's runs (for now, through the run's browser while it runs), and every later run of that agent starts from that signed-in browser. Sign-ins are kept per agent, never shared between agents, and the server picks which one a run gets, never the model.
- Where the cookies are. At the browser's vendor: a Browserbase context, or a Kernel profile under a random name
(
agentrun-and 24 hex digits: Kernel's names are its account's, so a name derived from the agent would be any server's that shares the key). This server keeps only a pointer per agent and vendor, sealed under the seal key (AGENTRUN_SEAL_KEY) and bound to its agent and vendor, in its store. Capabilities saysign_ins: truewith a browser vendor here. A local Chrome keeps none: its cookies would sit on this server's disk. - How a run gets it. Before a run with the
browsertool is launched, the server makes the agent's context at Browserbase (POST /v1/contexts, which opens no session; Browserbase bills sessions, not contexts) or its profile at Kernel (POST /profiles, which starts no browser) if it has none, and hands the run's process the pointer over its pipe, with its secrets, never in its environment. The run's process never gets the seal key. Every session the run opens uses that profile, by the namedefault; the model never sees the pointer. A vendor that does not answer leaves that run's browser signed out, said in the server's log. - One run saves at a time. The first run of an agent to start with the browser holds the sign-in's save lease, and
its sessions save what changed (Browserbase
persist, Kernelsave_changes). A run of the same agent started while another holds it starts signed in and saves nothing. The lease ends when its run ends (completed, failed or cancelled) or lets go cleanly to wait for its person. A run whose process went, or a server restart, keeps it with the run for its relaunch, since a session it opened before may still write back at the vendor, but for no longer than such a session can live (pi-browser's session timeout, 30 minutes) while its process stays gone: a run that waits on its person after its process died, or is never opened again, lets the others save after that. A run whose process went without letting its sessions go keeps the lease that way even once it ends. Each launch decides again whether its run saves: a follow-up of a run that saved, opened while another run holds the lease, saves nothing. One that names a run that ended while the server was down counts as let go. Browserbase writes a saved context back a few seconds after its session ends, so a Browserbase saver's lease stays named for it 10 seconds past its end (a bound this server chose; Browserbase publishes none): a run started in that time starts from the context as it was, and saves nothing over it, and the saver itself, resumed in that time, waits it out before it saves again. A gone holder's Browserbase lease gets the same 10 seconds past the 30 minutes. A V1 limit: the lease goes to the first run of the agent to start with the browser in its tools, whether or not it opens a browser, and stays with it until it ends, so a long run that never browses keeps the others of that agent from saving meanwhile. - What you see.
GET /v2/agents/{id}listssign_ins:{key: "default", provider, state, held_by, verified_at},heldwith the run's id while a run holds the lease, elseready;verified_atis when a saving session last ended.unreadable(this server's own state, markedsignins/1in the served contract) is a pointer that does not open under the seal key the server has now (none, or another): runs start signed out, and none is made in its place until you forget it, since the vendor's object it points to would be left behind. A run still going when the server starts that was handed the sign-in, which now does not open (or whose sign-ins file can't be read or is damaged), is not taken up: it is stopped (or, its process already gone, never opened again) and ends failed ("This server can't read the run's browser sign-in (its seal key changed or is missing, or the sign-in is damaged): …"), and its rows are not read, since what it says could repeat the pointer, which the server could not cut. Once the sign-in opens again (the right seal key back), its rows are read and shown, cut of it. A run that had already ended keeps how it ended, but while the sign-in does not open none of what it said is served (rows, answer, output, error words, a review's reason, a workflow run's graph, and its files,GET /runs/{id}/filesand each file, which answer 403forbidden), it can't be continued, and what its end-of-run learning turn wrote is not checked, graded or merged (it waits as it was for a server that reads the sign-in). It is shown again, cut, once the sign-in opens. A run that was never handed the sign-in (one launched signed out since the key changed) is taken up as any other. That a run was handed it is kept in itsserve.json; a launch that can't save that hands it none, and the run browses signed out. A run still going whoseserve.jsonis there but can't be read or parsed (where its plane and that mark are kept) is hidden the same way when its agent's revision grants the browser, or can't be read: nothing else says which browser it ran on, so whether it was handed the sign-in is not known ("This server can't read the run's record (its serve.json is damaged or can't be read), …"). An ended run whoseserve.jsonis damaged since is withheld the same way, its end kept. That mark is the SHA-256 of each pointer the run was handed (a list, one per pointer; never a pointer), and what a run was handed is read back by it alone: each hash matched to the agent's live pointer or a forgotten one (below). A run with no mark was never handed one. When any of its hashes matches no pointer that opens (one under another seal key or none, one forgotten and since dropped out of the newest 32 kept, the agent's sign-ins file gone), the run is hidden or withheld as above, and shown again, cut, once every one does: nothing keeps that verdict, each server reads it anew. Forgetting the agent's other sign-ins never withholds it. A mark of any other shape (one an older build wrote,trueor a single hash, or a damaged one) is read as handed some sign-in no one can name: the run is hidden or withheld, never served uncut, and forget waits for it while it goes. A run list's row for an ended run the server has not read (from its row andserve.jsonalone) serves its error (its details too) and review cut the same way, or withholds them in the same words, and withholds them when itsserve.jsonis damaged. Itsheld_bystill names a run that holds its lease, as a held one does. Never the pointer.DELETE /v2/agents/{id}/sign-ins/{key}forgets one: the vendor's context or profile is deleted, then the pointer. A delete the vendor does not answer is said in the answer (at_vendor: "not_deleted"), and the pointer goes all the same. It is409 sign_in_heldwhile a run holds the lease (details.held_by), and also while a run it was handed is still going without the lease (details.handed_to): one that waits for its person, say, or one whose process went more than 30 minutes ago. What that run says could repeat the pointer, and once it is forgotten a restarted server could not read it back to cut it. The message names the run, never the pointer; forget it once that run ends. A forgotten pointer is still kept, sealed as it was, in the agent's sign-ins file (forgotten), the newest 32 per agent: never listed insign_ins, never served, never handed to a run, never a sign-in a forget finds. It is kept only so a later server still cuts it from what a run that was handed it said: one that ended before the forget, or one opened again since on a new sign-in. Archiving an agent keeps its sign-ins; this server has no route that deletes an agent.
An agent is granted monid's data endpoints on one key, MONID_API_KEY, by name:
monid:<provider>/<endpoint> (one, such as monid:apollo/people/match) or monid:<provider>/* (every endpoint monid
lists for the provider, at most 50). Each grant is read against monid's listing when the agent is saved, and pinned on
that revision with the endpoint's description, its input schema (pathParams, queryParams, body) and its price; a
provider or endpoint monid does not list, or a grant saved with no monid key, is refused at the save in words. An
endpoint monid prices by usage (per result, per unit, metered, or a matrix or tier with a usage part) is pinned too,
named or from a wildcard, and the save's warnings name each one (reason priced_by_usage): "monid:<provider>/<endpoint>
is priced by usage: monid can't cap what it charges, so a call can cost more than its estimate and more than the run's
cap allows." What one such call costs is known only after it has run, and monid's maxCost checks only its estimate,
which such a call can pass. Which endpoints an agent may call is the control: grant them by name or by provider, and
set each to deny or ask in tool settings. An edit pins again. A workflow's nodes do not bind monid endpoints yet. Each pinned endpoint is a tool of its own on every
harness, named on the wire with __ for : and / (monid__apollo__people__match), asked about by default, and set by
its own name or its provider's wildcard in tool settings.
Each run is paid per call from the monid workspace's wallet, and is sent once, never retried. An async provider's
run is read until it ends, about two minutes at most, and asked to stop at monid when the run stops or it outlasts that.
A refusal comes back as {error, status?} in words: the wallet too low (402), a workspace control such as its budget
(BLOCKED), FAILED, TIMED_OUT, the provider's own error (not charged). The model reads each answer as JSON cut at
60,000 characters, the whole of it then filed under the run's work/evidence/monid/. An answer carries what monid
charged (cost, in dollars), and that charge is the run's spend: booked once in the run's own records as a tool cost
(agentrun.tool_cost: tool the endpoint's name, charged_by "monid", usd), shown in its timeline on a line of its
own (Tool cost: monid charged $0.0260 for monid:apollo/people/match) and summed into its cost, the total its
spend cap reads, and /usage grouped by meter shows it as its own meter, tools, apart from tokens.
Each run is marked in the run's records before it is sent, held at its pinned price (a per-call price; the dearest
variant of a matrix; a tiered price's default and every tier), and its approval card shows that hold; its charge
settles the mark. It is sent with that hold as monid's maxCost, so an endpoint monid prices higher now than when the
agent was saved is refused by monid unrun and uncharged, never booked past its hold. Once the cap lets it go, its
price is read again from monid (an inspect, which monid does not charge). One monid has moved to usage pricing since
the save is still held and sent at its pinned price, so monid runs it only at an estimate within it; its charge can
pass it (below). A call of an endpoint pinned as priced by usage is held at monid's estimate for the call's own input
instead. Its approval card reads "Priced by usage: monid estimates the cost when the call runs, and can charge more."
(pending.price "priced by usage"), and monid is sent nothing while the call waits. Once the call may run (after
the person's allow, or at once when it needs no ask), the call is first sent with maxCost 0, which monid refuses unrun
and uncharged, naming its estimate; that estimate is the hold, and the call is sent with it as maxCost. That read is
itself a paid step of the call, marked at $0 on the run's ledger before it is sent (a crash while monid holds it leaves
its charge unknown, as any cut call's) and given back when monid refused it unrun; a read monid ran (an estimate of $0,
which maxCost 0 lets through) is the call, settled at its charge. Under a cap, a read that ends with its charge unknown
(no answer, or FAILED with no cost) stops the run at once, "monid may have charged for <name> and did not say how
much, so this run's cap can't be kept; the run stopped": its $0 hold bounds nothing. Its charge can pass the estimate: then it is booked
as charged, and the run stops at once, failed, in the words "monid charged $X, more than the $Y held; the run stopped".
A run's spend cap is a hard stop for everything but that one charge. A mark a crash left unsettled leaves the run's cost unknown, as a
model request a crash cut does, and its cap counts it at its held figure, never $0. A run that may have charged and says
no cost (FAILED, TIMED_OUT, one stopped by the run or the wait, one whose sending failed) books an unknown charge,
never $0: the run's cost reads null, and under a cap it counts at its held figure, the bound the cap let it go at, as
a crash-cut mark does, so the run goes on while its cap allows, in its process and in one opened again from its store;
one monid says it did not charge (refused as sent, BLOCKED, STOPPED, the provider's error) books nothing. Under a
cap, each endpoint's call is held as a model request is: unless what the run has spent plus what the call is held at
fits its max_cost_usd, or when the spend is unknown, the call is refused with a spend_cap_reached error the model
reads, naming the endpoint, its hold and the cap, the run pauses on its cap, and the call is never sent (one priced by usage has had only its estimate read). Runs go one at a time under a cap, and on
claude-agent and codex the check holds each model request still in flight at its worst case. A run sent holds its
figure until its charge is in, on every harness: a model request checked meanwhile counts it beside what the run has
spent, and a run that fails without an answer counts at it. Every harness calls an endpoint as a host tool in the run's
process, where a call a crash cut off is answered interrupted, never sent again. The key is a secret like the model
keys: a run's process gets it over its pipe, never in its environment.
