@parcha/agentrun-serve 0.1.0-beta.52 → 0.1.0-beta.53
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +122 -1
- package/README.md +213 -24
- package/dist/agent-delete.d.ts +5 -6
- package/dist/agent-delete.js +30 -67
- package/dist/agent-package.d.ts +71 -0
- package/dist/agent-package.js +345 -0
- package/dist/agents-store.d.ts +26 -20
- package/dist/agents-store.js +41 -33
- package/dist/api-only.d.ts +26 -6
- package/dist/api-only.js +35 -13
- package/dist/claude-login.d.ts +1 -0
- package/dist/claude-login.js +1 -1
- package/dist/cli-learning/cli.d.ts +3 -0
- package/dist/cli-learning/cli.js +17 -3
- package/dist/cli-learning/connections.js +3 -2
- package/dist/cli-learning/schema.js +2 -1
- package/dist/cli.js +70 -7
- package/dist/composio-preset.d.ts +2 -1
- package/dist/composio-preset.js +4 -3
- package/dist/composio-triggers.d.ts +4 -0
- package/dist/composio-triggers.js +4 -1
- package/dist/computer-needs.d.ts +32 -0
- package/dist/computer-needs.js +80 -0
- package/dist/computer-setting.d.ts +1 -0
- package/dist/computer-setting.js +8 -1
- package/dist/console/assets/index-BFgyZzF_.js +734 -0
- package/dist/console/assets/index-DbilxljH.css +1 -0
- package/dist/console/index.html +2 -2
- package/dist/console-links.d.ts +1 -0
- package/dist/console-links.js +2 -0
- package/dist/env-switch.d.ts +14 -0
- package/dist/env-switch.js +23 -0
- package/dist/errors.d.ts +1 -0
- package/dist/errors.js +3 -0
- package/dist/eval-previous.js +4 -3
- package/dist/fal-price.js +10 -13
- package/dist/handed-secret.d.ts +4 -0
- package/dist/handed-secret.js +10 -0
- package/dist/harness-archive.d.ts +15 -5
- package/dist/harness-archive.js +71 -34
- package/dist/harness-check.d.ts +2 -1
- package/dist/harness-check.js +36 -95
- package/dist/harness-egress.d.ts +23 -0
- package/dist/harness-egress.js +69 -0
- package/dist/harness-recipe-entry.d.ts +71 -0
- package/dist/harness-recipe-entry.js +184 -0
- package/dist/harness-recipe.d.ts +73 -6
- package/dist/harness-recipe.js +185 -31
- package/dist/harness-sign-in.d.ts +29 -0
- package/dist/harness-sign-in.js +122 -0
- package/dist/harness-table.d.ts +21 -0
- package/dist/harness-table.js +58 -3
- package/dist/harness-zip.d.ts +6 -0
- package/dist/harness-zip.js +203 -0
- package/dist/ids.d.ts +11 -0
- package/dist/ids.js +36 -0
- package/dist/learn/commit.d.ts +14 -1
- package/dist/learn/commit.js +156 -1
- package/dist/learn/compile.js +22 -8
- package/dist/learn/folder.d.ts +5 -0
- package/dist/learn/folder.js +10 -1
- package/dist/learn/learning.sh +15 -3
- package/dist/learn/promote.d.ts +2 -2
- package/dist/learn/secrets.js +30 -7
- package/dist/learning-routes.d.ts +23 -11
- package/dist/learning-routes.js +110 -20
- package/dist/learning.d.ts +9 -6
- package/dist/learning.js +9 -4
- package/dist/mcp-gateway.js +15 -2
- package/dist/mcp-probe.d.ts +3 -0
- package/dist/mcp-probe.js +7 -2
- package/dist/mcp-resources.d.ts +44 -0
- package/dist/mcp-resources.js +100 -0
- package/dist/mcp-servers-store.d.ts +16 -12
- package/dist/model.d.ts +4 -4
- package/dist/model.js +6 -6
- package/dist/native/cli.js +9 -2
- package/dist/native/connection.d.ts +2 -2
- package/dist/native/connection.js +5 -2
- package/dist/native/discovery.d.ts +2 -0
- package/dist/native/discovery.js +10 -6
- package/dist/native/remote-worker-bridge.js +36 -4
- package/dist/native/remote.d.ts +18 -1
- package/dist/native/remote.js +126 -37
- package/dist/native/schema.d.ts +6 -0
- package/dist/native/schema.js +31 -6
- package/dist/native/source-account.d.ts +13 -0
- package/dist/native/source-account.js +114 -0
- package/dist/native/source-capture-hooks.d.ts +5 -0
- package/dist/native/source-capture-hooks.js +102 -0
- package/dist/native/source-mcp-selection.d.ts +13 -0
- package/dist/native/source-mcp-selection.js +72 -0
- package/dist/native/source-runtime-tools.d.ts +19 -0
- package/dist/native/source-runtime-tools.js +103 -0
- package/dist/native/source-snapshot-types.d.ts +138 -0
- package/dist/native/source-snapshot-types.js +12 -0
- package/dist/native/source-snapshot.d.ts +8 -0
- package/dist/native/source-snapshot.js +1201 -0
- package/dist/observation/learning.js +3 -2
- package/dist/openapi.js +167 -36
- package/dist/print.js +1 -1
- package/dist/purged-workflow.d.ts +12 -0
- package/dist/purged-workflow.js +43 -0
- package/dist/run-keys.d.ts +46 -0
- package/dist/run-keys.js +109 -0
- package/dist/run-launch.d.ts +16 -1
- package/dist/run-launch.js +30 -1
- package/dist/run-learning-served.d.ts +2 -2
- package/dist/run-model-key.d.ts +2 -2
- package/dist/run-model-key.js +5 -5
- package/dist/run-secrets.d.ts +2 -0
- package/dist/run-secrets.js +7 -4
- package/dist/run-view.d.ts +17 -0
- package/dist/run-view.js +25 -1
- package/dist/runner/adapter-loop.d.ts +11 -3
- package/dist/runner/adapter-loop.js +138 -22
- package/dist/runner/adapter-run-spec.js +25 -12
- package/dist/runner/audit.d.ts +2 -0
- package/dist/runner/audit.js +9 -1
- package/dist/runner/beside.js +2 -1
- package/dist/runner/claim-secrets.d.ts +29 -3
- package/dist/runner/claim-secrets.js +38 -4
- package/dist/runner/cli-run-spec.js +23 -12
- package/dist/runner/harness-loops.d.ts +6 -0
- package/dist/runner/harness-loops.js +11 -1
- package/dist/runner/held.d.ts +4 -0
- package/dist/runner/journal-kinds.d.ts +2 -0
- package/dist/runner/learned-first.d.ts +2 -0
- package/dist/runner/learned-first.js +1 -1
- package/dist/runner/learning-end.d.ts +7 -2
- package/dist/runner/learning-end.js +22 -10
- package/dist/runner/learning-seed.d.ts +9 -3
- package/dist/runner/learning-seed.js +2 -2
- package/dist/runner/main.d.ts +1 -0
- package/dist/runner/main.js +20 -13
- package/dist/runner/mcp-claim.js +6 -1
- package/dist/runner/mcp-run.d.ts +10 -7
- package/dist/runner/mcp-run.js +3 -5
- package/dist/runner/monid-run.js +9 -11
- package/dist/runner/project-checkpoint.d.ts +35 -0
- package/dist/runner/project-checkpoint.js +116 -0
- package/dist/runner/project-drain.d.ts +8 -0
- package/dist/runner/project-drain.js +25 -0
- package/dist/runner/project-host.d.ts +10 -0
- package/dist/runner/project-host.js +52 -0
- package/dist/runner/promotion.d.ts +14 -6
- package/dist/runner/promotion.js +98 -41
- package/dist/runner/redact.d.ts +13 -0
- package/dist/runner/redact.js +67 -1
- package/dist/runner/run-channel.d.ts +9 -0
- package/dist/runner/run-channel.js +15 -2
- package/dist/runner/run-child-host.d.ts +8 -4
- package/dist/runner/run-child-host.js +171 -41
- package/dist/runner/run-errors.js +2 -2
- package/dist/runner/runner-check.js +5 -2
- package/dist/runner/runner.js +26 -9
- package/dist/runner/store-secrets.js +7 -3
- package/dist/runner/workflow-first.d.ts +4 -0
- package/dist/runner/workflow-first.js +13 -0
- package/dist/runner/workflow-loop.d.ts +2 -1
- package/dist/runner/workflow-loop.js +2 -1
- package/dist/runner/workflow-spec.js +1 -1
- package/dist/runs-over-store.d.ts +34 -6
- package/dist/runs-over-store.js +133 -25
- package/dist/sdk/runs.d.ts +11 -1
- package/dist/sdk/runs.js +117 -26
- package/dist/sdk/schema.js +12 -2
- package/dist/sdk/workflows.d.ts +1 -1
- package/dist/server.d.ts +68 -32
- package/dist/server.js +600 -110
- package/dist/skills/agentrun-serve/SKILL.md +2 -1
- package/dist/source-sync/adoption.d.ts +15 -0
- package/dist/source-sync/adoption.js +36 -0
- package/dist/source-sync/auxiliary.d.ts +23 -0
- package/dist/source-sync/auxiliary.js +64 -0
- package/dist/source-sync/capture-git.d.ts +5 -0
- package/dist/source-sync/capture-git.js +272 -0
- package/dist/source-sync/capture-project.d.ts +53 -0
- package/dist/source-sync/capture-project.js +206 -0
- package/dist/source-sync/capture-refusal.d.ts +7 -0
- package/dist/source-sync/capture-refusal.js +16 -0
- package/dist/source-sync/capture.d.ts +11 -0
- package/dist/source-sync/capture.js +22 -0
- package/dist/source-sync/checkpoint-gate.d.ts +21 -0
- package/dist/source-sync/checkpoint-gate.js +52 -0
- package/dist/source-sync/checkpoints.d.ts +66 -0
- package/dist/source-sync/checkpoints.js +168 -0
- package/dist/source-sync/claim.d.ts +11 -0
- package/dist/source-sync/claim.js +48 -0
- package/dist/source-sync/destination.d.ts +47 -0
- package/dist/source-sync/destination.js +239 -0
- package/dist/source-sync/io.d.ts +15 -0
- package/dist/source-sync/io.js +52 -0
- package/dist/source-sync/local.d.ts +43 -0
- package/dist/source-sync/local.js +229 -0
- package/dist/source-sync/prepare.d.ts +59 -0
- package/dist/source-sync/prepare.js +93 -0
- package/dist/source-sync/projects.d.ts +61 -0
- package/dist/source-sync/projects.js +130 -0
- package/dist/source-sync/registry.d.ts +95 -0
- package/dist/source-sync/registry.js +226 -0
- package/dist/source-sync/service.d.ts +33 -0
- package/dist/source-sync/service.js +118 -0
- package/dist/source-sync/skill-edits.d.ts +12 -0
- package/dist/source-sync/skill-edits.js +122 -0
- package/dist/source-sync/snapshots.d.ts +48 -0
- package/dist/source-sync/snapshots.js +448 -0
- package/dist/source-sync/types.d.ts +9 -0
- package/dist/source-sync/types.js +14 -0
- package/dist/source-sync/workspace.d.ts +66 -0
- package/dist/source-sync/workspace.js +273 -0
- package/dist/store/agent-body.d.ts +4 -0
- package/dist/store/agent-body.js +16 -5
- package/dist/store/index.d.ts +2 -2
- package/dist/store/index.js +1 -1
- package/dist/store/schema.d.ts +2 -1
- package/dist/store/schema.js +2 -1
- package/dist/store/seal.d.ts +5 -1
- package/dist/store/seal.js +12 -3
- package/dist/store/sqlite/project-checkpoints.d.ts +11 -0
- package/dist/store/sqlite/project-checkpoints.js +70 -0
- package/dist/store/sqlite/run-launch.d.ts +4 -12
- package/dist/store/sqlite/run-launch.js +5 -19
- package/dist/store/sqlite/store.js +224 -170
- package/dist/store/store.d.ts +116 -39
- package/dist/store/store.js +14 -1
- package/dist/store-reads/learning.d.ts +2 -2
- package/dist/store-view.d.ts +3 -1
- package/dist/store-view.js +17 -5
- package/dist/template-import.d.ts +10 -2
- package/dist/template-import.js +116 -13
- package/dist/templates.d.ts +26 -5
- package/dist/templates.js +62 -10
- package/dist/timeline/index.d.ts +1 -1
- package/dist/timeline/index.js +1 -1
- package/dist/timeline/timeline.d.ts +5 -0
- package/dist/timeline/timeline.js +8 -0
- package/dist/tool-plane.d.ts +12 -12
- package/dist/tools.d.ts +8 -8
- package/dist/trigger-launch-hook.d.ts +47 -0
- package/dist/trigger-launch-hook.js +90 -0
- package/dist/trigger-targets.d.ts +14 -1
- package/dist/trigger-targets.js +20 -0
- package/dist/triggers.d.ts +54 -5
- package/dist/triggers.js +143 -8
- package/dist/uploads-archil.js +1 -1
- package/dist/uploads.js +1 -1
- package/dist/validate.js +1 -2
- package/dist/workspace/computer-for-claim.d.ts +2 -0
- package/dist/workspace/computer-for-claim.js +43 -0
- package/dist/workspace/paths.d.ts +6 -0
- package/dist/workspace/paths.js +6 -0
- package/dist/workspace/resolve-computer.d.ts +1 -0
- package/dist/workspace/run-tools.d.ts +2 -0
- package/dist/workspace/run-tools.js +8 -0
- package/launcher/agentrun-serve +1 -1
- package/package.json +10 -10
- package/skills/agentrun-serve/SKILL.md +2 -1
- package/templates/README.md +5 -2
- package/dist/console/assets/index-B-D0EM3j.js +0 -733
- package/dist/console/assets/index-DlQepP2J.css +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,127 @@
|
|
|
2
2
|
|
|
3
3
|
## [Unreleased]
|
|
4
4
|
|
|
5
|
+
## 0.1.0-beta.53 (2026-11-22)
|
|
6
|
+
|
|
7
|
+
- An agent can be exported as a template package: `GET /v2/agents/{agent_id}/package` answers its current revision as the files of a package (`agent.md` with the instructions as its body, `skills/`, `rules/`, an output schema) and their sha256, and `agentrun export AGENT --out DIR` writes them as a folder that `agentrun template validate` reads and any AgentRun applies. `agent.md` always names the model and approvals. MCP tools become needs by their saved server's source and toolkit, and triggers carry no agent and no secret. What names this host (its box, its computer's provider, its pins of this server's tool listings, its place) is left out. The answer's `report` names what can't travel as it is: `blocked` (an MCP server saved nowhere here, on this machine's loopback, or sending its own auth header) and `remade` (webhook, GitHub, Composio and email triggers, browser sign-ins, a paired computer, what the agent learned). `agentrun export` prints both, and with anything blocked it writes nothing and exits 2. A native, CLI learning, SDK or another system's agent, or a workflow, answers `409 not_exportable`. <!-- changes/agent-export.md -->
|
|
8
|
+
- `agentrun deploy DIR --to URL` deploys an agent package folder to another AgentRun (`--to cloud` is the hosted one; `AGENTRUN_CLOUD_URL` overrides its address). It uploads the package, prints the apply's plan (create or revise, the keys and MCP servers the target lacks, each trigger made, kept or removed, the computer), asks before it applies (`--yes` off a terminal), and writes a lock to `DIR/.agentrun/deploy.json`. A second deploy of the same files says it is up to date and sends nothing that writes; changed files make the agent's next revision. A target the package needs keys or connections on exits 3 with nothing made, and an agent edited on the target since the last deploy exits 2 unless `--force`. `agentrun deploy rollback` makes the previous revision current, and `agentrun deploy delete` deletes the agent and the lock. `agentrun deploy AGENT_ID` deploys an agent from this install by its package; `--pause-source` turns its schedules off here once it is deployed. <!-- changes/agentrun-deploy.md -->
|
|
9
|
+
- `POST /v2/templates/import` takes `{files}`, a package uploaded whole, checked under the GitHub import's limits and in its words, stored as `upload:<name>` with the package's sha256, and replaced by the next upload of that name. An upload asks no publisher trust. A server that serves the API alone takes an upload and refuses a GitHub `source`.
|
|
10
|
+
- `POST /v2/templates/{id}/apply` takes `dry_run: true`: it answers `{plan}` from the apply's own reads and checks and writes nothing.
|
|
11
|
+
- `POST /v2/templates/{id}/apply` takes `revision` (with `agent_id`) and `sha`, what the caller read: the apply, or its plan, is 412 when the agent's current revision or the package stored under that id is another, with nothing changed. Its answer names the revision it wrote, or kept, as `revision_id`. A plan whose keys are missing lists them even where the model needs one of them, and a plan on a server with no public URL says a Composio trigger is skipped, as the apply does.
|
|
12
|
+
- `agentrun deploy delete` removes the lock only when the agent is gone from the target: a 404 to the archive or the delete is followed by a read of the agent, and one still there exits 2 with nothing deleted and the lock kept. `agentrun deploy AGENT_ID` exits 2 for an agent this install does not have or does not export. `--to` takes an address whose path lacks `/v2` (`https://host/api` is `https://host/api/v2`).
|
|
13
|
+
- A folder's lock comes with the folder, so its target gets the API key only where this CLI has deployed before, or when it is AgentRun cloud: any other address needs `--to`, and nothing is sent until then.
|
|
14
|
+
- A plan lists `MONID_API_KEY` as missing where the package grants a monid tool and the server has no monid key, as the apply refuses it.
|
|
15
|
+
- A deploy whose apply skipped a trigger (a connection or a feed the target lacks) leaves a lock that names no package, so the next deploy of the same files applies again and makes the trigger once it can.
|
|
16
|
+
- One deploy, rollback or delete at a time per source: another one of the same folder or install agent exits 2 with nothing sent, and a hold left by a process of this machine that has ended is taken. The CLI's own deploy record is changed under a lock. A folder whose `.agentrun`, or its `deploy.json`, is a symbolic link is refused with nothing sent.
|
|
17
|
+
- An API-only server (`AGENTRUN_API_ONLY=1`) takes a deploy from the backend in front of it, with the server's token: a template's apply (a redeploy with `agent_id`), the agent's read, its revisions, a rollback (`POST /agents/{id}/current`), and its archive (which its delete needs first) and unarchive. Every run there starts through the backend, on its keys and budget: with the launch hook set, the apply makes the package's schedule and feed triggers and each firing goes to the backend, which starts the run through the API (the unarchive turns them on again); without the hook it makes neither (`not_set_up_here`). A webhook, GitHub, Composio or email trigger is never made there (`not_an_option`). Each skipped trigger is a warning under `warnings` (`triggers.<i>`), and the dry run plans it as `skip` in the same words. Every other agent, template, trigger, hook and settings route stays refused. <!-- changes/api-only-deploy-routes.md -->
|
|
18
|
+
- The computer package ships a documents image (`packages/computer/documents`): the default image plus python-pptx, python-docx and openpyxl for `python3` and pptxgenjs, docx and exceljs for `node`, built as the serve README's "The box's image" says and named in `AGENTRUN_DOCKER_IMAGE`. `computer.needs` may now name a Python or Node library by its pip or npm name, and a box that lacks one fails its run in words naming this image's build. <!-- changes/documents-image.md -->
|
|
19
|
+
- The console's Learning tab opens on what learning did, once a learned workflow has taken a run over: one sentence, then four figures, each with the count it stands on. The cost ratio is the server's own; how often the serving revision's answer was the agent's on its promotion check, and how many of the runs it ran first it finished alone, are shares with their 95% interval; the last is the bill's break-even run. <!-- changes/learning-tab-glance.md -->
|
|
20
|
+
- A new chart, cost against agreement, draws each promoted revision as one point: what a run it served cost, all in, against how often its answer was the agent's on its check's inputs, with that share's 95% interval, the bar it had to clear to serve, and the agent as the reference at what a run cost it before takeover. A hollow mark beside each point is the same revision's audits since. It sits beside the bill on a wide page.
|
|
21
|
+
- The learned workflow, with its revisions to step through, stands beside the cost of a run where the tab has room for both, and under it otherwise: the steps that take a run over are next to the line that falls when they do.
|
|
22
|
+
- Who finished each run is drawn a run a column wherever the chart is wide enough to give each run one, so a hand-back shows on its own run; a narrower chart keeps blocks of runs.
|
|
23
|
+
- Every figure is one count the API already gives: a check's `agreed` of its `alone`, the audit ledger's rows, the cost summary and the bill. A check's count and an audit's are never added together, and agreement is never called accuracy: the agent's answer is the reference, not the truth. The tab reads the audit ledger once for the figures, the chart and the audit line. No API changes.
|
|
24
|
+
- A harness recipe now covers an outside agent's release as its vendor ships it (Google's agy CLI among them), and the owner's own sign-in, made by the agent itself: <!-- changes/recipes-outside-harness.md -->
|
|
25
|
+
- `.zip` releases install, unpacked in Node with no `unzip` on the host. An entry that leaves the folder (`..`, an absolute path, a backslash), a symbolic link, a device, an encrypted entry or a duplicate refuses the whole archive before anything lands.
|
|
26
|
+
- An archive is pinned by one digest, its `sha256` or, where the vendor's manifest lists that, its `sha512` (Google's agy CLI manifests). `release.registry` is optional, for a release that is the vendor's own rather than the ACP registry's.
|
|
27
|
+
- Every file the archive unpacks to is pinned, not the binary alone: the tree's sha256 is recorded at the first install (or given as the release's `treeSha256`), and a check or a sign-in refuses a sidecar that changed since.
|
|
28
|
+
- A release may give its own `args` per platform, over the recipe's.
|
|
29
|
+
- `model.id` picks a plan-billed agent's model among those its `session/new` lists (`session/set_model`); one it does not list is refused before a prompt.
|
|
30
|
+
- A key may be handed under the name the agent reads: `keys: [{ "name": "ANTIGRAVITY_GEMINI_API_KEY", "env": "GEMINI_API_KEY" }]`. It is read by its saved name, so the server's own `GEMINI_API_KEY` never reaches the agent. `keyMethod` is the method the agent's ACP `authenticate` signs in with on it (`gemini-api-key`).
|
|
31
|
+
- One list in the kernel, `launchEnv` (`LAUNCH_ENV`, `LAUNCH_ENV_PREFIXES`), names the variables that change what a process loads or runs before its own code: `PATH`, `LD_*`, `DYLD_*`, `NODE_OPTIONS`, `NODE_PATH`, `PYTHON*`, `BASH_*`, `ENV`, `GIT_*` and a few shells' and interpreters' start-up variables. A key is never handed under one of them, nor a recipe's `env` or `model.env` named one. The recipe loader and the ACP adapter both refuse them.
|
|
32
|
+
- A key's saved and handed names follow the kernel's `KEY_NAME` (capitals, digits and `_`, at most 64) in the recipe loader as in the ACP adapter, so `harness-check` no longer refuses a lowercase key name the loader took. Other variable names keep `ENV_NAME`.
|
|
33
|
+
- `signIn: { "args": [...], "homeArg": FLAG }` names the agent's own sign-in, as T3 Code runs agy: `agentrun harness sign-in --recipe FILE` starts the installed, unmodified agent on your terminal with its arguments, `args` (`--login`) and `homeArg` naming its own folder (`--gemini-dir DIR`). The agent prints the address, reads the code you paste and keeps its sign-in in that folder; exit 0 is signed in (`HARNESS_SIGN_IN_FAILED` otherwise).
|
|
34
|
+
- harness-check runs on the recipe's keys alone, never the sign-in, so a plan-billed recipe names a key beside any `signIn`. A run on the sign-in hands the agent `homeArg` and its folder, no key, nothing it prints kept.
|
|
35
|
+
- AgentRun never reads, refreshes or sends the sign-in's token, and has no usage reader: it never opens the folder, and a test keeps every credential file and Google account or quota endpoint out of the harness sources.
|
|
36
|
+
- The ACP adapter's `stderr: "none"` (`AcpRecipe`) keeps nothing an agent prints, for a run on a sign-in: a failure says its exit status and AgentRun's own code, and an error the agent answers says its JSON-RPC code alone.
|
|
37
|
+
- A template's apply keeps the names of the keys the package declared (its `secrets`, and those of the model choice it took) on the revision it writes, never their values, so `GET /v2/agents/{agent_id}/package` names them after the server's copy of the template changes, as a bundled template does on every upgrade. Applying the same package again still writes no revision. Only an agent applied before this keeps its `report.remade` entry for keys that can't be recovered. <!-- changes/revision-secrets.md -->
|
|
38
|
+
- A run says when it stopped short for its spend cap. Every run read and list item carries `stopped_for` and `budget_refused_calls`. `stopped_for` is `"budget"` on a `completed` run that wound down to stay under its `max_cost_usd`: its model was told to wrap up near the cap, or its tool calls were refused there. It is null on every other run. `budget_refused_calls` counts the tool calls the cap's wrap-up refused, each call once, and is 0 when none were. Before, such a run read `completed` like any other, and nothing on it said the cap had cut it short. The status stays `completed`, so a reader that sets "budget exhausted" reads `stopped_for`. A run paused at its cap (`pending.kind` `budget`) and one its cap ended (`failed`, `spend_cap_reached`) read as before. The server keeps each refusal on the run's journal as it happens; a run that ended before this server reads `stopped_for: "budget"` when its model was told to wrap up, and 0 refused calls. <!-- changes/run-stopped-for-budget.md -->
|
|
39
|
+
- A sandbox can list the programs its agent needs on the box's PATH, `computer.needs` (such as `["chrome", "ffmpeg", "ffprobe", "hyperframes"]`), and the computer package ships a media image that has them. Each run's claim asks the box it started before the run's first model request, searching the folders the agent's shell searches, not a PATH the image sets; a box that lacks one, or that cannot be asked, is let go and the run ends `failed` (`run_failed`) in words naming what is missing and how to give the box an image that has it. The field never picks an image: a Docker box's image is still `AGENTRUN_DOCKER_IMAGE`'s. A setting that has `needs` but is no sandbox (a stored body or a launch's computer the validator never saw) fails the run at claim the same way, before anything is started. An agent without `needs` is checked for nothing. A template states them as `needs` in its agent.md, read only beside `computer: [shell]`: apply writes them onto the sandbox it picks as the agent's `computer.needs`, and where the shell here is no sandbox (Archil's serverless exec, or none) it refuses (`409`) in words naming them and `AGENTRUN_DOCKER_IMAGE`, making nothing. `GET /v2/templates` shows them as `needs`. A server before this release refuses a template that names `needs` as an unknown field. <!-- changes/sandbox-needs-media-image.md -->
|
|
40
|
+
The media image's recipe is `packages/computer/media/Dockerfile`: the default image's base and programs, plus Node 24, Chromium as `chrome`, FFmpeg and FFprobe, Noto (CJK, colour emoji) and Liberation fonts, and the HyperFrames CLI at an exact version, with its usage reports off and the image's fonts compressed for it at build, so a render with no network doesn't spend a minute of its compile compressing Noto Color Emoji. Build it and name its tag in `AGENTRUN_DOCKER_IMAGE`; the serve README's "The box's image" has the commands. It is not published.
|
|
41
|
+
- Keep newly connected Codex and Claude Code setups in sync by default, and move a supported complete setup to AgentRun from the existing agent page. Move preserves the agent's identity, history, source capture and unified usage, and checks destination tools, accounts, model, policy and project restoration before switching execution. <!-- changes/source-sync-move.md -->
|
|
42
|
+
|
|
43
|
+
Managed runs retain project checkpoints for later runs. Source and managed changes produce reviewable conflicts;
|
|
44
|
+
uncertain saves require review before another run. Existing connections require an explicit export grant, native
|
|
45
|
+
credentials stay at the source, and unsupported capabilities remain named prerequisites. See
|
|
46
|
+
[source sync](../../docs/source-sync.md) for compatibility and recovery behavior. Automatic notes and learned skills
|
|
47
|
+
remain retired; authored source skills retain their files and modes.
|
|
48
|
+
Owner skill edits after Move produce a new immutable project for future runs while preserving existing runs and
|
|
49
|
+
unchanged companion assets. Git checkpoints exclude ignored dependency trees before applying project limits and
|
|
50
|
+
file checks. An upload refused before project seeding releases its write receipt only after destination and upload
|
|
51
|
+
cleanup have both settled; unknown or dispatched writes continue to block deletion.
|
|
52
|
+
Completed checkpoint reads that refuse staged Git changes, secrets or unsupported files release their write receipt
|
|
53
|
+
only after scratch, cache, tools and provider cleanup settle under the original claim. The rejected save remains
|
|
54
|
+
visible and unpublished. Failed commands, changed files, lost write acknowledgments and uncertain cleanup retain
|
|
55
|
+
their receipts and continue to block deletion.
|
|
56
|
+
Terminal moved runs whose child crashed before checkpointing now require project review instead of silently starting
|
|
57
|
+
from an older saved project. Recovery reads the committed end, or the exact terminal claim when no end could be
|
|
58
|
+
written; it never invents a checkpoint or publishes orphan files. Missing-end reviews use `entry_id: null` and the
|
|
59
|
+
required `attempt_epoch`, so reviewing an earlier failure cannot acknowledge a later one. Active and queued runs
|
|
60
|
+
are not classified as failed merely because their checkpoint is still pending.
|
|
61
|
+
Moved projects on local storage now place attachments before restoring project files, pin their exact input paths,
|
|
62
|
+
and refuse collisions before admission. Claims and follow-ups reuse the placed files; checkpoints exclude those
|
|
63
|
+
attachments while retaining authored files in the same inputs directory.
|
|
64
|
+
|
|
65
|
+
Moved agents can learn checked workflows on the server using their existing learning settings. Replay and eligible
|
|
66
|
+
shadow-audit runs receive isolated copies of the reserved project; their results remain learning evidence, while
|
|
67
|
+
their settled file changes are explicitly discarded rather than published to the saved project. Uncertain writes
|
|
68
|
+
retain recovery receipts, and the existing restrictions on auditing write-capable agents still apply.
|
|
69
|
+
An audit that stops at an approval can still settle its private project under its original held claim, so that
|
|
70
|
+
refused tool call does not falsely block later runs. Parked runs gain no new tool-dispatch permission; superseded
|
|
71
|
+
claims and unresolved writes still refuse settlement. The bounded host-settlement model covers this transition;
|
|
72
|
+
the DSL effect-admission and recovery-driver models are unchanged.
|
|
73
|
+
|
|
74
|
+
Supported HTTP MCP connections retain source tool selections and denials, with explicit destination account binding.
|
|
75
|
+
Resource lists, templates and reads use the same pinned grants, credentials and permission gate; resource-only servers
|
|
76
|
+
are supported on managed AgentRun; native Codex 0.171.0 has a resource-only discovery limitation. Incomplete resource listings fail visibly, and resource bodies that echo connection credentials are
|
|
77
|
+
scrubbed or withheld before filing. Three upstream tool names are now reserved for these generated resource operations:
|
|
78
|
+
`agentrun_list_resources`, `agentrun_list_resource_templates` and `agentrun_read_resource`. A conflicting upstream tool
|
|
79
|
+
must be renamed before its server can connect. Stdio connections and unsupported native capabilities remain prerequisites.
|
|
80
|
+
|
|
81
|
+
Unknown source storage-write outcomes retain receipts and block deletion until independently resolved; restarting
|
|
82
|
+
or acknowledging a run checkpoint does not clear a source write receipt.
|
|
83
|
+
|
|
84
|
+
The Codex adapter preserves native rollout ordinals when recording an approved tool's result before resuming. This
|
|
85
|
+
fixes pinned Codex 0.164.0 rejecting the resumed thread after approval. Existing mixed or invalid ordinal histories
|
|
86
|
+
remain retained and fail before another tool dispatch; they are not silently rewritten or retried. Older wholly
|
|
87
|
+
unnumbered journals retain their format. This serialization fix leaves recovery admission, intent and result ordering
|
|
88
|
+
unchanged, so the recovery models do not change.
|
|
89
|
+
- An ACP run (Cursor, Goose, or a harness recipe) no longer stalls after many turns. Before, the adapter copied the agent's whole session store into the run's records at every turn, so the records grew with the square of the turn count. After about 20 Cursor turns they no longer fit the 32 MiB channel to the run's process: an approval answered 204, and the run then waited for good. Now the mirror stores each file as 64 KiB pieces, each written once per session, so a store that grows by appending costs only its new bytes. It never copies SQLite's `-shm` file, and holds at most 8 MiB per session. Past that, the run's timeline says "The agent's session state passed 8 MiB, so a resume starts it fresh with the conversation so far." and the mirror stops. A run whose records no longer cross to its process now fails at once, naming the size and the limit, and the approval that woke it is answered that the run failed. Adapters get a `notice` event, which serve shows as a step on the run's timeline. A session store mirrored before this version is not restored: such a run resumes fresh with the conversation so far. <!-- changes/acp-state-mirror-bounded.md -->
|
|
90
|
+
- The console's trigger forms make a trigger for a connected agent: a new schedule, webhook, GitHub trigger, app trigger, feed trigger or email trigger asks such an agent for no cost cap and sends none, and says why in place of the field ("None. A connected agent runs in its own CLI, which keeps its own limits: AgentRun cannot cap its runs."). Before, each form required a cap the server refuses on a connected agent's target (422 `target.max_cost_usd`), so no such trigger could be made from the console. <!-- changes/console-trigger-connected-agent-no-cap.md -->
|
|
91
|
+
- A schedule edited onto a connected agent drops its cap, and the effort it carried, which the server refuses there too.
|
|
92
|
+
- A trigger's page reads the same words under Cost cap for a connected agent, in place of "Agent's default".
|
|
93
|
+
- For every other agent the forms are as they were: a cap is required unless the agent has a default one.
|
|
94
|
+
- `agentrun deploy DIR` uploads the folder's package and nothing else of it: `agent.md`, the `skills/`, `rules/` and `evals/` trees, and the answer's schema file `agent.md` names (`output: {schema}`) at the folder's root. A `.env`, a key, a README or any other file or folder beside them stays on this machine. A folder with no `agent.md` exits 2 with nothing sent. <!-- changes/deploy-upload-custody.md -->
|
|
95
|
+
- Deleting an agent (`DELETE /v2/agents/{agent_id}` once archived, as `agentrun deploy delete` does) also removes the uploaded package (`upload:<name>`) it was applied from, in the same write, when no other agent on that server, archived or not, was applied from it. A package imported from GitHub stays. Before, an upload stayed until the next upload of its name, and a server that serves the API alone could never remove one.
|
|
96
|
+
- A deploy, rollback or delete that waits for another CLI to finish saving its deploy record says so on stderr.
|
|
97
|
+
- The dial conformance script accepts `AGENTRUN_BIND_HOST` so local verification can bind to `127.0.0.1` without exposing a public listener. Its local fixture tests use this setting; leaving it unset preserves the public listener used by remote machines. <!-- changes/dial-conformance-bind-host.md -->
|
|
98
|
+
- `GET /v2/agents/{agent_id}/package` no longer copies a credential in the clear into a package. A trigger's source (a feed URL with a `?token=`, `?key=`, `?sig=` or `?password=` query, an address with a user part), its run input (an `api_key` field) and an MCP tool's pin are read the way a composio trigger's config is sealed, and each credential is a `report.blocked` entry of kind `trigger` or `pin` named by its field (`Status: source.urls.0`, `slack: pin.post.api_key`), never by its value. The trigger or pin is left out, and `agentrun export` and `agentrun deploy` write nothing and exit 2, as they do for any blocked entry. A query such as `?page=2` still exports. `report.blocked[].kind` and `report.remade[].kind` are now an enum in the OpenAPI document, so the generated clients type them. <!-- changes/export-custody.md -->
|
|
99
|
+
- A run a paid call stopped for good (a fal job or monid call settled above its hold, taking the run past its cap) now stays stopped when a call that passed the tool gate beside it is admitted after the stop and refused for room. Before, that refusal replaced the stop, so a script's next call ran; the run still ended failed at its next model request. <!-- changes/fal-cap-stop-sticky.md -->
|
|
100
|
+
- A fal job whose output states more than its input asked for (a larger image, a longer clip) is still booked at what its output states, and when that takes the run past its spend cap, the run now stops at once in the cap's words: no tool runs after it, a script's own calls included. Before, the run went on until its next model request. The stop reads only what the run has been charged: a job still running counts toward whether a new call is let through, never toward stopping the run, so one that settles above its hold beside another still running stops the run only if the charges, once in, pass the cap. A fal job priced by the length of the media it is given is now only one of the endpoints fal bills that way (ElevenLabs dubbing, voice isolation and speech-to-text, and sync-lipsync v2); another endpoint billed per second whose input names no length, such as a talking video made from a voice or LatentSync, which fal bills by its output video, is refused under a cap and booked as an unknown charge without one. <!-- changes/fal-cap-stop.md -->
|
|
101
|
+
- A connected agent's held draft is now revised as its hold says. Before, its run's end never found the held workflow (the task never matched it as the run's input), so a check's hold never asked its one recompile and a hold after five give-backs stayed held for good. The held workflow is now the one the task fits, as the start reserves a check. A hold after five give-backs asks its revise only once the agent has `compile_after` completed runs of its own started since the hold, the same wait as a first compile, so a client that never sends a shadow check costs one compile per `compile_after` runs. That revise prompt says nothing was checked and there are no disagreements to show, and no longer says that nothing compiles again. <!-- changes/give-back-hold-cadence.md -->
|
|
102
|
+
- A monid call charged above the estimate it was held at no longer stops a run that can still afford it. It is booked as charged and logged, and the run stops only when that charge takes it past its spend cap, in the cap's words, as a fal job's does. Before, any such charge stopped the run, failed, in the words "monid charged $X, more than the $Y held; the run stopped", even far below its cap. <!-- changes/monid-overrun-cap.md -->
|
|
103
|
+
- A stored agent body refuses a sandbox's `computer.needs` of more than 32 programs, as the API already did, in the API's words: the store, the API document and a template's `needs` now read one rule. <!-- changes/needs-store-cap.md -->
|
|
104
|
+
- A run's purge (`DELETE /v2/runs/{run_id}`) now takes the run's text off its agent's learning folder's current files: its diff files go, and the feedback lines its merges added to `corrections.md` leave main in one commit by the host per merge (none when nothing is left to take off; a line a person edited since stays). Another merge's diff that shows such a line as context is written without it. The folder's history reads (`GET /v2/agents/{agent_id}/learning`, its `/log`, a workflow's `/revisions`, and a champion read by its digest in `/promotions`) no longer serve the purged run's merges, and a log page read before the purge is followed by the next with no change skipped; a champion whose revision was the run's (or that it changed last on main) reads as one no commit holds. Each merge's scrub lands once, so a `DELETE` sent again after a stop takes no other run's same line, and a merge of the run made since is scrubbed by it. It covers the learning folder on the server; a Mode 2 agent's folder on an Archil disk keeps the text until a reset or the agent's purge. The bytes stay in the folder's `.git` until a learning reset (`DELETE /v2/agents/{agent_id}/learning`) or the agent's purge, which delete the folder whole; a promotion record keeps its commit ids. A second `DELETE` of a purged run does this again, so a run purged before this release loses its text the same way; it is `204` with no body as before, and `503 unavailable` while the learning folder can't be written. <!-- changes/purge-learning-text.md -->
|
|
105
|
+
- Run ids minted in one millisecond now list and claim in creation order: every run id comes from the monotonic UUIDv7 minter uploads already use, so two runs started in the same millisecond list newest first and a runner claims the older first. Before, a run id's bits after its time were random, and such runs listed and were claimed in either order. A purge on SQLite now writes its scrub marker (`store.sqlite.scrub`) before it changes a row, so a full disk refuses the `DELETE` (500 `internal`) with nothing purged and the retry purges whole. A retried `DELETE` of a purged run or agent does no checkpoint and writes nothing. A purge that commits and then fails (a Postgres commit left unanswered) no longer keeps the run's answer and input in the server's memory. <!-- changes/purge-marker-first.md -->
|
|
106
|
+
- A learned workflow whose `workflow.json` a purged run changed last is refused by every read, however old its merge: its file read is `410 purged`, a champion read by its digest reads no commit, a later merge's diff shows the file as added (never the purged text), an SDK start sent again whose receipt pinned it is `410 purged`, and no run lays or serves it, so the agent takes the run. Before, the file read, the diff, an SDK receipt and a run's seed served the purged text, and a champion read served it once the merge was older than the log's newest 200 changes. <!-- changes/purged-workflow-refused.md -->
|
|
107
|
+
- A run can bring its own tool keys: `keys: {"PARALLEL_API_KEY": "..."}` on `POST /v2/runs`, `POST /v2/agents/{agent_id}/runs` and a message, for the tool keys its revision reads (422 at `keys.<NAME>` otherwise). <!-- changes/run-keys.md -->
|
|
108
|
+
Each one is sealed with the run's launch, opened at its claim for its tools alone and erased from the store when its turn ends; the runner's redactor keeps the value in memory to cut it. It is never in the run's body, timeline, view or logs, and the runner cuts it from what the run writes.
|
|
109
|
+
`AGENTRUN_RUN_KEYS=1`: a template's apply makes its agent though a tool key it declares is not set here, with a warning, and each run of that agent must bring the key in `keys` (409 `agent_not_runnable` at `keys.<NAME>` without it). Keys the server holds are still used by runs that bring none. The monid key stays the server's: an agent's monid tools are checked with it when the agent is saved, so with none on the server a template granting them is still refused at its apply.
|
|
110
|
+
- A run's purge takes each learned workflow whose `workflow.json` it changed last off main, its README.md too, so both file reads are `404`, the learning view no longer lists it, and the next compile turn is never asked to revise its text. Before, its README.md and description were still served and a held revision of it went into the next run's compile prompt; a run purged before this takes its workflows off when its `DELETE` is sent again. <!-- changes/purge-takes-workflows-off-main.md -->
|
|
111
|
+
- Console: a finished run's recording on the Screen tab has the run's steps beside it. Each step the run took while the file was recorded is listed at its time on the video, in the Timeline tab's words; clicking one moves the video there, and the step the video is at is marked as it plays. A step's time is its timeline time since the row that says the recording began, so a run whose timeline has no such row plays its recording alone, as before. The steps sit beside the player on a wide window and under it on a narrow one. <!-- changes/console-recording-steps.md -->
|
|
112
|
+
- Launch hook: with `AGENTRUN_LAUNCH_HOOK_URL` and `AGENTRUN_LAUNCH_HOOK_SECRET` set, each trigger firing that would start a run is POSTed to the host instead, signed as Standard Webhooks (`{firing_id, trigger_id, agent_id, revision_id, input, fired_at}`), and the host starts the run through the API with its own keys and cap. The host passes the new `trigger_firing` (`{trigger_id, firing_id}`) on `POST /agents/{agent_id}/runs`, so the run is the firing's: it carries the trigger, its title and input origin, and the firing reads `started` with it, counted by the overlap check and `max_active_runs`. The host may start the run before or after it answers: a 2xx without the run records the firing `sent` with `start_by`, 10 minutes after that answer, and it takes that one start until then. The 10 minutes run from the answer, not from `fired_at`, so a catch-up, a firing that waited on `max_active_runs` or one handed again after a restart gets the same time. Any other answer, or none in 10 s, records it `skipped` with why. The hook URL is https, or http to 127.0.0.0/8, `::1` or `localhost` alone; any other http URL stops the start. On an API-only server (`AGENTRUN_API_ONLY=1`), the hook is what lets a template's apply make its schedule and feed triggers. Unset, firings start their runs as before, and `trigger_firing` is refused. <!-- changes/trigger-launch-hook.md -->
|
|
113
|
+
- `GET /v2/settings/mcp-server-names` answers the names of the MCP servers saved here, `{names}`, and nothing else of them: no URL, auth type, header, tool or Composio record. It takes the server's token and is served on an API-only server too (`AGENTRUN_API_ONLY=1`), so a host that builds runs from saved servers can hold back a job whose server isn't saved before its launch is refused for it. <!-- changes/mcp-server-names.md -->
|
|
114
|
+
- A Composio user id may hold a `:`, so a run's `mcp_auth` can bind a per-run Composio server to a team's connected account by the user a host names it with (`team:<tenant>`), and a preset save may name such a user. A space, a slash and a `~` are still refused. <!-- changes/composio-team-user.md -->
|
|
115
|
+
- A key a run brings in `keys` or `model_key` is text of 8 or more characters with no space or control character: a shorter one could not be cut from what the run writes, so it is now 422 `invalid` at `keys.<NAME>` or `model_key`, the value never echoed. With `AGENTRUN_RUN_KEYS=1`, no trigger is made whose firings would run an agent without the tool keys each of its runs must bring: a template's apply skips such triggers with a warning at `triggers.<N>` (`not_set_up_here`, the apply still 201) unless the launch hook is set, and `POST /v2/triggers`, or a `PATCH` that moves a trigger, is 409 `agent_not_runnable` naming the keys for one that would start such runs with no hook, or message one of them. <!-- changes/run-keys-hardening.md -->
|
|
116
|
+
- A run's view, and so every runs list, is several times faster for runs with long timelines: redacting a timeline's rows no longer derives every held value's forms again for each row (its path spellings, base64 at three alignments, percent forms, hex and folded patterns). What is derived of a set of values is kept per array and derived again when the array's values change, so a value a caller adds is still cut, and what is cut is unchanged. On a store of code-review runs of about 2,500 journal writes each, one run's view went from about 3.2 s to 0.7 s, and a list of ten runs from about 22 s to 5 s. <!-- changes/redact-derived-once.md -->
|
|
117
|
+
- A server runs a harness recipe it is started with: `agentrun-serve --harness-recipe FILE` (repeatable, or `AGENTRUN_SERVE_HARNESS_RECIPES`), and `agentrun-serve runner` takes the same flag. The harness is listed, and a run starts, only once a `harness-check` passed on the data directory for that recipe file, binary and tree (`<id>.checked`; else `HARNESS_NOT_CHECKED`); each start digests the binary and tree again. A proxy-billed agent runs on the server's model proxy. A plan-billed one runs on keys saved for its harness, which no server saves yet (`HARNESS_KEYS_NOT_SAVED`), or, on a server its owner starts with `--harness-sign-in` on their own machine (loopback, its own SQLite store, its runs as its own user, one owner; else `HARNESS_SIGN_IN_NOT_LOCAL`), on the owner's own sign-in for a run a person starts; a scheduled or triggered run on it is refused at its claim, and a `message_run` trigger to a run on it is refused when made and skipped at each firing. `harness-check` runs on a recipe's keys alone, never the sign-in, and a plan-billed recipe must name a key. `agentrun harness sign-in` prints one warning line that the vendor's terms (the recipe's new `signIn.terms`) may not cover use through AgentRun. A run's agent reaches beyond loopback only through the server's egress proxy, to the recipe's `model.hosts`. The loader now refuses a key whose name is not shaped as a key (`FOO_CRED`: `RECIPE_KEY_NOT_OWN`). <!-- changes/recipe-run-path.md -->
|
|
118
|
+
- A template package can be read on its own: `GET /v2/templates/{template}` answers one package, bundled or imported, as `GET /v2/templates` lists it, with its instructions and every skill file in full (placeholders unfilled), and its console apply page as `console_url`. Before, that path took only `DELETE` and a `GET` of it was `405 method_not_allowed`, and a bundled package's instructions and skills could not be read through the API at all before applying it. An unknown id is `404 not_found`; an imported id is URL-encoded (`github%3Aacme%2Fagents%2Fkyb`). The CLI has it as `agentrun template get TEMPLATE`, and the TypeScript and Python clients as `client.template.get(id)`. The console's "set up with a coding agent" prompt for a template now points the agent at that package's own URL instead of the whole list. <!-- changes/get-one-template.md -->
|
|
119
|
+
- A backend SDK run (`POST /agents/{agent_id}/sdk-runs`) can now run longer than an hour, be reported after it began, and carry its own title and labels. <!-- changes/sdk-run-start-fields.md -->
|
|
120
|
+
- Each events batch, an empty `events: []` one included, moves the run's deadline to an hour after that batch, up to 24 hours after its start. A run that misses its deadline still ends with an unknown outcome, as before.
|
|
121
|
+
- The start takes optional `started_at` (RFC 3339, at most 60 seconds ahead of the server's clock and 7 days behind it), which becomes the run's `created_at`. The deadline is still counted from the start request. Those bounds apply to a new start only: a retry under the same `Idempotency-Key` and body of a start that was made gets that run's receipt, however late it comes.
|
|
122
|
+
- The start takes optional `title` (trimmed, 1 to 200 characters), used instead of the input's first 80 characters, and `labels`, under the same rules as `RunCreate.labels`, so `GET /runs?label=<key>:<value>` finds the run. A label holding a server secret is refused.
|
|
123
|
+
- `GET /capabilities` says so in `features.sdk_runs`: `{ started_at: true, title: true, labels: true, max_open_s: 86400 }`.
|
|
124
|
+
- A start without these fields behaves as before. They are for SDK runs; a CLI learning turn takes none of them and keeps its 24-hour window.
|
|
125
|
+
|
|
5
126
|
## 0.1.0-beta.52 (2026-11-21)
|
|
6
127
|
|
|
7
128
|
**Breaking:**
|
|
@@ -219,7 +340,7 @@
|
|
|
219
340
|
- `GET /v2/computers`' `folder` field is described by its rule alone, naming no vendor: `bind` a folder of this machine (Mode 1), `archil` the owner's Archil disk where the provider takes an Archil mount, has Archil's image and does not dial this server, `sync` a synced folder the runner keeps for any other computer that takes a folder in Mode 2, null none. The computer package's README no longer says a program of the user can join the window manager's namespace with nsenter: root made it, and the user holds no capability there. A Daytona desktop on exec is refused in the shared refusal's words alone. `runConformance` takes `onScreenshot(png)`, called with screen.screenshot-size's last whole screenshot. <!-- changes/computer-untangle-16.md -->
|
|
220
341
|
- In the console, updating an agent from a template (Update <agent>) now says it was updated and names the new revision ("Updated: rev 2"). It used to say the template was applied and "The agent is made", as if the apply had made a new agent. Only an Apply that makes a new agent says "made". <!-- changes/template-update-says-updated.md -->
|
|
221
342
|
- A scheduled run handed its previous result's `x-carried` fields is told how many entries each carried array lost from its front, "the first N entries" (the template keeps the array oldest first), no longer "the N oldest": the engine drops from the front and reads no dates. A stored `x-carried` the save would refuse (a repeated, unknown or empty name) is read as none, so its run gets the too-large line. `submitParameters` leaves every `x-` keyword out of submit tool schemas, as it does `criteria`, not only `x-carried`; a property or definition so named keeps its name. <!-- changes/x-carried-first-entries.md -->
|
|
222
|
-
- A run's look-back (its own after its job, or the feedback round a grade opens) keeps the run's end
|
|
343
|
+
- A run's look-back (its own after its job, or the feedback round a grade opens) keeps the run's end, so GET, the list, SSE and the console show it completed or failed with its answer and `ended_at` while its learning reads `reflecting`, it tells `run.ended` once, a stop or cancel that lands mid-round drops only the round, and `PUT /v2/runs/{run_id}/grade` meanwhile is `409 run_learning`, a new error code. <!-- changes/grade-keeps-run-end.md -->
|
|
223
344
|
- `GET /v2/runs/{run_id}/usage` gives `browser_sessions` (`runusage/2`): one record per browser session the run opened, with the provider's session id, when the server opened it and let it go, why it ended, the seconds charged for it, and the provider's own record of it (`provider_record`: its start, end and proxy bytes), read once when the session is let go. With it a person running AgentRun sees how long each session ran, spots one that ended late or was lost, and finds each on the provider's own dashboard and invoice by its id. A provider that keeps no record, or a read that fails, says so in `provider_record_status`, with the record null, never zeros. In the computer package, a browser provider may offer `sessionUsage(ref)`, the vendor's record of a session; Browserbase's reads `GET /v1/sessions/{id}`. <!-- changes/run-usage-browser-sessions.md -->
|
|
224
345
|
- `GET /v2/runs/{run_id}/usage` gives `computer_intervals` (`runusage/3`): one record per computer the run made through its provider (a sandbox, a desktop or a phone), by when each was made, with the provider's own id for it (`provider_id`), its `kind`, what its create asked for (`gpu`, `cpus`, `memory_mb`; null where it asked none, never a guess), when the create answered (`started_at`), when the provider's delete of it answered ok (`ended_at`), and whether the run's park kept it past its claim (`kept`). With it a person running AgentRun sees how long each of a run's computers lived, finds one left running after its run (`ended_at` null: no delete was proven, never a guessed end), and matches the provider's invoice by its id. The server writes the store's new `computer_intervals` table (Postgres migration `0022_computer_intervals.sql`; a SQLite store gets it at the server's open) at the claim's create, the park, and every delete that answers ok: the claim's release, a later claim letting an earlier one's go, the run's end, a kept computer's end, and the janitor's sweeps. A write that fails is said on the runner's log and never fails the run. The agent's own computer, a paired one and `--faux`'s have no record. Computer time is not priced: it is on no line and not in `total`. A `tools` line now names its `provider` too, the same vendor as `charged_by`; a `tokens` line behind a model gateway keeps `provider` null, since the server does not know the gateway's upstream. <!-- changes/computer-intervals.md -->
|
|
225
346
|
- An agent whose `input_schema` fields are all optional takes a run that gives one of them and no `content` (`{"pr_number": 3318}` was refused 422). An input with neither is still refused at `input.content`. <!-- changes/input-content-or-field.md -->
|
package/README.md
CHANGED
|
@@ -14,6 +14,11 @@ sign-in and configuration. Turn **Self-improving** On separately to give later r
|
|
|
14
14
|
corrections. Eligible server-run and SDK agents can also compile checked workflows; CLI capture has no workflow
|
|
15
15
|
bridge. Imported history stays historical and does not automatically train the agent.
|
|
16
16
|
|
|
17
|
+
New source connections also keep their setup in sync by default. A supported complete setup can **Move to AgentRun**
|
|
18
|
+
from the same agent page, retaining its identity and history. Destination accounts and unsupported tools/settings
|
|
19
|
+
appear as prerequisites. See [source sync and Move](../../docs/source-sync.md) for scope, project continuity,
|
|
20
|
+
conflicts and current compatibility; `--no-sync` opts out when connecting.
|
|
21
|
+
|
|
17
22
|
For a source on a different laptop, VM or container, choose **Connection setup → Another machine** and use the
|
|
18
23
|
matching [Python source connector](../../connector/README.md). Remote execution currently needs the server and
|
|
19
24
|
connector from the same reviewed development checkout; the published observation-only CLI does not include it.
|
|
@@ -723,6 +728,45 @@ AGENTRUN_DOCKER_IMAGE=python:3.12-bookworm AGENTRUN_BOXES=docker node packages/s
|
|
|
723
728
|
`sh`, `sleep` and `setsid`, and `bash` for the `bash` tool when there is one (else `sh`). The image's own entrypoint
|
|
724
729
|
never runs; the box's first process is a `sleep` of its lifetime.
|
|
725
730
|
|
|
731
|
+
**The media image.** For an agent that makes video, the computer package keeps a second recipe,
|
|
732
|
+
`packages/computer/media/Dockerfile`: the default image's base, by the same digest, and its programs, plus Node 24 from
|
|
733
|
+
its official tarball (each architecture's sha256 checked), Chromium (also on PATH as `chrome`), FFmpeg and FFprobe,
|
|
734
|
+
Noto (with CJK and colour emoji), Liberation and DejaVu fonts, and the [HyperFrames](https://github.com/heygen-com/hyperframes)
|
|
735
|
+
CLI at an exact version. On amd64 it also has the `chrome-headless-shell` build that CLI pins, by sha256, so a render
|
|
736
|
+
needs no download. The CLI's usage reports and update check are off unless a command turns them on. Nothing builds it for
|
|
737
|
+
you, and no agent setting picks it: build it, then name its tag in `AGENTRUN_DOCKER_IMAGE`. From the repository's root:
|
|
738
|
+
|
|
739
|
+
```sh
|
|
740
|
+
tag=agentrun-media:$(sha256sum packages/computer/media/Dockerfile | cut -c1-12)
|
|
741
|
+
docker build -t "$tag" - < packages/computer/media/Dockerfile
|
|
742
|
+
AGENTRUN_DOCKER_IMAGE=$tag AGENTRUN_BOXES=docker node packages/serve/dist/cli.js
|
|
743
|
+
```
|
|
744
|
+
|
|
745
|
+
The tag is the recipe's hash, so an edit to the recipe is a new tag, and a tag already on this machine is used as it is
|
|
746
|
+
(nothing is pulled). Its Debian packages come from snapshot.debian.org (over https) at one instant, and the CLI's npm
|
|
747
|
+
dependencies from the registry as it stood at that instant (by date, not by content), so two builds of one tag install
|
|
748
|
+
the same Debian packages. It is about 2.7 GB on disk. An agent that needs it says so with
|
|
749
|
+
[`computer.needs`](#computers), so a server on another image fails its runs in words instead of running them.
|
|
750
|
+
|
|
751
|
+
**The documents image.** For an agent that writes decks, documents and sheets, `packages/computer/documents` is the
|
|
752
|
+
default image plus the Python and Node libraries that write Office files (python-pptx, python-docx and openpyxl for
|
|
753
|
+
`python3`; pptxgenjs, docx and exceljs for `node`), pinned as its header says. The Node libraries are linked as
|
|
754
|
+
`/node_modules`, so a script in any folder requires or imports them. The libraries are the folder's
|
|
755
|
+
`documents.sh`, the one layer both builds run. Build it and name its tag in `AGENTRUN_DOCKER_IMAGE`:
|
|
756
|
+
|
|
757
|
+
```sh
|
|
758
|
+
tag=agentrun-documents:$(cat packages/computer/documents/Dockerfile packages/computer/documents/documents.sh | sha256sum | cut -c1-12)
|
|
759
|
+
docker build -t "$tag" packages/computer/documents
|
|
760
|
+
AGENTRUN_DOCKER_IMAGE=$tag AGENTRUN_BOXES=docker node packages/serve/dist/cli.js
|
|
761
|
+
```
|
|
762
|
+
|
|
763
|
+
On Daytona, `python3 packages/computer/box/build-daytona.py --documents` builds the box
|
|
764
|
+
image with the same layer on top as the snapshot `agentrun-documents-<hash>` (the box recipe's snapshot,
|
|
765
|
+
`agentrun-box-<hash>`, is unchanged); name it in `AGENTRUN_DAYTONA_SNAPSHOT`. An agent that needs them says so in
|
|
766
|
+
`computer.needs` (`["python-pptx", "pptxgenjs"]`), and a box without them ends its runs before any model request; on
|
|
767
|
+
Docker, the words name this image's build. Neither is published, and no agent setting picks one: a server's Docker image, or its
|
|
768
|
+
Daytona snapshot, is one for every agent.
|
|
769
|
+
|
|
726
770
|
### In the published image
|
|
727
771
|
|
|
728
772
|
The published image, `ghcr.io/parcha-ai/agentrun-server`, runs Docker sandboxes on the Docker of the host it runs on,
|
|
@@ -831,6 +875,31 @@ They apply to Docker computers only: a vendor's computer (Daytona, Modal, E2B, O
|
|
|
831
875
|
size its provider makes it, and is never given them. A value the Docker provider refuses stops the server's start, in
|
|
832
876
|
the provider's words.
|
|
833
877
|
|
|
878
|
+
**What a sandbox needs.** A sandbox may list the programs its agent's work needs on the box's PATH:
|
|
879
|
+
`"computer": {"kind": "sandbox", "provider": "docker", "needs": ["chrome", "ffmpeg", "ffprobe", "hyperframes"]}`, 1 to
|
|
880
|
+
32 names (letters, digits, `.`, `_`, `+` and `-`; no path), each once. A name may also be a library the agent's code
|
|
881
|
+
loads: a Python package by the name pip installs it by (`python-pptx`), which the box's `python3` has installed, or a
|
|
882
|
+
Node package (`pptxgenjs`), which a script of the box's `node` requires (from `node_modules` of the folder the check
|
|
883
|
+
runs in or any folder above it, up to `/node_modules`). A scoped npm package (`@scope/name`) can't be named. It says what the box must have, never which
|
|
884
|
+
image it is: a Docker box's image is still `AGENTRUN_DOCKER_IMAGE`'s, and another provider's is its own. Each run's
|
|
885
|
+
claim asks the box it started, before the run's first model request: one `sh` with the names as its arguments, which
|
|
886
|
+
prints those that are neither a program `command -v` finds nor such a library, searching the folders the agent's shell searches (`/usr/local/sbin`,
|
|
887
|
+
`/usr/local/bin`, `/usr/sbin`, `/usr/bin`, `/sbin`, `/bin`), never a PATH the image sets. A box that lacks one, or that cannot be asked, is let go and the run ends
|
|
888
|
+
`failed` (`run_failed`), its words naming what is missing and how to give the box an image that has it:
|
|
889
|
+
|
|
890
|
+
```text
|
|
891
|
+
This agent's sandbox on Docker lacks chrome, ffmpeg, ffprobe, and hyperframes, which the agent needs (computer.needs),
|
|
892
|
+
so nothing ran. Set AGENTRUN_DOCKER_IMAGE to an image that has them and restart the server. For video (chrome, ffmpeg,
|
|
893
|
+
ffprobe, hyperframes), build the media image: ...
|
|
894
|
+
```
|
|
895
|
+
|
|
896
|
+
Nothing is installed and nothing falls back. A provider whose image is a setting of its own (Daytona's
|
|
897
|
+
`AGENTRUN_DAYTONA_SNAPSHOT`) is named in the fix instead. Only a sandbox takes `needs` (422 `not_allowed` on another
|
|
898
|
+
kind; a stored setting or a launch's computer that has them on another kind fails the run at claim in words, nothing
|
|
899
|
+
started); an agent without it is checked for nothing, and its revision is as before. A template states them as `needs`
|
|
900
|
+
beside `computer: [shell]` ([templates](templates/README.md)), and apply writes them onto the sandbox it picks, or
|
|
901
|
+
refuses where the shell here is no sandbox.
|
|
902
|
+
|
|
834
903
|
**A lost sandbox.** A run's sandbox can be lost mid-run: its vendor deleted it (from its own console or API), or no
|
|
835
904
|
longer has it. The tool call in flight when the loss is confirmed fails with code `gone`: `the computer <name> was lost
|
|
836
905
|
while this call ran, and it was not run again: <the provider's words>. A new computer starts at the next call.` It is
|
|
@@ -1291,7 +1360,8 @@ Custody, as for a per_run MCP server's `mcp_auth`:
|
|
|
1291
1360
|
keeps failing, the message waits untaken and is delivered again, never run on the key held before it or the
|
|
1292
1361
|
server's. A stop or cancel sent after it still reaches the run. A message without one keeps the key the run holds.
|
|
1293
1362
|
|
|
1294
|
-
**The revoke-at-turn-end contract.** The write that ends a run's turn erases its key
|
|
1363
|
+
**The revoke-at-turn-end contract.** The write that ends a run's turn erases its key from the store (the runner's
|
|
1364
|
+
redactor keeps the value in memory to cut it), and the run reports the turn
|
|
1295
1365
|
ended (`run.ended`, the run's `completed`, `failed` or `stopped` status) only after that write. Every model request
|
|
1296
1366
|
tied to the turn finishes before then: the job, its subagents, its learned workflows' nodes, its end-of-run compile
|
|
1297
1367
|
turn. So a caller may revoke the key as soon as it sees the turn end, and no request of that run will
|
|
@@ -1308,6 +1378,47 @@ Jev and the other decision providers run on their own keys (`TYPESAFE_API_KEY`,
|
|
|
1308
1378
|
`OPENROUTER_API_KEY`), which are not model keys and which a run's key does not replace. On a run that brings its own
|
|
1309
1379
|
key, no model key is on the env its decision nodes run under, so Jev's route on an openrouter.ai gateway's key is off.
|
|
1310
1380
|
|
|
1381
|
+
### Per-run tool keys
|
|
1382
|
+
|
|
1383
|
+
A caller can hand a run its own tool keys with `keys` on `POST /v2/runs`, `POST /v2/agents/{agent_id}/runs` and
|
|
1384
|
+
`POST /v2/runs/{run_id}/messages`: `{"PARALLEL_API_KEY": "..."}`. The run's tools use each one in place of the server's
|
|
1385
|
+
key of that name. The names a run can carry are the tool keys: `PARALLEL_API_KEY` (`web_search`, `web_fetch`, Parallel
|
|
1386
|
+
decisions), `MONID_API_KEY`, `BROWSERBASE_API_KEY` with `BROWSERBASE_PROJECT_ID` or `KERNEL_API_KEY` (`browser`) and
|
|
1387
|
+
`TYPESAFE_API_KEY` (Jev). A model key goes in `model_key`, above.
|
|
1388
|
+
|
|
1389
|
+
```sh
|
|
1390
|
+
curl -s http://127.0.0.1:7340/v2/agents/searcher/runs -H "Authorization: Bearer $AGENTRUN_TOKEN" \
|
|
1391
|
+
-H 'content-type: application/json' \
|
|
1392
|
+
-d "{\"input\": {\"content\": \"Find the release notes\"}, \"keys\": {\"PARALLEL_API_KEY\": \"$CUSTOMER_PARALLEL_KEY\"}}"
|
|
1393
|
+
```
|
|
1394
|
+
|
|
1395
|
+
- A name that is not a tool key, or one no tool of the run's revision reads (its tools, its workflow's nodes and
|
|
1396
|
+
decision providers, and the keys its template declares), is 422 at `keys.<NAME>`, the value never echoed. So is a
|
|
1397
|
+
value that is not text of 8 or more characters with no space or control character (`invalid`): the runner could
|
|
1398
|
+
not cut a shorter one from what the run writes.
|
|
1399
|
+
- The keys are taken out of the body before anything reads it, as `model_key` is: never in the run's saved body, its
|
|
1400
|
+
timeline, its view, a log or an `Idempotency-Key`'s fingerprint. They are sealed with the run's launch, opened at
|
|
1401
|
+
each claim for its tools alone, and erased from the store by the write that ends its turn; the runner's redactor
|
|
1402
|
+
keeps each value in memory to cut it. Since no read after that could cut them, the runner cuts them from everything
|
|
1403
|
+
the run writes, as it writes it.
|
|
1404
|
+
- A message's `keys` replace the run's in the message's own write, read from the run's next claim on; a turn still
|
|
1405
|
+
going keeps the keys it opened. `keys: {}` leaves the run none. A message without them keeps the run's, which are
|
|
1406
|
+
none once its last turn ended.
|
|
1407
|
+
|
|
1408
|
+
**Tool keys each run brings: `AGENTRUN_RUN_KEYS=1`.** Off, a template's apply refuses a tool key the server does not
|
|
1409
|
+
hold (409, as before). With `1`, a template's apply makes its agent though a tool key it declares is not set here, with
|
|
1410
|
+
a warning, and each run of that agent must bring the key in `keys`: without it, the run is 409 `agent_not_runnable` at
|
|
1411
|
+
`keys.<NAME>` before anything is made, and so is a message that would start a turn. Keys the server holds are still
|
|
1412
|
+
used by runs that bring none. A trigger's firing brings no keys, so no trigger is made whose firings would start or
|
|
1413
|
+
message such runs without them: the apply skips the template's triggers with a warning at `triggers.<N>`
|
|
1414
|
+
(`not_set_up_here`, the apply still 201), unless the [launch hook](#launch-hook) is set, which hands each firing to
|
|
1415
|
+
your backend to start the run with its keys; `POST /v2/triggers`, or a `PATCH` that moves a trigger, is 409
|
|
1416
|
+
`agent_not_runnable` naming the keys for a trigger that would start runs of the agent with no hook, or message one of
|
|
1417
|
+
its runs, hook or not. `MONID_API_KEY` stays the server's even with
|
|
1418
|
+
the setting on: an agent's monid tools are checked with it when the agent is saved, before any run, so a template that
|
|
1419
|
+
grants them is still refused at its apply (409 at `secrets.MONID_API_KEY`) where the server has none. A run can still
|
|
1420
|
+
bring its own monid key to use in place of the server's.
|
|
1421
|
+
|
|
1311
1422
|
### Direct Particle-1
|
|
1312
1423
|
|
|
1313
1424
|
Save a Particle key in **Settings → Model keys → Particle**, then select `particle/particle-1` with the **Pi** harness.
|
|
@@ -1978,8 +2089,8 @@ its charge unknown, as any cut call's) and given back when monid refused it unru
|
|
|
1978
2089
|
which `maxCost` 0 lets through) is the call, settled at its charge. Under a cap, a read that ends with its charge unknown
|
|
1979
2090
|
(no answer, or `FAILED` with no cost) stops the run at once, "monid may have charged for <name> and did not say how
|
|
1980
2091
|
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
|
|
1981
|
-
as charged
|
|
1982
|
-
|
|
2092
|
+
as charged and logged ("monid charged $X, more than the $Y held"), and the run goes on while its charges fit its cap; one
|
|
2093
|
+
that takes them past it stops the run at once in the cap's words ([Spend cap](#spend-cap)). A mark a crash left unsettled leaves the run's cost unknown, as a
|
|
1983
2094
|
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
|
|
1984
2095
|
no cost (`FAILED`, `TIMED_OUT`, one stopped by the run or the wait, one whose sending failed) books an unknown charge,
|
|
1985
2096
|
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
|
|
@@ -2088,6 +2199,15 @@ Streamable HTTP with the official MCP SDK client (`@modelcontextprotocol/client`
|
|
|
2088
2199
|
value}}` (up to 8). An `oauth` server is signed in to first ([below](#signing-in-with-oauth)), then previewed by name.
|
|
2089
2200
|
`url` is `https`, or `http` on loopback.
|
|
2090
2201
|
|
|
2202
|
+
A server advertising MCP resources also lists three AgentRun-generated read operations, including when it has no
|
|
2203
|
+
tools: `agentrun_list_resources` (`resource: "list"`), `agentrun_list_resource_templates` (`resource: "templates"`)
|
|
2204
|
+
and `agentrun_read_resource` (`resource: "read"`). The first two take `{}`; read takes `{uri}`. They are granted,
|
|
2205
|
+
pinned and gated like tools, using the same destination credential, but dispatch MCP resource methods. URIs are
|
|
2206
|
+
passed to that server rather than fetched directly. Resource lists include all pages within 500 entries, 1 MiB
|
|
2207
|
+
and one call deadline; exceeding a bound fails without a partial list. Text uses the ordinary answer filing and
|
|
2208
|
+
credential scrub. A binary resource containing a connection credential is withheld. These three names are reserved:
|
|
2209
|
+
an upstream ordinary tool with one of them makes preview or save fail. A name alone never grants resource authority.
|
|
2210
|
+
|
|
2091
2211
|
### Composio
|
|
2092
2212
|
|
|
2093
2213
|
Composio is an MCP server like any other, so it needs no adapter of its own. Settings → MCP servers has a Composio
|
|
@@ -2129,8 +2249,9 @@ curl -X POST "$BASE/v2/agents/$AGENT/runs" -H "authorization: Bearer $TOKEN" -H
|
|
|
2129
2249
|
`composio_user_id` is a Composio user id; `connected_account_id`, optional, is one of that user's connected accounts
|
|
2130
2250
|
(`ca_...`), and without it Composio picks the user's account for the toolkit. Each request to the server carries that
|
|
2131
2251
|
user and account, the Composio key staying the server's own. The binding is kept as a `per_run` server's headers are:
|
|
2132
|
-
sealed into the run's launch, erased by the write that ends the run, never on the server's row, the
|
|
2133
|
-
timeline, its trace or a log line, and its values are cut from whatever the run shows
|
|
2252
|
+
sealed into the run's launch, erased from the store by the write that ends the run, never on the server's row, the
|
|
2253
|
+
run's view, its timeline, its trace or a log line, and its values are cut from whatever the run shows (the runner's
|
|
2254
|
+
redactor keeps them in memory to cut them). A message's binding replaces the
|
|
2134
2255
|
run's for the turn it starts. A run that names no account has its calls of the server answered, unsent, that it was
|
|
2135
2256
|
handed none, so a per-run server never calls as a default account. A malformed user or account is `422 input_invalid` at
|
|
2136
2257
|
`mcp_auth.<server>.composio_user_id` or `.connected_account_id`, and so is a binding to the preset's default user
|
|
@@ -2202,9 +2323,10 @@ A per_run save keeps no secret, so the API token may make it, as it may preview
|
|
|
2202
2323
|
credentials such a server receives are the ones each run's own caller hands it. The run's calls of that server carry
|
|
2203
2324
|
those headers, and only to the origin the server had when the run was started. The
|
|
2204
2325
|
credential is sealed into the run's launch record under `AGENTRUN_SEAL_KEY` (bound to the run's id), read at each claim, so
|
|
2205
|
-
a resume, a restart or a lost lease uses it again, and erased by the write that ends the run. It is never
|
|
2206
|
-
saved body, its timeline, its view, a log line or an `Idempotency-Key`'s fingerprint (a retry with a new
|
|
2207
|
-
answers the first request's run), and its values are cut from whatever the run shows
|
|
2326
|
+
a resume, a restart or a lost lease uses it again, and erased from the store by the write that ends the run. It is never
|
|
2327
|
+
in the run's saved body, its timeline, its view, a log line or an `Idempotency-Key`'s fingerprint (a retry with a new
|
|
2328
|
+
credential answers the first request's run), and its values are cut from whatever the run shows (the runner's redactor
|
|
2329
|
+
keeps them in memory to cut them). `POST /v2/runs/{run_id}/messages`
|
|
2208
2330
|
takes `mcp_auth` too: it replaces the run's credentials in the message's own write, so the turn the message starts (a
|
|
2209
2331
|
steer into a working run from its next model request, or a follow-up that opens an ended run again) calls with them. A
|
|
2210
2332
|
name that is not a saved per_run server is `422` at `mcp_auth.<server>`, and no run starts. A run handed no credential
|
|
@@ -2908,8 +3030,9 @@ approve, such a send is refused in those words.
|
|
|
2908
3030
|
## Templates
|
|
2909
3031
|
|
|
2910
3032
|
A template package makes a working agent in one call: its definition, its skills and rules, and its triggers, from a
|
|
2911
|
-
folder the server ships. `GET /v2/templates` lists them; `
|
|
2912
|
-
|
|
3033
|
+
folder the server ships. `GET /v2/templates` lists them; `GET /v2/templates/{name}` reads one whole (its instructions and
|
|
3034
|
+
every skill file, as an import shows them); `POST /v2/templates/{name}/apply` with `{parameters, overrides?: {model}}`
|
|
3035
|
+
makes one, or nothing when a check fails (a trigger refused archives the agent it made). A
|
|
2913
3036
|
package's `version` is SemVer and never `definition.version`, the agent's revision number. A package's `composio` trigger names its
|
|
2914
3037
|
need's toolkit as its `server` (`server: github` for a required `{source: composio, toolkit: github}` need), and apply makes it
|
|
2915
3038
|
on the saved Composio server that need maps to, its `config` filled from the parameters it names
|
|
@@ -2967,6 +3090,7 @@ failed, 2 when nothing ran. The runner, the graders and the report are in
|
|
|
2967
3090
|
| `POST /runs/{id}/pause`, `POST /runs/{id}/resume` | A workflow run: what is in flight finishes, and no node, model call or decision starts until it is resumed. Its status reads `paused`, and stays so across a server restart. An agentic run is `501`, an ended one `409`. |
|
|
2968
3091
|
| `POST /workflows/validate` | `{workflow, tools?}`: every issue a save would refuse (`[{path, code, message}]`, the DSL's validation with code not run) and what this host lacks as `warnings`. Writes nothing. A refused save's `422` carries each issue as a field under `definition.workflow`, with its `code`. |
|
|
2969
3092
|
| `GET /settings/tool-keys`, `PUT` and `DELETE /settings/tool-keys/{id}` | [Tool keys](#tool-keys), this server's own routes (`x-agentrun-serve: "toolkeys/1"`): each key's fields by name and where each is set, never a value; save one sealed, or forget it. |
|
|
3093
|
+
| `GET /settings/mcp-server-names` | The saved MCP servers' names alone (`mcpservernames/1`), sorted, with the token, also [API-only](#api-only): no URL, auth type, header or tool. |
|
|
2970
3094
|
| `GET /settings/mcp-servers`, `POST /settings/mcp-servers/preview`, `GET`, `PUT` and `DELETE /settings/mcp-servers/{name}`, `POST .../{name}/refresh`, `POST .../{name}/oauth/start`, `GET /settings/mcp-servers/oauth/callback` and `GET .../oauth/client.json` | [MCP servers](#mcp-servers), this server's own routes (`x-agentrun-serve: "mcpservers/1"`): preview a remote MCP server's tools, save it with its credential sealed, read it back without the credential, refresh its tools, forget it, or [sign in to it with OAuth](#signing-in-with-oauth) (the callback and the client document take no token). |
|
|
2971
3095
|
| `GET /settings/tools`, `PUT /settings/tools` | This server's own: the providers of `web_search`, `web_fetch` and `browser` ([search and fetch](#search-and-fetch)). |
|
|
2972
3096
|
| `GET /runs/{id}/browser` | This server's own (`x-agentrun-serve: "liveview/1"`): the run's live browser view for the owner, `{state: "off", reason}`, `{state: "none"}` or `{state: "live", viewer}` ([the live view](#the-browsers-live-view)). |
|
|
@@ -3103,6 +3227,18 @@ serves these routes alone:
|
|
|
3103
3227
|
- a run's hosted machine fetching this server's computerd build (`GET /computers/daemon`), with the token its create
|
|
3104
3228
|
minted;
|
|
3105
3229
|
- `GET /capabilities`, `GET /health`, `GET /usage` and `GET /capacity`;
|
|
3230
|
+
- the names of the MCP servers saved here (`GET /settings/mcp-server-names`, `{names}`), never a URL or a credential:
|
|
3231
|
+
a backend that builds runs from saved servers holds back a job whose server isn't saved, before its launch is refused;
|
|
3232
|
+
- a deploy, for a backend that deploys agents here: a template's apply (`POST /templates/{id}/apply`, a redeploy with
|
|
3233
|
+
its `agent_id`), the agent's read (`GET /agents/{id}`), its revisions (`GET /agents/{id}/revisions`), a rollback
|
|
3234
|
+
(`POST /agents/{id}/current`), and its archive and unarchive (`POST /agents/{id}/archive`, `/unarchive`). The archive
|
|
3235
|
+
is what its delete (`DELETE /agents/{id}`) needs first. A run here starts through the backend, on its keys and
|
|
3236
|
+
budget, never on this server's own model key. So with the [launch hook](#launch-hook) set, the apply makes the
|
|
3237
|
+
package's schedule and feed triggers, and each firing goes to the backend, which starts its run through the API; the
|
|
3238
|
+
unarchive turns them on again, as no trigger route is served to. Without the hook it makes neither (`not_set_up_here`: set
|
|
3239
|
+
the hook, or start those runs through the API). A webhook, GitHub, Composio or email trigger is never made here, hook
|
|
3240
|
+
or not, since this profile refuses the hook or setting each needs (`not_an_option`). Each skipped trigger is a warning
|
|
3241
|
+
under `warnings` (`triggers.<i>`), and the dry run (`dry_run: true`) plans it as `skip` in the same words;
|
|
3106
3242
|
- a run's desktop or phone, for a backend that shows its user the live view and lets them take over: see below.
|
|
3107
3243
|
|
|
3108
3244
|
Here a run's computer routes take the server's token. `POST /runs/{id}/computer/viewer` mints a 5-minute link on
|
|
@@ -3110,12 +3246,50 @@ Here a run's computer routes take the server's token. `POST /runs/{id}/computer/
|
|
|
3110
3246
|
|
|
3111
3247
|
Every other address is `404 not_found`, answered before the request is read further: the console at `/` and its
|
|
3112
3248
|
assets, sign-in and setup, every `/settings` route, `POST /mcp`, triggers and their
|
|
3113
|
-
`POST /hooks/{id}`, agents
|
|
3114
|
-
|
|
3115
|
-
|
|
3249
|
+
`POST /hooks/{id}`, the agents list, an agent made or edited through `/agents`, the templates list and every other
|
|
3250
|
+
template route, `/openapi.json`, `/llms.txt` and a browser's live view. It has no accounts: there is no page to sign in
|
|
3251
|
+
to, so no setup code is printed. The token works as it does on every route served. Unset, `0` or `false` serve the
|
|
3252
|
+
whole server, as before; any value other than these and `1` or `true` stops the start, in words.
|
|
3253
|
+
|
|
3254
|
+
So on an API-only server a run is launched inline (`POST /runs` with its definition), on an agent a template's apply
|
|
3255
|
+
made, or on an agent made before the profile was turned on.
|
|
3256
|
+
|
|
3257
|
+
### Launch hook
|
|
3258
|
+
|
|
3259
|
+
For an install that hosts agents for other people, where the host decides who pays for each run and with which keys,
|
|
3260
|
+
set `AGENTRUN_LAUNCH_HOOK_URL` to the host's address and `AGENTRUN_LAUNCH_HOOK_SECRET` to a Standard Webhooks secret
|
|
3261
|
+
(`whsec_` and 32 random bytes in base64; it is one of the server's own secrets, never a run's). Each trigger firing that
|
|
3262
|
+
would start a run (a schedule, a feed, a webhook, Composio, GitHub or email trigger, or Run now) is then POSTed to the
|
|
3263
|
+
host, and this server starts no run for it:
|
|
3264
|
+
|
|
3265
|
+
```json
|
|
3266
|
+
{ "firing_id": "fir_...", "trigger_id": "trg_...", "agent_id": "digest", "revision_id": "rev_...",
|
|
3267
|
+
"input": { "content": "Summarize yesterday's issues.\n\n(Started by the schedule ...)" },
|
|
3268
|
+
"fired_at": "2026-06-01T00:10:00Z" }
|
|
3269
|
+
```
|
|
3116
3270
|
|
|
3117
|
-
|
|
3118
|
-
|
|
3271
|
+
The POST carries `webhook-id` (the firing's id, the same if it is handed again), `webhook-timestamp` and
|
|
3272
|
+
`webhook-signature` as [webhooks](#webhooks) do: check them with any Standard Webhooks library before reading the
|
|
3273
|
+
body. The host starts the run with `POST /v2/agents/{agent_id}/runs`, giving the input, its own `model_key`, `keys` and
|
|
3274
|
+
`max_cost_usd`, and `"trigger_firing": { "trigger_id": ..., "firing_id": ... }` as it was sent, and answers 2xx within
|
|
3275
|
+
10 s. It can start the run before it answers or after: a firing it answered 2xx with no run yet reads `sent` with
|
|
3276
|
+
`start_by`, 10 minutes after that answer, takes that one start until then, and is refused with 422 `not_due` after.
|
|
3277
|
+
The 10 minutes run from the answer, not from `fired_at`, so a firing that reaches the host late (a catch-up, one that
|
|
3278
|
+
waited on `max_active_runs`, one handed again after a restart) gets the same time; the server never hands a `sent`
|
|
3279
|
+
firing over again. That run is
|
|
3280
|
+
the firing's, as one this server started would be: it names the trigger and the firing, carries the trigger's title and
|
|
3281
|
+
input origin, is capped, and the firing reads `started` with it, so the trigger's overlap check and `max_active_runs`
|
|
3282
|
+
count it. The firing is the run's key, so a second start for the same firing answers the same run and the request
|
|
3283
|
+
takes no `Idempotency-Key` (422 with one); a firing that is not being handed over (skipped, or one of another agent's
|
|
3284
|
+
triggers) is refused with 422. Until its run starts, a `sent` firing is one the overlap check cannot see. Any other
|
|
3285
|
+
answer, a redirect included (it is not followed), no answer in 10 s, or no connection, and the firing reads `skipped`
|
|
3286
|
+
with why, unless the host started its run by then; a skip is no failure and never turns the trigger off, and the
|
|
3287
|
+
server does not try that firing again. A firing the server's stop cuts short stays due and is handed again at the next
|
|
3288
|
+
start, under the same `webhook-id`. A `message_run` target starts no run and is unchanged. The start prints the hook's
|
|
3289
|
+
origin, never its path or the secret. The hook is `https`: a firing's input can carry a person's data, and the
|
|
3290
|
+
signature proves who sent it, not that no one else read it, so plain `http` is taken only for 127.0.0.0/8, `::1` or
|
|
3291
|
+
`localhost`. One of the two set without the other, a URL that is not https (or http to this machine) or holds a user
|
|
3292
|
+
or password, or a secret that is not a `whsec_` one of 24 bytes or more stops the start, in words.
|
|
3119
3293
|
|
|
3120
3294
|
## Uploads
|
|
3121
3295
|
|
|
@@ -3492,10 +3666,20 @@ stays in every total.
|
|
|
3492
3666
|
overwrites them. `VACUUM FULL` rewrites the table into a new file (under an exclusive lock), and the old file's
|
|
3493
3667
|
blocks go back to the filesystem unwiped. Postgres's own WAL and its archived WAL keep the old values until they are
|
|
3494
3668
|
recycled or expire, and backups keep them for their retention.
|
|
3495
|
-
- Its agent's other runs and what the agent learned from it are kept. A promotion record keeps the run's id
|
|
3496
|
-
|
|
3497
|
-
|
|
3498
|
-
|
|
3669
|
+
- Its agent's other runs and what the agent learned from it are kept. A promotion record keeps the run's id and the
|
|
3670
|
+
commits it names. A run's purge removes its diff file and its feedback line from the folder's current files, and the
|
|
3671
|
+
folder's history no longer serves its merge; the bytes stay in the folder's `.git` until a learning reset
|
|
3672
|
+
(`DELETE /v2/agents/{id}/learning`) or the agent's purge, which delete the folder whole. Each merge's feedback line goes in
|
|
3673
|
+
one commit by the host (none when nothing is left to remove), a line a person edited since stays, and another
|
|
3674
|
+
merge's diff that shows the line as context is written without it. The log and a workflow's revisions leave out its
|
|
3675
|
+
merges, known by the run the log names for each (its newest 200 changes). A purge takes each learned workflow whose
|
|
3676
|
+
`workflow.json` the run changed last (by the commits' run trailers over the whole history, past those 200) off main
|
|
3677
|
+
in one host commit, its whole folder: its file reads are `404`, no run lays it, and a read at an older commit
|
|
3678
|
+
(a champion by its digest, an SDK receipt's pinned commit, a later merge's diff, which shows its files as added)
|
|
3679
|
+
never serves its text. Each merge's scrub lands once, so a `DELETE` sent again
|
|
3680
|
+
after a stop takes no other run's same line, and a merge of the run made since is scrubbed by it. A second `DELETE`
|
|
3681
|
+
does this again. It covers the learning folder on this
|
|
3682
|
+
server; a Mode 2 agent's folder on an Archil disk keeps the run's text until a learning reset or the agent's purge.
|
|
3499
3683
|
- It takes the owner's session (the password sign-in, or the console on a server bound to loopback) or the API token;
|
|
3500
3684
|
any other console session is `403 forbidden`, no credential `401`. An [API-only](#api-only) server purges a run of
|
|
3501
3685
|
an agent another system owns alone; a run of an agent made here is its profile's `404` there.
|
|
@@ -3926,8 +4110,10 @@ A start reserves a check only on a turn that can be its baseline: a JSON object
|
|
|
3926
4110
|
schema (a prose task's input is resolved by the bridge), and a start whose task or instructions held a protected value
|
|
3927
4111
|
reserves nothing. A reserved turn that still cannot be the baseline (cancelled or failed, incomplete, redacted or
|
|
3928
4112
|
workflow-assisted evidence, no `workflow_check` report, or a shadow that `failed` or `skipped_write`) gives the
|
|
3929
|
-
reservation back: the record stays `replaying` with no `runs`, counts it in `check.released
|
|
3930
|
-
draft takes is checked.
|
|
4113
|
+
reservation back: the record stays `replaying` with no `runs`, counts it in `check.released` (a cancel is never
|
|
4114
|
+
counted), and the next turn the draft takes is checked. A turn that lands starts the count again; five counted
|
|
4115
|
+
give-backs in a row hold the draft, never promoted and never stopped for good: the agent's next compile, after
|
|
4116
|
+
`compile_after` more runs, revises it, and the revision is checked afresh. A turn the
|
|
3931
4117
|
backend never completes within an hour is decided as one failed input through the same check, so its hold asks the
|
|
3932
4118
|
one recompile and a recompile's check that ends the same way stops. Connected checks' records say `via: "sdk"`;
|
|
3933
4119
|
`check.fresh_reads` counts the shadow's `shadowReadFallback` reads.
|
|
@@ -4273,13 +4459,16 @@ spend limit. A workflow definition keeps one the same way. The cap is checked in
|
|
|
4273
4459
|
before each model request, the agent's and a compaction's alike, on every harness: what the run has spent so far, plus
|
|
4274
4460
|
what each request still in flight is held at, plus the most this request can cost must stay within it, or the
|
|
4275
4461
|
request is not sent and the run pauses ([below](#a-run-paused-at-its-cap)). The cap is a hard stop for everything but
|
|
4276
|
-
|
|
4277
|
-
|
|
4462
|
+
two charges that can pass what they were held at: a monid call priced by usage, which can pass monid's estimate
|
|
4463
|
+
([monid](#monid)), and a fal job, booked at the units its output states, which can pass those its input asked for. Either
|
|
4464
|
+
is booked as charged; when that takes the run past its cap, the run stops at once in the cap's words, nothing run after
|
|
4465
|
+
it, and below the cap the run goes on. An MCP tool counts only at the price saved for it (its server's `prices`); one with none is
|
|
4278
4466
|
not metered and bills its own account outside the cap. fal is counted: a job sent to a fal server (one saved with the
|
|
4279
4467
|
toolkit `fal`, or at `mcp.fal.ai`) through `run_model`, `submit_job` or `submit_jobs` is priced before it is sent, at
|
|
4280
4468
|
fal's unit price for its endpoint (the server's own `get_pricing`, read with the run's credential and kept five
|
|
4281
4469
|
minutes) times the units the job's input states: its images, their megapixels, its text's characters, the seconds it
|
|
4282
|
-
names, or
|
|
4470
|
+
names, or, for dubbing, lip-sync, voice isolation and speech-to-text, which fal bills by the length of the media they
|
|
4471
|
+
are given, that length, read from the file first. That price is held under the cap, a
|
|
4283
4472
|
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
|
|
4284
4473
|
server, with the price and the count it came from. It is an estimate at fal's list price, not fal's invoice: fal
|
|
4285
4474
|
reports no cost for a job, and a minimum charge, a discount or a rate that depends on a setting `get_pricing` does not
|