@parcha/agentrun-serve 0.1.0-beta.58 → 0.1.0-beta.60
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 +402 -1
- package/README.md +516 -190
- 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/agent-delete.d.ts +6 -9
- package/dist/agent-delete.js +5 -3
- package/dist/agent-package.js +11 -1
- 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 -2
- package/dist/api-only.js +3 -3
- package/dist/archil-routes.d.ts +4 -1
- package/dist/archil-routes.js +15 -12
- package/dist/archil-settings.d.ts +18 -8
- package/dist/archil-settings.js +35 -17
- package/dist/attach-conformance.js +5 -4
- package/dist/box-paths.d.ts +3 -2
- package/dist/box-paths.js +5 -4
- 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 +7 -0
- package/dist/chatgpt-plan.js +35 -11
- package/dist/claude-login-token.d.ts +20 -11
- package/dist/claude-login-token.js +175 -107
- package/dist/claude-login.d.ts +124 -33
- package/dist/claude-login.js +562 -85
- package/dist/claude-sign-in.d.ts +3 -0
- package/dist/claude-sign-in.js +10 -1
- package/dist/cli-learning/connections.js +1 -1
- package/dist/cli.js +323 -292
- 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 +6 -3
- package/dist/computer-attach.js +41 -29
- 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 +2 -1
- package/dist/computers.js +6 -3
- package/dist/console/THIRD-PARTY-NOTICES.txt +50 -0
- package/dist/console/assets/backend-QnwGVBeU.js +166 -0
- package/dist/console/assets/index-DZi-muIj.js +629 -0
- package/dist/console/assets/share-pz61zIn9.js +6 -0
- package/dist/console/assets/styles-CcceGcu2.js +291 -0
- package/dist/console/assets/styles-fjQBFfMv.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.js +10 -4
- 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 +12 -2
- package/dist/env-switch.js +23 -3
- package/dist/errors.d.ts +1 -0
- package/dist/errors.js +2 -0
- package/dist/factory-activity.d.ts +68 -0
- package/dist/factory-activity.js +153 -0
- package/dist/factory-runs.d.ts +11 -0
- package/dist/factory-runs.js +52 -0
- package/dist/fal-price.d.ts +11 -1
- package/dist/fal-price.js +33 -0
- package/dist/faux-computers.js +1 -1
- package/dist/filed-answer.d.ts +2 -2
- package/dist/filed-answer.js +2 -2
- package/dist/filed-tool.d.ts +32 -0
- package/dist/filed-tool.js +122 -0
- 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.d.ts +1 -2
- package/dist/harness-keys.js +10 -8
- 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 +12 -0
- package/dist/harness-table.js +21 -6
- package/dist/harness.js +6 -2
- 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-worker.js +2 -2
- package/dist/import.d.ts +20 -8
- package/dist/import.js +448 -187
- package/dist/key-refusal.d.ts +14 -2
- package/dist/key-refusal.js +97 -33
- package/dist/learn/audit.d.ts +28 -27
- package/dist/learn/audit.js +87 -62
- package/dist/learn/check.js +1 -1
- package/dist/learn/commit.d.ts +35 -43
- package/dist/learn/commit.js +62 -270
- package/dist/learn/compile.d.ts +9 -6
- package/dist/learn/compile.js +51 -28
- package/dist/learn/corrections.js +1 -1
- package/dist/learn/delete.d.ts +5 -12
- package/dist/learn/delete.js +17 -30
- package/dist/learn/field-check.d.ts +111 -0
- package/dist/learn/field-check.js +174 -0
- package/dist/learn/forget-run.d.ts +16 -0
- package/dist/learn/forget-run.js +53 -0
- package/dist/learn/index.js +1 -1
- package/dist/learn/learning-of.d.ts +0 -4
- package/dist/learn/learning-of.js +0 -5
- package/dist/learn/ledger.d.ts +32 -29
- package/dist/learn/ledger.js +26 -19
- package/dist/learn/{folder.d.ts → legacy/folder.d.ts} +2 -1
- package/dist/learn/{folder.js → legacy/folder.js} +4 -7
- package/dist/learn/legacy/place.d.ts +16 -0
- package/dist/{workspace/learning-workspace.js → learn/legacy/place.js} +12 -42
- package/dist/learn/legacy/scrub.d.ts +28 -0
- package/dist/learn/legacy/scrub.js +258 -0
- package/dist/learn/promote.d.ts +119 -102
- package/dist/learn/promote.js +119 -262
- package/dist/learn/reset-ledger.d.ts +18 -0
- package/dist/learn/reset-ledger.js +14 -0
- package/dist/learn/rows.d.ts +186 -0
- package/dist/learn/rows.js +376 -0
- package/dist/learn/secrets.d.ts +4 -0
- package/dist/learn/secrets.js +12 -0
- package/dist/learn/workflow-draft.d.ts +4 -1
- package/dist/learn/workflow-draft.js +12 -2
- 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 +25 -8
- package/dist/learning-cost.js +23 -8
- package/dist/learning-reset.d.ts +1 -1
- package/dist/learning-reset.js +9 -11
- package/dist/learning-routes.d.ts +60 -81
- package/dist/learning-routes.js +187 -360
- package/dist/learning-setting.d.ts +6 -0
- package/dist/learning-setting.js +11 -1
- package/dist/learning-words.d.ts +2 -0
- package/dist/learning-words.js +2 -0
- package/dist/learning.d.ts +18 -24
- package/dist/learning.js +35 -66
- package/dist/listen-first.d.ts +5 -4
- package/dist/listen-first.js +4 -5
- package/dist/live-reach.d.ts +7 -0
- package/dist/live-reach.js +7 -0
- package/dist/mcp-api-only-origins.d.ts +15 -0
- package/dist/mcp-api-only-origins.js +40 -0
- package/dist/mcp-gateway.d.ts +22 -2
- package/dist/mcp-gateway.js +85 -11
- 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-resources.d.ts +1 -1
- 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/model-gateway.d.ts +1 -1
- package/dist/model-gateway.js +20 -36
- package/dist/native/discovery.d.ts +6 -0
- package/dist/native/discovery.js +14 -1
- package/dist/native/remote.d.ts +5 -0
- package/dist/native/remote.js +16 -0
- package/dist/native/runtime.js +3 -2
- package/dist/observation/observer.d.ts +6 -6
- package/dist/ollama-provider.d.ts +23 -9
- package/dist/ollama-provider.js +49 -20
- package/dist/openapi.js +290 -79
- 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 +58 -34
- package/dist/place-offers.js +96 -54
- package/dist/place.d.ts +41 -20
- package/dist/place.js +97 -47
- package/dist/print.js +1 -1
- package/dist/provider.d.ts +3 -2
- package/dist/provider.js +17 -8
- package/dist/purged-workflow.d.ts +0 -33
- package/dist/purged-workflow.js +3 -71
- package/dist/redact/match.d.ts +42 -9
- package/dist/redact/match.js +356 -54
- 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.d.ts +3 -3
- package/dist/run-launch.js +16 -3
- package/dist/run-learning-served.d.ts +3 -3
- package/dist/run-learning-served.js +1 -1
- package/dist/run-listing.d.ts +1 -1
- 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.d.ts +1 -1
- package/dist/run-timeline-served.js +8 -5
- package/dist/runnable.js +26 -9
- package/dist/runner/adapter-loop.d.ts +35 -18
- package/dist/runner/adapter-loop.js +94 -47
- package/dist/runner/adapter-run-spec.d.ts +14 -1
- package/dist/runner/adapter-run-spec.js +73 -46
- package/dist/runner/adapters/pi.js +4 -2
- package/dist/runner/audit.d.ts +10 -9
- package/dist/runner/audit.js +64 -67
- package/dist/runner/beside.js +5 -6
- package/dist/runner/claim-secrets.d.ts +10 -3
- package/dist/runner/claim-secrets.js +29 -13
- package/dist/runner/cli-run-spec.d.ts +18 -0
- package/dist/runner/cli-run-spec.js +87 -58
- package/dist/runner/compare-end.d.ts +2 -3
- package/dist/runner/compare-end.js +30 -11
- package/dist/runner/conformance/harness.js +2 -3
- package/dist/runner/conformance/subject.d.ts +4 -1
- package/dist/runner/disk-free.d.ts +15 -4
- package/dist/runner/disk-free.js +25 -7
- package/dist/runner/feedback-round.d.ts +1 -1
- package/dist/runner/feedback-round.js +2 -2
- package/dist/runner/harness-loops.js +3 -4
- package/dist/runner/held.d.ts +5 -12
- package/dist/runner/held.js +0 -25
- package/dist/runner/journal-kinds.d.ts +8 -2
- package/dist/runner/journal-kinds.js +23 -5
- package/dist/runner/learned-first.d.ts +0 -2
- package/dist/runner/learned-first.js +23 -7
- package/dist/runner/learning-end.d.ts +14 -24
- package/dist/runner/learning-end.js +52 -94
- package/dist/runner/learning-seed.d.ts +13 -16
- package/dist/runner/learning-seed.js +13 -23
- 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.js +13 -12
- package/dist/runner/mcp-claim.js +21 -5
- package/dist/runner/mcp-run.d.ts +4 -0
- package/dist/runner/mcp-run.js +2 -0
- 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 +12 -11
- package/dist/runner/presence.d.ts +1 -4
- package/dist/runner/presence.js +6 -8
- package/dist/runner/promotion.d.ts +39 -36
- package/dist/runner/promotion.js +168 -112
- package/dist/runner/redact.d.ts +3 -1
- package/dist/runner/redact.js +5 -3
- package/dist/runner/reflect-hook.d.ts +2 -2
- package/dist/runner/reflect-hook.js +4 -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 +21 -14
- package/dist/runner/run-child-host.js +187 -141
- package/dist/runner/run-child.js +11 -4
- package/dist/runner/runner-check.js +5 -1
- package/dist/runner/runner.d.ts +3 -4
- package/dist/runner/runner.js +13 -9
- package/dist/runner/sdk-loop.js +10 -12
- package/dist/runner/spec-holds.d.ts +8 -1
- package/dist/runner/spec-holds.js +9 -4
- package/dist/runner/workflow-calls.d.ts +9 -0
- package/dist/runner/workflow-calls.js +150 -0
- package/dist/runner/workflow-first.d.ts +120 -32
- package/dist/runner/workflow-first.js +218 -94
- package/dist/runner/workflow-spec.js +1 -1
- 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/check.d.ts +1 -4
- package/dist/sdk/check.js +2 -3
- package/dist/sdk/runs.d.ts +26 -7
- package/dist/sdk/runs.js +194 -78
- 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 +55 -9
- package/dist/secrets.js +345 -21
- package/dist/server-fs.d.ts +1 -1
- package/dist/server-fs.js +1 -1
- package/dist/server-keys.d.ts +10 -3
- package/dist/server-keys.js +16 -3
- package/dist/server-secrets-store.js +2 -4
- package/dist/server.d.ts +30 -18
- package/dist/server.js +520 -238
- 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/source-sync/auxiliary.js +2 -2
- 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/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/migrations/0032_learning_rows.sql +65 -0
- package/dist/store/postgres/store.js +4 -0
- package/dist/store/schema.d.ts +60 -11
- package/dist/store/schema.js +147 -17
- package/dist/store/seal.d.ts +4 -1
- package/dist/store/sqlite/learning-rows.d.ts +23 -0
- package/dist/store/sqlite/learning-rows.js +559 -0
- 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 +17 -10
- package/dist/store/sqlite/run-patch.js +50 -13
- package/dist/store/sqlite/store.d.ts +9 -0
- package/dist/store/sqlite/store.js +194 -46
- package/dist/store/store-schema.js +3 -4
- package/dist/store/store.d.ts +286 -38
- package/dist/store/store.js +27 -11
- package/dist/store-reads/analytics.d.ts +2 -1
- package/dist/store-reads/analytics.js +7 -5
- package/dist/store-reads/journal.d.ts +33 -3
- package/dist/store-reads/journal.js +99 -4
- package/dist/store-reads/learning.d.ts +50 -45
- package/dist/store-reads/learning.js +153 -116
- package/dist/store-reads/loop.js +1 -1
- package/dist/store-reads/stats.d.ts +2 -2
- package/dist/store-reads/stats.js +13 -7
- package/dist/store-view.d.ts +24 -2
- package/dist/store-view.js +49 -17
- package/dist/suggestions.d.ts +1 -1
- package/dist/suggestions.js +29 -13
- package/dist/template-eval.d.ts +72 -9
- package/dist/template-eval.js +358 -64
- package/dist/templates.d.ts +10 -2
- package/dist/templates.js +31 -4
- 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 +8 -6
- package/dist/timeline/web-calls.js +10 -6
- 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 +54 -13
- package/dist/tool-plane.js +103 -32
- 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 +34 -0
- package/dist/web-holds.js +89 -0
- package/dist/web-run.d.ts +32 -5
- package/dist/web-run.js +76 -28
- package/dist/web-save.js +23 -12
- 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/archil-exec.js +1 -1
- package/dist/workspace/archil.d.ts +1 -1
- package/dist/workspace/archil.js +1 -1
- package/dist/workspace/attach.js +52 -19
- package/dist/workspace/attached-computers.d.ts +6 -2
- package/dist/workspace/attached-computers.js +5 -4
- package/dist/workspace/computer-deps.d.ts +23 -6
- package/dist/workspace/computer-deps.js +38 -18
- package/dist/workspace/computer-for-claim.d.ts +21 -4
- package/dist/workspace/computer-for-claim.js +160 -54
- 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 +19 -4
- package/dist/workspace/computer-providers.js +40 -6
- package/dist/workspace/index.d.ts +2 -3
- package/dist/workspace/index.js +2 -3
- 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.js +4 -5
- package/dist/workspace/paths.d.ts +0 -4
- package/dist/workspace/paths.js +0 -6
- 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 +7 -1
- package/dist/workspace/workspace.js +1 -1
- package/package.json +13 -14
- package/skills/agentrun-serve/SKILL.md +5 -2
- package/templates/README.md +22 -6
- package/templates/TOOLS.md +46 -0
- package/dist/console/assets/backend-CSAWUqtZ.js +0 -166
- package/dist/console/assets/index-Bwn1oTem.css +0 -1
- package/dist/console/assets/index-DPh29cyz.js +0 -747
- package/dist/workspace/learning-workspace.d.ts +0 -24
- /package/dist/learn/{learning.sh → legacy/learning.sh} +0 -0
package/README.md
CHANGED
|
@@ -74,9 +74,10 @@ once they have loaded. A port already taken at the start is left to the start's
|
|
|
74
74
|
replaces, as it always has, and prints no `Starting` line.
|
|
75
75
|
|
|
76
76
|
A Docker box's image is built on its first run, which shows that on its timeline. `npx @parcha/agentrun` prints the
|
|
77
|
-
`Boxes:` line on stderr, after its own line on stdout. On a machine where Docker is not running, the `Boxes:` line says so instead (`Boxes: none, so new
|
|
78
|
-
runner. Docker isn't running on this machine (no docker command on PATH): install or start Docker,
|
|
79
|
-
AgentRun
|
|
77
|
+
`Boxes:` line on stderr, after its own line on stdout. On a machine where Docker is not running, the `Boxes:` line says so instead (`Boxes: none, so a new agent must name its
|
|
78
|
+
place: a box, or the runner. Docker isn't running on this machine (no docker command on PATH): install or start Docker,
|
|
79
|
+
then restart AgentRun.`; in Mode 2, where the runner's shell is Archil's serverless exec, `Boxes: none, so new agents run on
|
|
80
|
+
the runner.` and Docker's reason); see [Sandbox](#sandbox).
|
|
80
81
|
|
|
81
82
|
`Open` is [the console](#the-console), which takes [your password](#your-password). For a client, export the two lines before
|
|
82
83
|
it, then make an agent, start a run, and read its timeline until a page says `final`:
|
|
@@ -234,6 +235,11 @@ A request's path has no query. `auth_failed` names the route and why (`no_creden
|
|
|
234
235
|
`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
236
|
run and `auth_failed` lines stay. A run whose process failed at its start says why in its `error.message`, in words.
|
|
236
237
|
One line at start, `event=boxes`, says which boxes this server has ([Sandbox](#sandbox)); quiet keeps it too.
|
|
238
|
+
`AGENTRUN_LOG=debug` keeps every line and also writes into a run's log one line per call an ACP agent announces, when
|
|
239
|
+
its recipe declares `announces`: `acp: the agent announced a call`, with the call's `toolCallId`, its `kind`, the tool
|
|
240
|
+
name the recipe's field holds when it names an AgentRun tool (at most 200 characters; `native` for any other call,
|
|
241
|
+
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
|
|
242
|
+
announced with no name (Cursor's) gets the line again when a later update names it.
|
|
237
243
|
`event=harness_offers why=start ms=<n>` says how long the server took to check what each harness offers (each CLI's
|
|
238
244
|
package and pins; [harnesses](#harnesses)), the bulk of its start; quiet keeps it too. It is made at the start only: a
|
|
239
245
|
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 +253,26 @@ names no run, and a store with no such run says nothing; quiet keeps it too.
|
|
|
247
253
|
|
|
248
254
|
Set `OTEL_EXPORTER_OTLP_ENDPOINT` (or `OTEL_EXPORTER_OTLP_TRACES_ENDPOINT`) and every run on a pi or CLI harness
|
|
249
255
|
exports a GenAI trace over OTLP/HTTP to any backend that takes one, with the official OpenTelemetry SDK: an
|
|
250
|
-
`invoke_agent {
|
|
256
|
+
`invoke_agent {agent name}` span per claim of the run, under it a `chat {model}` span per model request (provider, model,
|
|
251
257
|
`server.address` (the host the request goes to, OpenRouter's for a model reached through it; none where not known),
|
|
252
258
|
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.
|
|
259
|
+
own) and an `execute_tool {tool}` span per tool call. Every span says which agent ran and on what, as the
|
|
260
|
+
[GenAI semantic conventions][otel-agent-spans] name it:
|
|
261
|
+
|
|
262
|
+
| Attribute | Value |
|
|
263
|
+
| --- | --- |
|
|
264
|
+
| `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. |
|
|
265
|
+
| `gen_ai.agent.id` | The agent's id, the one its API routes take. |
|
|
266
|
+
| `agentrun.harness` | The harness that ran it (`pi`, `claude-agent`, `codex`). The conventions have no attribute for it. |
|
|
267
|
+
| `gen_ai.conversation.id`, `agentrun.run.id`, `session.id` | The run's id. |
|
|
268
|
+
| `gen_ai.operation.name` | `invoke_agent`, `chat` or `execute_tool`. |
|
|
269
|
+
|
|
270
|
+
An inline run (`POST /runs` with its definition) names its agent too, since it writes the agent's row first. The
|
|
271
|
+
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
|
|
272
|
+
`sk-` key's) is `[redacted]` whatever the runner holds. A name the model wrote is never sent as written: a call the
|
|
273
|
+
harness refused (a tool the session does not have) is `execute_tool` with `error.type=tool_refused` and no tool name, a
|
|
274
|
+
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
|
|
275
|
+
and at 64 characters. A run is one trace, sampled whole or not at
|
|
254
276
|
all (`OTEL_TRACES_SAMPLER`, `OTEL_TRACES_SAMPLER_ARG`). A request billed to a plan, and every turn of a plan harness,
|
|
255
277
|
has `agentrun.billing=plan` and no token counts. No span holds content (a prompt, a message, a tool's arguments or
|
|
256
278
|
result), whatever `OTEL_INSTRUMENTATION_GENAI_CAPTURE_CONTENT` says; content capture comes later. Reasoning tokens are
|
|
@@ -258,10 +280,62 @@ not on chat spans yet: the usage a run's requests are booked with does not count
|
|
|
258
280
|
`gen_ai.response.model`: the model asked for is `gen_ai.request.model`. The exporter takes the standard
|
|
259
281
|
`OTEL_EXPORTER_OTLP_HEADERS` and `OTEL_EXPORTER_OTLP_TIMEOUT`, and the resource `OTEL_SERVICE_NAME` and
|
|
260
282
|
`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
|
|
283
|
+
receive these settings: no `OTEL_*` variable reaches a run's harness, tools or computer, and a run in a process of its
|
|
284
|
+
own (under `agentrun-serve runner`) sends its trace to its runner, which exports it. The runner reads what that process
|
|
285
|
+
sends as untrusted: every string is cut as a name the model wrote, a provider or host that loses its shape is dropped,
|
|
286
|
+
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
|
|
287
|
+
secret the server and the runner hold, under any name, an unknown one too, but the value of a `Content-Type`, `Accept`,
|
|
288
|
+
`Content-Encoding` or `User-Agent` header, and of a dataset or tenant header (`x-honeycomb-dataset`, `x-axiom-dataset`,
|
|
289
|
+
`x-scope-orgid`), which is only cut from the `[otel]` lines below. A value is held as written and decoded. What follows
|
|
290
|
+
its first word is held too when that word is a known auth scheme (`Bearer`, `Basic`, `Api-Key`, `Api-Token`, `Token`,
|
|
291
|
+
`sentry`, `Splunk`, `GenieKey`) or the header is named like a credential (`authorization`, `x-sentry-auth`,
|
|
292
|
+
`x-api-key`); any other header's value is held whole, never its tail alone. So are an OTLP endpoint's user, password
|
|
293
|
+
and any query parameter named like a credential, and, inside any header's value, the value of each `name=value` pair
|
|
294
|
+
named like a credential, read over the whole value as written, a URL's query and fragment included (a cookie's
|
|
295
|
+
`session=<token>`, `https://relay/v1?region=us;session=<token>`, `#access_token=<token>`; pairs split at `;`, `&`, a
|
|
296
|
+
comma or its `%2C`, and spaces, again at `?`, `#` and `/` too, and three times keeping a `;`: at all but `;`, so
|
|
297
|
+
`api_key=<key;rest>%2Cregion=us` holds the key; at `&` and spaces alone, so `api_key=<key;rest%2Cmore>` holds the
|
|
298
|
+
whole key; and at those or their `%26` and `%20`, so that key is held as written before an encoded `&` or space too,
|
|
299
|
+
and at those or `%26` alone, so a key with a `%20` in it is held before a `%26` (all are held, since a redactor matches each held value exactly and the longer reading never covers the
|
|
300
|
+
key alone); a value whose part before its first `;` is empty, `token=;<key>` or `token=%3B<key>`, is
|
|
301
|
+
held after that `;` too; a value in quotes, raw or written `%22` or `%27`, is held without them; `theme=dark` is not held), and the user, password and
|
|
302
|
+
credential-named query parameters of every URL in it, one inside another's query or path too, scheme-relative
|
|
303
|
+
(`//<key>@host`) or with its slashes escaped (`https:\/\/`). A URL's query, an endpoint's too, is read split at `&`
|
|
304
|
+
alone and again at `&` and `;`, so `?api_key=<key;rest>` holds the whole key and `?region=us;session=<token>` the
|
|
305
|
+
token; after the first query a header value's read takes, a later one is read while 4,096 characters of them in all
|
|
306
|
+
fit, and the pair read covers the rest. A URL in quotes ends at its
|
|
307
|
+
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,
|
|
308
|
+
since a password may hold a raw `'`. Inside it the user and password are read as RFC 3986 reads them, everything before
|
|
309
|
+
the last `@` of its authority, any `;`, `&`, `=`, `,` or `@` in a password included, and also, a user or password of
|
|
310
|
+
8 characters or more, before its first `@` and up to 14 more `@` (4,096 characters of those at most), each as written
|
|
311
|
+
and decoded. A URL only adds readings: the pair
|
|
312
|
+
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
|
|
313
|
+
lower-to-upper case change, a word's trailing digits are dropped (`apiKey2` is `api` and `key`), and it is named like a
|
|
314
|
+
credential when a word is authorization, auth, key, apikey, token, secret, password, passwd, pwd, sig, signature,
|
|
315
|
+
credential, credentials, jwt or session; or ends in key, token, secret, password, passwd, pwd, auth, authorization,
|
|
316
|
+
sig, signature, credential, credentials, jwt or sessionid; or starts with token, secret, password, passwd or jwt and is
|
|
317
|
+
longer than its plural (`api_key`, `access_token`, `apiKey`, `token2`, `accesstoken`, `tokenvalue`, `passwordhash`,
|
|
318
|
+
`jsessionid`, `writekey` and `hmackey` are; `authority`, `keyspace`, `tokens`, `sessions` and `sessioncount` are not).
|
|
319
|
+
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
|
|
320
|
+
posted to, are cut of every such value at any length, a short one too, and of what follows any header value's first
|
|
321
|
+
word, whatever the word and the header's name; values that overlap or touch in a line are cut as one `[redacted]`, as
|
|
322
|
+
every other redactor cuts them, so no character of any of them is left. A run's process can hold at most 512
|
|
323
|
+
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
|
|
324
|
+
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
|
|
325
|
+
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
|
|
326
|
+
no held list: that floor is kept on purpose, since a needle of a few characters would cut ordinary text, turn a served
|
|
327
|
+
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
|
|
328
|
+
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
|
|
329
|
+
beside the server, or `agentrun-serve runner`) with tracing on says so once, and where its spans go:
|
|
330
|
+
`[otel] tracing is on: spans export to https://collector.example:4318`, the endpoint's origin alone (scheme, host and
|
|
331
|
+
port; never its user, password, path, query or fragment, nor a header). A collector that is down costs the dropped spans
|
|
332
|
+
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
|
|
333
|
+
dropped: Request timed out`), then at most one line a minute, said by the next failure once a minute has passed, that
|
|
334
|
+
counts the failures since the last line (`[otel] 25 more trace exports to ... failed since ..., the last at ...`); never
|
|
335
|
+
a line per span or per batch. Unset, or with `OTEL_SDK_DISABLED=true`, no OpenTelemetry code loads, nothing is sent and
|
|
336
|
+
nothing is said.
|
|
337
|
+
|
|
338
|
+
[otel-agent-spans]: https://github.com/open-telemetry/semantic-conventions-genai/blob/d0e74ba6c48bcc4ded473b1828a8212f06b23753/docs/gen-ai/gen-ai-agent-spans.md#L213-L272
|
|
265
339
|
|
|
266
340
|
To send traces to Sentry (two variables: its OTLP endpoint and its `x-sentry-auth` header) or to any other backend
|
|
267
341
|
through an OpenTelemetry Collector, and for what Sentry's Agents view shows of a run, see
|
|
@@ -321,7 +395,7 @@ sealed secrets, so a lost key is not replaced: recreating the container with the
|
|
|
321
395
|
|
|
322
396
|
From a checkout, the same command in its root, with `--build` to build the image from it.
|
|
323
397
|
`packages/serve/docker/Dockerfile` builds that image: the server and the open packages it runs, on Node 24.22.3 and Debian 13
|
|
324
|
-
(trixie), with git 2.47 for
|
|
398
|
+
(trixie), with git 2.47 for a source project's capture and the Docker client. Everything it keeps is under `/data`: the agent store,
|
|
325
399
|
the runs and the token.
|
|
326
400
|
|
|
327
401
|
The image's default command, `server-and-runner --data /data --listen 0.0.0.0 --port 7340 --drain-timeout 6s`, starts
|
|
@@ -389,7 +463,7 @@ that can claim is there, the refusal is gone.
|
|
|
389
463
|
The data directory has two parts. Its own files, the control plane, hold the agent store (`DIR/store.sqlite`, where
|
|
390
464
|
each run's row keeps its claim: an epoch and its holder), the token and the server's settings; only the server and its
|
|
391
465
|
runners open them. Everything the agents make is on the disk, `DIR/disk/`: one folder per agent, `DIR/disk/agents/<agent>/` (its id
|
|
392
|
-
in lower case, a dash and 16 hex digits of its SHA-256), with its
|
|
466
|
+
in lower case, a dash and 16 hex digits of its SHA-256), with its runs
|
|
393
467
|
(`runs/<id>/`, each with `work/`, where its tools work). Nothing is copied in or out of a run's folder: where it
|
|
394
468
|
works, it works in that folder. A run's record is not in its folder: its row, its claim and its journal (what the run
|
|
395
469
|
did, in order) are rows of the store.
|
|
@@ -489,14 +563,8 @@ claim lapses another runner claims the run and resumes it from its journal. A ru
|
|
|
489
563
|
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
|
|
490
564
|
timeline and, once, to the model as an "AgentRun server note"), and the agent's own computer, a persistent setting, does.
|
|
491
565
|
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.
|
|
492
|
-
One that only
|
|
493
|
-
|
|
494
|
-
keep lasts: no other runner claims the run to resume it, so a runner whose loops are full makes an answer wait until
|
|
495
|
-
then. A stop or a cancel never waits: any runner claims the run at once and ends it without taking the kept machine
|
|
496
|
-
(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
|
|
497
|
-
next pass once the run is over; another runner's janitor leaves both the row and the machine. Once that runner
|
|
498
|
-
is gone, any runner claims it, starts a new one, and the timeline says `The desktop wasn't kept: the runner that kept it
|
|
499
|
-
is gone.` `agentrun-serve runner --check --data DIR --name N`
|
|
566
|
+
One that only its runner can reach (a Docker container, a machine that dials the server) brings the run back to that
|
|
567
|
+
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`
|
|
500
568
|
(or `AGENTRUN_RUNNER_NAME=N` in place of `--name`) checks the runner's environment by name (its store, its seal key,
|
|
501
569
|
every run-facing name its server holds, a forwarder on loopback) and whether the runner named `N` has a fresh
|
|
502
570
|
heartbeat: it exits 0 when both hold, 1 when either does not, and 2 when no name is given. `--check --env` checks the
|
|
@@ -526,11 +594,16 @@ one off.
|
|
|
526
594
|
## Sandbox
|
|
527
595
|
|
|
528
596
|
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
|
|
529
|
-
with no setup: a Docker container made for each run, which binds the run's `work/` and nothing else.
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
and
|
|
533
|
-
|
|
597
|
+
with no setup: a Docker container made for each run, which binds the run's `work/` and nothing else. Every other provider
|
|
598
|
+
whose sandbox can hold the run's folder is a box too: `daytona`, `modal`, `e2b`, `agent37`, `morph`, `cloudflare`, `fly`,
|
|
599
|
+
`boxd` and `groundbox`. Such a box runs on a sandbox computer from that provider, offered once `AGENTRUN_BOXES` lists it
|
|
600
|
+
and the keys its computer provider needs are set (the environment, or Settings → Computers): `AGENTRUN_BOXES=docker,e2b`
|
|
601
|
+
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
|
|
602
|
+
mount or a synced folder), starts with no image named and keeps to the allow-list or has no network; Orgo (desktops), the
|
|
603
|
+
phone, the hosted browsers and smol cloud (whose disk sits where the folder would) are not. No box holds a key. A Docker
|
|
604
|
+
box on Linux reaches the package registries and GitHub through a proxy, and nothing else; so does a vendor's box, through
|
|
605
|
+
the egress proxy its computer's init starts, and capabilities say so in its `places.boxes` entry (`none` for boxd, whose
|
|
606
|
+
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
|
|
534
607
|
holds directory handles (Docker on Linux), else in the box. The agent's loop, its log, its model calls and every key stay
|
|
535
608
|
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
|
|
536
609
|
box](#a-run-in-a-docker-box) is what the container gets; [the box's image](#the-boxs-image) is what it starts from.
|
|
@@ -556,17 +629,43 @@ command in the background ([background processes](#background-processes)). The p
|
|
|
556
629
|
revision, so its answers show it. A definition that names its tools keeps exactly those, an empty list included, and
|
|
557
630
|
gets the box only when one of them runs only there (`bash` or a background tool). One whose tools need no shell (`[]`,
|
|
558
631
|
or `read`, `write`, `web_fetch` and the like) is saved with no place and runs on the runner, so its first run starts at
|
|
559
|
-
once instead of waiting on a container.
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
632
|
+
once instead of waiting on a container. One whose tools name one the box refuses (`browser`, runner-only for now) is
|
|
633
|
+
saved with no place too. A workflow is never given a box.
|
|
634
|
+
|
|
635
|
+
Where a new agent with no place goes, by mode:
|
|
636
|
+
|
|
637
|
+
- **Docker's box available:** it gets the box (`default_place` is `{"mode": "sandbox", "box": "docker"}`, no
|
|
638
|
+
`default_reason`), as above.
|
|
639
|
+
- **No Docker, and the runner has no shell (Mode 1): refused, `name a box`.** A new agent that would get the box (no
|
|
640
|
+
tools named, or a shell tool) is `422 input_invalid` with `{field: "definition.place", reason: "missing"}`, and so is an
|
|
641
|
+
edit that would save such a revision: `name a box: this server has no Docker box for a new agent. Set place to {mode:
|
|
642
|
+
sandbox, box: <one of: daytona, e2b>}, or to {mode: runner} to run without a shell. docker: <why>.` The words list the
|
|
643
|
+
boxes this server has (`<none is set up>` when it has none), and its `fix` says the same, so no box is picked for it:
|
|
644
|
+
the default box is the one whose provider descriptor sets `defaultBox` (Docker's), never another box that answers. They
|
|
645
|
+
end with why Docker's box is not here, in its entry's own words and fix (joining the docker group, say). A template
|
|
646
|
+
apply, or an `agentrun deploy`, of a package that names no `tools` and no `computer` list is refused the same way,
|
|
647
|
+
whatever MCP tools it ticks: it is the agent that gets the box where Docker is here. Its `dry_run` is refused
|
|
648
|
+
alike, with no plan. `default_place` is `null`, and
|
|
649
|
+
`default_reason` carries those words. A definition with no place that names a shell tool and the browser is refused at
|
|
650
|
+
the shell tool instead: a box refuses the browser, so no place runs both, and the words say to remove one.
|
|
651
|
+
- **No Docker, in Mode 2:** not refused. The runner's shell is Archil's serverless exec, so a new agent with no place
|
|
652
|
+
saves for the runner as before, and `default_place` is `{"mode": "runner"}`, no `default_reason`. A background tool
|
|
653
|
+
still runs in a box alone, so naming one with no place is refused at the tool.
|
|
654
|
+
|
|
655
|
+
A definition that names its place, the runner included, a workflow, and one whose tools need no shell save as before in
|
|
656
|
+
every mode, and so does a package that names its tools (`tools: []` included) or its computer list. An agent saved
|
|
657
|
+
before this change with no place and no tools keeps running on the runner: the store holds its tools as `[]`.
|
|
658
|
+
|
|
659
|
+
`capabilities.places.default_place` is always sent: the place a new agent with a shell gets here, and where a revision
|
|
660
|
+
that names no place and has a shell tool runs; `null` means no default, so a new agent names its place. It is worked out
|
|
661
|
+
again at each run, the same way as at create: an agentic revision with no place and a shell tool runs in the Docker box
|
|
662
|
+
wherever this server has docker now, on the runner in Mode 2, and in Mode 1 with no Docker its run is `409
|
|
663
|
+
agent_not_runnable` in the `name a box` words. A workflow, a revision whose tools need no shell, and one whose tools name
|
|
664
|
+
one the box refuses run on the runner. `default_reason` is there exactly when `default_place` is `null`; a client tells
|
|
665
|
+
the cases apart by `default_place === null`, never by reading `default_reason`. Docker's own reason is on its entry in
|
|
666
|
+
`boxes`. The console's new-agent form starts on `default_place`, with bash ticked when that place is a sandbox; with
|
|
667
|
+
`null`, it starts on neither the server nor a box, Create waits until one is chosen, and its picker says each box's
|
|
668
|
+
reason, and, with no box set up, that the agent needs one set up or On the server chosen.
|
|
570
669
|
What a person picks or unticks there is what is sent.
|
|
571
670
|
|
|
572
671
|
A run runs in its revision's place, else where `default_place` says at that run (a workflow, a revision whose tools need
|
|
@@ -586,8 +685,8 @@ the server is in Mode 1.
|
|
|
586
685
|
`unavailable`) and, when it is unavailable, the `reason`.
|
|
587
686
|
A definition naming a box this server does not have saves with a warning on `definition.place`, and a run of it is
|
|
588
687
|
`409 agent_not_runnable` with `details.box`. `GET /v2/openapi.json` marks `definition.place`, the run's `place` and
|
|
589
|
-
`capabilities.places` `x-agentrun-serve: "place/1"`, `
|
|
590
|
-
|
|
688
|
+
`capabilities.places` `x-agentrun-serve: "place/1"`, and `default_place` and `default_reason` `"place/5"` (`default_place`
|
|
689
|
+
replaced `places.default`, and took `null` at place/5).
|
|
591
690
|
|
|
592
691
|
### A run in a Docker box
|
|
593
692
|
|
|
@@ -927,6 +1026,19 @@ of a computer tool answers the tool's value. Codex's code mode takes no binding
|
|
|
927
1026
|
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
|
|
928
1027
|
client, each answer with its value as `structuredContent`.
|
|
929
1028
|
|
|
1029
|
+
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
|
|
1030
|
+
the run's end with what is on it. `computer_screenshot`'s `save_as` (a path relative to the run's folder, ending `.png`)
|
|
1031
|
+
saves the screenshot into the run's files through the run's own file writer, on any computer; a path outside the folder
|
|
1032
|
+
is refused in words before the computer is asked. A screenshot with `save_as` is a file written, so `write`'s setting holds
|
|
1033
|
+
it too, after the kind's deny: the stricter decides (`write` set to deny refuses it before the computer is asked, set to
|
|
1034
|
+
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
|
|
1035
|
+
agent's tools: an agent not given `write` is not offered it, and the gate refuses one anyway whatever `write`'s setting
|
|
1036
|
+
says. A script's `computer.files.write` needs `write` among the agent's tools the same way. `save_as` is offered only
|
|
1037
|
+
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
|
|
1038
|
+
approve. On a desktop or a phone the run's folder is not mounted in (one with `exec: false`, or a provider that mounts
|
|
1039
|
+
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
|
|
1040
|
+
gate would refuse is told instead that screenshots can't be saved to the run's files.
|
|
1041
|
+
|
|
930
1042
|
A kind with no provider, a provider that does not serve the kind, or a provider whose required keys are not saved is
|
|
931
1043
|
refused before anything starts, in words that name the fix in Settings → Computers. A Docker computer needs a Docker
|
|
932
1044
|
daemon on this server: where none answers `docker version` (Render and most hosted services run none), Docker is not
|
|
@@ -945,7 +1057,10 @@ run's hold), newest first. The runs list carries no computer, so this is the one
|
|
|
945
1057
|
across runs and agents; the console's Settings → Computers shows it as Running now. An agent's own computer kept
|
|
946
1058
|
between runs is on the agent's read (`own_computer`), and a paired computer under `paired` in `GET /v2/computers`. The keys are
|
|
947
1059
|
`DAYTONA_API_KEY` (with `DAYTONA_API_URL` and `DAYTONA_TARGET` optional), `MODAL_TOKEN_ID` and `MODAL_TOKEN_SECRET`,
|
|
948
|
-
`E2B_API_KEY`, `AGENT37_API_KEY`
|
|
1060
|
+
`E2B_API_KEY`, `AGENT37_API_KEY` (with `AGENT37_SSH_KEY` optional: unset, the server makes its own SSH key on first use,
|
|
1061
|
+
seals it in its store as every saved key under `AGENTRUN_SEAL_KEY`, and registers it on the workspace as
|
|
1062
|
+
`agentrun-<hash>`, one key per store even when claims or servers reach first use together; without a seal key, a new
|
|
1063
|
+
key each restart, the old one left on the workspace), `MORPH_API_KEY`, `ORGO_API_KEY`, `PHONE_HARNESS_API_KEY`,
|
|
949
1064
|
`BROWSERBASE_API_KEY` and `BROWSERBASE_PROJECT_ID`, `KERNEL_API_KEY`, `BOXD_API_KEY` (with `BOXD_ORG` and
|
|
950
1065
|
`BOXD_REGION` optional), `SMOLCLOUD_API_KEY`, `GROUNDBOX_API_KEY`, `CLOUDFLARE_RELAY_URL` and `CLOUDFLARE_RELAY_TOKEN` (the relay Worker's,
|
|
951
1066
|
`packages/computer/relays/cloudflare`), and `FLY_API_TOKEN` and `FLY_APP`; Docker takes none.
|
|
@@ -1127,8 +1242,12 @@ passes the binding's conformance cases (below) needs no change here.
|
|
|
1127
1242
|
- **Mode 1** (the default): on this server's own disk. Only a provider that binds a folder of this machine can hold
|
|
1128
1243
|
it, so a sandbox runs on Docker only; a Daytona, Modal, E2B or Agent37 sandbox is refused ("Mode 1 runs a sandbox only on
|
|
1129
1244
|
Docker").
|
|
1130
|
-
- **Mode 2**: on Archil disks. `PUT /v2/workspace/archil` turns it on with the account key, `ARCHIL_API_KEY`, its
|
|
1131
|
-
region
|
|
1245
|
+
- **Mode 2**: on Archil disks. `PUT /v2/workspace/archil` turns it on with the account key, `ARCHIL_API_KEY`, and its
|
|
1246
|
+
region (and an exec image pinned by digest, if you want one other than serve's default). For a region serve knows
|
|
1247
|
+
(`aws-us-east-1`, `aws-us-west-2`, `aws-eu-west-1` and `gcp-us-central1`, the regions Archil's SDK names; `GET` lists
|
|
1248
|
+
them in `regions`), the S3 URL is the region's (`https://s3.green.us-east-1.aws.prod.archil.com` for `aws-us-east-1`)
|
|
1249
|
+
and `s3Url` may be left out; one given is used instead, and `GET` says which in `s3UrlFrom`. Any other region needs
|
|
1250
|
+
its `s3Url`;
|
|
1132
1251
|
`DELETE` turns it off. The default exec image is Docker's `buildpack-deps:trixie-scm` pinned by digest (git 2.47),
|
|
1133
1252
|
because Archil's own has git 2.34 and a read-only bash policy runs git only at 2.43 or later. An image you name needs
|
|
1134
1253
|
git 2.43 for that too, and GNU coreutils and perl, as Debian-family images have. A Modal, E2B or Agent37 sandbox
|
|
@@ -1151,17 +1270,17 @@ passes the binding's conformance cases (below) needs no change here.
|
|
|
1151
1270
|
machine) or null (none).
|
|
1152
1271
|
|
|
1153
1272
|
The PUT is a secret write, so it takes the owner's signed-in session. A server with none to give it (API only, or
|
|
1154
|
-
`AGENTRUN_ACCOUNTS=0` reached beyond loopback) is set where it is started instead: `AGENTRUN_ARCHIL_REGION
|
|
1155
|
-
`AGENTRUN_ARCHIL_S3_URL`
|
|
1156
|
-
`ARCHIL_API_KEY`. Each agent's disk is then
|
|
1273
|
+
`AGENTRUN_ACCOUNTS=0` reached beyond loopback) is set where it is started instead: `AGENTRUN_ARCHIL_REGION`,
|
|
1274
|
+
`AGENTRUN_ARCHIL_S3_URL` for a region serve doesn't know (or to use another endpoint than a known region's), and
|
|
1275
|
+
`AGENTRUN_ARCHIL_IMAGE` for a pinned exec image, with the account key in `ARCHIL_API_KEY`. Each agent's disk is then
|
|
1276
|
+
made on its first run, as with saved settings:
|
|
1157
1277
|
|
|
1158
1278
|
```sh
|
|
1159
|
-
AGENTRUN_ARCHIL_REGION=aws-us-east-1
|
|
1160
|
-
ARCHIL_API_KEY=... node packages/serve/dist/cli.js
|
|
1279
|
+
AGENTRUN_ARCHIL_REGION=aws-us-east-1 ARCHIL_API_KEY=... node packages/serve/dist/cli.js
|
|
1161
1280
|
```
|
|
1162
1281
|
|
|
1163
|
-
Each value is checked as the PUT checks it.
|
|
1164
|
-
stops the start, in words naming each variable. Set, they win over saved settings, as `ARCHIL_API_KEY` wins over a
|
|
1282
|
+
Each value is checked as the PUT checks it. A variable set without the region, no S3 URL for a region serve doesn't
|
|
1283
|
+
know, or a value the PUT would refuse, stops the start, in words naming each variable. Set, they win over saved settings, as `ARCHIL_API_KEY` wins over a
|
|
1165
1284
|
saved key, and nothing is written to the store: `GET /v2/workspace/archil` says `source: "env"` (saved ones say
|
|
1166
1285
|
`"console"`), and `PUT` and `DELETE` are `409 key_set_by_server`, since they are changed where the server is started.
|
|
1167
1286
|
Unset, the saved settings, if any, hold again. A runner started on its own (`agentrun-serve runner`) reads them from its
|
|
@@ -1370,8 +1489,8 @@ model with no price set that the catalog does not list in any form; null while `
|
|
|
1370
1489
|
process is handed a model key only when its model needs it: a pi run its model's provider's (a run on Gemini
|
|
1371
1490
|
`GEMINI_API_KEY`, one on `openrouter/...` `OPENROUTER_API_KEY`; a workflow each of its tiers'), or `AGENT_MODEL_API_KEY`
|
|
1372
1491
|
through the gateway; a codex run `OPENAI_API_KEY`, or `AGENT_MODEL_API_KEY` through the gateway; a claude-agent run
|
|
1373
|
-
`ANTHROPIC_API_KEY`. No run gets another's. A workflow's decision nodes get their providers' keys on
|
|
1374
|
-
|
|
1492
|
+
`ANTHROPIC_API_KEY`. No run gets another's. A workflow's decision nodes get their providers' keys on the claim's own
|
|
1493
|
+
environment, whatever its model, and only those ([Safety](#safety)).
|
|
1375
1494
|
|
|
1376
1495
|
A definition is checked for what keeps it from running here when it is saved, with the same checks a run makes before
|
|
1377
1496
|
it starts:
|
|
@@ -1645,18 +1764,49 @@ has the row **Use Claude Code's login on this machine**, over these routes:
|
|
|
1645
1764
|
for by an id the server makes once in its data folder (`machine-id`, 0600) and reads back on every later start,
|
|
1646
1765
|
never by the hostname, which on a laptop changes with the network. Two data folders are two machines. A setting
|
|
1647
1766
|
saved before the id reads as `other_machine` until it is turned on again.
|
|
1767
|
+
The login's folders must be the server's user's own: at either place its home, and on `machine` each folder the
|
|
1768
|
+
server's environment gives it (`CLAUDE_CONFIG_DIR`, `CLAUDE_SECURESTORAGE_CONFIG_DIR`, and `ANTHROPIC_CONFIG_DIR`
|
|
1769
|
+
or else `XDG_CONFIG_HOME`'s `anthropic`). Each is a folder that user owns, or one still to make in a folder it owns,
|
|
1770
|
+
reached through no other user's link or folder, and writable by no one else; a folder on the way may be open to
|
|
1771
|
+
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
|
|
1772
|
+
on the login, and a setting saved before is kept but not used, the start logging why. A folder its group may write
|
|
1773
|
+
in is the user's alone where that group is the user's private one, as the local account files alone say:
|
|
1774
|
+
`/etc/nsswitch.conf` takes users and groups from those files only (`files` or `compat` on its `passwd`, `group` and
|
|
1775
|
+
any `initgroups` line), and the group is the user's primary group, which no other user has as theirs and
|
|
1776
|
+
`/etc/group` lists with no other member and gives no password there (`x`, `!`, `*` or empty), and `/etc/passwd` has
|
|
1777
|
+
one account with the user's uid and one with its name, so a umask of 002 under one refuses nothing. Any other group
|
|
1778
|
+
(one shared with other users, one that is not the user's primary group, one `/etc/group` lacks, account files with
|
|
1779
|
+
a `+` or `-` line, a second account with the user's name or uid, an id with blanks before it, or a switch that also
|
|
1780
|
+
asks sssd, LDAP, NIS, winbind or systemd's user records, as the `files systemd` of recent Ubuntu, Debian and Fedora
|
|
1781
|
+
installs does, or no switch file: there members can exist that the files do not show), and a folder anyone may
|
|
1782
|
+
write in, are refused in words that name the folder, its mode and the `chmod g-w,o-w` that closes it. A group
|
|
1783
|
+
`/etc/group` gives a password is refused too, since anyone who knows it may join the group with `newgrp`, and the
|
|
1784
|
+
words also name the group and the `gpasswd -r` that removes the password. An `x` there is not refused: it says only
|
|
1785
|
+
that the group's password, if it has one, is in `/etc/gshadow`, with the members `newgrp` lets in without it, and a
|
|
1786
|
+
server without privileges cannot read that file, so the check does not. A gshadow password or member set with
|
|
1787
|
+
`gpasswd` is not seen; remove it with `gpasswd -r` or `gpasswd -d`. The files are read as they are now: a user
|
|
1788
|
+
removed from the group keeps it in the sessions they already have open, since a process's groups are set when it
|
|
1789
|
+
logs in, so end those sessions before counting the folder as the user's alone. A folder of the login
|
|
1790
|
+
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
|
|
1791
|
+
the CLI signs in there is not refused after.
|
|
1648
1792
|
- `GET /v2/settings/claude-login` says `state`: `off`, `signed_in` (with the `account` the CLI names: method, email,
|
|
1649
|
-
organization, plan), `signed_out`, `no_cli` (claude-agent's first run installs the pinned CLI), `unknown`,
|
|
1650
|
-
`other_machine
|
|
1793
|
+
organization, plan), `signed_out`, `no_cli` (claude-agent's first run installs the pinned CLI), `unknown`,
|
|
1794
|
+
`other_machine`, or `refused` (turned on and kept, but its folders or the home are refused, `refused` saying why;
|
|
1795
|
+
`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
|
|
1651
1796
|
login folder (`machine.source`: `CLAUDE_CONFIG_DIR` or `default`; `machine.credentials`: the server's
|
|
1652
1797
|
`CLAUDE_SECURESTORAGE_CONFIG_DIR`, when it sets one). `command` is the line that signs the CLI in at
|
|
1653
|
-
the login's place, for a terminal on the server's machine
|
|
1798
|
+
the login's place, for a terminal on the server's machine; it is empty where the login's folders are refused, and
|
|
1799
|
+
`folder` is then the folder as the environment names it. Where the console is on that machine (a server on loopback
|
|
1654
1800
|
with no public address), `can_start` is true and `POST /v2/settings/claude-login/login` starts the pinned CLI's own
|
|
1655
1801
|
`auth login`, which opens a browser there. It runs with the same variables as `command`, so it signs in at `folder`,
|
|
1656
1802
|
and the status is read there too, since `auth login` writes the account it signed in to its config dir. On
|
|
1657
1803
|
`machine` with the default `~/.claude`, the CLI is signed in as the person's own `claude` runs: no
|
|
1658
1804
|
`CLAUDE_CONFIG_DIR` or `CLAUDE_SECURESTORAGE_CONFIG_DIR`, in their home, so it writes the account in `~/.claude.json`
|
|
1659
1805
|
and the tokens where their Claude Code keeps them (in `~/.claude`; on macOS the Keychain item `Claude Code-credentials`).
|
|
1806
|
+
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
|
|
1807
|
+
`LOGNAME` set to the user the server runs as (as the system names it, whatever `USER` the server was started with):
|
|
1808
|
+
the item is the one the person's own `claude auth status` reads in their terminal, never one under the account
|
|
1809
|
+
`unknown`, which a CLI started with no `USER` uses.
|
|
1660
1810
|
`command` there is `env -u CLAUDE_CONFIG_DIR -u CLAUDE_SECURESTORAGE_CONFIG_DIR ... auth login`, so a terminal that
|
|
1661
1811
|
exports either still signs in at that login. env is a program, so the line runs alike when pasted into sh, bash,
|
|
1662
1812
|
zsh, fish or tcsh; a CLI path holding `=`, which env would read as a variable, goes to `sh -c` as its `$0`. env skips
|
|
@@ -1689,6 +1839,28 @@ has the row **Use Claude Code's login on this machine**, over these routes:
|
|
|
1689
1839
|
The CLI dies with the server, as a session's CLI does, so a server that is killed outright (SIGKILL, the OOM killer)
|
|
1690
1840
|
leaves no sign-in waiting on the browser's port.
|
|
1691
1841
|
- `DELETE /v2/settings/claude-login` turns it off. The login stays as the CLI keeps it.
|
|
1842
|
+
- `POST /v2/settings/claude-login/sign-out` signs out of AgentRun's own login, for a fresh sign-in or another account: it
|
|
1843
|
+
ends a sign-in that waits, turns the mode off, runs the pinned CLI's own `claude auth logout` on
|
|
1844
|
+
`<data>/claude-login` (which removes its credentials file and, on macOS, its Keychain item for that folder), then
|
|
1845
|
+
removes that folder, the login's signed-in note in `claude-login-answers/` and the runner's token reader, whatever the
|
|
1846
|
+
CLI said. Each removal stands alone: one that fails is named in the answer and the rest still happen. It answers
|
|
1847
|
+
`{ "confirmed": true, "login": <the view, off> }`; `confirmed` false adds a `message` saying what may remain: the
|
|
1848
|
+
CLI didn't confirm its own sign-out, or its step failed, named (on macOS its Keychain item may remain), or a file it
|
|
1849
|
+
could not remove, by path. The CLI's sign-out runs where the folder is already gone too, so a retry after an
|
|
1850
|
+
unconfirmed sign-out confirms only where the CLI does. The next turn-on reads `signed_out` and the sign-in starts as
|
|
1851
|
+
before. `<data>/claude-login`
|
|
1852
|
+
is a folder AgentRun keeps itself: a turn-on where it is a link is refused, and a sign-out that finds a link there
|
|
1853
|
+
removes the link alone (and the login's signed-in note), runs no CLI through it, and names what it led to. Runs already going are left as a turn-off leaves them, and fail saying the
|
|
1854
|
+
login is signed out at their next read of it. Where each run is a user of its own, a run claimed on the login and
|
|
1855
|
+
started while the mode is off is refused at its start, as after a turn-off; the claim checks the login's folder, not
|
|
1856
|
+
its account, so a run claimed before Sign out and started after a new sign-in may run on the new account. What Sign
|
|
1857
|
+
out does not guarantee for a run still going: where runs stay in the runner's process, the run's CLI holds the login's
|
|
1858
|
+
refresh token itself and may write a renewed token pair back into `<data>/claude-login` after the folder is removed
|
|
1859
|
+
(nothing removes it again when that run ends), so once such runs end, a turn-on that reads `signed_in` again means
|
|
1860
|
+
Sign out again. The runner's own renewal, for
|
|
1861
|
+
runs that are users of their own, never writes back to a removed login. This machine's own login (`place` `machine`)
|
|
1862
|
+
is the person's: the sign-out is refused (403) with nothing touched, and the words say to run `claude auth logout` in
|
|
1863
|
+
a terminal there. The console's Claude login row offers Sign out only while AgentRun's own login is signed in.
|
|
1692
1864
|
|
|
1693
1865
|
While it is on, a claude-agent run on an `anthropic/<model>` model goes on the login: its CLI gets no
|
|
1694
1866
|
`ANTHROPIC_BASE_URL`, `ANTHROPIC_AUTH_TOKEN` or key, no model proxy runs, and the CLI's sandbox denies its commands
|
|
@@ -1742,10 +1914,12 @@ gateway and no restart: `GET /api/tags` for the tags, `POST /api/show` for each
|
|
|
1742
1914
|
is `ollama/<tag>` in `harnesses[].models` and `harnesses[].free_models` for pi and for every harness on a wire the
|
|
1743
1915
|
route translates, and the console names it
|
|
1744
1916
|
`<tag> · local (Ollama)`, on a run's page too (from the run's `tokens` usage line, `provider` `ollama` and `model` the
|
|
1745
|
-
tag), so a run on the default says which model it ran on. An embedding model is left out. A model pulled
|
|
1917
|
+
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
|
|
1746
1918
|
within half a minute (the listing is kept that long, and asked again behind the next answer). A down or stuck Ollama
|
|
1747
|
-
|
|
1748
|
-
|
|
1919
|
+
slows nothing: the listing has 2 seconds in all and follows no redirect. A listing that fails is never kept as one:
|
|
1920
|
+
past its deadline or with an answer of the wrong shape, the models listed before it stay; refused (Ollama is not
|
|
1921
|
+
running), none do. Either way Ollama is asked again behind the next answer, so an Ollama that comes back or starts
|
|
1922
|
+
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
|
|
1749
1923
|
seconds), and a run on any other model, a key's default included, never asks Ollama.
|
|
1750
1924
|
|
|
1751
1925
|
- Where: `OLLAMA_HOST`, read as the ollama CLI reads it. Unset, 127.0.0.1:11434, but only on one owner's own server
|
|
@@ -1771,12 +1945,26 @@ seconds), and a run on any other model, a key's default included, never asks Oll
|
|
|
1771
1945
|
- Cost: $0, booked as a known cost. Its requests never count toward the server's [limit on free
|
|
1772
1946
|
requests](#a-limit-on-free-requests): there is no shared quota behind them. An agent's own `max_requests` counts them,
|
|
1773
1947
|
with its other free requests, so a run on Ollama that keeps calling tools still stops there.
|
|
1774
|
-
- Harness: pi, and every harness on a wire the route translates.
|
|
1775
|
-
Goose,
|
|
1776
|
-
`num_ctx`, tools and cost. A Messages client's token
|
|
1777
|
-
asking the model, an answer it asks for unstreamed
|
|
1778
|
-
|
|
1779
|
-
|
|
1948
|
+
- Harness: pi, and every harness on a wire the route translates. Those wires are Anthropic's Messages (claude-agent,
|
|
1949
|
+
Goose, a harness module on it) and OpenAI's Responses (codex, opencode, a harness module on it). Their requests go
|
|
1950
|
+
through the same translation as pi's: the same `/api/chat`, `num_ctx`, tools and cost. A Messages client's token
|
|
1951
|
+
count (`/v1/messages/count_tokens`) is answered there without asking the model, an answer it asks for unstreamed
|
|
1952
|
+
comes back whole (or as a 500 error with words when part of the stream doesn't read), and every model id it sends
|
|
1953
|
+
(Claude Code's small model too) runs the one tag. claude-agent turns its own tool search off on these models.
|
|
1954
|
+
- On OpenAI's Responses, each request is the whole conversation: `store: true` and `previous_response_id` are
|
|
1955
|
+
refused, since nothing is stored here. Function tools only: a custom (freeform) tool such as Codex's `apply_patch`
|
|
1956
|
+
grammar, `local_shell` and `web_search` are refused with words, never dropped, and codex offers no live web search
|
|
1957
|
+
on these models. A `tool_choice` that forces a call (`"required"`, or one naming a function) is refused too: Ollama
|
|
1958
|
+
can't be made to call a tool. `"auto"` and `"none"` are taken. `text.format` `json_schema` is Ollama's own `format`
|
|
1959
|
+
(the answer held to the schema; `json_object` to any object), refused beside tools sent, since a model held to it
|
|
1960
|
+
can't call one. `temperature` and `top_p` reach Ollama's options; `reasoning.effort` turns a thinking model's
|
|
1961
|
+
thinking on, `"none"` off. An effort or a format the route doesn't know is refused. `parallel_tool_calls: false` gets
|
|
1962
|
+
an answer's first call alone, and the calls it drops are logged by tool name. A request streams only with
|
|
1963
|
+
`stream: true`; one that names no stream is answered whole. Replayed reasoning, OpenAI's encrypted reasoning
|
|
1964
|
+
included, is dropped, not refused. An answer cut at its output limit ends `response.incomplete` with its usage, so it
|
|
1965
|
+
is booked and codex ends the turn rather than asking again. Every model id the client sends (a title or compaction
|
|
1966
|
+
request's too) runs the one tag. codex and opencode are given the model's window as the route runs it (its `num_ctx`,
|
|
1967
|
+
at most 64k), so they compact before Ollama would cut the prompt, and its output ceiling (half that, at most 16,384).
|
|
1780
1968
|
- Cloud models: an Ollama cloud model (a `-cloud` tag, with `remote_host` and `remote_model` in `/api/tags` or
|
|
1781
1969
|
`/api/show`) runs on ollama.com, not here, so it is never listed: never local, never $0, never the default.
|
|
1782
1970
|
- Default: with no model key held (and no `AGENT_MODEL`, ChatGPT sign-in or gateway), pi and every harness on a wire the
|
|
@@ -1809,8 +1997,8 @@ agent_not_runnable`, with `details.unbound` and `details.missing`).
|
|
|
1809
1997
|
| `bash_signal` | Send a background process's group `TERM`, `INT` or `KILL`: `{id, signal}` | an agentic definition whose place is a sandbox | no, no |
|
|
1810
1998
|
| `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 |
|
|
1811
1999
|
| `ask_person` | Ask the person who started the run; the turn ends until a message answers | nothing | no, no |
|
|
1812
|
-
| `web_fetch` | Read one web page from a public host through the guarded direct fetch, or
|
|
1813
|
-
| `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)): `{
|
|
2000
|
+
| `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 |
|
|
2001
|
+
| `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 |
|
|
1814
2002
|
| `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 |
|
|
1815
2003
|
| `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 |
|
|
1816
2004
|
| `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 |
|
|
@@ -1974,6 +2162,27 @@ A workflow's model nodes may each run on another tier's model, so a workflow's `
|
|
|
1974
2162
|
it is Parallel on the server's key, else keyless Firecrawl, or the provider picked, and a pick of `native` alone is
|
|
1975
2163
|
unavailable for a workflow.
|
|
1976
2164
|
|
|
2165
|
+
Where the server holds a TypeSafe key (`TYPESAFE_API_KEY`, set or saved), Jev runs on the web tools by default, and
|
|
2166
|
+
run content goes to TypeSafe. Each `web_search` sends TypeSafe its objective and each result's URL, title, snippet and
|
|
2167
|
+
published date (when the provider gives one).
|
|
2168
|
+
Each `web_fetch` given an objective sends TypeSafe the page's text (up to 1,000,000 characters, in chunks) and the
|
|
2169
|
+
objective; a fetch with no objective sends nothing. TypeSafe bills every request to the server's TypeSafe key. To
|
|
2170
|
+
keep the old behaviour on a server that holds the key, set `AGENTRUN_WEB_JEV_OFF=1`. Jev (`jev-1.14.0`) scores each
|
|
2171
|
+
search's results against its objective and reorders them by that score, keeping every one,
|
|
2172
|
+
each with its `relevance` (0 to 1), and a `sift` line saying how they were ranked, or why not (a Jev failure leaves them
|
|
2173
|
+
as the provider gave them). It applies wherever the run's own `web_search` runs (Parallel, keyless Firecrawl or Exa,
|
|
2174
|
+
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
|
|
2175
|
+
Jev's published price and booked at the cost Jev reported, never above that hold. A `web_fetch` given an objective has
|
|
2176
|
+
Jev pick the chunks of the page most likely to hold it, in page order (`found`, each with its `relevance`), its requests
|
|
2177
|
+
held and booked the same way; a fetch with no objective asks Jev nothing and its page is whole. A server with only an
|
|
2178
|
+
OpenRouter key runs no ranking; `AGENTRUN_WEB_JEV_OFF=1` on the server turns Jev off for every run created while it is
|
|
2179
|
+
set, on whatever runner host claims it (the run's plane carries the switch, and keeps it at every later launch); a
|
|
2180
|
+
runner's own switch can add off for the runs that host claims, never turn it back on. `GET /capabilities`' `why` for
|
|
2181
|
+
each tool says what it sends TypeSafe, or that Jev is off: for `web_search` `…; Jev (jev-1.14.0) ranks results …; each
|
|
2182
|
+
search sends that and each result's URL, title, snippet and published date to TypeSafe …`, for `web_fetch` `…; a fetch given an
|
|
2183
|
+
objective sends the page's text and the objective to TypeSafe …`, and for either `…; Jev off: no TypeSafe key` or
|
|
2184
|
+
`…; Jev off (AGENTRUN_WEB_JEV_OFF)`.
|
|
2185
|
+
|
|
1977
2186
|
| | `claude-agent` | `codex` | pi |
|
|
1978
2187
|
| --- | --- | --- | --- |
|
|
1979
2188
|
| `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 |
|
|
@@ -1981,7 +2190,7 @@ unavailable for a workflow.
|
|
|
1981
2190
|
| `web_search`, `off` | unavailable (`web_search is turned off in settings`): nothing is searched | the same | the same |
|
|
1982
2191
|
| `web_search`, `firecrawl-keyless` | Firecrawl's public MCP search, keyless Exa's behind it, a host tool | the same | the same |
|
|
1983
2192
|
| `web_search`, `exa-keyless` | Exa's public MCP search alone, a host tool | the same | the same |
|
|
1984
|
-
| `web_fetch`, `auto` (the default) |
|
|
2193
|
+
| `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 |
|
|
1985
2194
|
| `web_fetch`, `firecrawl-keyless` | Firecrawl's public MCP scrape, the guarded direct fetch behind it: Firecrawl is sent each URL | the same | the same |
|
|
1986
2195
|
| `web_fetch`, `kernel` | the guarded direct fetch | the same | the same |
|
|
1987
2196
|
| either, `parallel` | Parallel's search and extract, host tools | the same | the same |
|
|
@@ -2020,10 +2229,11 @@ Upgrading to the tool gate: a workflow whose call node's tool is set to ask, by
|
|
|
2020
2229
|
run (`409` with `details.asks`); set that tool to allow for the agent (`definition.tool_settings`). Built-in tools are
|
|
2021
2230
|
allowed by default; catalog (`monid:<provider>/<endpoint>`) and MCP tools, which ask by default, are no call node's tools here.
|
|
2022
2231
|
|
|
2023
|
-
Upgrading: a server holding `PARALLEL_API_KEY`
|
|
2024
|
-
|
|
2025
|
-
|
|
2026
|
-
`PUT /v2/settings/tools {"web_fetch": {"provider": "
|
|
2232
|
+
Upgrading: on a server holding `PARALLEL_API_KEY`, `web_fetch` on `auto` reads each page through Parallel's extract
|
|
2233
|
+
first, with the guarded direct fetch behind it, as `web_search` on `auto` searches through Parallel (keyless Firecrawl on
|
|
2234
|
+
a server with no Parallel key). To keep every URL on the server instead, set
|
|
2235
|
+
`PUT /v2/settings/tools {"web_fetch": {"provider": "kernel"}}` once (or `tool_settings` in an agent). Both tools'
|
|
2236
|
+
`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
|
|
2027
2237
|
[Decision workflows](#decision-workflows)), and a web tool reaches Parallel only where its own capability does.
|
|
2028
2238
|
|
|
2029
2239
|
pi's native `web_search` is one standalone request, as Claude's CLI runs its WebSearch: one user turn carrying the
|
|
@@ -2042,11 +2252,13 @@ https://exa.ai/terms). To turn them off, set `web_search` to `native` (native on
|
|
|
2042
2252
|
keys (or set `PARALLEL_API_KEY`): `auto` then searches through Parallel and bills the key.
|
|
2043
2253
|
|
|
2044
2254
|
Keyless Firecrawl is one MCP exchange with Firecrawl's public endpoint (`https://mcp.firecrawl.dev/v2/mcp`), with no key,
|
|
2045
|
-
no Authorization header and no header of our own: `firecrawl_search`
|
|
2255
|
+
no Authorization header and no header of our own: `firecrawl_search` once for each of the search's first 3 queries, all at
|
|
2256
|
+
once, each with the objective (its tool requires one), its share of the results asked for and a scrape of each result
|
|
2257
|
+
as markdown, the answers merged by URL,
|
|
2046
2258
|
or `firecrawl_scrape` with the URL, for its markdown. A call ends at 30 s and is not retried: the backend behind Firecrawl
|
|
2047
2259
|
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,
|
|
2048
2260
|
and no backend starts once the deadline is spent. A page Firecrawl read with a status that is not 2xx, or an answer past
|
|
2049
|
-
the bound (
|
|
2261
|
+
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
|
|
2050
2262
|
Firecrawl, and where the guarded direct fetch then reads the page, the server logs why Firecrawl gave none
|
|
2051
2263
|
(`event=web_fetch_firecrawl_failed`, never the URL). Firecrawl refuses a keyless call it will not serve with a code, and
|
|
2052
2264
|
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
|
|
@@ -2095,7 +2307,10 @@ refuses is refused and never leaves the machine. A call stopped before its page
|
|
|
2095
2307
|
`via: "stopped"`: no page came for it (the run's read of the URL goes on for its other calls).
|
|
2096
2308
|
|
|
2097
2309
|
`web_search` through Parallel uses its Search API (`POST https://api.parallel.ai/v1/search`, its `fast` mode, about
|
|
2098
|
-
$0.001 a search)
|
|
2310
|
+
$0.001 a search): the objective as its objective, the queries as its `search_queries`, and the run's model as
|
|
2311
|
+
`client_model` (its bare id) where the run names one. A search asks an objective, what the agent wants to find out in a
|
|
2312
|
+
sentence (cut at 1,000 characters), and up to 5 keyword queries (each cut at 200; with none, the objective's first 200
|
|
2313
|
+
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
|
|
2099
2314
|
`{error}`, with nothing searched instead; a 401 or 403 to either web tool stops Parallel for both for the rest of the run.
|
|
2100
2315
|
|
|
2101
2316
|
Parallel's fees are the run's spend, booked as monid's are: each search and each page Parallel extracts is marked in the
|
|
@@ -2123,7 +2338,7 @@ keyless use has a rate limit it does not publish, and its own terms. Past that l
|
|
|
2123
2338
|
then is a tool error in our words (above): the model reads why and answers without it, and the run's later searches
|
|
2124
2339
|
are held for the wait. Exa answers its daily count running out the same way, naming no wait, so a second limit naming no
|
|
2125
2340
|
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
|
|
2126
|
-
included, so a call never hangs. The answer is the
|
|
2341
|
+
included, so a call never hangs. The answer is the objective, the queries and their results, each a URL, a title, a
|
|
2127
2342
|
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
|
|
2128
2343
|
relies on. Keyless Exa answers behind keyless Firecrawl, the default for a harness with no native search when the server
|
|
2129
2344
|
holds no Parallel key; `off` turns `web_search` off, both included.
|
|
@@ -2429,8 +2644,8 @@ A stored value that does not open is never a reason not to start. It reads `set:
|
|
|
2429
2644
|
so once, naming the condition and the file, never a value; a `PUT` of the value seals it again under the current key.
|
|
2430
2645
|
|
|
2431
2646
|
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
|
|
2432
|
-
gets the saved keys at its launch,
|
|
2433
|
-
|
|
2647
|
+
gets the saved keys at its launch, on its claim's own environment (a workflow run's `PARALLEL_API_KEY` too), never in
|
|
2648
|
+
any process's environment, and never the seal key. No restart: a `PUT` or `DELETE`
|
|
2434
2649
|
answers once capabilities, a save's checks and a run's checks see the change, in milliseconds. No harness reads a tool
|
|
2435
2650
|
key, so a key leaves what each harness offers as it is, and the harnesses are not checked again. A run already
|
|
2436
2651
|
running keeps what it was handed; the next run started, or a run's process started again, takes what is saved then.
|
|
@@ -2479,8 +2694,9 @@ preset: you give your Composio API key, a toolkit (`github`, `slack`...), the ac
|
|
|
2479
2694
|
toolkit's list) and a server name, and the server has Composio make a managed MCP server for them, then saves it as an
|
|
2480
2695
|
ordinary MCP server with the key sealed as an `x-api-key` header. `POST /v2/settings/mcp-servers/composio/tools`
|
|
2481
2696
|
`{api_key, toolkit}` lists the actions, and `POST /v2/settings/mcp-servers/composio/toolkits` `{api_key}` lists the
|
|
2482
|
-
toolkits Composio offers (`{toolkits: [{slug, name}]}`, by name) for the console's toolkit picker;
|
|
2483
|
-
user_id?, auth_config_id?, price_usd?}` makes
|
|
2697
|
+
toolkits Composio offers (`{toolkits: [{slug, name}]}`, by name) for the console's toolkit picker;
|
|
2698
|
+
`PUT /v2/settings/mcp-servers/{name}/composio` `{api_key, toolkit, tools, user_id?, auth_config_id?, price_usd?}` makes
|
|
2699
|
+
and saves the server. In place of `api_key`, `"api_key_env":
|
|
2484
2700
|
"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
|
|
2485
2701
|
way an [API-only](#api-only) server's token saves one. That key is only ever sent to Composio's own origin, fixed in
|
|
2486
2702
|
code, so a server saved so whose address is anywhere else is refused by name and sent nothing. The body names no
|
|
@@ -2494,12 +2710,16 @@ server. `price_usd` (0 or more, as a `prices` value) is what each call costs you
|
|
|
2494
2710
|
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
|
|
2495
2711
|
`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
|
|
2496
2712
|
lists. Composio's server can leave out an action it was allowed (it did for `HACKERNEWS_GET_FRONTPAGE`), so the answer's
|
|
2497
|
-
`not_served` names any chosen action the saved server doesn't list. These routes are the owner's session alone.
|
|
2498
|
-
|
|
2499
|
-
|
|
2500
|
-
|
|
2501
|
-
|
|
2502
|
-
|
|
2713
|
+
`not_served` names any chosen action the saved server doesn't list. These routes are the owner's session alone.
|
|
2714
|
+
|
|
2715
|
+
A refresh of a saved Composio server also reads its account at Composio, and every read of the server then says it as
|
|
2716
|
+
`composio_account: {state, labels?, checked_at}`: `connected` with each account's label (its alias, else the name
|
|
2717
|
+
Composio shows, else its word id; never its id or a token), `pending` while its connect link is unfinished, `expired`,
|
|
2718
|
+
`none`, or `unknown` when Composio didn't answer. Only an account Composio names as the server's user's is the server's,
|
|
2719
|
+
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,
|
|
2720
|
+
and the user connects one again. A per-run server has none; an empty recorded user reads
|
|
2721
|
+
`unknown`. The API token sees `composio_account` too, in a server's full read: its label may be the account's email.
|
|
2722
|
+
|
|
2503
2723
|
A saved Composio server is gated, approved and shown on the Timeline as any MCP server's tools are, "not metered" until
|
|
2504
2724
|
you price them (`price_usd`, or the server's `prices`). Composio's own meta tools stay refused, and the helper actions
|
|
2505
2725
|
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.
|
|
@@ -2533,8 +2753,28 @@ other server, are `422` at `mcp_auth.<server>`, and no run starts. A per-run ser
|
|
|
2533
2753
|
runs as one account. A server saved for one user before this mode keeps calling as that user.
|
|
2534
2754
|
|
|
2535
2755
|
With `user_id: "per_run"`, whoever can start a run chooses its Composio user, so the host owns which user each run
|
|
2536
|
-
binds: it binds each run to its own person and never takes the ids from that person.
|
|
2537
|
-
|
|
2756
|
+
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
|
|
2757
|
+
a Composio user the owner calls as here, in any letter case: the user any preset server the owner saved calls as or
|
|
2758
|
+
its kept account stands on (not one the token saved, and not a per-run one), `agentrun`, and the tool-listing user.
|
|
2759
|
+
On a start, an inline start, a launch hook's firing start and a message, the
|
|
2760
|
+
token's binding of one is `422 input_invalid` at `mcp_auth.<server>.composio_user_id` (`not_allowed`), and nothing is
|
|
2761
|
+
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
|
|
2762
|
+
owner connects after a token's run started is refused from then on. The seal marks each binding with who handed it
|
|
2763
|
+
(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
|
|
2764
|
+
has connected since has its calls answered, unsent, that the user is the owner's, until a message hands `mcp_auth`
|
|
2765
|
+
again or a new run starts. The owner's session binds any user, the owner's own included. On an [API-only](#api-only)
|
|
2766
|
+
server every caller is the token: the same users are refused, at the request and at each claim whoever handed the
|
|
2767
|
+
binding, and a named account must be one Composio lists under the run's user.
|
|
2768
|
+
|
|
2769
|
+
What this leaves open: a per-run server lends the install's Composio key to whoever starts a run, and a token can still
|
|
2770
|
+
name a user the owner connected directly at Composio (the dashboard, or another client of the same Composio project),
|
|
2771
|
+
outside this install, which no record here names. Save a per-run server only on an install whose token callers own
|
|
2772
|
+
that Composio project's users.
|
|
2773
|
+
|
|
2774
|
+
Upgrading: a run sealed before the mark, in flight across the upgrade, whose binding names a user the owner connects
|
|
2775
|
+
here has its calls of that server answered, unsent, in the same words at its next claim, since nothing says the owner
|
|
2776
|
+
handed it: a message that hands `mcp_auth` again (the owner's session, for the owner's user) marks it, or start a new
|
|
2777
|
+
run.
|
|
2538
2778
|
|
|
2539
2779
|
What can go wrong, told apart:
|
|
2540
2780
|
|
|
@@ -3305,9 +3545,29 @@ after asks, saying "this run has sent 5 emails" (the count is the run's own reco
|
|
|
3305
3545
|
stops two auto-responders answering each other. On a run an email started whose `email_read` is thread-scoped (no
|
|
3306
3546
|
`scope: "mailbox"`), a send to anyone outside the thread's people
|
|
3307
3547
|
(the account's own address and every From, To and Cc of the thread's messages) asks too, naming them ("eve@example.com
|
|
3308
|
-
is outside this email's thread").
|
|
3309
|
-
|
|
3310
|
-
|
|
3548
|
+
is outside this email's thread"). On every run a trigger started (schedule, webhook, Slack, GitHub, Composio, feed or
|
|
3549
|
+
email), a send to an address this account has never sent to asks too, naming it ("someone@example.com: this account
|
|
3550
|
+
has never sent to them"). Never sent to means no message in the account's own Sent folder (Gmail's Sent Mail), from
|
|
3551
|
+
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
|
|
3552
|
+
of ASCII letters only (a Unicode look-alike such as the Kelvin sign for K is another address), as far back as Sent
|
|
3553
|
+
goes. Some servers (Exchange and Outlook among them) keep no Bcc header on a Sent copy over IMAP, so there an address
|
|
3554
|
+
only ever Bcc'd asks. Mail received from someone doesn't count, so a scheduled run replying to a first-time sender asks
|
|
3555
|
+
once; nor does a draft or someone else's message in Sent, and `email_file` refuses Sent and Drafts as targets, so a run
|
|
3556
|
+
can't file its own evidence there. Once it has made a folder, `email_file` files only into a mailbox the server lists
|
|
3557
|
+
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
|
|
3558
|
+
recipients asks. The new-address check never asks about the account's own address or an address the run already sent
|
|
3559
|
+
to (unasked or approved). On a thread-scoped email run it doesn't ask about the thread's starter (the From of the
|
|
3560
|
+
message that started the run) either, but only when the receiving mail server vouched for that From: the message's
|
|
3561
|
+
topmost Authentication-Results header carries the account provider's authserv-id and says `dmarc=pass` with a
|
|
3562
|
+
`header.from` equal to the From's domain (case-blind, ASCII letters only). A header lower down may be the sender's own
|
|
3563
|
+
and is never read; `dkim=pass` or `spf=pass` alone doesn't count. The provider's authserv-id is known for Gmail
|
|
3564
|
+
(`mx.google.com`, by the Gmail preset or an IMAP host under gmail.com) and for no other provider yet, so there the
|
|
3565
|
+
starter asks like any new address. A starter with no DMARC pass asks too, since their From may be forged. Anyone else
|
|
3566
|
+
that message names, such as a stranger it Cc'd, asks on a reply-all. The 5-send cap still counts
|
|
3567
|
+
every send. A Sent folder that can't be read (or none, or no account saved when the send is checked) asks, saying so.
|
|
3568
|
+
`scope: "mailbox"` turns the thread ask off and exempts no starter. A playground or API run has neither ask, only the
|
|
3569
|
+
cap. The pending approval carries the reason as `asks_because`, which the console's card says above the call's
|
|
3570
|
+
arguments ("Asks because ..."). With accounts off, where no one can approve, such a send is refused in those words.
|
|
3311
3571
|
|
|
3312
3572
|
An agent whose definition says `checkout: repository` starts each run in a checkout of the repository the run names: its
|
|
3313
3573
|
start's `repo`, else the first `https://github.com/<owner>/<repo>` in its first message (a github trigger's run, its
|
|
@@ -3363,8 +3623,9 @@ Create; no run ever holds a token that can write.
|
|
|
3363
3623
|
then applies it here (an apply refused takes the package back, deletes the branch and makes nothing). The push is
|
|
3364
3624
|
recorded on the suggestion first, so a create after a write that failed finds the agent made from that template at
|
|
3365
3625
|
that commit and reuses it, never making a second one;
|
|
3366
|
-
- opens the pull request, naming the agent's id and the variables the client reads (`
|
|
3367
|
-
|
|
3626
|
+
- opens the pull request, naming the agent's id and the variables the client reads (`AGENTRUN_BASE_URL`, given
|
|
3627
|
+
with `/v2` as the server prints it and taken with or without, as AgentRun's own clients take it;
|
|
3628
|
+
`AGENTRUN_API_KEY`; `AGENTRUN_AGENT_<KEY>`). A pull request GitHub refuses keeps the agent (`502 github_failed`,
|
|
3368
3629
|
`details.agent_id`), and the next create opens the pull request alone. A created suggestion answers `200` as it is.
|
|
3369
3630
|
|
|
3370
3631
|
`--faux-github` (with `--faux`) serves the list, the checks and the create from its fake App: its installation holds
|
|
@@ -3426,13 +3687,14 @@ failed, 2 when nothing ran. The runner, the graders and the report are in
|
|
|
3426
3687
|
| `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. |
|
|
3427
3688
|
| `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. |
|
|
3428
3689
|
| `GET /agents/{id}/revisions` | The agent's revisions, newest first: `revision`, `version`, `parent`, `kind`, `current`, `note`, `created_at` and the `definition`. |
|
|
3690
|
+
| `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 `{}`. |
|
|
3429
3691
|
| `POST /agents/{id}/current` | `{revision}`: one of the agent's revisions becomes current again. |
|
|
3430
3692
|
| `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`. |
|
|
3431
3693
|
| `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`. |
|
|
3432
3694
|
| `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`. |
|
|
3433
3695
|
| `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. |
|
|
3434
3696
|
| `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. |
|
|
3435
|
-
| `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, and `archived=true` lists only archived ones. A failed run's summary carries its `error`, and a waiting run's its `pending`. |
|
|
3697
|
+
| `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`. |
|
|
3436
3698
|
| `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). |
|
|
3437
3699
|
| `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. |
|
|
3438
3700
|
| `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`). |
|
|
@@ -3582,7 +3844,8 @@ serves these routes alone:
|
|
|
3582
3844
|
are the console's, refused here;
|
|
3583
3845
|
- what an agent learned, for the backend whose runs it learned from: the loop's compile turns
|
|
3584
3846
|
(`GET /agents/{id}/learning/loop`), each learned workflow's promotion and what serves
|
|
3585
|
-
(`GET /agents/{id}/learning/promotions`), the
|
|
3847
|
+
(`GET /agents/{id}/learning/promotions`), the audit ledger of the workflows that serve
|
|
3848
|
+
(`GET /agents/{id}/learning/audits`), the cost per run (`GET /agents/{id}/learning/cost`) and a run's learning
|
|
3586
3849
|
(`GET /runs/{id}/learning`), each cut of the host's secrets as the console's reads are; and its reset
|
|
3587
3850
|
(`DELETE /agents/{id}/learning`, the agent and its runs kept), its one learning write served here;
|
|
3588
3851
|
- a run's hosted machine fetching this server's computerd build (`GET /computers/daemon`), with the token its create
|
|
@@ -3622,7 +3885,49 @@ serves these routes alone:
|
|
|
3622
3885
|
One saved any other way (by the owner, sealing a credential or not) is `403` to both, it stays as it was, and
|
|
3623
3886
|
nothing is sent to Composio. An owner's save over a server the token saved makes it the owner's once it lands (one
|
|
3624
3887
|
refused with `412` leaves it the token's), and one that lands while the token's is under way wins: the token's is
|
|
3625
|
-
`412
|
|
3888
|
+
`412`;
|
|
3889
|
+
- the token's Composio save never uses an auth config a server the owner saved uses: an `auth_config_id` naming one
|
|
3890
|
+
is `403`, and so is the save when the toolkit's own auth config, as Composio answers it, is that one, before
|
|
3891
|
+
anything is made at Composio; both say so in the same words. An `auth_config_id` Composio answers under another id
|
|
3892
|
+
(another letter case, say) is `422` under it, for any save. An `auth_config_id` naming one that another server the
|
|
3893
|
+
token saved made is used, and that server's record still says it made it, so only its delete removes the auth
|
|
3894
|
+
config at Composio, or, while this server still uses it, hands it to this one, whose delete then removes it;
|
|
3895
|
+
- the token's Composio user has a namespace of its own: a save that is not `per_run` reaches Composio, and its server
|
|
3896
|
+
calls, as `agentrun.token.<user_id>` (no `user_id`: `agentrun.token.agentrun`), a user that, through this install,
|
|
3897
|
+
only the token's own connect link connects (the Composio dashboard, or another client of the same Composio project,
|
|
3898
|
+
can connect any user id), so its `user_id` is at most 113 characters. No save names a `user_id` starting
|
|
3899
|
+
`agentrun.token.` in any letter case, the owner's included: `422` under `user_id`, before anything is sent;
|
|
3900
|
+
- nor does the token's save stand on a connected account it did not connect: when Composio already has ACTIVE
|
|
3901
|
+
accounts for that user under its auth config, the save is `403` before anything is made, unless a server the token
|
|
3902
|
+
saved holds each of them as one it made (connected through the token's own link). The lookup reads 50 accounts a
|
|
3903
|
+
page, at most 10 pages (500 for that user and auth config): past that the token's save is `403`, since it can't
|
|
3904
|
+
check them all, and an owner's save goes on with the ones it read. That check sees the accounts there when the token
|
|
3905
|
+
saves; the namespace is what keeps the user the token's after it, since no save here names it;
|
|
3906
|
+
- a run's binding of a per-run Composio server (`mcp_auth.<server>`, `{composio_user_id, connected_account_id?}`)
|
|
3907
|
+
never calls as a user the owner calls as here, since every caller here is the token: its `composio_user_id`, in any
|
|
3908
|
+
letter case, is not the preset's default user (`agentrun`), its tool-listing user, or any user a server the owner
|
|
3909
|
+
saved (no token's mark on its record) stands on, by its preset record, the account its refresh kept or its address,
|
|
3910
|
+
else `422` `not_allowed` under it, before any account is looked up. Any other user is the caller's: a backend's
|
|
3911
|
+
own bare user id or one in the token's namespace alike. A `connected_account_id` it names is
|
|
3912
|
+
one Composio lists under that user for the server's toolkit, read at the start or the message that hands it with the
|
|
3913
|
+
server's key, 50 a page and at most 10 pages, as the save's lookup reads; one Composio answers under another user,
|
|
3914
|
+
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
|
|
3915
|
+
past those 10 pages, in words of its own, since it can't be checked. Composio not answering that read is `424`
|
|
3916
|
+
(`upstream_failed`): a run's account is never taken unchecked. Each refusal says which check refused it, nothing is
|
|
3917
|
+
started, and none quotes what was sent. A run's claim reads the same check again (one sealed before it, or before
|
|
3918
|
+
the owner's server was saved), its calls refused unsent. What it can't see: the per-run server lends this install's
|
|
3919
|
+
Composio key, so a binding may name a user the owner connected only at Composio (its dashboard, or another client of
|
|
3920
|
+
the same Composio project) with no record here, and call as that user. Save a per-run Composio server only with a
|
|
3921
|
+
Composio project whose users are all the token's backend's. On the full server the owner's runs bind as before;
|
|
3922
|
+
- a server the token saved before the namespace (0.1.0-beta.56 and earlier) calls as a user outside it, which may be
|
|
3923
|
+
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
|
|
3924
|
+
server in one log line (`api_only_composio_outside_namespace`), never its user or address. Delete it, then save it
|
|
3925
|
+
again: the new save is namespaced and returns a connect link for it. Where a server the owner saved stands on its
|
|
3926
|
+
auth config, which is the case a takeover leaves, a save over it is `403` (the auth config rule above), so it can only
|
|
3927
|
+
be deleted, and the refusal says so. Where none does, a save over it moves it to the namespaced user and returns a
|
|
3928
|
+
connect link; that save deletes at Composio every account the server's record holds as made here under the bare user
|
|
3929
|
+
(the one its own link connected, or one handed to it), unless another saved server stands on it (that one then owns
|
|
3930
|
+
it), and keeps an account it found there, which was never its own.
|
|
3626
3931
|
|
|
3627
3932
|
The names route above is the listing: there is no list or read of a server's address, auth or tools here. The
|
|
3628
3933
|
generic save (`PUT /settings/mcp-servers/{name}`) is a `404` unless the operator names the MCP origins it may save at,
|
|
@@ -3633,8 +3938,9 @@ serves these routes alone:
|
|
|
3633
3938
|
http(s) origins (`https://mcp.example.com`), a plain setting. With it, the token's `PUT /settings/mcp-servers/{name}`
|
|
3634
3939
|
saves `"auth": {"type": "per_run"}` at a listed origin, and each run hands its own credential in `mcp_auth`. A body
|
|
3635
3940
|
that carries a credential, or a save over a server the token did not save or one that seals a credential, is `403`;
|
|
3636
|
-
any other origin or auth type, or a Composio server's name, is `404`. A wildcard
|
|
3637
|
-
origin alone
|
|
3941
|
+
any other origin or auth type, or a Composio server's name, is `404`. A wildcard, an entry that is not an http(s)
|
|
3942
|
+
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
|
|
3943
|
+
loopback origin also needs `AGENTRUN_MCP_ALLOW_LOOPBACK=1`. The list holds past
|
|
3638
3944
|
the save: a per_run server the token saved at an origin not listed is refused, and nothing is sent to it. Unset, the
|
|
3639
3945
|
list is empty, so on an upgrade list each such server's origin first, or re-save it from the owner's signed-in
|
|
3640
3946
|
session with API-only off; the start names the servers off the list in one log line (`api_only_mcp_off_list`), never
|
|
@@ -4015,7 +4321,7 @@ typed answers and their probabilities.
|
|
|
4015
4321
|
- OpenRouter's Decisions models answer a node that says `provider: "openrouter"` and names its model in `model`
|
|
4016
4322
|
(`liquid/d1`, `perplexity/pplx-decider-v1.2`, `cloudflare/clef`, `typesafe/jev-1.14`). They run on the OpenRouter key
|
|
4017
4323
|
Jev's OpenRouter route reads (`OPENROUTER_API_KEY`, else `AGENT_MODEL_API_KEY` with `AGENT_MODEL_BASE_URL` on
|
|
4018
|
-
openrouter.ai),
|
|
4324
|
+
openrouter.ai), laid on the run's claim's own environment as Jev's is. That key is also the model
|
|
4019
4325
|
gateway's, which a run's process holds. Images to them are experimental. A model that cites the web returns
|
|
4020
4326
|
`url_citation` annotations, which become the node's evidence. A cost OpenRouter reports above 0 is booked; 0 (a model its
|
|
4021
4327
|
catalog prices at 0) or none is unknown, never $0.
|
|
@@ -4035,18 +4341,17 @@ typed answers and their probabilities.
|
|
|
4035
4341
|
($0.042 per million input tokens; output tokens are free) as an estimate, and the run's `cost.usd` is its decisions'
|
|
4036
4342
|
sum, with `basis: "estimate"`. A decision whose cost is unknown (no token counts, the OpenRouter route, or a call that
|
|
4037
4343
|
failed after it may have been sent) keeps its receipt's cost `null`, and the run's reads `null`, never `0`.
|
|
4038
|
-
-
|
|
4039
|
-
|
|
4040
|
-
|
|
4041
|
-
|
|
4042
|
-
|
|
4043
|
-
|
|
4044
|
-
|
|
4045
|
-
|
|
4046
|
-
also the model gateway's key, which a run's process holds for its model nodes.
|
|
4344
|
+
- A run gets only the TypeSafe and Parallel keys it needs ([Safety](#safety)): a workflow's decision providers',
|
|
4345
|
+
Parallel's where its `web_fetch` or `web_search` resolves to Parallel, and TypeSafe's where one of its web tools is
|
|
4346
|
+
the run's own ([Search and fetch](#search-and-fetch): `web_fetch` wherever it runs, `web_search` except a harness's
|
|
4347
|
+
own search inside its CLI, as on codex or claude-agent). The runner's claim reads them from the store and lays them
|
|
4348
|
+
on the claim's own environment, the one the run's tools and decision providers read, a fresh object for each claim,
|
|
4349
|
+
so no run sees another's. No program the run starts inherits them: a run process's environment has every key-shaped
|
|
4350
|
+
name removed, and the run's shell environment is fixed. On the OpenRouter route Jev's key is also the model
|
|
4351
|
+
gateway's key, which the claim holds for its model nodes.
|
|
4047
4352
|
- `TYPESAFE_API_KEY` and `PARALLEL_API_KEY` are among the secrets the launcher hands the server over its pipe, so the
|
|
4048
4353
|
server holds them out of its own environment too. Neither is ever among the secrets a run's process gets over its own
|
|
4049
|
-
pipe, which are its tools' environment: the
|
|
4354
|
+
pipe, which are its tools' environment: the runner's claim is their only way into a run.
|
|
4050
4355
|
|
|
4051
4356
|
## Archiving
|
|
4052
4357
|
|
|
@@ -4108,21 +4413,22 @@ stays in every total.
|
|
|
4108
4413
|
overwrites them. `VACUUM FULL` rewrites the table into a new file (under an exclusive lock), and the old file's
|
|
4109
4414
|
blocks go back to the filesystem unwiped. Postgres's own WAL and its archived WAL keep the old values until they are
|
|
4110
4415
|
recycled or expire, and backups keep them for their retention.
|
|
4111
|
-
- Its agent's other runs and what the agent learned from
|
|
4112
|
-
|
|
4113
|
-
|
|
4114
|
-
|
|
4115
|
-
|
|
4116
|
-
|
|
4117
|
-
|
|
4118
|
-
|
|
4119
|
-
|
|
4120
|
-
|
|
4121
|
-
|
|
4122
|
-
|
|
4123
|
-
|
|
4124
|
-
|
|
4125
|
-
|
|
4416
|
+
- Its agent's other runs, and what the agent learned from them, are kept. The run's own learning rows go in the purge's
|
|
4417
|
+
transaction: each line it added to `corrections.md`, each learned workflow version it wrote (a person's approve of one
|
|
4418
|
+
goes with it, being still its text; a person's retire or restore of one stays on the version that comes back), its
|
|
4419
|
+
grades, and the promotion records and audit rows of the workflow versions it alone wrote. Its saves stay as facts with
|
|
4420
|
+
no words (a version, its id and its merge key, so the run never merges again), and a person's save that changed only
|
|
4421
|
+
its text loses its words too; no other save names a file or workflow only it wrote.
|
|
4422
|
+
- The purge is a save of the agent's learning (the host's, which the log never shows). A write computed before it (a
|
|
4423
|
+
person's edit, a run's merge) is computed again on what the purge left, so none writes the purged text back. A run of
|
|
4424
|
+
the agent that read its learning before the purge (its seed) has its learning dropped at its end, nothing written
|
|
4425
|
+
(`learning.reason` `purged_since_seed`): the purge changed what it started from, so a file it gives back unchanged
|
|
4426
|
+
can't be told apart from the purged run's. A promotion, audit row or grade written after the purge for what it took
|
|
4427
|
+
(a check of the run's workflow version still replaying, a grade of the purged run) writes nothing. So the log and a
|
|
4428
|
+
workflow's revisions leave it out, and `GET /runs/{id}/learning/diff` is `404`. A workflow it revised goes back to the
|
|
4429
|
+
version before it, so another run's champion keeps serving; one it wrote new is gone, its file reads `404`. A read at
|
|
4430
|
+
an older version id (a champion by its digest, an SDK receipt's pinned save, a later merge's diff) reads the rows as
|
|
4431
|
+
they are now, so it never serves the run's text. A second `DELETE` does this again and finds nothing left.
|
|
4126
4432
|
- It takes the owner's session (the password sign-in, or the console on a server bound to loopback) or the API token;
|
|
4127
4433
|
any other console session is `403 forbidden`, no credential `401`. An [API-only](#api-only) server purges a run of
|
|
4128
4434
|
any agent with its token, as it deletes or purges the whole agent.
|
|
@@ -4148,7 +4454,8 @@ delete what it sent. `DELETE /v2/agents/{id}` deletes such an agent whole, in th
|
|
|
4148
4454
|
while a `DELETE` runs waits for it, then finds the agent gone (`404`), so none lands after its learning went. Each of
|
|
4149
4455
|
its runs still going, its learning runs included, is cancelled as `POST /runs/{id}/cancel` cancels it, and the
|
|
4150
4456
|
delete waits until every one has ended.
|
|
4151
|
-
2. Its learning is deleted by the learning module: every
|
|
4457
|
+
2. Its learning is deleted by the learning module: every learning row of the agent (its corrections, workflows, saves,
|
|
4458
|
+
promotion records, grades and audit rows).
|
|
4152
4459
|
It refuses while learning work of the agent is in flight: `409 learning_busy`, naming
|
|
4153
4460
|
that work in `details.runs`.
|
|
4154
4461
|
3. The rest: its triggers (and what each registered at its source), its saved sign-ins (and each object at its vendor),
|
|
@@ -4181,6 +4488,14 @@ server's own origin, under a CSP that allows that origin only, but for the provi
|
|
|
4181
4488
|
- **Mission Control**: the store's counts, imported history, analytics and the latest runs, available before the first
|
|
4182
4489
|
server-run agent and without a model-provider key. Its introduction is dismissible. Connect agent and Query use
|
|
4183
4490
|
the coding-agent selector; the page refreshes when you return from your coding agent.
|
|
4491
|
+
- **Agent Factory** (`#/factory`): a kanban of sessions reported to this server, including parallel runs of one agent,
|
|
4492
|
+
reported active child conversations, an audit's shadow run while it runs, and sessions without a repository. Waiting, Working, Needs you and Unknown
|
|
4493
|
+
describe execution; a completed run does not prove that its GitHub change passed checks or merged. Cards open the
|
|
4494
|
+
existing run viewer for activity and supported controls. GitHub links come from launch or trusted trigger provenance.
|
|
4495
|
+
Native connector health and missing SDK freshness are explicit; observed sessions do not acquire controls here.
|
|
4496
|
+
Archived active runs remain visible, imported history is excluded, and ended attention is separate from active counts.
|
|
4497
|
+
The board refreshes every ten seconds after a read settles. It reads bounded pages and offers **Load more** with
|
|
4498
|
+
partial-coverage counts; failures preserve the last-known cards with a stale notice.
|
|
4184
4499
|
- **Agents**: **Build** opens a description composer and local starter templates; **Connected agents** lists definitions,
|
|
4185
4500
|
with archived ones behind **Archived**. Build, edit and run actions share the remembered coding-agent dropdown,
|
|
4186
4501
|
including **API playground**. Choosing a template prepares its full definition without creating or running it.
|
|
@@ -4209,6 +4524,18 @@ the checks' problems, and the seed and merge revisions. Its changed
|
|
|
4209
4524
|
files remain available beside the result. The agent's Learning tab refreshes after returning to the console and
|
|
4210
4525
|
while visible, without replacing an open edit or review.
|
|
4211
4526
|
|
|
4527
|
+
The visibility API uses `GET /v2/runs?scope=active` and `scope=review` (also on an agent's runs route), with `limit`
|
|
4528
|
+
and opaque `next_cursor`. Scope is filtered before pagination; cursors are tied to the scope and agent filters.
|
|
4529
|
+
Do not combine scope with `status` or `archived`. Scoped summaries add `factory` source/control, observation,
|
|
4530
|
+
activity, GitHub provenance and reported-child metadata. A lifecycle version captured inside each run snapshot
|
|
4531
|
+
orders overlapping observations across the two scopes. A run's summary is built once per change of the run and
|
|
4532
|
+
kept on its row, as the runs list keeps its items, so a refresh builds no view of a run that has not changed;
|
|
4533
|
+
only who observes the run and its computer are read at each request (a computer's read opens the run's journal
|
|
4534
|
+
only for a desktop or phone that is up, or a computer held for its owner). GitHub provenance is what the server
|
|
4535
|
+
saved of the delivery that fired the run, never a payload tag found in its input; a run started before servers
|
|
4536
|
+
saved it (0.1.0-beta.39) shows no GitHub link. An online connector is transport health, not a heartbeat for each
|
|
4537
|
+
session. These reads add no scheduling, branch-writing or merge authority.
|
|
4538
|
+
|
|
4212
4539
|
Its files (`index.html`, and Vite's hashed files under `/assets/`) are public and hold no data: everything it shows
|
|
4213
4540
|
comes through `/v2`. With accounts on (the default) the console asks for the owner's password
|
|
4214
4541
|
([your password](#your-password)) and the browser holds the owner's session cookie; a `?token=` link sets no cookie: the
|
|
@@ -4292,19 +4619,20 @@ Never bypass the store lock. This local-store operation has no server endpoint t
|
|
|
4292
4619
|
machine; importing into a different local store does not populate a remote console. Build, edit, run, query and
|
|
4293
4620
|
connection handoffs use the shared coding-agent selector and target this server's matching skill, MCP endpoint and API.
|
|
4294
4621
|
|
|
4295
|
-
`agentrun-serve import --data DIR` reads the Claude Code, Codex and
|
|
4296
|
-
`~/.codex/sessions`, `~/.pi/agent/sessions`) into the data directory,
|
|
4622
|
+
`agentrun-serve import --data DIR` reads the Claude Code, Codex, pi, OpenCode and Copilot CLI sessions in your own home
|
|
4623
|
+
(`~/.claude/projects`, `~/.codex/sessions`, `~/.pi/agent/sessions`, `~/.local/share/opencode`, `~/.copilot/session-state`) into the data directory,
|
|
4624
|
+
once. Each project folder becomes an agent, with its
|
|
4297
4625
|
CLAUDE.md or AGENTS.md and its skill folders, and each session becomes a run you can read but not continue. Nothing leaves
|
|
4298
4626
|
this machine, and the values of key-shaped environment variables are cut out of what it writes. Run it again and it takes
|
|
4299
4627
|
only what it has not taken already. Sessions written in the last 10 minutes wait for the next import.
|
|
4300
4628
|
|
|
4301
|
-
A run's cost is what its source recorded (Claude Code's and
|
|
4629
|
+
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
|
|
4302
4630
|
session, keeps the model catalog's estimate for its tokens beside an unknown cost, and every place that shows a run's
|
|
4303
4631
|
cost reads that estimate, as an estimate: the run (`cost.usd`, basis `estimate`), its usage row, `GET /stats` and its
|
|
4304
4632
|
analytics, and `GET /usage`. A session on a model the catalog does not price stays unknown.
|
|
4305
4633
|
|
|
4306
4634
|
- `--dry-run` lists what it would import and writes nothing.
|
|
4307
|
-
- `--from claude-code,codex,pi` picks the sources.
|
|
4635
|
+
- `--from claude-code,codex,pi,opencode,copilot` picks the sources.
|
|
4308
4636
|
- `--include-deleted` also imports the sessions of project folders that no longer exist, such as a git worktree you
|
|
4309
4637
|
deleted. Each such folder is still its own agent, with no instructions or skills to read.
|
|
4310
4638
|
- `--all` keeps those too, as well as sessions of temporary folders and sessions with no message of yours.
|
|
@@ -4408,7 +4736,7 @@ The agent's Learning tab and Learning Dojo show missing setup for that agent's a
|
|
|
4408
4736
|
`ready` means the route and credentials are configured, not that quota or provider availability has been verified.
|
|
4409
4737
|
These reads make no paid request, and saving a matching key refreshes the setup guidance.
|
|
4410
4738
|
|
|
4411
|
-
Importing Claude Code, Codex or
|
|
4739
|
+
Importing Claude Code, Codex, pi or Copilot CLI session history does not replay learning or connect a live learning stream.
|
|
4412
4740
|
Before/after cost and duration are observations, not an accuracy evaluation.
|
|
4413
4741
|
|
|
4414
4742
|
**Existing CLI capture.** A project enrolled with `cli_learning` keeps running in its original Codex CLI or Claude
|
|
@@ -4420,22 +4748,25 @@ corrections and shows captured runs; new captures begin with the next normal pro
|
|
|
4420
4748
|
Historical learning files remain stored and are not converted into owner corrections or deleted. Older stored
|
|
4421
4749
|
CLI `learning: "notes"` settings read publicly as `true`; that compatibility read does not rewrite the revision.
|
|
4422
4750
|
|
|
4423
|
-
An agent
|
|
4751
|
+
An agent's learning is kept by the server as versioned rows in its store, SQLite or Postgres alike. It reads as a
|
|
4752
|
+
folder, and the routes name its files by path:
|
|
4424
4753
|
|
|
4425
4754
|
- `corrections.md`, its owner's standing corrections, one `- ` line each, at most 2048 bytes;
|
|
4426
4755
|
- one folder per learned workflow, `workflows/<name>/`, with its `workflow.json` and its `README.md` (front matter with
|
|
4427
4756
|
`name` and `description`, and `status: pending` while it waits for its owner's OK).
|
|
4428
4757
|
|
|
4429
4758
|
The server reads and writes it with its own code, in [`src/learn/`](src/learn/SPEC.md), whose `SPEC.md` is the
|
|
4430
|
-
|
|
4431
|
-
|
|
4432
|
-
|
|
4433
|
-
|
|
4759
|
+
contract. Three tables hold it: `learning_saves`, one row per version of the agent's learning (its random 40-hex id,
|
|
4760
|
+
its kind: `init`, `run`, `person` or `purged`, who saved it and why, and a run's merge key, one per run and round);
|
|
4761
|
+
`learning_items`, each item's versions (a note: one line of `corrections.md`; a workflow: its folder's files whole, with
|
|
4762
|
+
its `workflow.json`'s digest), never updated, each naming the run whose text it is; and `learning_records`, its promotion
|
|
4763
|
+
records, grades and audit rows. The server is its only writer, and nothing in it runs. The agent's first run that
|
|
4764
|
+
learns makes its first save, empty; an agent that does not learn never gets one.
|
|
4434
4765
|
|
|
4435
|
-
Each run of an agent that learns starts from
|
|
4766
|
+
Each run of an agent that learns starts from the agent's newest save when the run is made, whatever its harness:
|
|
4436
4767
|
|
|
4437
|
-
-
|
|
4438
|
-
|
|
4768
|
+
- The run's launch record pins that save's id (`learning.seed`). It is written once: a resume or a follow-up reads the
|
|
4769
|
+
same save, however the agent's learning moves on.
|
|
4439
4770
|
- The agent's corrections go into the run's instructions after the agent's, under `# Learned`, so a run reads them
|
|
4440
4771
|
whatever its tools: `corrections.md` whole, after one line that says they are its owner's standing corrections, to
|
|
4441
4772
|
follow each one that applies. Nothing picks, ranks or summarizes them: the file's cap keeps it whole. A run with no
|
|
@@ -4443,7 +4774,7 @@ Each run of an agent that learns starts from `main` as it is when the run is mad
|
|
|
4443
4774
|
pi's system prompt and claude-agent's and codex's instructions: the same channel `CLAUDE.md` and `AGENTS.md` travel
|
|
4444
4775
|
in. No file is written into the run's work. The pin keeps the section the run reads (`section`), so a resume or a
|
|
4445
4776
|
follow-up reads the same.
|
|
4446
|
-
- The workflows the agent learned, each a folder `workflows/<name>/`
|
|
4777
|
+
- The workflows the agent learned, each a folder `workflows/<name>/` at the run's seed with its `workflow.json` and its
|
|
4447
4778
|
`README.md`, are the run's as one tool, `learned_workflow {name, input}`, on every harness (pi, claude-agent, codex),
|
|
4448
4779
|
with no edit of the agent's definition. Only an active, promoted revision is: its `README.md` sets no status, or `active`,
|
|
4449
4780
|
and its promotion record names the checked champion. A compiled draft without that record is withheld; front
|
|
@@ -4451,10 +4782,10 @@ Each run of an agent that learns starts from `main` as it is when the run is mad
|
|
|
4451
4782
|
than one line) reads as retired, so no run is given it. Its description names each workflow with the line its README gives, 8 KiB of lines in all: by name, each
|
|
4452
4783
|
while its line fits, and one that does not, or holds one of the server's secrets, is left out. A README whose front
|
|
4453
4784
|
matter does not read one way (not closed, or a line that is no key at its left edge) is not read. The pin names the
|
|
4454
|
-
ones the run gets (`workflows`), each
|
|
4455
|
-
and the ones left out (`workflows_left_out`). The list is fixed when the run starts: a workflow approved or retired
|
|
4785
|
+
ones the run gets (`workflows`), each read whole from the rows at the run's seed when the run is claimed, outside its
|
|
4786
|
+
work, and the ones left out (`workflows_left_out`). The list is fixed when the run starts: a workflow approved or retired
|
|
4456
4787
|
while it runs is the next run's to get or not. A call checks the workflow again against the agent's own tools as its
|
|
4457
|
-
run resolves them, as the
|
|
4788
|
+
run resolves them, as the save's checks did: one whose call node names a tool the agent was not
|
|
4458
4789
|
granted (or one its run resolves unavailable), whose model node names any tool (a learned model node runs without
|
|
4459
4790
|
tools, so the checks refuse one too), or that holds a code node or a shell or executor call, is refused before any of
|
|
4460
4791
|
its nodes runs. It runs with the workflow DSL: each model node on the run's own model (the one the run was made with
|
|
@@ -4477,15 +4808,13 @@ Each run of an agent that learns starts from `main` as it is when the run is mad
|
|
|
4477
4808
|
runs; set to ask, the `learned_workflow` call asks once, naming every such tool, and the run parks. A run's own draft
|
|
4478
4809
|
can't call one yet: the checks admitting it are coming.
|
|
4479
4810
|
|
|
4480
|
-
|
|
4481
|
-
|
|
4482
|
-
a run: when the folder cannot be made or read, the run starts with nothing learned. A host without
|
|
4483
|
-
git 2.32 or later (what learning's own git calls need) is one such fault, said once on stderr.
|
|
4811
|
+
A workflow out of shape is not read, and the server's stderr names it. A learning fault never blocks a run: when the
|
|
4812
|
+
agent's learning cannot be read, the run starts with nothing learned (`seed_failed`).
|
|
4484
4813
|
|
|
4485
4814
|
### What a run learns
|
|
4486
4815
|
|
|
4487
|
-
When a run that learns answers or fails, its end step (`src/runner/reflect-hook.ts`) keeps two things, one
|
|
4488
|
-
round on the agent's
|
|
4816
|
+
When a run that learns answers or fails, its end step (`src/runner/reflect-hook.ts`) keeps two things, one save a
|
|
4817
|
+
round on the agent's learning, whatever its harness:
|
|
4489
4818
|
|
|
4490
4819
|
- Its owner's words. A grade's words, or a message they sent after the job's first, become one line of
|
|
4491
4820
|
`corrections.md`, with no model turn: `- ` and the words, whitespace folded. A line that holds one of the server's
|
|
@@ -4497,13 +4826,13 @@ round on the agent's `main`, whatever its harness:
|
|
|
4497
4826
|
and the run takes it once. The turn (`compilePrompt`, in `src/learn/compile.ts`) gives the agent's last runs (each
|
|
4498
4827
|
input, its tool calls, its answer and what the person said after it), the workflow language and one worked example,
|
|
4499
4828
|
and asks for the whole job as one workflow draft. The draft is checked in code and dry-run; what the checks refuse
|
|
4500
|
-
goes back to the model, as data, up to 3 times. A draft that passes is
|
|
4829
|
+
goes back to the model, as data, up to 3 times. A draft that passes is saved directly, with no grader: its
|
|
4501
4830
|
promotion check (below) decides whether it serves. A compile whose drafts all failed is recorded as the compile's
|
|
4502
4831
|
attempt (compile once), and its errors are on the run's learning (`draft_errors`), never silent.
|
|
4503
4832
|
[`src/learn/SPEC.md`](src/learn/SPEC.md) has the rules.
|
|
4504
4833
|
- Its answer's quote re-pick, with `learning.repick: true` (off by default): a workflow whose answer quotes the pages
|
|
4505
4834
|
its run fetched re-picks once when a quote is in none of them. Off, the re-pick reads its compact notes and its failed
|
|
4506
|
-
draft. On, the server rewrites the passing draft before it
|
|
4835
|
+
draft. On, the server rewrites the passing draft before it saves it, so the re-pick reads the pages themselves,
|
|
4507
4836
|
sent as untrusted data (the model is told never to follow anything written in them, and the step has no tools), at
|
|
4508
4837
|
most `learning.repick_max_chars` characters of them (150000 by default, 1 to 400000; past it the longest pages are
|
|
4509
4838
|
cut first). Its request is the served run's, under the run's cost cap. The setting is read at each compile: turning
|
|
@@ -4516,11 +4845,13 @@ owner and no compile due spends nothing on learning, and its learning ends `drop
|
|
|
4516
4845
|
work was its learned workflows, each answering, with nothing said after its first message and no compile due, ends
|
|
4517
4846
|
`dropped` (`empty`) too: "Nothing new: the run only ran a learned workflow."
|
|
4518
4847
|
|
|
4519
|
-
The round's
|
|
4848
|
+
The round's save is one transaction: the passing draft's workflow written whole (its `README.md` with
|
|
4520
4849
|
`status: pending` when a step calls a tool with no price, to wait for its owner's OK) and the owner's line appended to
|
|
4521
|
-
`corrections.md
|
|
4522
|
-
|
|
4523
|
-
merged, never twice. A draft file that is not
|
|
4850
|
+
`corrections.md`, with the run's reason. It is a compare and swap on the agent's newest version (computed once more on
|
|
4851
|
+
a version that moved meanwhile), and its merge key (the run and its round) is taken once, in the same transaction, so a
|
|
4852
|
+
run's round is merged once, never twice. A draft file that is not at the newest version as it was at the run's seed is
|
|
4853
|
+
a conflict, never written over; a seed the agent's learning no longer holds (a reset since) makes the whole merge a
|
|
4854
|
+
conflict that says so.
|
|
4524
4855
|
|
|
4525
4856
|
A new workflow revision serves only once its promotion check passes. For a server-run agent, the first run that lays it replays it on the
|
|
4526
4857
|
inputs of the agent's last `compile_after` completed runs, one replay run each at workflow cost, and scores each against
|
|
@@ -4571,7 +4902,7 @@ evidence and the shadow result through the run-scoped SDK credential.
|
|
|
4571
4902
|
The run's `learning` (on `GET /runs/{run_id}`, and `{state, reason, detail}` in run lists, the detail cut to 140
|
|
4572
4903
|
characters and no time) says how it went: `seeded`, then `reflecting` during its end step, and `merged`, or `dropped`
|
|
4573
4904
|
with a reason from a closed list (`seed_failed`, `no_budget`, `unknown_cost`, `cancelled`, `crashed`, `reflect_failed`,
|
|
4574
|
-
`empty`, `checker`, `use`; a run record with any other reason is not counted). It is `null` for a run that does not
|
|
4905
|
+
`empty`, `checker`, `use`, `reset`, `purged_since_seed`; a run record with any other reason is not counted). It is `null` for a run that does not
|
|
4575
4906
|
learn (its agent's `learning` is not true, the server's switch was off when it started, or it is a workflow's or an
|
|
4576
4907
|
imported run). Its `detail` says the same in a person's words, never the machine's: "Started from 2 corrections.",
|
|
4577
4908
|
"Keeping what this run learned…", "Learned the workflow sort-invoice. Kept your correction.", "Nothing new to keep from
|
|
@@ -4601,64 +4932,60 @@ proposed and reused, staleness after a rule changes, and wrong keeps after a pla
|
|
|
4601
4932
|
A person reads and changes an agent's learning through this server's own routes (`learning/1` in `/v2/openapi.json`),
|
|
4602
4933
|
with the token, an archived agent's too:
|
|
4603
4934
|
|
|
4604
|
-
- `GET /agents/{agent_id}/learning`:
|
|
4935
|
+
- `GET /agents/{agent_id}/learning`: its newest save's id as `main`, `corrections.md` as `corrections`, the learned workflows (each its
|
|
4605
4936
|
name, files, description, status and `etag`; `status` is one word: `pending` or `retired` as its `README.md` says,
|
|
4606
4937
|
else where it stands as `.../learning/promotions` says it: `serving`, `checking`, `held` or `stopped`, a champion
|
|
4607
|
-
the cost rule stopped included), the first 20 changes
|
|
4608
|
-
`
|
|
4938
|
+
the cost rule stopped included), the first 20 changes of its log (newest first, each `by: {run}` for a run's merge or
|
|
4939
|
+
`{user: true}` for a person's change, with its save id as `commit`, time, reason and files), how the agent's runs that tried to learn
|
|
4609
4940
|
fared (`merged`, `dropped` by reason, `in_progress`), counted as `GET /stats` counts them, and `impact`, what
|
|
4610
4941
|
learning changed: the agent's completed runs that started from at least one learned item (a correction, or a learned
|
|
4611
4942
|
workflow) against those that started before its first, each side's `runs`; `median_duration_s`, the time to the
|
|
4612
4943
|
answer (the run's start to its job's end, before its end-of-run step). What a run costs, learning included, and what
|
|
4613
4944
|
learning itself cost are `.../learning/cost`'s (`summary.before`/`after`, the bill's `learning_usd`).
|
|
4614
|
-
Null unless both sides count 2 runs. An agent with no
|
|
4615
|
-
`GET .../learning/log?cursor=&limit=` pages on, up to 200 at a time; a cursor
|
|
4616
|
-
|
|
4617
|
-
- `GET .../learning/corrections`: `corrections.md`
|
|
4945
|
+
Null unless both sides count 2 runs. An agent with no save yet answers `main: null`, empty lists and `impact: null`.
|
|
4946
|
+
`GET .../learning/log?cursor=&limit=` pages on, up to 200 at a time; a cursor names the version its page stopped at, so the
|
|
4947
|
+
next page starts below it however the log grew since.
|
|
4948
|
+
- `GET .../learning/corrections`: `corrections.md` at the newest save as `{text, etag, cap_bytes}` (empty text when there is
|
|
4618
4949
|
none). `PUT .../learning/corrections` with `{text}` replaces it whole under `If-Match: <etag>`: a stale ETag is 412,
|
|
4619
4950
|
none (or `If-Match: *`) 428 `precondition_required`. A text that holds one of the server's secrets, a secret's shape or
|
|
4620
4951
|
a hidden character, or passes 2048 bytes, is 422 with the problems, and nothing is written. A text read cut of a
|
|
4621
|
-
secret and sent back keeps the cut: a person's write never puts a secret back. One
|
|
4622
|
-
|
|
4623
|
-
- `GET .../learning/files/{file}`: `corrections.md` or a workflow's file
|
|
4624
|
-
id. `POST .../learning/files/{file}/retire` under `If-Match`, on a workflow's `README.md`, sets `status: retired`: no
|
|
4952
|
+
secret and sent back keeps the cut: a person's write never puts a secret back. One save of the agent's learning,
|
|
4953
|
+
`edited by a person: corrections.md`, which the log shows as `by: {user: true}`.
|
|
4954
|
+
- `GET .../learning/files/{file}`: `corrections.md` or a workflow's file at the newest save, with its `ETag`, its text's
|
|
4955
|
+
blob id (as git would name its bytes). `POST .../learning/files/{file}/retire` under `If-Match`, on a workflow's `README.md`, sets `status: retired`: no
|
|
4625
4956
|
later run is given it. `POST .../learning/files/{file}/approve` makes a pending workflow active (see
|
|
4626
4957
|
[Approving a workflow that waits](#approving-a-workflow-that-waits), below). `POST .../learning/files/{file}/restore`
|
|
4627
4958
|
under `If-Match` gives a retired workflow to every later run again, after checking its files again as a run's draft
|
|
4628
4959
|
is checked (a refusal is 400 with `problems`, and it stays retired); it takes the owner's password session alone, as
|
|
4629
4960
|
an approval does. The learning view gives each workflow `last_change` (`{kind, by, at}`: `approved`, `edited`,
|
|
4630
4961
|
`created`, `retired` or `restored` by a `person`, or `learned` by a `run`) and each retired one `retired` (`{at, by}`).
|
|
4631
|
-
- `GET .../learning/workflows/{name}/revisions` lists a learned workflow's revisions
|
|
4962
|
+
- `GET .../learning/workflows/{name}/revisions` lists a learned workflow's revisions, newest first;
|
|
4632
4963
|
`GET .../learning/promotions` its promotion records; `GET .../learning/loop` each compile turn; and
|
|
4633
4964
|
`GET .../learning/cost` the agent's cost per run, run after run.
|
|
4634
|
-
- `DELETE /agents/{agent_id}/learning` resets the agent's learning:
|
|
4635
|
-
workflows,
|
|
4636
|
-
|
|
4965
|
+
- `DELETE /agents/{agent_id}/learning` resets the agent's learning: every learning row of the agent (`corrections.md`,
|
|
4966
|
+
its workflows, every save and version of them, its promotion records, grades and audit rows), in one transaction. A
|
|
4967
|
+
run started before it from a save it removed merges nothing: its seed is no longer held, a conflict. The agent and its runs stay,
|
|
4637
4968
|
with their files, costs and each run's own learning, so the run list, `GET /stats` and `GET /usage` read the same (a
|
|
4638
|
-
served run keeps its share of its revision's compile and check); a run's learning diff goes with the
|
|
4969
|
+
served run keeps its share of its revision's compile and check); a run's learning diff goes with the rows (404);
|
|
4639
4970
|
the next run takes the agent path, given nothing learned. It cancels the runs that exist only for learning (replays,
|
|
4640
4971
|
audit shadows) and waits for them; while a run of the agent's own is still going it is `409 learning_busy` (each named
|
|
4641
4972
|
in `details.runs`), and nothing is deleted. `204`, a second call and an agent that never learned included. The
|
|
4642
4973
|
API-only profile serves it too.
|
|
4643
4974
|
- `GET /runs/{run_id}/learning`: the run's learning whole (its seed, its merge, the corrections it added, the workflow it
|
|
4644
4975
|
wrote, its compile turn's attempts and the checks' problems), `null` for a run that does not learn.
|
|
4645
|
-
`GET /runs/{run_id}/learning/diff`: a merged run's merge
|
|
4646
|
-
from the first
|
|
4647
|
-
|
|
4648
|
-
Every read is the
|
|
4649
|
-
|
|
4650
|
-
|
|
4651
|
-
|
|
4652
|
-
|
|
4653
|
-
|
|
4654
|
-
changes). A cursor reads at the main it names while this server still holds that snapshot, else as the first page of
|
|
4655
|
-
`main` now. Every write to `main` (a run's merge, a person's corrections, retire, approve or restore) is one exec of the learning
|
|
4656
|
-
script, a compare and swap on `main`. A symbolic link at the agent's home, its learning folder or the folder's `.git` is never
|
|
4657
|
-
followed: a read or a write there answers `500`, and nothing is written.
|
|
4976
|
+
`GET /runs/{run_id}/learning/diff`: a merged run's merge save against the one before it, each file's patch in unified
|
|
4977
|
+
diff form from the first `@@` (as git writes one), `404` once the run is purged or the agent's learning reset, or `withheld` (`too_large`, `secret`).
|
|
4978
|
+
|
|
4979
|
+
Every read is the store's learning rows: the newest save, or a save by its id, read as the rows are now (so a purged
|
|
4980
|
+
run's text is never served at any version). Every text it answers is cut of the server's secrets as they are then; a
|
|
4981
|
+
file name holding one (a workflow named after a value made secret since, say) reads `[redacted]` whole, in the
|
|
4982
|
+
workflows, the log's `files` and a diff's `path`, while its route still answers the real name to a caller who knows it.
|
|
4983
|
+
Every write (a run's merge, a person's corrections, retire, approve or restore) is one save, a compare and swap on the
|
|
4984
|
+
agent's newest version, computed again when another write landed first; one that keeps losing is `503`, to retry.
|
|
4658
4985
|
|
|
4659
4986
|
### Approving a workflow that waits
|
|
4660
4987
|
|
|
4661
|
-
A learned workflow whose step calls a tool with no price is
|
|
4988
|
+
A learned workflow whose step calls a tool with no price is saved with `status: pending` in its `README.md` and
|
|
4662
4989
|
given to no run until its owner approves it.
|
|
4663
4990
|
|
|
4664
4991
|
Who can approve: the owner, signed in with their password. No token approves, the server's own included, so a run that reaches this server only through its API (its MCP tools, a sandbox run) can't approve its own workflows. Runs that use bash on the host run as you: they can read this server's files, its session key among them, so no route keeps them from approving. For untrusted tasks, use the sandbox.
|
|
@@ -4669,8 +4996,7 @@ carry) and a token sent beside the session. So is every request on a server with
|
|
|
4669
4996
|
(`AGENTRUN_ACCOUNTS=0`), which has no password session: its console session comes from the launch code, never the token. With no credential it is 401, as every route.
|
|
4670
4997
|
`capabilities.learning.approve` is true only for the owner's session; every other caller reads `approve: false` with
|
|
4671
4998
|
`approve_needs: "password"`. A workflow that is not pending is 400; a stale ETag is 412, none 428. The approval is one
|
|
4672
|
-
|
|
4673
|
-
the log shows `by: {user: true, via: "console"}` at the commit's time.
|
|
4999
|
+
save, `approved by a person: <file>`; the log shows `by: {user: true, via: "console"}` at the save's time.
|
|
4674
5000
|
|
|
4675
5001
|
## A run's cost: its tokens and its basis
|
|
4676
5002
|
|
|
@@ -5007,16 +5333,16 @@ step is sent only when the run's spend plus that step's least (its whole input b
|
|
|
5007
5333
|
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
|
|
5008
5334
|
($3 / $15, cache write $3.75, cache read $0.30 a million) through the dispatch's own system prompt and tools (read,
|
|
5009
5335
|
write, edit, the desktop's and `codemode`, with the desktop skill named in the system prompt), five requests (four
|
|
5010
|
-
screenshots, then the answer), spending about $0.04 in all. Through a gateway the first request's byte bound is
|
|
5011
|
-
tokens, so it needs $0.
|
|
5336
|
+
screenshots, then the answer), spending about $0.04 in all. Through a gateway the first request's byte bound is 10,445
|
|
5337
|
+
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
|
|
5012
5338
|
needs $0.082;
|
|
5013
|
-
straight to Anthropic the count is one recorded from a real desktop run on Sonnet (3,146 tokens at first),
|
|
5014
|
-
$0.
|
|
5339
|
+
straight to Anthropic the count is one recorded from a real desktop run on Sonnet (3,146 tokens at first), and the note,
|
|
5340
|
+
placed after the count, adds its byte bound (371 tokens), so it needs $0.031 and $0.083:
|
|
5015
5341
|
|
|
5016
5342
|
| Route | First request needs | Five-step run needs | Each further step |
|
|
5017
5343
|
| --- | --- | --- | --- |
|
|
5018
5344
|
| Through a gateway (OpenRouter): the byte bound, then the last bill | $0.06 | $0.09 | about $0.012 |
|
|
5019
|
-
| Straight to Anthropic: Anthropic's count | $0.
|
|
5345
|
+
| Straight to Anthropic: Anthropic's count | $0.04 | $0.09 | about $0.012 |
|
|
5020
5346
|
|
|
5021
5347
|
A claude-agent run's first request is of the same size (the pinned
|
|
5022
5348
|
CLI's measured 6,926 bytes with five tools: $0.04 for its first request through a gateway). A cap below these pauses at
|
|
@@ -5332,8 +5658,8 @@ carries no cost at all, as from a provider that does not price the model. The te
|
|
|
5332
5658
|
keys or bearer token (held, and handed to a run on Bedrock), an `AWS_PROFILE`, `GOOGLE_CLOUD_API_KEY` or the default
|
|
5333
5659
|
application credentials file work. A credential file a provider reads by path (`AWS_PROFILE`'s `~/.aws` files, the
|
|
5334
5660
|
default application credentials) is the host's: a run's process reads it for its model, and its file tools cannot.
|
|
5335
|
-
- `TYPESAFE_API_KEY` is a decision key, given to a workflow run's decision providers
|
|
5336
|
-
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
|
|
5661
|
+
- `TYPESAFE_API_KEY` is a decision key, given to a workflow run's decision providers and to a run's web tools Jev
|
|
5662
|
+
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
|
|
5337
5663
|
the run fails.
|
|
5338
5664
|
- A run's file tools (`read`, `write`, `edit`) reach its own `work/`, and two places of its own beside it: `read` also
|
|
5339
5665
|
reaches the run's `tmp/` (next to `work/`, where a command's spilled output would go), and a write may also land in a
|