@parcha/agentrun-serve 0.1.0-beta.57 → 0.1.0-beta.59
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 +376 -0
- package/README.md +393 -118
- package/dist/acp-package.d.ts +5 -1
- package/dist/acp-package.js +19 -2
- package/dist/adapters.d.ts +23 -2
- package/dist/adapters.js +106 -33
- package/dist/agents-store.js +1 -1
- package/dist/answer-text.d.ts +3 -0
- package/dist/answer-text.js +22 -0
- package/dist/api-only.d.ts +2 -4
- package/dist/api-only.js +2 -4
- package/dist/attach-conformance.js +5 -4
- package/dist/box-paths.d.ts +7 -5
- package/dist/box-paths.js +12 -8
- package/dist/browser-computer.d.ts +3 -8
- package/dist/browser-computer.js +12 -35
- package/dist/browser-cost.js +94 -20
- package/dist/capacity.d.ts +1 -1
- package/dist/capacity.js +3 -3
- package/dist/chatgpt-plan.d.ts +5 -0
- package/dist/chatgpt-plan.js +25 -11
- package/dist/claude-login-token.d.ts +121 -0
- package/dist/claude-login-token.js +797 -0
- package/dist/claude-login.d.ts +119 -34
- package/dist/claude-login.js +551 -79
- package/dist/claude-sign-in.d.ts +3 -0
- package/dist/claude-sign-in.js +10 -1
- package/dist/cli.js +325 -328
- package/dist/composio-made.d.ts +1 -6
- package/dist/composio-made.js +1 -6
- package/dist/composio-owners.d.ts +26 -0
- package/dist/composio-owners.js +36 -0
- package/dist/composio-preset.d.ts +56 -23
- package/dist/composio-preset.js +173 -77
- package/dist/composio-triggers.d.ts +4 -4
- package/dist/composio-triggers.js +6 -7
- package/dist/compute-cost.js +11 -2
- package/dist/computer-attach.d.ts +40 -19
- package/dist/computer-attach.js +326 -62
- package/dist/computer-held-routes.d.ts +1 -1
- package/dist/computer-held-routes.js +9 -4
- package/dist/computer-keys.d.ts +11 -1
- package/dist/computer-keys.js +26 -1
- package/dist/computer-record.js +3 -1
- package/dist/computer-view.d.ts +5 -3
- package/dist/computer-view.js +10 -6
- package/dist/computer-viewer.js +36 -7
- package/dist/computers.d.ts +12 -11
- package/dist/computers.js +11 -8
- package/dist/console/THIRD-PARTY-NOTICES.txt +50 -0
- package/dist/console/assets/backend-BztxEAvb.js +166 -0
- package/dist/console/assets/index-LwNL4L9q.js +619 -0
- package/dist/console/assets/share-L84tlUDW.js +6 -0
- package/dist/console/assets/styles-CaRKlHke.js +291 -0
- package/dist/console/assets/styles-DQo8rzY-.css +1 -0
- package/dist/console/index.html +4 -3
- package/dist/console/share.html +17 -0
- package/dist/decisions.d.ts +17 -7
- package/dist/decisions.js +41 -15
- package/dist/dial-relay.d.ts +25 -4
- package/dist/dial-relay.js +139 -5
- package/dist/docker-daemon.js +4 -5
- package/dist/docker-host-addresses.js +29 -11
- package/dist/email/account.d.ts +6 -0
- package/dist/email/account.js +6 -0
- package/dist/email/authentication.d.ts +21 -0
- package/dist/email/authentication.js +106 -0
- package/dist/email/email-faux.d.ts +11 -2
- package/dist/email/email-faux.js +21 -5
- package/dist/email/mail.d.ts +25 -0
- package/dist/email/mail.js +58 -2
- package/dist/email/names.js +2 -2
- package/dist/email/tools.d.ts +9 -4
- package/dist/email/tools.js +95 -13
- package/dist/env-switch.d.ts +13 -5
- package/dist/env-switch.js +24 -6
- package/dist/errors.d.ts +1 -0
- package/dist/errors.js +2 -0
- package/dist/fal-price.d.ts +12 -4
- package/dist/fal-price.js +110 -26
- package/dist/faux-computers.js +1 -1
- package/dist/filed-answer.d.ts +2 -2
- package/dist/filed-answer.js +2 -2
- package/dist/graph-served.d.ts +10 -5
- package/dist/graph-served.js +40 -10
- package/dist/handed-values.js +1 -2
- package/dist/harness-check.d.ts +2 -1
- package/dist/harness-check.js +45 -12
- package/dist/harness-keys.js +9 -6
- package/dist/harness-opencode/facts.js +2 -0
- package/dist/harness-recipe-entry.d.ts +9 -3
- package/dist/harness-recipe-entry.js +18 -9
- package/dist/harness-recipe.d.ts +21 -0
- package/dist/harness-recipe.js +25 -3
- package/dist/harness-table.d.ts +8 -0
- package/dist/harness-table.js +17 -6
- package/dist/helper-env.d.ts +4 -1
- package/dist/helper-env.js +4 -1
- package/dist/host-check.d.ts +2 -3
- package/dist/host-check.js +13 -7
- package/dist/hosted-search.js +1 -1
- package/dist/import.d.ts +11 -8
- package/dist/import.js +437 -186
- package/dist/key-refusal.d.ts +9 -2
- package/dist/key-refusal.js +86 -32
- package/dist/learn/audit.d.ts +8 -5
- package/dist/learn/audit.js +15 -7
- package/dist/learn/compile.d.ts +5 -2
- package/dist/learn/compile.js +45 -21
- package/dist/learn/field-check.d.ts +111 -0
- package/dist/learn/field-check.js +174 -0
- package/dist/learn/ledger.d.ts +173 -0
- package/dist/learn/ledger.js +225 -0
- package/dist/learn/promote.d.ts +82 -39
- package/dist/learn/promote.js +61 -66
- package/dist/learn/secrets.d.ts +4 -0
- package/dist/learn/secrets.js +12 -0
- package/dist/learned-nodes.d.ts +8 -5
- package/dist/learned-nodes.js +8 -5
- package/dist/learned-workflow.d.ts +2 -1
- package/dist/learned-workflow.js +13 -10
- package/dist/learning-cost.d.ts +40 -21
- package/dist/learning-cost.js +30 -21
- package/dist/learning-setting.d.ts +6 -0
- package/dist/learning-setting.js +11 -1
- package/dist/listen-first.d.ts +5 -4
- package/dist/listen-first.js +4 -5
- package/dist/live-reach.d.ts +9 -0
- package/dist/live-reach.js +9 -0
- package/dist/mcp-api-only-origins.d.ts +23 -3
- package/dist/mcp-api-only-origins.js +57 -17
- package/dist/mcp-gateway.d.ts +16 -2
- package/dist/mcp-gateway.js +41 -3
- package/dist/mcp-oauth.d.ts +1 -1
- package/dist/mcp-oauth.js +3 -2
- package/dist/mcp-probe.d.ts +3 -0
- package/dist/mcp-probe.js +3 -0
- package/dist/mcp-secret-writes.d.ts +24 -2
- package/dist/mcp-secret-writes.js +30 -2
- package/dist/mcp-servers-store.d.ts +52 -14
- package/dist/mcp-servers-store.js +165 -61
- package/dist/mcp-sources.d.ts +1 -2
- package/dist/mcp-sources.js +1 -2
- package/dist/mcp-store.d.ts +5 -5
- package/dist/mcp-store.js +3 -3
- package/dist/mcp.js +1 -1
- package/dist/micro.d.ts +2 -0
- package/dist/micro.js +2 -0
- package/dist/model-gateway.d.ts +1 -1
- package/dist/model-gateway.js +20 -36
- package/dist/model.d.ts +5 -4
- package/dist/model.js +7 -6
- package/dist/monid.d.ts +14 -1
- package/dist/monid.js +103 -26
- package/dist/ollama-provider.d.ts +23 -9
- package/dist/ollama-provider.js +49 -20
- package/dist/openapi.js +234 -61
- package/dist/otel/genai.d.ts +83 -7
- package/dist/otel/genai.js +69 -9
- package/dist/otel/tracer.d.ts +42 -13
- package/dist/otel/tracer.js +241 -56
- package/dist/page.d.ts +7 -1
- package/dist/page.js +76 -22
- package/dist/paid-calls.d.ts +6 -4
- package/dist/paid-calls.js +15 -7
- package/dist/place-offers.d.ts +59 -34
- package/dist/place-offers.js +100 -58
- package/dist/place.d.ts +13 -14
- package/dist/place.js +56 -41
- package/dist/print.js +1 -1
- package/dist/provider.d.ts +5 -4
- package/dist/provider.js +26 -13
- package/dist/redact/match.d.ts +27 -9
- package/dist/redact/match.js +266 -57
- package/dist/run-census.d.ts +1 -1
- package/dist/run-census.js +4 -5
- package/dist/run-cut.js +4 -5
- package/dist/run-export-store.d.ts +15 -0
- package/dist/run-export-store.js +30 -0
- package/dist/run-export.d.ts +139 -0
- package/dist/run-export.js +379 -0
- package/dist/run-file-cut.d.ts +5 -0
- package/dist/run-file-cut.js +13 -0
- package/dist/run-launch.js +16 -3
- package/dist/run-learning-served.d.ts +2 -2
- package/dist/run-model-key.d.ts +15 -6
- package/dist/run-model-key.js +30 -31
- package/dist/run-reads-over-store.js +4 -4
- package/dist/run-secrets.js +3 -5
- package/dist/run-timeline-served.js +3 -1
- package/dist/run-view.d.ts +1 -2
- package/dist/run-view.js +2 -1
- package/dist/runnable.js +2 -2
- package/dist/runner/adapter-loop.d.ts +35 -18
- package/dist/runner/adapter-loop.js +97 -63
- package/dist/runner/adapter-run-spec.d.ts +34 -14
- package/dist/runner/adapter-run-spec.js +120 -75
- package/dist/runner/adapters/pi.js +4 -2
- package/dist/runner/audit.d.ts +8 -5
- package/dist/runner/audit.js +37 -17
- package/dist/runner/beside.d.ts +9 -2
- package/dist/runner/beside.js +29 -13
- package/dist/runner/claim-secrets.d.ts +27 -18
- package/dist/runner/claim-secrets.js +61 -47
- package/dist/runner/cli-run-spec.d.ts +18 -0
- package/dist/runner/cli-run-spec.js +93 -46
- package/dist/runner/compare-end.d.ts +2 -1
- package/dist/runner/compare-end.js +25 -10
- package/dist/runner/conformance/harness.js +2 -3
- package/dist/runner/conformance/subject.d.ts +4 -1
- package/dist/runner/harness-loops.js +3 -3
- package/dist/runner/held.d.ts +19 -4
- package/dist/runner/journal-kinds.d.ts +4 -1
- package/dist/runner/journal-kinds.js +22 -4
- package/dist/runner/learned-first.js +20 -4
- package/dist/runner/learning-end.d.ts +2 -8
- package/dist/runner/learning-end.js +11 -19
- package/dist/runner/live-ticker.js +7 -5
- package/dist/runner/loop-contract.d.ts +0 -2
- package/dist/runner/loop.d.ts +7 -0
- package/dist/runner/loop.js +1 -0
- package/dist/runner/main.d.ts +11 -6
- package/dist/runner/main.js +24 -18
- package/dist/runner/mcp-claim.js +24 -7
- package/dist/runner/mcp-run.d.ts +3 -6
- package/dist/runner/mcp-run.js +3 -4
- package/dist/runner/meta-tools.js +3 -2
- package/dist/runner/metrics.d.ts +7 -0
- package/dist/runner/metrics.js +19 -0
- package/dist/runner/model-route.d.ts +10 -7
- package/dist/runner/model-route.js +79 -15
- package/dist/runner/native-loop.js +10 -8
- package/dist/runner/presence.d.ts +11 -4
- package/dist/runner/presence.js +11 -6
- package/dist/runner/promotion.d.ts +25 -13
- package/dist/runner/promotion.js +125 -50
- package/dist/runner/redact.d.ts +3 -1
- package/dist/runner/redact.js +5 -3
- package/dist/runner/reflect-hook.js +1 -1
- package/dist/runner/responses-fetch.d.ts +36 -0
- package/dist/runner/responses-fetch.js +511 -0
- package/dist/runner/run-child-host.d.ts +38 -12
- package/dist/runner/run-child-host.js +231 -83
- package/dist/runner/run-child.js +11 -4
- package/dist/runner/runner-check.js +5 -1
- package/dist/runner/runner.d.ts +5 -3
- package/dist/runner/runner.js +14 -10
- package/dist/runner/save-slots.js +2 -1
- package/dist/runner/sdk-loop.js +8 -8
- package/dist/runner/spec-holds.d.ts +8 -1
- package/dist/runner/spec-holds.js +9 -4
- package/dist/runner/subagent.d.ts +11 -0
- package/dist/runner/subagent.js +17 -3
- package/dist/runner/workflow-calls.d.ts +9 -0
- package/dist/runner/workflow-calls.js +150 -0
- package/dist/runner/workflow-first.d.ts +138 -37
- package/dist/runner/workflow-first.js +230 -99
- package/dist/runner/workflow-spec.js +2 -2
- package/dist/runs-over-store.js +8 -7
- package/dist/save-once.d.ts +14 -0
- package/dist/save-once.js +31 -0
- package/dist/scrub-command.d.ts +34 -31
- package/dist/scrub-command.js +116 -147
- package/dist/sdk/runs.d.ts +6 -0
- package/dist/sdk/runs.js +89 -10
- package/dist/seal-key.js +4 -4
- package/dist/secret-cut.d.ts +3 -0
- package/dist/secret-cut.js +7 -1
- package/dist/secret-rules.d.ts +8 -1
- package/dist/secret-rules.js +482 -53
- package/dist/secrets.d.ts +51 -9
- package/dist/secrets.js +311 -21
- package/dist/server-keys.d.ts +4 -3
- package/dist/server-keys.js +4 -3
- package/dist/server-secrets-store.js +2 -4
- package/dist/server.d.ts +33 -10
- package/dist/server.js +454 -136
- package/dist/share-context.d.ts +22 -0
- package/dist/share-context.js +76 -0
- package/dist/shell-lex.d.ts +105 -0
- package/dist/shell-lex.js +646 -0
- package/dist/sign-ins-store.d.ts +5 -7
- package/dist/sign-ins-store.js +12 -16
- package/dist/sign-ins.d.ts +7 -11
- package/dist/sign-ins.js +40 -41
- package/dist/skills/agentrun-serve/SKILL.md +5 -2
- package/dist/slots.d.ts +9 -0
- package/dist/slots.js +45 -0
- package/dist/start-switches.d.ts +6 -5
- package/dist/start-switches.js +8 -4
- package/dist/stats.d.ts +5 -1
- package/dist/stats.js +1 -1
- package/dist/store/agent-body.js +2 -2
- package/dist/store/dialect.d.ts +4 -0
- package/dist/store/dialect.js +1 -0
- package/dist/store/index.d.ts +2 -2
- package/dist/store/index.js +1 -1
- package/dist/store/mcp-record-keys.d.ts +10 -0
- package/dist/store/mcp-record-keys.js +13 -0
- package/dist/store/postgres/dialect.js +2 -0
- package/dist/store/postgres/migrations/0028_learning_ledger.sql +44 -0
- package/dist/store/postgres/migrations/0029_run_launch_census_settle.sql +28 -0
- package/dist/store/postgres/migrations/0030_learning_ledger_epoch.sql +40 -0
- package/dist/store/postgres/migrations/0031_learning_ledger_calls.sql +12 -0
- package/dist/store/postgres/store.js +4 -0
- package/dist/store/schema.d.ts +44 -4
- package/dist/store/schema.js +111 -11
- package/dist/store/seal.d.ts +4 -1
- package/dist/store/sqlite/run-launch.d.ts +3 -10
- package/dist/store/sqlite/run-launch.js +12 -23
- package/dist/store/sqlite/run-patch.d.ts +19 -2
- package/dist/store/sqlite/run-patch.js +67 -2
- package/dist/store/sqlite/store.d.ts +3 -0
- package/dist/store/sqlite/store.js +177 -32
- package/dist/store/store-schema.js +3 -4
- package/dist/store/store.d.ts +74 -25
- package/dist/store/store.js +14 -11
- package/dist/store-reads/analytics.d.ts +2 -1
- package/dist/store-reads/analytics.js +7 -5
- package/dist/store-reads/learning.d.ts +102 -136
- package/dist/store-reads/learning.js +251 -302
- package/dist/store-reads/stats.d.ts +2 -2
- package/dist/store-reads/stats.js +13 -7
- package/dist/store-view.js +10 -7
- package/dist/suggestions.d.ts +1 -1
- package/dist/suggestions.js +29 -13
- package/dist/template-eval.d.ts +91 -9
- package/dist/template-eval.js +448 -105
- package/dist/template-import.d.ts +0 -10
- package/dist/template-import.js +5 -10
- package/dist/timeline/labels.d.ts +1 -1
- package/dist/timeline/labels.js +4 -3
- package/dist/timeline/timeline.d.ts +23 -11
- package/dist/timeline/timeline.js +115 -31
- package/dist/timeline/web-calls.d.ts +14 -14
- package/dist/timeline/web-calls.js +18 -30
- package/dist/tool-gate.d.ts +13 -1
- package/dist/tool-gate.js +43 -3
- package/dist/tool-keys-store.js +2 -4
- package/dist/tool-keys.d.ts +11 -0
- package/dist/tool-keys.js +16 -0
- package/dist/tool-plane.d.ts +50 -11
- package/dist/tool-plane.js +94 -30
- package/dist/tools.d.ts +5 -1
- package/dist/tools.js +7 -7
- package/dist/trigger-email.js +12 -6
- package/dist/triggers.d.ts +15 -34
- package/dist/triggers.js +119 -126
- package/dist/validate.d.ts +8 -1
- package/dist/validate.js +163 -23
- package/dist/web-fake.d.ts +2 -1
- package/dist/web-fake.js +8 -6
- package/dist/web-fetch.d.ts +8 -6
- package/dist/web-fetch.js +13 -11
- package/dist/web-holds.d.ts +32 -0
- package/dist/web-holds.js +86 -0
- package/dist/web-run.d.ts +32 -5
- package/dist/web-run.js +75 -28
- package/dist/web-save.d.ts +4 -9
- package/dist/web-save.js +27 -55
- package/dist/web-search.js +14 -25
- package/dist/wires.d.ts +4 -3
- package/dist/wires.js +5 -4
- package/dist/workspace/archil-claim.d.ts +12 -5
- package/dist/workspace/archil-claim.js +45 -5
- package/dist/workspace/attach.js +52 -19
- package/dist/workspace/attached-computers.d.ts +38 -11
- package/dist/workspace/attached-computers.js +81 -16
- package/dist/workspace/computer-deps.d.ts +29 -7
- package/dist/workspace/computer-deps.js +36 -18
- package/dist/workspace/computer-for-claim.d.ts +21 -4
- package/dist/workspace/computer-for-claim.js +166 -57
- package/dist/workspace/computer-intervals.d.ts +2 -0
- package/dist/workspace/computer-intervals.js +1 -1
- package/dist/workspace/computer-janitor.d.ts +48 -14
- package/dist/workspace/computer-janitor.js +153 -44
- package/dist/workspace/computer-kept.d.ts +158 -32
- package/dist/workspace/computer-kept.js +288 -63
- package/dist/workspace/computer-providers.d.ts +8 -3
- package/dist/workspace/computer-providers.js +12 -5
- package/dist/workspace/index.d.ts +1 -1
- package/dist/workspace/index.js +1 -1
- package/dist/workspace/local.js +41 -1
- package/dist/workspace/mount-revoke-left.d.ts +31 -0
- package/dist/workspace/mount-revoke-left.js +72 -0
- package/dist/workspace/paired-route.d.ts +91 -0
- package/dist/workspace/paired-route.js +152 -0
- package/dist/workspace/resolve-computer.d.ts +5 -2
- package/dist/workspace/resolve-computer.js +9 -3
- package/dist/workspace/run-end-computers.d.ts +11 -5
- package/dist/workspace/run-end-computers.js +153 -28
- package/dist/workspace/run-tools.d.ts +22 -3
- package/dist/workspace/run-tools.js +17 -5
- package/dist/workspace/run-workspace.d.ts +14 -1
- package/dist/workspace/run-workspace.js +34 -1
- package/dist/workspace/workspace.d.ts +6 -0
- package/dist/wrapped.d.ts +8 -2
- package/dist/wrapped.js +21 -6
- package/package.json +12 -13
- package/skills/agentrun-serve/SKILL.md +5 -2
- package/templates/README.md +25 -9
- package/dist/console/assets/backend-DVhHzJX2.js +0 -166
- package/dist/console/assets/index-Bwn1oTem.css +0 -1
- package/dist/console/assets/index-okP-y8PK.js +0 -747
package/README.md
CHANGED
|
@@ -234,6 +234,11 @@ A request's path has no query. `auth_failed` names the route and why (`no_creden
|
|
|
234
234
|
`wrong_launch_code`, `wrong_password`, `sign_in_table_full`), never the token given nor any part of it. `AGENTRUN_LOG=quiet` leaves out the request lines; the
|
|
235
235
|
run and `auth_failed` lines stay. A run whose process failed at its start says why in its `error.message`, in words.
|
|
236
236
|
One line at start, `event=boxes`, says which boxes this server has ([Sandbox](#sandbox)); quiet keeps it too.
|
|
237
|
+
`AGENTRUN_LOG=debug` keeps every line and also writes into a run's log one line per call an ACP agent announces, when
|
|
238
|
+
its recipe declares `announces`: `acp: the agent announced a call`, with the call's `toolCallId`, its `kind`, the tool
|
|
239
|
+
name the recipe's field holds when it names an AgentRun tool (at most 200 characters; `native` for any other call,
|
|
240
|
+
since a recipe's field may sit inside the call's input) and the AgentRun tool it named, never the call's input. A call
|
|
241
|
+
announced with no name (Cursor's) gets the line again when a later update names it.
|
|
237
242
|
`event=harness_offers why=start ms=<n>` says how long the server took to check what each harness offers (each CLI's
|
|
238
243
|
package and pins; [harnesses](#harnesses)), the bulk of its start; quiet keeps it too. It is made at the start only: a
|
|
239
244
|
PUT of `/settings/tools` and a save or delete of a tool key change no harness's offer, so they remake capabilities at
|
|
@@ -247,10 +252,26 @@ names no run, and a store with no such run says nothing; quiet keeps it too.
|
|
|
247
252
|
|
|
248
253
|
Set `OTEL_EXPORTER_OTLP_ENDPOINT` (or `OTEL_EXPORTER_OTLP_TRACES_ENDPOINT`) and every run on a pi or CLI harness
|
|
249
254
|
exports a GenAI trace over OTLP/HTTP to any backend that takes one, with the official OpenTelemetry SDK: an
|
|
250
|
-
`invoke_agent {
|
|
255
|
+
`invoke_agent {agent name}` span per claim of the run, under it a `chat {model}` span per model request (provider, model,
|
|
251
256
|
`server.address` (the host the request goes to, OpenRouter's for a model reached through it; none where not known),
|
|
252
257
|
and tokens with the cache: `gen_ai.usage.input_tokens` includes the cache read and write, which are also given on their
|
|
253
|
-
own) and an `execute_tool {tool}` span per tool call.
|
|
258
|
+
own) and an `execute_tool {tool}` span per tool call. Every span says which agent ran and on what, as the
|
|
259
|
+
[GenAI semantic conventions][otel-agent-spans] name it:
|
|
260
|
+
|
|
261
|
+
| Attribute | Value |
|
|
262
|
+
| --- | --- |
|
|
263
|
+
| `gen_ai.agent.name` | The agent's name as you gave it (`billing-helper`). An agent with no name has none, never the harness in its place, and its span is `invoke_agent` alone. |
|
|
264
|
+
| `gen_ai.agent.id` | The agent's id, the one its API routes take. |
|
|
265
|
+
| `agentrun.harness` | The harness that ran it (`pi`, `claude-agent`, `codex`). The conventions have no attribute for it. |
|
|
266
|
+
| `gen_ai.conversation.id`, `agentrun.run.id`, `session.id` | The run's id. |
|
|
267
|
+
| `gen_ai.operation.name` | `invoke_agent`, `chat` or `execute_tool`. |
|
|
268
|
+
|
|
269
|
+
An inline run (`POST /runs` with its definition) names its agent too, since it writes the agent's row first. The
|
|
270
|
+
agent's name and id are cut as any other name is (below), and a name written like a key (a GitHub token's shape, an
|
|
271
|
+
`sk-` key's) is `[redacted]` whatever the runner holds. A name the model wrote is never sent as written: a call the
|
|
272
|
+
harness refused (a tool the session does not have) is `execute_tool` with `error.type=tool_refused` and no tool name, a
|
|
273
|
+
model the run does not know is named by its route's model, and any other name is cut of every secret the runner holds
|
|
274
|
+
and at 64 characters. A run is one trace, sampled whole or not at
|
|
254
275
|
all (`OTEL_TRACES_SAMPLER`, `OTEL_TRACES_SAMPLER_ARG`). A request billed to a plan, and every turn of a plan harness,
|
|
255
276
|
has `agentrun.billing=plan` and no token counts. No span holds content (a prompt, a message, a tool's arguments or
|
|
256
277
|
result), whatever `OTEL_INSTRUMENTATION_GENAI_CAPTURE_CONTENT` says; content capture comes later. Reasoning tokens are
|
|
@@ -258,10 +279,58 @@ not on chat spans yet: the usage a run's requests are booked with does not count
|
|
|
258
279
|
`gen_ai.response.model`: the model asked for is `gen_ai.request.model`. The exporter takes the standard
|
|
259
280
|
`OTEL_EXPORTER_OTLP_HEADERS` and `OTEL_EXPORTER_OTLP_TIMEOUT`, and the resource `OTEL_SERVICE_NAME` and
|
|
260
281
|
`OTEL_RESOURCE_ATTRIBUTES` (put `deployment.environment.name` there); `service.name` is `agentrun` unless set. Runs never
|
|
261
|
-
receive these settings: no `OTEL_*` variable reaches a run's harness, tools or computer, and a run
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
and the
|
|
282
|
+
receive these settings: no `OTEL_*` variable reaches a run's harness, tools or computer, and a run in a process of its
|
|
283
|
+
own (under `agentrun-serve runner`) sends its trace to its runner, which exports it. The runner reads what that process
|
|
284
|
+
sends as untrusted: every string is cut as a name the model wrote, a provider or host that loses its shape is dropped,
|
|
285
|
+
and a request's or turn's end takes only a value the runner knows. Every OTLP header value of 8 characters or more is a
|
|
286
|
+
secret the server and the runner hold, under any name, an unknown one too, but the value of a `Content-Type`, `Accept`,
|
|
287
|
+
`Content-Encoding` or `User-Agent` header, and of a dataset or tenant header (`x-honeycomb-dataset`, `x-axiom-dataset`,
|
|
288
|
+
`x-scope-orgid`), which is only cut from the `[otel]` lines below. A value is held as written and decoded. What follows
|
|
289
|
+
its first word is held too when that word is a known auth scheme (`Bearer`, `Basic`, `Api-Key`, `Api-Token`, `Token`,
|
|
290
|
+
`sentry`, `Splunk`, `GenieKey`) or the header is named like a credential (`authorization`, `x-sentry-auth`,
|
|
291
|
+
`x-api-key`); any other header's value is held whole, never its tail alone. So are an OTLP endpoint's user, password
|
|
292
|
+
and any query parameter named like a credential, and, inside any header's value, the value of each `name=value` pair
|
|
293
|
+
named like a credential, read over the whole value as written, a URL's query and fragment included (a cookie's
|
|
294
|
+
`session=<token>`, `https://relay/v1?region=us;session=<token>`, `#access_token=<token>`; pairs split at `;`, `&`, a
|
|
295
|
+
comma or its `%2C`, and spaces, again at `?`, `#` and `/` too, and again at all but `;`, so `api_key=<key;rest>` holds
|
|
296
|
+
the whole key; a value in quotes is held without them; `theme=dark` is not held), and the user, password and
|
|
297
|
+
credential-named query parameters of every URL in it, one inside another's query or path too, scheme-relative
|
|
298
|
+
(`//<key>@host`) or with its slashes escaped (`https:\/\/`). A URL's query, an endpoint's too, is read split at `&`
|
|
299
|
+
alone and again at `&` and `;`, so `?api_key=<key;rest>` holds the whole key and `?region=us;session=<token>` the
|
|
300
|
+
token; after the first query a header value's read takes, a later one is read while 4,096 characters of them in all
|
|
301
|
+
fit, and the pair read covers the rest. A URL in quotes ends at its
|
|
302
|
+
closing quote; one without at the next space or quote, and, when that is a quote, it is also read on to the next space,
|
|
303
|
+
since a password may hold a raw `'`. Inside it the user and password are read as RFC 3986 reads them, everything before
|
|
304
|
+
the last `@` of its authority, any `;`, `&`, `=`, `,` or `@` in a password included, and also, a user or password of
|
|
305
|
+
8 characters or more, before its first `@` and up to 14 more `@` (4,096 characters of those at most), each as written
|
|
306
|
+
and decoded. A URL only adds readings: the pair
|
|
307
|
+
read covers its text too. A header's, a parameter's or a pair's name is split into words at punctuation and at each
|
|
308
|
+
lower-to-upper case change, a word's trailing digits are dropped (`apiKey2` is `api` and `key`), and it is named like a
|
|
309
|
+
credential when a word is authorization, auth, key, apikey, token, secret, password, passwd, pwd, sig, signature,
|
|
310
|
+
credential, credentials, jwt or session; or ends in key, token, secret, password, passwd, pwd, auth, authorization,
|
|
311
|
+
sig, signature, credential, credentials, jwt or sessionid; or starts with token, secret, password, passwd or jwt and is
|
|
312
|
+
longer than its plural (`api_key`, `access_token`, `apiKey`, `token2`, `accesstoken`, `tokenvalue`, `passwordhash`,
|
|
313
|
+
`jsessionid`, `writekey` and `hmackey` are; `authority`, `keyspace`, `tokens`, `sessions` and `sessioncount` are not).
|
|
314
|
+
Commas split the header variables, so write a comma inside a value as `%2C`. The tracer's own `[otel]` lines, where an exporter's error may quote a header it sent or the URL it
|
|
315
|
+
posted to, are cut of every such value at any length, a short one too, and of what follows any header value's first
|
|
316
|
+
word, whatever the word and the header's name; values that overlap or touch in a line are cut as one `[redacted]`, as
|
|
317
|
+
every other redactor cuts them, so no character of any of them is left. A run's process can hold at most 512
|
|
318
|
+
model requests and 512 tool calls open in its runner's trace at once; one started past that has no span. No OpenTelemetry diag logger is set, since the
|
|
319
|
+
SDK's diag writes can quote a header value as sent, and a test fails if a source sets one or `OTEL_LOG_LEVEL`. Everywhere else, the runner's logs and what a run
|
|
320
|
+
writes, a held value is cut at 8 characters or more, a header value's as any other's, and a shorter header value is on
|
|
321
|
+
no held list: that floor is kept on purpose, since a needle of a few characters would cut ordinary text, turn a served
|
|
322
|
+
number such as `1` into `[redacted]`, or refuse a source capture of any project that holds it. Spans are sent in the background, so a run's end never waits on
|
|
323
|
+
the collector; a server or runner that stops waits at most 3 s to send what is left. At its start, a runner (the one
|
|
324
|
+
beside the server, or `agentrun-serve runner`) with tracing on says so once, and where its spans go:
|
|
325
|
+
`[otel] tracing is on: spans export to https://collector.example:4318`, the endpoint's origin alone (scheme, host and
|
|
326
|
+
port; never its user, password, path, query or fragment, nor a header). A collector that is down costs the dropped spans
|
|
327
|
+
and a line with the endpoint's origin and the time (`[otel] a trace export to ... failed at 2026-11-25T07:01:31.465Z; its spans were
|
|
328
|
+
dropped: Request timed out`), then at most one line a minute, said by the next failure once a minute has passed, that
|
|
329
|
+
counts the failures since the last line (`[otel] 25 more trace exports to ... failed since ..., the last at ...`); never
|
|
330
|
+
a line per span or per batch. Unset, or with `OTEL_SDK_DISABLED=true`, no OpenTelemetry code loads, nothing is sent and
|
|
331
|
+
nothing is said.
|
|
332
|
+
|
|
333
|
+
[otel-agent-spans]: https://github.com/open-telemetry/semantic-conventions-genai/blob/d0e74ba6c48bcc4ded473b1828a8212f06b23753/docs/gen-ai/gen-ai-agent-spans.md#L213-L272
|
|
265
334
|
|
|
266
335
|
To send traces to Sentry (two variables: its OTLP endpoint and its `x-sentry-auth` header) or to any other backend
|
|
267
336
|
through an OpenTelemetry Collector, and for what Sentry's Agents view shows of a run, see
|
|
@@ -329,7 +398,8 @@ two processes in the container: the server with `--no-runner`, and one runner on
|
|
|
329
398
|
`GET /v2/health`. Each has its own store connection, so a busy runner never holds up the API. If either exits, the other
|
|
330
399
|
stops and the container exits non-zero. Give the image other arguments and it runs that one command, as given:
|
|
331
400
|
`runner --data /data --name runner-1` is a runner, and server options alone (no `server-and-runner`) are a server with
|
|
332
|
-
its runner in its own process
|
|
401
|
+
its runner in its own process. A [paired computer](#a-persons-own-computer) works under either once the runner relays,
|
|
402
|
+
below.
|
|
333
403
|
|
|
334
404
|
A computer provider whose machines dial the server (Fly Machines and Cloudflare; the computer package's `connectOf`,
|
|
335
405
|
which also says dial for E2B, Daytona or Modal made with `connect: "dial"`) works under a runner apart that knows the
|
|
@@ -345,6 +415,15 @@ and the server says it sooner: in `GET /v2/computers`, each dial provider's row
|
|
|
345
415
|
and its Test connection in Settings → Computers fails in the same words. With a runner that relays, `runs_refused` is
|
|
346
416
|
null.
|
|
347
417
|
|
|
418
|
+
A [paired computer](#a-persons-own-computer) takes the same relay. A run's claim on a runner that relays writes the
|
|
419
|
+
computer's route (a settings row: the runner, its process, the run and the hold's end), refused while a live run on a
|
|
420
|
+
live runner holds it, and taken from a runner that is gone or restarted, or a run that is over. Once a second the server
|
|
421
|
+
closes a paired computer's socket that is not where its route says (close 1001), and the driver's redial lands there:
|
|
422
|
+
relayed to the run's runner, or back on the server once the run releases it. The run's create waits for it about 80 s
|
|
423
|
+
(the driver's longest redial, a relay's connect and a hello) and fails in words naming the runner when it does not
|
|
424
|
+
come. `GET /v2/computers` lists the runner the hold is on (`held_on`), and the server's note when a relay was refused
|
|
425
|
+
(`hold_note`), each shown on the computer's row in Settings → Computers.
|
|
426
|
+
|
|
348
427
|
The token is in the log of the start that made it. A `docker stop` reaches both processes. The runner gives a busy run
|
|
349
428
|
6 s (`--drain-timeout 6s`) to finish its turn, so a busy `docker stop` ends in about 7.5 s, inside Docker's default 10 s
|
|
350
429
|
grace, and Compose's `stop_grace_period` is 15 s; a turn cut off resumes at the next start. Compose publishes the port
|
|
@@ -479,14 +558,8 @@ claim lapses another runner claims the run and resumes it from its journal. A ru
|
|
|
479
558
|
runner loss, a crash, a server stop or a park (the claim that resumes the run starts a new one, and says so on the
|
|
480
559
|
timeline and, once, to the model as an "AgentRun server note"), and the agent's own computer, a persistent setting, does.
|
|
481
560
|
The exception is a park's keep: a desktop, phone or sandbox a park keeps for 10 minutes comes back to the run's resume.
|
|
482
|
-
One that only
|
|
483
|
-
|
|
484
|
-
keep lasts: no other runner claims the run to resume it, so a runner whose loops are full makes an answer wait until
|
|
485
|
-
then. A stop or a cancel never waits: any runner claims the run at once and ends it without taking the kept machine
|
|
486
|
-
(also when the kept row can't be read then), which the runner that kept it ends at its time, or sooner at its janitor's
|
|
487
|
-
next pass once the run is over; another runner's janitor leaves both the row and the machine. Once that runner
|
|
488
|
-
is gone, any runner claims it, starts a new one, and the timeline says `The desktop wasn't kept: the runner that kept it
|
|
489
|
-
is gone.` `agentrun-serve runner --check --data DIR --name N`
|
|
561
|
+
One that only its runner can reach (a Docker container, a machine that dials the server) brings the run back to that
|
|
562
|
+
runner while it is up; a stop or cancel never waits for it, and the run's end deletes the machine. `agentrun-serve runner --check --data DIR --name N`
|
|
490
563
|
(or `AGENTRUN_RUNNER_NAME=N` in place of `--name`) checks the runner's environment by name (its store, its seal key,
|
|
491
564
|
every run-facing name its server holds, a forwarder on loopback) and whether the runner named `N` has a fresh
|
|
492
565
|
heartbeat: it exits 0 when both hold, 1 when either does not, and 2 when no name is given. `--check --env` checks the
|
|
@@ -516,11 +589,16 @@ one off.
|
|
|
516
589
|
## Sandbox
|
|
517
590
|
|
|
518
591
|
A sandbox agent's `bash` runs in a box, a machine apart from this server. Docker is the default box and the only one offered
|
|
519
|
-
with no setup: a Docker container made for each run, which binds the run's `work/` and nothing else.
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
and
|
|
523
|
-
|
|
592
|
+
with no setup: a Docker container made for each run, which binds the run's `work/` and nothing else. Every other provider
|
|
593
|
+
whose sandbox can hold the run's folder is a box too: `daytona`, `modal`, `e2b`, `agent37`, `morph`, `cloudflare`, `fly`,
|
|
594
|
+
`boxd` and `groundbox`. Such a box runs on a sandbox computer from that provider, offered once `AGENTRUN_BOXES` lists it
|
|
595
|
+
and the keys its computer provider needs are set (the environment, or Settings → Computers): `AGENTRUN_BOXES=docker,e2b`
|
|
596
|
+
with `E2B_API_KEY` set offers both. A box is a provider that serves a sandbox, takes the run's folder (a bind, an Archil
|
|
597
|
+
mount or a synced folder), starts with no image named and keeps to the allow-list or has no network; Orgo (desktops), the
|
|
598
|
+
phone, the hosted browsers and smol cloud (whose disk sits where the folder would) are not. No box holds a key. A Docker
|
|
599
|
+
box on Linux reaches the package registries and GitHub through a proxy, and nothing else; so does a vendor's box, through
|
|
600
|
+
the egress proxy its computer's init starts, and capabilities say so in its `places.boxes` entry (`none` for boxd, whose
|
|
601
|
+
computers have no network). Its `read`, `write` and `edit` work on that same `work/`: on this server, where the box binds it and this server
|
|
524
602
|
holds directory handles (Docker on Linux), else in the box. The agent's loop, its log, its model calls and every key stay
|
|
525
603
|
on the server. An agent says so in its [place](#place); the server says which boxes it has (`places.boxes` in its capabilities); [a run in a Docker
|
|
526
604
|
box](#a-run-in-a-docker-box) is what the container gets; [the box's image](#the-boxs-image) is what it starts from.
|
|
@@ -917,6 +995,19 @@ of a computer tool answers the tool's value. Codex's code mode takes no binding
|
|
|
917
995
|
JSON. A run whose `codemode` is set to deny lists them the same way, so its computer stays in reach. `computerMcp` (`src/workspace/computer-mcp.ts`) serves the same tools to an MCP
|
|
918
996
|
client, each answer with its value as `structuredContent`.
|
|
919
997
|
|
|
998
|
+
A desktop's or a phone's own disk is not the run's files: only the run's folder is collected, and the computer goes at
|
|
999
|
+
the run's end with what is on it. `computer_screenshot`'s `save_as` (a path relative to the run's folder, ending `.png`)
|
|
1000
|
+
saves the screenshot into the run's files through the run's own file writer, on any computer; a path outside the folder
|
|
1001
|
+
is refused in words before the computer is asked. A screenshot with `save_as` is a file written, so `write`'s setting holds
|
|
1002
|
+
it too, after the kind's deny: the stricter decides (`write` set to deny refuses it before the computer is asked, set to
|
|
1003
|
+
ask puts it to a person); one with no `save_as` is held to the kind's setting alone. `save_as` needs `write` among the
|
|
1004
|
+
agent's tools: an agent not given `write` is not offered it, and the gate refuses one anyway whatever `write`'s setting
|
|
1005
|
+
says. A script's `computer.files.write` needs `write` among the agent's tools the same way. `save_as` is offered only
|
|
1006
|
+
where the gate would let a save through: not with `write` set to deny, nor set to ask on a server where no one can
|
|
1007
|
+
approve. On a desktop or a phone the run's folder is not mounted in (one with `exec: false`, or a provider that mounts
|
|
1008
|
+
none), the model is told this once in the run, as the server's note, after a due cap wrap-up; a run whose saves the
|
|
1009
|
+
gate would refuse is told instead that screenshots can't be saved to the run's files.
|
|
1010
|
+
|
|
920
1011
|
A kind with no provider, a provider that does not serve the kind, or a provider whose required keys are not saved is
|
|
921
1012
|
refused before anything starts, in words that name the fix in Settings → Computers. A Docker computer needs a Docker
|
|
922
1013
|
daemon on this server: where none answers `docker version` (Render and most hosted services run none), Docker is not
|
|
@@ -1095,13 +1186,16 @@ passes the binding's conformance cases (below) needs no change here.
|
|
|
1095
1186
|
refused at its start, saying to open its driver. A run uses what the hello's groups and features allow.
|
|
1096
1187
|
- **Remove it.** Remove on its row (`DELETE /v2/computers/{computer_id}`) ends its token and closes its connection; a
|
|
1097
1188
|
run holding it loses it. Pairing it again gives it a new id.
|
|
1098
|
-
- **One process.** A computer's connection lands on
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1189
|
+
- **One process, or a relay.** A computer's connection lands on the server process it dials. A run of the runner
|
|
1190
|
+
beside the server (`agentrun-serve start`, the default) uses it there. A runner started apart (`agentrun-serve
|
|
1191
|
+
runner`, beside a server started with `--no-runner`; the image's default command) uses it through the server's relay
|
|
1192
|
+
when it knows the server's public address, `AGENTRUN_PUBLIC_URL`: its run's claim routes the computer's next dial to
|
|
1193
|
+
that runner, and its release routes it back (above). One that does not refuses a paired computer at the claim,
|
|
1194
|
+
naming both fixes. Such a server says it sooner: while no runner relays, its pairing code, the pair answer and each
|
|
1195
|
+
paired computer carry `runs_refused`, which the console shows with the code and on the computer's row. Give the
|
|
1196
|
+
runner `AGENTRUN_PUBLIC_URL`, or give the image the server's options alone (`--data /data --listen 0.0.0.0 --port
|
|
1197
|
+
7340 --drain-timeout 6s`) to keep the runner in the server's process. A second server on one store is already
|
|
1198
|
+
refused by the store's owner lock, on SQLite and Postgres alike.
|
|
1105
1199
|
- **Conformance.** `node dist/attach-conformance-cli.js [--port 7392] [--listen 127.0.0.1]` runs the binding's cases
|
|
1106
1200
|
against whatever driver pairs with the code it prints: pair, a wrong or used code, ping, a quiet minute, a redial
|
|
1107
1201
|
after each close it must redial after (4408, 1000, 1001, 4409) and after a drop, a binary frame (1003), a frame over
|
|
@@ -1357,8 +1451,8 @@ model with no price set that the catalog does not list in any form; null while `
|
|
|
1357
1451
|
process is handed a model key only when its model needs it: a pi run its model's provider's (a run on Gemini
|
|
1358
1452
|
`GEMINI_API_KEY`, one on `openrouter/...` `OPENROUTER_API_KEY`; a workflow each of its tiers'), or `AGENT_MODEL_API_KEY`
|
|
1359
1453
|
through the gateway; a codex run `OPENAI_API_KEY`, or `AGENT_MODEL_API_KEY` through the gateway; a claude-agent run
|
|
1360
|
-
`ANTHROPIC_API_KEY`. No run gets another's. A workflow's decision nodes get their providers' keys on
|
|
1361
|
-
|
|
1454
|
+
`ANTHROPIC_API_KEY`. No run gets another's. A workflow's decision nodes get their providers' keys on the claim's own
|
|
1455
|
+
environment, whatever its model, and only those ([Safety](#safety)).
|
|
1362
1456
|
|
|
1363
1457
|
A definition is checked for what keeps it from running here when it is saved, with the same checks a run makes before
|
|
1364
1458
|
it starts:
|
|
@@ -1632,18 +1726,49 @@ has the row **Use Claude Code's login on this machine**, over these routes:
|
|
|
1632
1726
|
for by an id the server makes once in its data folder (`machine-id`, 0600) and reads back on every later start,
|
|
1633
1727
|
never by the hostname, which on a laptop changes with the network. Two data folders are two machines. A setting
|
|
1634
1728
|
saved before the id reads as `other_machine` until it is turned on again.
|
|
1729
|
+
The login's folders must be the server's user's own: at either place its home, and on `machine` each folder the
|
|
1730
|
+
server's environment gives it (`CLAUDE_CONFIG_DIR`, `CLAUDE_SECURESTORAGE_CONFIG_DIR`, and `ANTHROPIC_CONFIG_DIR`
|
|
1731
|
+
or else `XDG_CONFIG_HOME`'s `anthropic`). Each is a folder that user owns, or one still to make in a folder it owns,
|
|
1732
|
+
reached through no other user's link or folder, and writable by no one else; a folder on the way may be open to
|
|
1733
|
+
all where the sticky bit is set, as on `/tmp`. Else the turn-on and the sign-in answer `403` in words, no run goes
|
|
1734
|
+
on the login, and a setting saved before is kept but not used, the start logging why. A folder its group may write
|
|
1735
|
+
in is the user's alone where that group is the user's private one, as the local account files alone say:
|
|
1736
|
+
`/etc/nsswitch.conf` takes users and groups from those files only (`files` or `compat` on its `passwd`, `group` and
|
|
1737
|
+
any `initgroups` line), and the group is the user's primary group, which no other user has as theirs and
|
|
1738
|
+
`/etc/group` lists with no other member and gives no password there (`x`, `!`, `*` or empty), and `/etc/passwd` has
|
|
1739
|
+
one account with the user's uid and one with its name, so a umask of 002 under one refuses nothing. Any other group
|
|
1740
|
+
(one shared with other users, one that is not the user's primary group, one `/etc/group` lacks, account files with
|
|
1741
|
+
a `+` or `-` line, a second account with the user's name or uid, an id with blanks before it, or a switch that also
|
|
1742
|
+
asks sssd, LDAP, NIS, winbind or systemd's user records, as the `files systemd` of recent Ubuntu, Debian and Fedora
|
|
1743
|
+
installs does, or no switch file: there members can exist that the files do not show), and a folder anyone may
|
|
1744
|
+
write in, are refused in words that name the folder, its mode and the `chmod g-w,o-w` that closes it. A group
|
|
1745
|
+
`/etc/group` gives a password is refused too, since anyone who knows it may join the group with `newgrp`, and the
|
|
1746
|
+
words also name the group and the `gpasswd -r` that removes the password. An `x` there is not refused: it says only
|
|
1747
|
+
that the group's password, if it has one, is in `/etc/gshadow`, with the members `newgrp` lets in without it, and a
|
|
1748
|
+
server without privileges cannot read that file, so the check does not. A gshadow password or member set with
|
|
1749
|
+
`gpasswd` is not seen; remove it with `gpasswd -r` or `gpasswd -d`. The files are read as they are now: a user
|
|
1750
|
+
removed from the group keeps it in the sessions they already have open, since a process's groups are set when it
|
|
1751
|
+
logs in, so end those sessions before counting the folder as the user's alone. A folder of the login
|
|
1752
|
+
still to make is made by AgentRun at the turn-on and before the CLI's sign-in, 0700 whatever the umask, so the login
|
|
1753
|
+
the CLI signs in there is not refused after.
|
|
1635
1754
|
- `GET /v2/settings/claude-login` says `state`: `off`, `signed_in` (with the `account` the CLI names: method, email,
|
|
1636
|
-
organization, plan), `signed_out`, `no_cli` (claude-agent's first run installs the pinned CLI), `unknown`,
|
|
1637
|
-
`other_machine
|
|
1755
|
+
organization, plan), `signed_out`, `no_cli` (claude-agent's first run installs the pinned CLI), `unknown`,
|
|
1756
|
+
`other_machine`, or `refused` (turned on and kept, but its folders or the home are refused, `refused` saying why;
|
|
1757
|
+
`DELETE` turns it off, and an API key is made only after that). `folder` is the folder whose login the CLI is asked about, and `machine` is this machine's own
|
|
1638
1758
|
login folder (`machine.source`: `CLAUDE_CONFIG_DIR` or `default`; `machine.credentials`: the server's
|
|
1639
1759
|
`CLAUDE_SECURESTORAGE_CONFIG_DIR`, when it sets one). `command` is the line that signs the CLI in at
|
|
1640
|
-
the login's place, for a terminal on the server's machine
|
|
1760
|
+
the login's place, for a terminal on the server's machine; it is empty where the login's folders are refused, and
|
|
1761
|
+
`folder` is then the folder as the environment names it. Where the console is on that machine (a server on loopback
|
|
1641
1762
|
with no public address), `can_start` is true and `POST /v2/settings/claude-login/login` starts the pinned CLI's own
|
|
1642
1763
|
`auth login`, which opens a browser there. It runs with the same variables as `command`, so it signs in at `folder`,
|
|
1643
1764
|
and the status is read there too, since `auth login` writes the account it signed in to its config dir. On
|
|
1644
1765
|
`machine` with the default `~/.claude`, the CLI is signed in as the person's own `claude` runs: no
|
|
1645
1766
|
`CLAUDE_CONFIG_DIR` or `CLAUDE_SECURESTORAGE_CONFIG_DIR`, in their home, so it writes the account in `~/.claude.json`
|
|
1646
1767
|
and the tokens where their Claude Code keeps them (in `~/.claude`; on macOS the Keychain item `Claude Code-credentials`).
|
|
1768
|
+
On macOS the CLI names that item's account by `USER`, so the sign-in, the status check and a run all get `USER` and
|
|
1769
|
+
`LOGNAME` set to the user the server runs as (as the system names it, whatever `USER` the server was started with):
|
|
1770
|
+
the item is the one the person's own `claude auth status` reads in their terminal, never one under the account
|
|
1771
|
+
`unknown`, which a CLI started with no `USER` uses.
|
|
1647
1772
|
`command` there is `env -u CLAUDE_CONFIG_DIR -u CLAUDE_SECURESTORAGE_CONFIG_DIR ... auth login`, so a terminal that
|
|
1648
1773
|
exports either still signs in at that login. env is a program, so the line runs alike when pasted into sh, bash,
|
|
1649
1774
|
zsh, fish or tcsh; a CLI path holding `=`, which env would read as a variable, goes to `sh -c` as its `$0`. env skips
|
|
@@ -1683,13 +1808,37 @@ reads of the login. A model named on a gateway or OpenRouter keeps its key, and
|
|
|
1683
1808
|
`model_key`. With no key at all, claude-agent's default
|
|
1684
1809
|
model is `anthropic/claude-sonnet-5-5`. A run whose login is signed out fails at its start and says so. A status check
|
|
1685
1810
|
the CLI outlasts (15 s) is asked once more; still no answer, the run goes on when the same login read signed in within
|
|
1686
|
-
the last 10 minutes
|
|
1811
|
+
the last 10 minutes on this machine (at a run's check or in Settings, in the server or in a runner process of its own on
|
|
1812
|
+
the same data folder, which keeps that time alone per login in `claude-login-answers/`, 0600), else it fails saying the
|
|
1813
|
+
check timed out. Being on disk, a signed-in answer outlives a restart of the server, and a turn-off and turn-on, for up to
|
|
1814
|
+
those 10 minutes; a signed-out answer removes it, and a new machine id (`machine-id` made again) leaves it standing for
|
|
1815
|
+
nothing.
|
|
1687
1816
|
A check where the CLI answered nothing that reads as a status gets the same. Any other failure of the check, such as no CLI at
|
|
1688
1817
|
its path, fails the run at once in the check's own words. It never switches to a key. The run books its tokens and no dollars (`cost.plan`, `on: "claude_code"`), and the plan's own limits
|
|
1689
1818
|
apply. Only a run in a runner place, on the machine the mode was turned on for, goes on the login. A run placed in a
|
|
1690
|
-
sandbox, or on another machine, uses the keys. The login is the server's user's
|
|
1691
|
-
|
|
1692
|
-
|
|
1819
|
+
sandbox, or on another machine, uses the keys. The login is the server's user's. Where each run is a user of its own
|
|
1820
|
+
(the image, `run_isolation: "uid"`), a run on AgentRun's own login folder gets the login's access token alone in
|
|
1821
|
+
`CLAUDE_CODE_OAUTH_TOKEN`: never the folder and never the refresh token, so its CLI never renews the login. The runner
|
|
1822
|
+
reads the token from the folder at the run's start and again whenever Anthropic refuses it mid-run, so a renewal the
|
|
1823
|
+
person's own Claude Code wrote there is picked up. The runner renews the login itself, in the CLI's place: when a token
|
|
1824
|
+
has less than five minutes left, and after Anthropic refuses one mid-run. It sends the pinned CLI's own refresh request,
|
|
1825
|
+
holds the CLI's own refresh lock on the folder (so a renewal by the CLI or another runner is taken and nothing is sent
|
|
1826
|
+
twice), and writes the answer back to the folder's `.credentials.json` alone, atomically at mode 0600, every other field
|
|
1827
|
+
kept. It holds that lock as the CLI does, by the mtime it set: a lock another holder took over while the runner was
|
|
1828
|
+
paused is never touched or removed, and the runner sends nothing under it. If the write back fails, the runner keeps the
|
|
1829
|
+
new pair in memory: each later ask gets its token, sends nothing (the old refresh token is spent and is never sent
|
|
1830
|
+
again) and tries the write again, under the same refresh lock and after reading the file again, so a newer pair another
|
|
1831
|
+
holder wrote there is kept. Once that token has less than five minutes left and is still unsaved, the run fails
|
|
1832
|
+
in words that say the renewal could not be saved and what to fix. A held token Anthropic refuses is never handed again:
|
|
1833
|
+
the ask fails while the pair is unsaved, and once it is saved the runner renews from it. One ask sends at most one renewal and nothing retries it. A renewal that fails, a refresh token Anthropic refused
|
|
1834
|
+
included, fails the run at its start in words that say to open Claude Code once to renew it, and mid-run ends the turn
|
|
1835
|
+
in the same words (or, with no failure to tell, words that say to run the claude CLI once on this login to renew it).
|
|
1836
|
+
No token is in the runner's log or in any error, and each token handed is cut from the run's journal, messages and rows
|
|
1837
|
+
as the runner writes them. A command the run's CLI starts can read the token,
|
|
1838
|
+
as the run's own user can. Under per-run users, a run on this machine's own Claude Code login (`~/.claude`, or the `CLAUDE_CONFIG_DIR` AgentRun was started with) fails at its
|
|
1839
|
+
claim and says so, and so does any login run while another runner on the same data folder runs its login runs under
|
|
1840
|
+
the server's user (its CLI renews the folder's login itself), naming that runner. Set `AGENTRUN_RUN_USER=same`, or give
|
|
1841
|
+
the run a `model_key`.
|
|
1693
1842
|
|
|
1694
1843
|
The mode exists only on a server that listens on loopback (a local install, or one behind a local proxy). A server
|
|
1695
1844
|
bound to any other address, such as all interfaces in a container or on a hosting service, has it off
|
|
@@ -1705,10 +1854,12 @@ gateway and no restart: `GET /api/tags` for the tags, `POST /api/show` for each
|
|
|
1705
1854
|
is `ollama/<tag>` in `harnesses[].models` and `harnesses[].free_models` for pi and for every harness on a wire the
|
|
1706
1855
|
route translates, and the console names it
|
|
1707
1856
|
`<tag> · local (Ollama)`, on a run's page too (from the run's `tokens` usage line, `provider` `ollama` and `model` the
|
|
1708
|
-
tag), so a run on the default says which model it ran on. An embedding model is left out. A model pulled
|
|
1857
|
+
tag), so a run on the default says which model it ran on. An embedding model is left out. A model pulled after the server shows in capabilities
|
|
1709
1858
|
within half a minute (the listing is kept that long, and asked again behind the next answer). A down or stuck Ollama
|
|
1710
|
-
|
|
1711
|
-
|
|
1859
|
+
slows nothing: the listing has 2 seconds in all and follows no redirect. A listing that fails is never kept as one:
|
|
1860
|
+
past its deadline or with an answer of the wrong shape, the models listed before it stay; refused (Ollama is not
|
|
1861
|
+
running), none do. Either way Ollama is asked again behind the next answer, so an Ollama that comes back or starts
|
|
1862
|
+
after the server shows in the answer after that. A run never waits on the listing: one on `ollama/<tag>` asks that model's `/api/show` alone (10
|
|
1712
1863
|
seconds), and a run on any other model, a key's default included, never asks Ollama.
|
|
1713
1864
|
|
|
1714
1865
|
- Where: `OLLAMA_HOST`, read as the ollama CLI reads it. Unset, 127.0.0.1:11434, but only on one owner's own server
|
|
@@ -1734,12 +1885,26 @@ seconds), and a run on any other model, a key's default included, never asks Oll
|
|
|
1734
1885
|
- Cost: $0, booked as a known cost. Its requests never count toward the server's [limit on free
|
|
1735
1886
|
requests](#a-limit-on-free-requests): there is no shared quota behind them. An agent's own `max_requests` counts them,
|
|
1736
1887
|
with its other free requests, so a run on Ollama that keeps calling tools still stops there.
|
|
1737
|
-
- Harness: pi, and every harness on a wire the route translates.
|
|
1738
|
-
Goose,
|
|
1739
|
-
`num_ctx`, tools and cost. A Messages client's token
|
|
1740
|
-
asking the model, an answer it asks for unstreamed
|
|
1741
|
-
|
|
1742
|
-
|
|
1888
|
+
- Harness: pi, and every harness on a wire the route translates. Those wires are Anthropic's Messages (claude-agent,
|
|
1889
|
+
Goose, a harness module on it) and OpenAI's Responses (codex, opencode, a harness module on it). Their requests go
|
|
1890
|
+
through the same translation as pi's: the same `/api/chat`, `num_ctx`, tools and cost. A Messages client's token
|
|
1891
|
+
count (`/v1/messages/count_tokens`) is answered there without asking the model, an answer it asks for unstreamed
|
|
1892
|
+
comes back whole (or as a 500 error with words when part of the stream doesn't read), and every model id it sends
|
|
1893
|
+
(Claude Code's small model too) runs the one tag. claude-agent turns its own tool search off on these models.
|
|
1894
|
+
- On OpenAI's Responses, each request is the whole conversation: `store: true` and `previous_response_id` are
|
|
1895
|
+
refused, since nothing is stored here. Function tools only: a custom (freeform) tool such as Codex's `apply_patch`
|
|
1896
|
+
grammar, `local_shell` and `web_search` are refused with words, never dropped, and codex offers no live web search
|
|
1897
|
+
on these models. A `tool_choice` that forces a call (`"required"`, or one naming a function) is refused too: Ollama
|
|
1898
|
+
can't be made to call a tool. `"auto"` and `"none"` are taken. `text.format` `json_schema` is Ollama's own `format`
|
|
1899
|
+
(the answer held to the schema; `json_object` to any object), refused beside tools sent, since a model held to it
|
|
1900
|
+
can't call one. `temperature` and `top_p` reach Ollama's options; `reasoning.effort` turns a thinking model's
|
|
1901
|
+
thinking on, `"none"` off. An effort or a format the route doesn't know is refused. `parallel_tool_calls: false` gets
|
|
1902
|
+
an answer's first call alone, and the calls it drops are logged by tool name. A request streams only with
|
|
1903
|
+
`stream: true`; one that names no stream is answered whole. Replayed reasoning, OpenAI's encrypted reasoning
|
|
1904
|
+
included, is dropped, not refused. An answer cut at its output limit ends `response.incomplete` with its usage, so it
|
|
1905
|
+
is booked and codex ends the turn rather than asking again. Every model id the client sends (a title or compaction
|
|
1906
|
+
request's too) runs the one tag. codex and opencode are given the model's window as the route runs it (its `num_ctx`,
|
|
1907
|
+
at most 64k), so they compact before Ollama would cut the prompt, and its output ceiling (half that, at most 16,384).
|
|
1743
1908
|
- Cloud models: an Ollama cloud model (a `-cloud` tag, with `remote_host` and `remote_model` in `/api/tags` or
|
|
1744
1909
|
`/api/show`) runs on ollama.com, not here, so it is never listed: never local, never $0, never the default.
|
|
1745
1910
|
- Default: with no model key held (and no `AGENT_MODEL`, ChatGPT sign-in or gateway), pi and every harness on a wire the
|
|
@@ -1772,8 +1937,8 @@ agent_not_runnable`, with `details.unbound` and `details.missing`).
|
|
|
1772
1937
|
| `bash_signal` | Send a background process's group `TERM`, `INT` or `KILL`: `{id, signal}` | an agentic definition whose place is a sandbox | no, no |
|
|
1773
1938
|
| `bash_list` | List the run's background processes: id, state or exit code, output size, start time and command | an agentic definition whose place is a sandbox | no, no |
|
|
1774
1939
|
| `ask_person` | Ask the person who started the run; the turn ends until a message answers | nothing | no, no |
|
|
1775
|
-
| `web_fetch` | Read one web page from a public host through the guarded direct fetch, or
|
|
1776
|
-
| `web_search` | Search the web, natively where the harness or the model's provider can, else through Parallel where the server holds its key, else keyless through Exa, or through the provider picked ([search and fetch](#search-and-fetch)): `{
|
|
1940
|
+
| `web_fetch` | Read one web page from a public host through Parallel's extract where the server holds a Parallel key (the default, `auto`), else keyless Firecrawl, with the guarded direct fetch behind either, or the guarded direct fetch alone where `kernel` is picked ([search and fetch](#search-and-fetch)), a part at a time: `{url, offset?, max_chars?, objective?}` in (`objective`, what the page is read for, is passed to the run's Web; with no classifier in the run it changes nothing), a Page out, `{ok, url, status, title, text, chars, truncated?, original_chars?, beyond_read?, offset?, next_offset?, html_chars?, converted?, links, links_omitted?, via, parallel?, refused?, error?}` | nothing (`PARALLEL_API_KEY` for Parallel, one billed extract a page a run) | yes, yes |
|
|
1941
|
+
| `web_search` | Search the web, natively where the harness or the model's provider can, else through Parallel where the server holds its key, else keyless through Exa, or through the provider picked ([search and fetch](#search-and-fetch)): `{objective, queries?, n?}` in (`query` is deprecated: a model's call must give `objective`, which the schema requires; a workflow call node's `{query}` alone is still searched as the objective and its one query), `{provider, objective, queries, results: [{url, title, snippet, published?}], text?}` or `{error}` out | nothing (`PARALLEL_API_KEY` for Parallel) | yes, yes |
|
|
1777
1942
|
| `web_save` | Download one file from a public URL into the run's `work/` and keep it there, for a link that expires (a generated image, audio or video): `{url, path}` in, `path` relative to `work/` and a bare name under `media/`; `{ok: true, path, bytes, content_type, duration_s?, url}` or `{ok: false, url, refused \| error}` out, `duration_s` its length in seconds when it is audio or video whose bytes give it (below). Never overwrites | nothing | no, no |
|
|
1778
1943
|
| `browser` | A hosted browser, Browserbase's or Kernel's, on pi-browser's durable adapter: `snapshot`, `run`, `screenshot`, `browser_read`, `browser_release`, `browser_relaunch`, `browser_downloads` and `browser_upload` (into and from the run's `work/`); Kernel keeps no downloads, so a run on Kernel has no `browser_downloads` | `BROWSERBASE_API_KEY` and `BROWSERBASE_PROJECT_ID`, or `KERNEL_API_KEY` | yes, no |
|
|
1779
1944
|
| `monid:<provider>/<endpoint>`, `monid:<provider>/*` | One monid endpoint, or every endpoint monid lists for a provider (at most 50), each pinned at the save and run as a tool of its own, paid per call from the monid wallet: `{body?, queryParams?, pathParams?}` in, the run's `output`, `price` and `cost` out ([monid](#monid)) | `MONID_API_KEY` | no, no |
|
|
@@ -1937,6 +2102,26 @@ A workflow's model nodes may each run on another tier's model, so a workflow's `
|
|
|
1937
2102
|
it is Parallel on the server's key, else keyless Firecrawl, or the provider picked, and a pick of `native` alone is
|
|
1938
2103
|
unavailable for a workflow.
|
|
1939
2104
|
|
|
2105
|
+
Where the server holds a TypeSafe key (`TYPESAFE_API_KEY`, set or saved), Jev runs on the web tools by default, and
|
|
2106
|
+
run content goes to TypeSafe. Each `web_search` sends TypeSafe its objective and each result's URL, title and snippet.
|
|
2107
|
+
Each `web_fetch` given an objective sends TypeSafe the page's text (up to 1,000,000 characters, in chunks) and the
|
|
2108
|
+
objective; a fetch with no objective sends nothing. TypeSafe bills every request to the server's TypeSafe key. To
|
|
2109
|
+
keep the old behaviour on a server that holds the key, set `AGENTRUN_WEB_JEV_OFF=1`. Jev (`jev-1.14.0`) scores each
|
|
2110
|
+
search's results against its objective and reorders them by that score, keeping every one,
|
|
2111
|
+
each with its `relevance` (0 to 1), and a `sift` line saying how they were ranked, or why not (a Jev failure leaves them
|
|
2112
|
+
as the provider gave them). It applies wherever the run's own `web_search` runs (Parallel, keyless Firecrawl or Exa,
|
|
2113
|
+
pi's hosted search), never to a harness's own search inside its CLI. Each Jev request is held on the run's spend cap at
|
|
2114
|
+
Jev's published price and booked at the cost Jev reported, never above that hold. A `web_fetch` given an objective has
|
|
2115
|
+
Jev pick the chunks of the page most likely to hold it, in page order (`found`, each with its `relevance`), its requests
|
|
2116
|
+
held and booked the same way; a fetch with no objective asks Jev nothing and its page is whole. A server with only an
|
|
2117
|
+
OpenRouter key runs no ranking; `AGENTRUN_WEB_JEV_OFF=1` on the server turns Jev off for every run created while it is
|
|
2118
|
+
set, on whatever runner host claims it (the run's plane carries the switch, and keeps it at every later launch); a
|
|
2119
|
+
runner's own switch can add off for the runs that host claims, never turn it back on. `GET /capabilities`' `why` for
|
|
2120
|
+
each tool says what it sends TypeSafe, or that Jev is off: for `web_search` `…; Jev (jev-1.14.0) ranks results …; each
|
|
2121
|
+
search sends that and each result's URL, title and snippet to TypeSafe …`, for `web_fetch` `…; a fetch given an
|
|
2122
|
+
objective sends the page's text and the objective to TypeSafe …`, and for either `…; Jev off: no TypeSafe key` or
|
|
2123
|
+
`…; Jev off (AGENTRUN_WEB_JEV_OFF)`.
|
|
2124
|
+
|
|
1940
2125
|
| | `claude-agent` | `codex` | pi |
|
|
1941
2126
|
| --- | --- | --- | --- |
|
|
1942
2127
|
| `web_search`, `auto` (the default) | Parallel on the server's key, else keyless Firecrawl, a host tool: Claude's own WebSearch is the `native` pick | the same: Codex's own search is the `native` pick | the same: the model provider's hosted search is the `native` pick |
|
|
@@ -1944,7 +2129,7 @@ unavailable for a workflow.
|
|
|
1944
2129
|
| `web_search`, `off` | unavailable (`web_search is turned off in settings`): nothing is searched | the same | the same |
|
|
1945
2130
|
| `web_search`, `firecrawl-keyless` | Firecrawl's public MCP search, keyless Exa's behind it, a host tool | the same | the same |
|
|
1946
2131
|
| `web_search`, `exa-keyless` | Exa's public MCP search alone, a host tool | the same | the same |
|
|
1947
|
-
| `web_fetch`, `auto` (the default) |
|
|
2132
|
+
| `web_fetch`, `auto` (the default) | Parallel's extract where the server holds a Parallel key, the guarded direct fetch behind it; else keyless Firecrawl | the same | the same |
|
|
1948
2133
|
| `web_fetch`, `firecrawl-keyless` | Firecrawl's public MCP scrape, the guarded direct fetch behind it: Firecrawl is sent each URL | the same | the same |
|
|
1949
2134
|
| `web_fetch`, `kernel` | the guarded direct fetch | the same | the same |
|
|
1950
2135
|
| either, `parallel` | Parallel's search and extract, host tools | the same | the same |
|
|
@@ -1983,10 +2168,11 @@ Upgrading to the tool gate: a workflow whose call node's tool is set to ask, by
|
|
|
1983
2168
|
run (`409` with `details.asks`); set that tool to allow for the agent (`definition.tool_settings`). Built-in tools are
|
|
1984
2169
|
allowed by default; catalog (`monid:<provider>/<endpoint>`) and MCP tools, which ask by default, are no call node's tools here.
|
|
1985
2170
|
|
|
1986
|
-
Upgrading: a server holding `PARALLEL_API_KEY`
|
|
1987
|
-
|
|
1988
|
-
|
|
1989
|
-
`PUT /v2/settings/tools {"web_fetch": {"provider": "
|
|
2171
|
+
Upgrading: on a server holding `PARALLEL_API_KEY`, `web_fetch` on `auto` reads each page through Parallel's extract
|
|
2172
|
+
first, with the guarded direct fetch behind it, as `web_search` on `auto` searches through Parallel (keyless Firecrawl on
|
|
2173
|
+
a server with no Parallel key). To keep every URL on the server instead, set
|
|
2174
|
+
`PUT /v2/settings/tools {"web_fetch": {"provider": "kernel"}}` once (or `tool_settings` in an agent). Both tools'
|
|
2175
|
+
`auto` order is one table in the source (`DEFAULT_WEB_ORDER`, tool-plane.ts). Parallel's key reaches an agentic run only when one of its capabilities resolves to Parallel (see
|
|
1990
2176
|
[Decision workflows](#decision-workflows)), and a web tool reaches Parallel only where its own capability does.
|
|
1991
2177
|
|
|
1992
2178
|
pi's native `web_search` is one standalone request, as Claude's CLI runs its WebSearch: one user turn carrying the
|
|
@@ -2005,11 +2191,13 @@ https://exa.ai/terms). To turn them off, set `web_search` to `native` (native on
|
|
|
2005
2191
|
keys (or set `PARALLEL_API_KEY`): `auto` then searches through Parallel and bills the key.
|
|
2006
2192
|
|
|
2007
2193
|
Keyless Firecrawl is one MCP exchange with Firecrawl's public endpoint (`https://mcp.firecrawl.dev/v2/mcp`), with no key,
|
|
2008
|
-
no Authorization header and no header of our own: `firecrawl_search`
|
|
2194
|
+
no Authorization header and no header of our own: `firecrawl_search` once for each of the search's first 3 queries, all at
|
|
2195
|
+
once, each with the objective (its tool requires one), its share of the results asked for and a scrape of each result
|
|
2196
|
+
as markdown, the answers merged by URL,
|
|
2009
2197
|
or `firecrawl_scrape` with the URL, for its markdown. A call ends at 30 s and is not retried: the backend behind Firecrawl
|
|
2010
2198
|
answers it in its place. A search's 60 s are one deadline for both keyless backends: Firecrawl's 30 s leave Exa the rest,
|
|
2011
2199
|
and no backend starts once the deadline is spent. A page Firecrawl read with a status that is not 2xx, or an answer past
|
|
2012
|
-
the bound (
|
|
2200
|
+
the bound (8 MiB for a search, its results scraped; the guarded fetch's 5 MiB for a page), is no read: the call goes to the backend behind
|
|
2013
2201
|
Firecrawl, and where the guarded direct fetch then reads the page, the server logs why Firecrawl gave none
|
|
2014
2202
|
(`event=web_fetch_firecrawl_failed`, never the URL). Firecrawl refuses a keyless call it will not serve with a code, and
|
|
2015
2203
|
only the code is read, never its words or its sign-up link: `KEYLESS_QUOTA_EXHAUSTED` (its free daily limit spent), `KEYLESS_ACCESS_NOT_AVAILABLE` or
|
|
@@ -2058,7 +2246,10 @@ refuses is refused and never leaves the machine. A call stopped before its page
|
|
|
2058
2246
|
`via: "stopped"`: no page came for it (the run's read of the URL goes on for its other calls).
|
|
2059
2247
|
|
|
2060
2248
|
`web_search` through Parallel uses its Search API (`POST https://api.parallel.ai/v1/search`, its `fast` mode, about
|
|
2061
|
-
$0.001 a search)
|
|
2249
|
+
$0.001 a search): the objective as its objective, the queries as its `search_queries`, and the run's model as
|
|
2250
|
+
`client_model` (its bare id) where the run names one. A search asks an objective, what the agent wants to find out in a
|
|
2251
|
+
sentence (cut at 1,000 characters), and up to 5 keyword queries (each cut at 200; with none, the objective's first 200
|
|
2252
|
+
characters); Exa is sent the objective as its query, native search the first query. `n` is 1 to 25 (10 by default). A result is a lead: the agent reads the page with `web_fetch`. A failure answers
|
|
2062
2253
|
`{error}`, with nothing searched instead; a 401 or 403 to either web tool stops Parallel for both for the rest of the run.
|
|
2063
2254
|
|
|
2064
2255
|
Parallel's fees are the run's spend, booked as monid's are: each search and each page Parallel extracts is marked in the
|
|
@@ -2086,7 +2277,7 @@ keyless use has a rate limit it does not publish, and its own terms. Past that l
|
|
|
2086
2277
|
then is a tool error in our words (above): the model reads why and answers without it, and the run's later searches
|
|
2087
2278
|
are held for the wait. Exa answers its daily count running out the same way, naming no wait, so a second limit naming no
|
|
2088
2279
|
wait after a wait has passed (a 429 with Retry-After is a timed limit, and only waits), in the same run and with no search succeeding since, turns search off for the rest of that run. A search ends at 60 s, its retry
|
|
2089
|
-
included, so a call never hangs. The answer is the
|
|
2280
|
+
included, so a call never hangs. The answer is the objective, the queries and their results, each a URL, a title, a
|
|
2090
2281
|
snippet of at most 3,000 characters and its date when Exa knows it, then a line asking the model to cite the URLs it
|
|
2091
2282
|
relies on. Keyless Exa answers behind keyless Firecrawl, the default for a harness with no native search when the server
|
|
2092
2283
|
holds no Parallel key; `off` turns `web_search` off, both included.
|
|
@@ -2392,8 +2583,8 @@ A stored value that does not open is never a reason not to start. It reads `set:
|
|
|
2392
2583
|
so once, naming the condition and the file, never a value; a `PUT` of the value seals it again under the current key.
|
|
2393
2584
|
|
|
2394
2585
|
A saved key is read by name like one the launcher hands over, and the launcher's value wins for a name it holds. A run
|
|
2395
|
-
gets the saved keys at its launch,
|
|
2396
|
-
|
|
2586
|
+
gets the saved keys at its launch, on its claim's own environment (a workflow run's `PARALLEL_API_KEY` too), never in
|
|
2587
|
+
any process's environment, and never the seal key. No restart: a `PUT` or `DELETE`
|
|
2397
2588
|
answers once capabilities, a save's checks and a run's checks see the change, in milliseconds. No harness reads a tool
|
|
2398
2589
|
key, so a key leaves what each harness offers as it is, and the harnesses are not checked again. A run already
|
|
2399
2590
|
running keeps what it was handed; the next run started, or a run's process started again, takes what is saved then.
|
|
@@ -2442,8 +2633,9 @@ preset: you give your Composio API key, a toolkit (`github`, `slack`...), the ac
|
|
|
2442
2633
|
toolkit's list) and a server name, and the server has Composio make a managed MCP server for them, then saves it as an
|
|
2443
2634
|
ordinary MCP server with the key sealed as an `x-api-key` header. `POST /v2/settings/mcp-servers/composio/tools`
|
|
2444
2635
|
`{api_key, toolkit}` lists the actions, and `POST /v2/settings/mcp-servers/composio/toolkits` `{api_key}` lists the
|
|
2445
|
-
toolkits Composio offers (`{toolkits: [{slug, name}]}`, by name) for the console's toolkit picker;
|
|
2446
|
-
user_id?, auth_config_id?, price_usd?}` makes
|
|
2636
|
+
toolkits Composio offers (`{toolkits: [{slug, name}]}`, by name) for the console's toolkit picker;
|
|
2637
|
+
`PUT /v2/settings/mcp-servers/{name}/composio` `{api_key, toolkit, tools, user_id?, auth_config_id?, price_usd?}` makes
|
|
2638
|
+
and saves the server. In place of `api_key`, `"api_key_env":
|
|
2447
2639
|
"COMPOSIO_API_KEY"` reads the key from that variable, as the server and each runner were started with it, at each use and keeps no copy: the
|
|
2448
2640
|
way an [API-only](#api-only) server's token saves one. That key is only ever sent to Composio's own origin, fixed in
|
|
2449
2641
|
code, so a server saved so whose address is anywhere else is refused by name and sent nothing. The body names no
|
|
@@ -2457,12 +2649,16 @@ server. `price_usd` (0 or more, as a `prices` value) is what each call costs you
|
|
|
2457
2649
|
price, so a call is held under its run's cap and booked as the run's tool cost (its trace span's `usd`, the run's
|
|
2458
2650
|
`cost.usd`), as any priced MCP tool's. A re-save that names no price keeps the server's prices for the actions it still
|
|
2459
2651
|
lists. Composio's server can leave out an action it was allowed (it did for `HACKERNEWS_GET_FRONTPAGE`), so the answer's
|
|
2460
|
-
`not_served` names any chosen action the saved server doesn't list. These routes are the owner's session alone.
|
|
2461
|
-
|
|
2462
|
-
|
|
2463
|
-
|
|
2464
|
-
|
|
2465
|
-
|
|
2652
|
+
`not_served` names any chosen action the saved server doesn't list. These routes are the owner's session alone.
|
|
2653
|
+
|
|
2654
|
+
A refresh of a saved Composio server also reads its account at Composio, and every read of the server then says it as
|
|
2655
|
+
`composio_account: {state, labels?, checked_at}`: `connected` with each account's label (its alias, else the name
|
|
2656
|
+
Composio shows, else its word id; never its id or a token), `pending` while its connect link is unfinished, `expired`,
|
|
2657
|
+
`none`, or `unknown` when Composio didn't answer. Only an account Composio names as the server's user's is the server's,
|
|
2658
|
+
for its state, its label, a save and a trigger alike: one answered as another user's, or with no user at all, never is,
|
|
2659
|
+
and the user connects one again. A per-run server has none; an empty recorded user reads
|
|
2660
|
+
`unknown`. The API token sees `composio_account` too, in a server's full read: its label may be the account's email.
|
|
2661
|
+
|
|
2466
2662
|
A saved Composio server is gated, approved and shown on the Timeline as any MCP server's tools are, "not metered" until
|
|
2467
2663
|
you price them (`price_usd`, or the server's `prices`). Composio's own meta tools stay refused, and the helper actions
|
|
2468
2664
|
that connect an account are left off the server's address. Deleting the server in Settings deletes what its save made in Composio too, with the saved key: the Composio MCP server, the connected account its connect link started (the link with it) and the auth config it made (Composio's "already gone" is fine). What another saved server uses is kept until the last of them goes, and what was there before the save (an auth config or account you had) is never deleted. The `DELETE` answers `200 {deleted: true, composio: {removed, note}}`: the note says what it removed, what it kept and why, and, when Composio refuses or does not answer, what is left to remove in Composio yourself (`removed: false`; the server is still forgotten here). The console shows it. A save that fails removes in Composio what it made there and never what it found, and its error names what is left when Composio refuses that too (a 422 on a field says it in `details.composio` as well). A save over a preset server removes, once it is saved, the Composio MCP server its earlier save made, and what that save made and the new one no longer stands on (the account of another `user_id`, the auth config of another toolkit), with the key it was made with, unless another saved server uses it, and answers `composio: {removed, note}` saying so. An ordinary `PUT` that moves a preset server to another address makes it another service's server: it removes what the preset made for it in Composio as its delete would, and answers `composio` too. While Composio triggers use the server, that move, and a preset save over it as another `user_id` or auth config, are refused as its delete is (`409 composio_in_use`, naming them). Preset saves and MCP server deletes run one at a time, so a delete never removes what a save in progress reuses; an ordinary save of a preset server lists its tools at once and takes its turn only to write the server and clean up.
|
|
@@ -2496,8 +2692,28 @@ other server, are `422` at `mcp_auth.<server>`, and no run starts. A per-run ser
|
|
|
2496
2692
|
runs as one account. A server saved for one user before this mode keeps calling as that user.
|
|
2497
2693
|
|
|
2498
2694
|
With `user_id: "per_run"`, whoever can start a run chooses its Composio user, so the host owns which user each run
|
|
2499
|
-
binds: it binds each run to its own person and never takes the ids from that person.
|
|
2500
|
-
|
|
2695
|
+
binds: it binds each run to its own person and never takes the ids from that person. The API token never binds a run to
|
|
2696
|
+
a Composio user the owner calls as here, in any letter case: the user any preset server the owner saved calls as or
|
|
2697
|
+
its kept account stands on (not one the token saved, and not a per-run one), `agentrun`, and the tool-listing user.
|
|
2698
|
+
On a start, an inline start, a launch hook's firing start and a message, the
|
|
2699
|
+
token's binding of one is `422 input_invalid` at `mcp_auth.<server>.composio_user_id` (`not_allowed`), and nothing is
|
|
2700
|
+
written: no run, no new binding, and a firing stays as it was. The owner's users are read at each request, so one the
|
|
2701
|
+
owner connects after a token's run started is refused from then on. The seal marks each binding with who handed it
|
|
2702
|
+
(the token or the owner's session), and each claim reads the owner's users again: a token's binding of a user the owner
|
|
2703
|
+
has connected since has its calls answered, unsent, that the user is the owner's, until a message hands `mcp_auth`
|
|
2704
|
+
again or a new run starts. The owner's session binds any user, the owner's own included. On an [API-only](#api-only)
|
|
2705
|
+
server every caller is the token: the same users are refused, at the request and at each claim whoever handed the
|
|
2706
|
+
binding, and a named account must be one Composio lists under the run's user.
|
|
2707
|
+
|
|
2708
|
+
What this leaves open: a per-run server lends the install's Composio key to whoever starts a run, and a token can still
|
|
2709
|
+
name a user the owner connected directly at Composio (the dashboard, or another client of the same Composio project),
|
|
2710
|
+
outside this install, which no record here names. Save a per-run server only on an install whose token callers own
|
|
2711
|
+
that Composio project's users.
|
|
2712
|
+
|
|
2713
|
+
Upgrading: a run sealed before the mark, in flight across the upgrade, whose binding names a user the owner connects
|
|
2714
|
+
here has its calls of that server answered, unsent, in the same words at its next claim, since nothing says the owner
|
|
2715
|
+
handed it: a message that hands `mcp_auth` again (the owner's session, for the owner's user) marks it, or start a new
|
|
2716
|
+
run.
|
|
2501
2717
|
|
|
2502
2718
|
What can go wrong, told apart:
|
|
2503
2719
|
|
|
@@ -3268,9 +3484,29 @@ after asks, saying "this run has sent 5 emails" (the count is the run's own reco
|
|
|
3268
3484
|
stops two auto-responders answering each other. On a run an email started whose `email_read` is thread-scoped (no
|
|
3269
3485
|
`scope: "mailbox"`), a send to anyone outside the thread's people
|
|
3270
3486
|
(the account's own address and every From, To and Cc of the thread's messages) asks too, naming them ("eve@example.com
|
|
3271
|
-
is outside this email's thread").
|
|
3272
|
-
|
|
3273
|
-
|
|
3487
|
+
is outside this email's thread"). On every run a trigger started (schedule, webhook, Slack, GitHub, Composio, feed or
|
|
3488
|
+
email), a send to an address this account has never sent to asks too, naming it ("someone@example.com: this account
|
|
3489
|
+
has never sent to them"). Never sent to means no message in the account's own Sent folder (Gmail's Sent Mail), from
|
|
3490
|
+
the account's own address and not a draft, has the address in its To, Cc or Bcc: the exact address, blind to the case
|
|
3491
|
+
of ASCII letters only (a Unicode look-alike such as the Kelvin sign for K is another address), as far back as Sent
|
|
3492
|
+
goes. Some servers (Exchange and Outlook among them) keep no Bcc header on a Sent copy over IMAP, so there an address
|
|
3493
|
+
only ever Bcc'd asks. Mail received from someone doesn't count, so a scheduled run replying to a first-time sender asks
|
|
3494
|
+
once; nor does a draft or someone else's message in Sent, and `email_file` refuses Sent and Drafts as targets, so a run
|
|
3495
|
+
can't file its own evidence there. Once it has made a folder, `email_file` files only into a mailbox the server lists
|
|
3496
|
+
by exactly the name given, so a name the server takes as another's (`Sent/` read as Sent) files nothing. Mail sent from a "send as" alias is filed from that alias, so a send to its
|
|
3497
|
+
recipients asks. The new-address check never asks about the account's own address or an address the run already sent
|
|
3498
|
+
to (unasked or approved). On a thread-scoped email run it doesn't ask about the thread's starter (the From of the
|
|
3499
|
+
message that started the run) either, but only when the receiving mail server vouched for that From: the message's
|
|
3500
|
+
topmost Authentication-Results header carries the account provider's authserv-id and says `dmarc=pass` with a
|
|
3501
|
+
`header.from` equal to the From's domain (case-blind, ASCII letters only). A header lower down may be the sender's own
|
|
3502
|
+
and is never read; `dkim=pass` or `spf=pass` alone doesn't count. The provider's authserv-id is known for Gmail
|
|
3503
|
+
(`mx.google.com`, by the Gmail preset or an IMAP host under gmail.com) and for no other provider yet, so there the
|
|
3504
|
+
starter asks like any new address. A starter with no DMARC pass asks too, since their From may be forged. Anyone else
|
|
3505
|
+
that message names, such as a stranger it Cc'd, asks on a reply-all. The 5-send cap still counts
|
|
3506
|
+
every send. A Sent folder that can't be read (or none, or no account saved when the send is checked) asks, saying so.
|
|
3507
|
+
`scope: "mailbox"` turns the thread ask off and exempts no starter. A playground or API run has neither ask, only the
|
|
3508
|
+
cap. The pending approval carries the reason as `asks_because`, which the console's card says above the call's
|
|
3509
|
+
arguments ("Asks because ..."). With accounts off, where no one can approve, such a send is refused in those words.
|
|
3274
3510
|
|
|
3275
3511
|
An agent whose definition says `checkout: repository` starts each run in a checkout of the repository the run names: its
|
|
3276
3512
|
start's `repo`, else the first `https://github.com/<owner>/<repo>` in its first message (a github trigger's run, its
|
|
@@ -3326,8 +3562,9 @@ Create; no run ever holds a token that can write.
|
|
|
3326
3562
|
then applies it here (an apply refused takes the package back, deletes the branch and makes nothing). The push is
|
|
3327
3563
|
recorded on the suggestion first, so a create after a write that failed finds the agent made from that template at
|
|
3328
3564
|
that commit and reuses it, never making a second one;
|
|
3329
|
-
- opens the pull request, naming the agent's id and the variables the client reads (`
|
|
3330
|
-
|
|
3565
|
+
- opens the pull request, naming the agent's id and the variables the client reads (`AGENTRUN_BASE_URL`, given
|
|
3566
|
+
with `/v2` as the server prints it and taken with or without, as AgentRun's own clients take it;
|
|
3567
|
+
`AGENTRUN_API_KEY`; `AGENTRUN_AGENT_<KEY>`). A pull request GitHub refuses keeps the agent (`502 github_failed`,
|
|
3331
3568
|
`details.agent_id`), and the next create opens the pull request alone. A created suggestion answers `200` as it is.
|
|
3332
3569
|
|
|
3333
3570
|
`--faux-github` (with `--faux`) serves the list, the checks and the create from its fake App: its installation holds
|
|
@@ -3389,13 +3626,14 @@ failed, 2 when nothing ran. The runner, the graders and the report are in
|
|
|
3389
3626
|
| `POST /agents`, `GET /agents`, `GET /agents/{id}` | `POST` takes `{definition, skills?, note?}` and makes the agent with its first revision, current. A definition has `instructions` (an agentic revision) or `workflow` (a workflow revision, checked by the DSL first), and `name`, `description`, `model` and `thinking` (agentic only), `harness` ([harnesses](#harnesses)), `place` ([place](#place)), `tools`, `tool_settings` ([search and fetch](#search-and-fetch)), `skills` (names; each `<name>/SKILL.md` is in `skills`) and `version`, which is the number the revision gets, and `max_cost_usd`, the agent's default cap (an agentic agent's or a workflow's), kept by an edit that leaves it out and cleared only by 0 ([spend cap](#spend-cap)), and `output_schema` (agentic only, at most 64 KiB): the JSON Schema the final answer's json block meets (its last fenced one, or the whole answer when it is one JSON object), which a completed run's `result.output` then holds (null when the answer doesn't meet it), kept by an edit that leaves it out. A template's answer schema is set here at apply, and a run a schedule trigger starts is handed that trigger's last completed `result.output` after its message; no other source's runs are, since each of their firings is a different event. Over 32 KiB, a scheduled run is handed only the fields the producing run's schema names in `x-carried`; carried arrays lose entries from the front until they fit, and the run is told how many. A save refuses an `x-carried` that is not unique root property names. `checkout` (agentic only): `pull_request` has the server check out, before each run's first turn, the pull request the run's GitHub event names, in `repo/` at its head with its base and merge base, using a read-only token of its GitHub App that the agent never holds ([GitHub triggers](#github-triggers-connect-github)); `none` clears it, and an edit that leaves it out keeps it. A field the store does not keep (`input_schema`) is `422 input_invalid` by name, and so is a definition that can never run here; one this host cannot run yet saves with `warnings` ([models](#models)). The ETag (`home_etag`) is the current revision's id. `GET /agents/{id}` adds `tools`, the tools its current revision grants with each one's provider ([search and fetch](#search-and-fetch)). It also adds `run_blockers` (`x-agentrun-serve: "runblockers/1"`): `{message, fields}` as a start with no overrides would be refused now (`409 agent_not_runnable`), or null. It is always null for an archived, native or SDK agent and for a revision whose MCP tools its first run pins, and the read asks no other service, so under the agent's `max_cost_usd` an OpenRouter decision model's missing price is named only once a save or a start has read OpenRouter's catalog: null is no promise that a start is accepted. |
|
|
3390
3627
|
| `PUT /agents/{id}/definition` | The same body, checked [the same way](#models): a new revision, its parent the current one, made current. Without `skills` the current revision's skill files carry over. A definition that is the current revision already writes nothing, so a PUT sent twice makes one revision. An agent's id and name stay those it was made with (another name is `422` on `definition.name`). Its description is a label kept on the agent, not on a revision: a PUT that names a new one makes the next revision (even when nothing else changed) and writes the description with it in one commit, so a stale or refused edit changes neither; a PUT that leaves it out keeps it. `If-Match` that is not the current ETag is `412 precondition_failed`; the store compares it again inside the commit, so of two edits that read the same revision exactly one lands. The contract's body is taken too: the definition itself, with `If-Match` required (`412` without it) and `definition.version` greater than the current one (`422`). Any such version is taken, and always makes a new revision, the same definition included; the revision is numbered as this server numbers them, the next, and the answer says which; the route reads a body holding `definition` as this one, any other as the contract's. |
|
|
3391
3628
|
| `GET /agents/{id}/revisions` | The agent's revisions, newest first: `revision`, `version`, `parent`, `kind`, `current`, `note`, `created_at` and the `definition`. |
|
|
3629
|
+
| `GET /agents/{id}/revisions/{revision}/skills` | `{revision, skills}`: every skill file saved with that exact revision, as paths relative to `.agents/skills/` mapped to their text, including supporting files. Read these before preparing a replacement `skills` map for a definition edit; retain the revision's ETag for `If-Match`. An unknown revision or one belonging to another agent is `404 not_found`, never the current revision instead. This read changes nothing and reads no connected agent's source filesystem; a revision without stored skills returns `{}`. |
|
|
3392
3630
|
| `POST /agents/{id}/current` | `{revision}`: one of the agent's revisions becomes current again. |
|
|
3393
3631
|
| `POST /agents/{id}/archive`, `POST /agents/{id}/unarchive` | [Archiving](#archiving): hides the agent and its runs from the lists, or shows them again. Answers the agent, with `archived_at`. |
|
|
3394
3632
|
| `DELETE /agents/{id}` | This server's own route (`x-agentrun-serve: "agentdelete/1"`): [deletes an agent another system owns](#deleting-an-agent-another-system-owns) (one an inline run made) whole, and [purges](#purging-a-run-or-an-agent-made-here) an archived agent made here. `204`; an agent made here not archived is `409 agent_not_archived`. |
|
|
3395
3633
|
| `DELETE /runs/{id}` | This server's own route (`x-agentrun-serve: "purge/1"`): [purges](#purging-a-run-or-an-agent-made-here) a run that is not live, its cost kept in every total. `204`, again on a second `DELETE`; a live run is `409 run_not_final`, and every route of a purged run is `410 purged`. |
|
|
3396
3634
|
| `DELETE /agents/{id}/sign-ins/{key}` | This server's own route (`x-agentrun-serve: "signins/1"`): forgets one of the agent's [saved sign-ins](#saved-sign-ins), at its vendor and here. `409 sign_in_held` while a run holds its save lease, or while a run it was handed is still going. |
|
|
3397
3635
|
| `POST /agents/{id}/runs`, `GET /agents/{id}/runs` | A run of the current revision, or of `revision`. An agentic run's input is `{content: string}`; a workflow run's is what its workflow's input schema takes. `file_ids` names [uploaded](#uploads) files, copied into the run's `work/inputs/` before it starts and named in its first message. `labels` (this server's own, `runlabels/1`) is the caller's map of its own strings for the run: at most 16 keys, each 1 to 63 letters, digits, `.`, `_`, `-` or `/` starting with a letter or a digit, each value 1 to 256 characters with no control character; kept as given, served as `labels` on every read of the run (`{}` when none), never read by the server otherwise, so no place for a secret. The agent's runs, newest first; `label` filters them as `GET /runs` does. |
|
|
3398
|
-
| `GET /runs` | Every agent's runs, newest first, a page of at most 100; `agent`, `revision` and `status` narrow it, `label=<key>:<value>` (`runlabels/1`, split at the first `:`, once per request) keeps the runs holding that label, and `archived=true` lists only archived ones. A failed run's summary carries its `error`, and a waiting run's its `pending`. |
|
|
3636
|
+
| `GET /runs` | Every agent's runs, newest first, a page of at most 100; `agent`, `revision` and `status` narrow it, `label=<key>:<value>` (`runlabels/1`, split at the first `:`, once per request) keeps the runs holding that label, `source=<name>` (`runsource/1`, once per request) keeps the runs imported from that source (its name as `imported_from.source` holds it: `claude-code`, `codex`, ...) and `source=live` the runs made here, not imported, `from` and `to` (`runwindow/1`, RFC 3339 date-times with their zone, each once) keep the runs started in [from, to), `model=<provider/model>` (`runmodel/1`, once) the runs that sent at least one request to that model (its exact name as their metrics hold it; a run counts from its first finished turn, as its metrics are written each time a turn ends), and `archived=true` lists only archived ones. A failed run's summary carries its `error`, and a waiting run's its `pending`. |
|
|
3399
3637
|
| `GET /runs/{id}` | The run: its revision, kind, status, state, result, error, `pending` (this server's own, `pending/1`: what a waiting run waits on, by `kind`: `{kind: "question", question, asked_at}` for a question it asked a person; `approval` for a tool call held for a person's approval, with the tool, its arguments and its price; `budget` for a run paused at its cap ([a run paused at its cap](#a-run-paused-at-its-cap)); `{kind: "browser", instruction, completion_condition, asked_at, expires_at}` for its agent's ask for the owner in its browser; or `{kind: "computer", computer: "desktop" \| "phone", instruction, completion_condition, asked_at, expires_at}` for its agent's ask for the owner on its desktop or phone; else null, a stopped turn's included) and cost (`basis` `reported`, `estimate` or `unpriced`, with its model requests' `tokens`: [A run's cost](#a-runs-cost-its-tokens-and-its-basis); $0 before its first model request, a cancelled run's included). |
|
|
3400
3638
|
| `GET /runs/{id}/timeline` | JSON pages with the change-number cursor (`after`, `next_after`, `reset`, `drop`, `has_more`, `final`, `wait_ms` long poll, and this server's own `limit`, 1 to 500 rows a page, default 500), or server-sent events with `Accept: text/event-stream` (`id` is the cursor, `Last-Event-ID` resumes). Rows sort by `seq`; the usage row (`Cost so far`), the run's running total, is always the last row, and moves to the end when a row comes after it. Beside the rows, `in_flight`: what a live run waits on now, each model request sent and not answered (from its booking's `runner.request`, stamped `at` when it left) and each tool call not returned, from when it was sent; empty once the run is final. A request sent or answered is a change of the page, as a row is. |
|
|
3401
3639
|
| `POST /runs/{id}/messages` | To an agentic run: `steer` while the agent works, `answer` when it asked the person, `follow_up` after a stop or after it completed: a completed run opens again, the same run on its own session and store, takes a place under `--max-runs` (it waits for one when none is free), and completes again. A failed or cancelled run, an archived run and a run of an archived agent are `409 not_continuable` (a run of an agent [being deleted](#deleting-an-agent-another-system-owns), `409 agent_not_runnable`); a workflow run takes none (`501`). |
|
|
@@ -3585,30 +3823,67 @@ serves these routes alone:
|
|
|
3585
3823
|
One saved any other way (by the owner, sealing a credential or not) is `403` to both, it stays as it was, and
|
|
3586
3824
|
nothing is sent to Composio. An owner's save over a server the token saved makes it the owner's once it lands (one
|
|
3587
3825
|
refused with `412` leaves it the token's), and one that lands while the token's is under way wins: the token's is
|
|
3588
|
-
`412
|
|
3826
|
+
`412`;
|
|
3827
|
+
- the token's Composio save never uses an auth config a server the owner saved uses: an `auth_config_id` naming one
|
|
3828
|
+
is `403`, and so is the save when the toolkit's own auth config, as Composio answers it, is that one, before
|
|
3829
|
+
anything is made at Composio; both say so in the same words. An `auth_config_id` Composio answers under another id
|
|
3830
|
+
(another letter case, say) is `422` under it, for any save. An `auth_config_id` naming one that another server the
|
|
3831
|
+
token saved made is used, and that server's record still says it made it, so only its delete removes the auth
|
|
3832
|
+
config at Composio, or, while this server still uses it, hands it to this one, whose delete then removes it;
|
|
3833
|
+
- the token's Composio user has a namespace of its own: a save that is not `per_run` reaches Composio, and its server
|
|
3834
|
+
calls, as `agentrun.token.<user_id>` (no `user_id`: `agentrun.token.agentrun`), a user that, through this install,
|
|
3835
|
+
only the token's own connect link connects (the Composio dashboard, or another client of the same Composio project,
|
|
3836
|
+
can connect any user id), so its `user_id` is at most 113 characters. No save names a `user_id` starting
|
|
3837
|
+
`agentrun.token.` in any letter case, the owner's included: `422` under `user_id`, before anything is sent;
|
|
3838
|
+
- nor does the token's save stand on a connected account it did not connect: when Composio already has ACTIVE
|
|
3839
|
+
accounts for that user under its auth config, the save is `403` before anything is made, unless a server the token
|
|
3840
|
+
saved holds each of them as one it made (connected through the token's own link). The lookup reads 50 accounts a
|
|
3841
|
+
page, at most 10 pages (500 for that user and auth config): past that the token's save is `403`, since it can't
|
|
3842
|
+
check them all, and an owner's save goes on with the ones it read. That check sees the accounts there when the token
|
|
3843
|
+
saves; the namespace is what keeps the user the token's after it, since no save here names it;
|
|
3844
|
+
- a run's binding of a per-run Composio server (`mcp_auth.<server>`, `{composio_user_id, connected_account_id?}`)
|
|
3845
|
+
never calls as a user the owner calls as here, since every caller here is the token: its `composio_user_id`, in any
|
|
3846
|
+
letter case, is not the preset's default user (`agentrun`), its tool-listing user, or any user a server the owner
|
|
3847
|
+
saved (no token's mark on its record) stands on, by its preset record, the account its refresh kept or its address,
|
|
3848
|
+
else `422` `not_allowed` under it, before any account is looked up. Any other user is the caller's: a backend's
|
|
3849
|
+
own bare user id or one in the token's namespace alike. A `connected_account_id` it names is
|
|
3850
|
+
one Composio lists under that user for the server's toolkit, read at the start or the message that hands it with the
|
|
3851
|
+
server's key, 50 a page and at most 10 pages, as the save's lookup reads; one Composio answers under another user,
|
|
3852
|
+
or with no `user_id`, never counts. An account it doesn't list there is `422` `not_allowed` under `connected_account_id`, and so is one
|
|
3853
|
+
past those 10 pages, in words of its own, since it can't be checked. Composio not answering that read is `424`
|
|
3854
|
+
(`upstream_failed`): a run's account is never taken unchecked. Each refusal says which check refused it, nothing is
|
|
3855
|
+
started, and none quotes what was sent. A run's claim reads the same check again (one sealed before it, or before
|
|
3856
|
+
the owner's server was saved), its calls refused unsent. What it can't see: the per-run server lends this install's
|
|
3857
|
+
Composio key, so a binding may name a user the owner connected only at Composio (its dashboard, or another client of
|
|
3858
|
+
the same Composio project) with no record here, and call as that user. Save a per-run Composio server only with a
|
|
3859
|
+
Composio project whose users are all the token's backend's. On the full server the owner's runs bind as before;
|
|
3860
|
+
- a server the token saved before the namespace (0.1.0-beta.56 and earlier) calls as a user outside it, which may be
|
|
3861
|
+
the owner's: every run's claim of it is refused unsent, in words that say to delete it, and the start names each such
|
|
3862
|
+
server in one log line (`api_only_composio_outside_namespace`), never its user or address. Delete it, then save it
|
|
3863
|
+
again: the new save is namespaced and returns a connect link for it. Where a server the owner saved stands on its
|
|
3864
|
+
auth config, which is the case a takeover leaves, a save over it is `403` (the auth config rule above), so it can only
|
|
3865
|
+
be deleted, and the refusal says so. Where none does, a save over it moves it to the namespaced user and returns a
|
|
3866
|
+
connect link; that save deletes at Composio every account the server's record holds as made here under the bare user
|
|
3867
|
+
(the one its own link connected, or one handed to it), unless another saved server stands on it (that one then owns
|
|
3868
|
+
it), and keeps an account it found there, which was never its own.
|
|
3589
3869
|
|
|
3590
3870
|
The names route above is the listing: there is no list or read of a server's address, auth or tools here. The
|
|
3591
3871
|
generic save (`PUT /settings/mcp-servers/{name}`) is a `404` unless the operator names the MCP origins it may save at,
|
|
3592
|
-
so by default the token saves no server at an address or with headers of its own. The preview, refresh, sign-in,
|
|
3593
|
-
|
|
3594
|
-
way;
|
|
3595
|
-
- a per_run MCP server's save at an origin the operator names
|
|
3596
|
-
|
|
3597
|
-
|
|
3598
|
-
|
|
3599
|
-
|
|
3600
|
-
|
|
3601
|
-
|
|
3602
|
-
|
|
3603
|
-
|
|
3604
|
-
|
|
3605
|
-
|
|
3606
|
-
|
|
3607
|
-
a per_run server the token saved with API-only off is refused until its origin is listed: list it before upgrading,
|
|
3608
|
-
or re-save it from the owner's signed-in session with API-only off, which makes it the owner's and leaves the save
|
|
3609
|
-
closed. The start logs one line (`api_only_mcp_off_list`) with the count and names of the servers off the list,
|
|
3610
|
-
never their addresses, and nothing when there are none. A server saved from the owner's signed-in session (which an
|
|
3611
|
-
API-only server doesn't serve) is the owner's, whenever it was saved, and the list does not govern it;
|
|
3872
|
+
so by default the token saves no server at an address or with headers of its own. The preview, refresh, sign-in,
|
|
3873
|
+
Composio tool listing and every other MCP settings route stay refused. On the full server the token's `api_key_env`
|
|
3874
|
+
is `403`, as `api_key` is: the owner's session saves a Composio server there either way;
|
|
3875
|
+
- a per_run MCP server's save at an origin the operator names: `AGENTRUN_API_ONLY_MCP_ORIGINS`, comma-separated
|
|
3876
|
+
http(s) origins (`https://mcp.example.com`), a plain setting. With it, the token's `PUT /settings/mcp-servers/{name}`
|
|
3877
|
+
saves `"auth": {"type": "per_run"}` at a listed origin, and each run hands its own credential in `mcp_auth`. A body
|
|
3878
|
+
that carries a credential, or a save over a server the token did not save or one that seals a credential, is `403`;
|
|
3879
|
+
any other origin or auth type, or a Composio server's name, is `404`. A wildcard, an entry that is not an http(s)
|
|
3880
|
+
origin alone, or plain http to a host other than a loopback one (127.0.0.0/8, ::1, localhost) stops the start, and a
|
|
3881
|
+
loopback origin also needs `AGENTRUN_MCP_ALLOW_LOOPBACK=1`. The list holds past
|
|
3882
|
+
the save: a per_run server the token saved at an origin not listed is refused, and nothing is sent to it. Unset, the
|
|
3883
|
+
list is empty, so on an upgrade list each such server's origin first, or re-save it from the owner's signed-in
|
|
3884
|
+
session with API-only off; the start names the servers off the list in one log line (`api_only_mcp_off_list`), never
|
|
3885
|
+
their addresses. A server the owner's session saved is not governed by the list, and its runs' `mcp_auth` still
|
|
3886
|
+
goes there;
|
|
3612
3887
|
- a run's desktop or phone, for a backend that shows its user the live view and lets them take over: see below.
|
|
3613
3888
|
|
|
3614
3889
|
Here a run's computer routes take the server's token. `POST /runs/{id}/computer/viewer` mints a 5-minute link on
|
|
@@ -3984,7 +4259,7 @@ typed answers and their probabilities.
|
|
|
3984
4259
|
- OpenRouter's Decisions models answer a node that says `provider: "openrouter"` and names its model in `model`
|
|
3985
4260
|
(`liquid/d1`, `perplexity/pplx-decider-v1.2`, `cloudflare/clef`, `typesafe/jev-1.14`). They run on the OpenRouter key
|
|
3986
4261
|
Jev's OpenRouter route reads (`OPENROUTER_API_KEY`, else `AGENT_MODEL_API_KEY` with `AGENT_MODEL_BASE_URL` on
|
|
3987
|
-
openrouter.ai),
|
|
4262
|
+
openrouter.ai), laid on the run's claim's own environment as Jev's is. That key is also the model
|
|
3988
4263
|
gateway's, which a run's process holds. Images to them are experimental. A model that cites the web returns
|
|
3989
4264
|
`url_citation` annotations, which become the node's evidence. A cost OpenRouter reports above 0 is booked; 0 (a model its
|
|
3990
4265
|
catalog prices at 0) or none is unknown, never $0.
|
|
@@ -4004,18 +4279,17 @@ typed answers and their probabilities.
|
|
|
4004
4279
|
($0.042 per million input tokens; output tokens are free) as an estimate, and the run's `cost.usd` is its decisions'
|
|
4005
4280
|
sum, with `basis: "estimate"`. A decision whose cost is unknown (no token counts, the OpenRouter route, or a call that
|
|
4006
4281
|
failed after it may have been sent) keeps its receipt's cost `null`, and the run's reads `null`, never `0`.
|
|
4007
|
-
-
|
|
4008
|
-
|
|
4009
|
-
|
|
4010
|
-
|
|
4011
|
-
|
|
4012
|
-
|
|
4013
|
-
|
|
4014
|
-
|
|
4015
|
-
also the model gateway's key, which a run's process holds for its model nodes.
|
|
4282
|
+
- A run gets only the TypeSafe and Parallel keys it needs ([Safety](#safety)): a workflow's decision providers',
|
|
4283
|
+
Parallel's where its `web_fetch` or `web_search` resolves to Parallel, and TypeSafe's where one of its web tools is
|
|
4284
|
+
the run's own ([Search and fetch](#search-and-fetch): `web_fetch` wherever it runs, `web_search` except a harness's
|
|
4285
|
+
own search inside its CLI, as on codex or claude-agent). The runner's claim reads them from the store and lays them
|
|
4286
|
+
on the claim's own environment, the one the run's tools and decision providers read, a fresh object for each claim,
|
|
4287
|
+
so no run sees another's. No program the run starts inherits them: a run process's environment has every key-shaped
|
|
4288
|
+
name removed, and the run's shell environment is fixed. On the OpenRouter route Jev's key is also the model
|
|
4289
|
+
gateway's key, which the claim holds for its model nodes.
|
|
4016
4290
|
- `TYPESAFE_API_KEY` and `PARALLEL_API_KEY` are among the secrets the launcher hands the server over its pipe, so the
|
|
4017
4291
|
server holds them out of its own environment too. Neither is ever among the secrets a run's process gets over its own
|
|
4018
|
-
pipe, which are its tools' environment: the
|
|
4292
|
+
pipe, which are its tools' environment: the runner's claim is their only way into a run.
|
|
4019
4293
|
|
|
4020
4294
|
## Archiving
|
|
4021
4295
|
|
|
@@ -4261,19 +4535,20 @@ Never bypass the store lock. This local-store operation has no server endpoint t
|
|
|
4261
4535
|
machine; importing into a different local store does not populate a remote console. Build, edit, run, query and
|
|
4262
4536
|
connection handoffs use the shared coding-agent selector and target this server's matching skill, MCP endpoint and API.
|
|
4263
4537
|
|
|
4264
|
-
`agentrun-serve import --data DIR` reads the Claude Code, Codex and
|
|
4265
|
-
`~/.codex/sessions`, `~/.pi/agent/sessions`) into the data directory,
|
|
4538
|
+
`agentrun-serve import --data DIR` reads the Claude Code, Codex, pi, OpenCode and Copilot CLI sessions in your own home
|
|
4539
|
+
(`~/.claude/projects`, `~/.codex/sessions`, `~/.pi/agent/sessions`, `~/.local/share/opencode`, `~/.copilot/session-state`) into the data directory,
|
|
4540
|
+
once. Each project folder becomes an agent, with its
|
|
4266
4541
|
CLAUDE.md or AGENTS.md and its skill folders, and each session becomes a run you can read but not continue. Nothing leaves
|
|
4267
4542
|
this machine, and the values of key-shaped environment variables are cut out of what it writes. Run it again and it takes
|
|
4268
4543
|
only what it has not taken already. Sessions written in the last 10 minutes wait for the next import.
|
|
4269
4544
|
|
|
4270
|
-
A run's cost is what its source recorded (Claude Code's and
|
|
4545
|
+
A run's cost is what its source recorded (Claude Code's, pi's and OpenCode's). A session its source did not price, such as a Codex or Copilot CLI
|
|
4271
4546
|
session, keeps the model catalog's estimate for its tokens beside an unknown cost, and every place that shows a run's
|
|
4272
4547
|
cost reads that estimate, as an estimate: the run (`cost.usd`, basis `estimate`), its usage row, `GET /stats` and its
|
|
4273
4548
|
analytics, and `GET /usage`. A session on a model the catalog does not price stays unknown.
|
|
4274
4549
|
|
|
4275
4550
|
- `--dry-run` lists what it would import and writes nothing.
|
|
4276
|
-
- `--from claude-code,codex,pi` picks the sources.
|
|
4551
|
+
- `--from claude-code,codex,pi,opencode,copilot` picks the sources.
|
|
4277
4552
|
- `--include-deleted` also imports the sessions of project folders that no longer exist, such as a git worktree you
|
|
4278
4553
|
deleted. Each such folder is still its own agent, with no instructions or skills to read.
|
|
4279
4554
|
- `--all` keeps those too, as well as sessions of temporary folders and sessions with no message of yours.
|
|
@@ -4377,7 +4652,7 @@ The agent's Learning tab and Learning Dojo show missing setup for that agent's a
|
|
|
4377
4652
|
`ready` means the route and credentials are configured, not that quota or provider availability has been verified.
|
|
4378
4653
|
These reads make no paid request, and saving a matching key refreshes the setup guidance.
|
|
4379
4654
|
|
|
4380
|
-
Importing Claude Code, Codex or
|
|
4655
|
+
Importing Claude Code, Codex, pi or Copilot CLI session history does not replay learning or connect a live learning stream.
|
|
4381
4656
|
Before/after cost and duration are observations, not an accuracy evaluation.
|
|
4382
4657
|
|
|
4383
4658
|
**Existing CLI capture.** A project enrolled with `cli_learning` keeps running in its original Codex CLI or Claude
|
|
@@ -4976,16 +5251,16 @@ step is sent only when the run's spend plus that step's least (its whole input b
|
|
|
4976
5251
|
1,024-token answer) fits. So a small cap pauses a run well before it has spent it. Measured on a pi desktop run on Sonnet
|
|
4977
5252
|
($3 / $15, cache write $3.75, cache read $0.30 a million) through the dispatch's own system prompt and tools (read,
|
|
4978
5253
|
write, edit, the desktop's and `codemode`, with the desktop skill named in the system prompt), five requests (four
|
|
4979
|
-
screenshots, then the answer), spending about $0.04 in all. Through a gateway the first request's byte bound is
|
|
4980
|
-
tokens, so it needs $0.
|
|
5254
|
+
screenshots, then the answer), spending about $0.04 in all. Through a gateway the first request's byte bound is 10,445
|
|
5255
|
+
tokens, the server's note that the desktop's disk is not the run's files among them, so it needs $0.055; each later request is bounded by the last one's bill and the bytes it adds, so the whole run
|
|
4981
5256
|
needs $0.082;
|
|
4982
|
-
straight to Anthropic the count is one recorded from a real desktop run on Sonnet (3,146 tokens at first),
|
|
4983
|
-
$0.
|
|
5257
|
+
straight to Anthropic the count is one recorded from a real desktop run on Sonnet (3,146 tokens at first), and the note,
|
|
5258
|
+
placed after the count, adds its byte bound (371 tokens), so it needs $0.031 and $0.083:
|
|
4984
5259
|
|
|
4985
5260
|
| Route | First request needs | Five-step run needs | Each further step |
|
|
4986
5261
|
| --- | --- | --- | --- |
|
|
4987
5262
|
| Through a gateway (OpenRouter): the byte bound, then the last bill | $0.06 | $0.09 | about $0.012 |
|
|
4988
|
-
| Straight to Anthropic: Anthropic's count | $0.
|
|
5263
|
+
| Straight to Anthropic: Anthropic's count | $0.04 | $0.09 | about $0.012 |
|
|
4989
5264
|
|
|
4990
5265
|
A claude-agent run's first request is of the same size (the pinned
|
|
4991
5266
|
CLI's measured 6,926 bytes with five tools: $0.04 for its first request through a gateway). A cap below these pauses at
|
|
@@ -5301,8 +5576,8 @@ carries no cost at all, as from a provider that does not price the model. The te
|
|
|
5301
5576
|
keys or bearer token (held, and handed to a run on Bedrock), an `AWS_PROFILE`, `GOOGLE_CLOUD_API_KEY` or the default
|
|
5302
5577
|
application credentials file work. A credential file a provider reads by path (`AWS_PROFILE`'s `~/.aws` files, the
|
|
5303
5578
|
default application credentials) is the host's: a run's process reads it for its model, and its file tools cannot.
|
|
5304
|
-
- `TYPESAFE_API_KEY` is a decision key, given to a workflow run's decision providers
|
|
5305
|
-
with a run's other secrets, so a pi run on a `typesafe/` model does not get it: it finds no key for that model, and
|
|
5579
|
+
- `TYPESAFE_API_KEY` is a decision key, given to a workflow run's decision providers and to a run's web tools Jev
|
|
5580
|
+
ranks alone, and never with a run's other secrets, so a pi run on a `typesafe/` model does not get it: it finds no key for that model, and
|
|
5306
5581
|
the run fails.
|
|
5307
5582
|
- A run's file tools (`read`, `write`, `edit`) reach its own `work/`, and two places of its own beside it: `read` also
|
|
5308
5583
|
reaches the run's `tmp/` (next to `work/`, where a command's spilled output would go), and a write may also land in a
|