@parcha/agentrun 0.4.6 → 0.4.7
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/README.md +11 -3
- package/lib/commands.generated.mjs +829 -46
- package/lib/follow.mjs +2 -1
- package/lib/start.mjs +2 -2
- package/package.json +2 -2
- package/skills/agentrun-cli/SKILL.md +23 -6
- package/skills/agentrun-cli/references/commands.md +230 -3
package/lib/follow.mjs
CHANGED
|
@@ -118,8 +118,9 @@ function settle(client, run, id) {
|
|
|
118
118
|
const why = run.status === "paused" ? `is paused: resume it with \`agentrun runs resume ${id}\``
|
|
119
119
|
: run.pending?.kind === "question" ? `asked a question: answer it with \`agentrun runs message ${id} --content TEXT\``
|
|
120
120
|
: run.pending?.kind === "budget" ? `is paused at its spend cap: raise it with \`agentrun runs raise-cap ${id} --max-cost-usd ${Number.isFinite(run.pending.suggested_cap_usd) ? run.pending.suggested_cap_usd : "N"}\``
|
|
121
|
+
: run.pending?.kind === "stopped" ? `was stopped by a person: send it a message with \`agentrun runs message ${id} --content TEXT\``
|
|
121
122
|
: run.pending?.kind ? `waits on a person (${run.pending.kind})`
|
|
122
|
-
: `
|
|
123
|
+
: `ended its turn: send it a message with \`agentrun runs message ${id} --content TEXT\``;
|
|
123
124
|
client.io.stderr.write(`Run ${id} ${why}, ${go}.\n`);
|
|
124
125
|
return EXIT.person;
|
|
125
126
|
}
|
package/lib/start.mjs
CHANGED
|
@@ -114,7 +114,7 @@ export function npmExecOf(env, from = process.ppid) {
|
|
|
114
114
|
}
|
|
115
115
|
|
|
116
116
|
export const USAGE = `Usage: npx @parcha/agentrun [--port N] [--data DIR] [--no-open] start the server
|
|
117
|
-
npx @parcha/agentrun import|reset-password|runner [--data DIR] a server command (
|
|
117
|
+
npx @parcha/agentrun import|reset-password|runner|native [--data DIR] a server command (native: discover/connect an existing project)
|
|
118
118
|
npx @parcha/agentrun <command> [args] the server's API: agents, runs, triggers, ..., api (npx @parcha/agentrun help)`;
|
|
119
119
|
|
|
120
120
|
/** The server's launcher, installed with this package (its dependency), or undefined. */
|
|
@@ -132,7 +132,7 @@ export const serverArgs = (argv) => (argv.includes("--no-open") ? argv.filter((a
|
|
|
132
132
|
|
|
133
133
|
/** The server's own commands (its CLI's first word), which this command runs on its store: every other first word is
|
|
134
134
|
* the CLI's, which names a command it has or says it has none. */
|
|
135
|
-
export const SERVER_COMMANDS = ["eval-template", "import", "reset-password", "runner", "validate-template"];
|
|
135
|
+
export const SERVER_COMMANDS = ["eval-template", "import", "native", "remote-bridge", "reset-password", "runner", "validate-template"];
|
|
136
136
|
|
|
137
137
|
/** How many of the server's refusals and ignored deliveries a start says, each route and reason once, before one line
|
|
138
138
|
* that says the rest are not: under this command the server's log goes nowhere else (its stdout is read here and dropped). */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@parcha/agentrun",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.7",
|
|
4
4
|
"description": "AgentRun, the open-source platform that supercharges your agents (self-improvement, durable execution and a control plane on top of your favorite agent harness), on this machine with one command: npx @parcha/agentrun",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"NOTICE"
|
|
17
17
|
],
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@parcha/agentrun-serve": "0.1.0-beta.
|
|
19
|
+
"@parcha/agentrun-serve": "0.1.0-beta.39"
|
|
20
20
|
},
|
|
21
21
|
"scripts": {
|
|
22
22
|
"test": "node --test 'test/*.test.mjs'"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: agentrun-cli
|
|
3
|
-
description:
|
|
3
|
+
description: Onboard and manage AgentRun agents from a shell. Connect existing Claude Code or Codex setups locally or remotely, import selected history, or create a new agent. Start runs, inspect results and use checked learning. Use when asked to connect, run or manage AgentRun agents from a terminal or script, or for anything the server's MCP tools do not cover (files, triggers, webhooks, revisions, learning).
|
|
4
4
|
---
|
|
5
5
|
<!-- Generated by scripts/generate-clients.mjs from the server's OpenAPI document and its skill template. Do not edit: run node scripts/generate-clients.mjs. -->
|
|
6
6
|
|
|
@@ -10,6 +10,10 @@ description: Drive an AgentRun server from a shell with the agentrun CLI. Make a
|
|
|
10
10
|
|
|
11
11
|
A list command (`agentrun agents list`, `agentrun runs list` and the others with `--cursor`) prints one page, with the `next_cursor` to pass as `--cursor` for the next; `--all` reads every page and prints them as one list, its `next_cursor` null.
|
|
12
12
|
|
|
13
|
+
## Choose the onboarding path
|
|
14
|
+
|
|
15
|
+
For general setup, first establish whether the user wants to start a new agent or bring an existing Claude Code/Codex setup. Ask only when intent is missing: Build an agent already chose new; Connect agent already chose existing. Reuse the named instance and read its matching `/skills/agentrun-serve/SKILL.md`; do not start a replacement. A new agent starts from a suitable template or custom definition after clarifying its job, inputs and expected result. Inspect configured models before asking for a key. Existing-agent connection and selected history import need no destination model key; live jobs use the source runtime's existing sign-in. Finish with the first requested run's result and console link, or the imported history and counts; offer self-improvement separately.
|
|
16
|
+
|
|
13
17
|
## The server and the token
|
|
14
18
|
|
|
15
19
|
The first of these that is set wins:
|
|
@@ -26,6 +30,16 @@ agentrun login --base-url "$AGENTRUN_BASE_URL" < token.txt
|
|
|
26
30
|
|
|
27
31
|
Never print, echo or log the token, and never pass it as an argument; the CLI never prints it. `agentrun logout` removes the config file. Keys and other secrets are set in the console, signed in: the token can't write one, so no command does (`agentrun tool-keys list` names the keys and fields, and whether each is set, never a value).
|
|
28
32
|
|
|
33
|
+
## Connect agent
|
|
34
|
+
|
|
35
|
+
First clarify whether the user wants a live connection, historical import, or both; then establish the source machine, destination instance and selected project/agent/profile. Do not infer history import or learning consent from a connection request. Read the target server's matching `/skills/agentrun-serve/SKILL.md` for the complete flow.
|
|
36
|
+
|
|
37
|
+
On the machine with the existing Claude Code or Codex setup, use `npx @parcha/agentrun native discover --project /absolute/project` to inspect supported project defaults, named Claude agents and Codex profiles without a model call. Then run `npx @parcha/agentrun native connect --project /absolute/project --runtime claude-code` (or `codex`), adding `--agent NAME` or `--profile NAME` for a discovered selector. The local server uses `--data DIR`; `--url http://127.0.0.1:PORT` selects its loopback address. For another machine, use the existing Python connector's `remote` command from the same reviewed build, with the matching `agentrun-serve remote-bridge` runtime. The released observation-only connector is not a remote execution worker. Pair using the console's one-use code entered into the secure CLI prompt; never send a broad server token or put the code in a command argument. Source configuration and sign-in stay on that machine. For completed project history, preview with the matching Python connector’s `remote history-preview --project /absolute/project --runtime claude-code` (or `codex`). Select History only or Both when creating the owner’s code; the source must also explicitly pass `--history-only` or `--history` to `remote connect`. History-only starts no worker or learning and needs no native sign-in. History flags reject named-agent/profile selectors because native logs cannot attribute sessions to them reliably. Re-import the approved target with `remote import-history --state-dir /private/connector`; duplicates are skipped. Historical records never become live jobs or automatic learning. Local-store imports still use the separate maintenance-window flow in the server skill.
|
|
38
|
+
|
|
39
|
+
For an authorized live connection, open the connected agent, verify its native sign-in, and turn Self-improving On only when requested to use the existing checked/graded learning pipeline. Native projects keep their original instructions, tools, hooks, permissions and login. AgentRun adds notes and skills without rewriting those files. Native dollar caps, interactive approvals, learned workflows and attachment to an already-running desktop conversation are unavailable; never bypass native permissions to make a run work. Off supplies and creates no AgentRun learning on subsequent runs. Reflection and grading make additional model calls using native sign-in unless the server has an explicit grading model route.
|
|
40
|
+
|
|
41
|
+
For the remote development build, install the Python connector from `./connector` in the same reviewed checkout after building its Node runtime (Python 3.12+ and Node 24.22.3+). A checkout build does not put `agentrun-serve` on PATH: pass `--bridge /absolute/path/to/checkout/packages/serve/dist/native/remote-worker-bridge.js` to discovery and connection. The Python connector and Node management CLI share the name `agentrun`; verify the executable, or use `python -m agentrun_cli` inside the installed connector environment. Keep its source worker online for live jobs. Inspect accepted notes and skills in Learning Dojo, then verify a fresh run uses them; imported history never supplies that learning automatically.
|
|
42
|
+
|
|
29
43
|
## Recipes
|
|
30
44
|
|
|
31
45
|
Run them in order, in one working directory: each writes `out.json`, the run as its command printed it, and the next reads it. The last line of each block says how its last command exits.
|
|
@@ -83,10 +97,10 @@ agentrun runs get "$run" > out.json && node -p 'JSON.stringify(require("./out.js
|
|
|
83
97
|
|
|
84
98
|
A run paused at its spend cap, or waiting for a tool call to be approved, exits 8 with `pending.kind` `budget` or `approval` in out.json.
|
|
85
99
|
|
|
86
|
-
A cap too small for the task stops the run before a request it cannot pay for.
|
|
100
|
+
A cap too small for the task stops the run before a request it cannot pay for. No request is sent that the cap cannot cover, a cache miss included:
|
|
87
101
|
|
|
88
102
|
```sh
|
|
89
|
-
agentrun runs start notes --max-cost-usd 0.05 --
|
|
103
|
+
agentrun runs start notes --max-cost-usd 0.05 --body '{"input": {"content": "Write moon.md with everything known about the Moon."}}' --wait > out.json
|
|
90
104
|
# exit 8 once it pauses at its cap: out.json has pending.kind budget, with cap_usd, spent_usd and suggested_cap_usd; 0 if the cap was enough
|
|
91
105
|
```
|
|
92
106
|
|
|
@@ -117,16 +131,19 @@ Two clients call the same API from code, with the same server and token. `@parch
|
|
|
117
131
|
|
|
118
132
|
## Commands
|
|
119
133
|
|
|
120
|
-
- `agentrun agents`: archive, create, delete-agent-archil, forget-sign-in, get, get-agent-archil, get-learning-loop, list, list-learning-promotions, runs, unarchive, update
|
|
134
|
+
- `agentrun agents`: archive, connect-native, create, delete-agent-archil, disconnect-native, discover-native, forget-sign-in, get, get-agent-archil, get-learning-loop, get-native, list, list-learning-promotions, runs, unarchive, update, verify-native
|
|
135
|
+
- `agentrun connectors`: complete-remote-command, enroll-remote-connector, import-remote-history, import-remote-target, list-remote-connectors, poll-remote-connector, register-remote-connector, remote-command-events, revoke-remote-connector
|
|
121
136
|
- `agentrun files`: create, delete, get, list, upload
|
|
122
137
|
- `agentrun home`: delete, list, read, write
|
|
123
|
-
- `agentrun learning`: batch, batch-cancel, batch-start, batches, cost, evals, get, log, notes, read, record-eval, retire, workflow-revisions, write
|
|
124
|
-
- `agentrun local`: create-pairing, delete-computer, delete-workspace-archil, disconnect-git-hub, get-git-hub-connection, get-workspace-archil, list-computer-choices, list-computers, test-computer, test-workspace-archil
|
|
138
|
+
- `agentrun learning`: batch, batch-cancel, batch-start, batches, cost, evals, get, log, notes, read, record-eval, replay, retire, workflow-revisions, write
|
|
139
|
+
- `agentrun local`: create-pairing, delete-composio-subscription, delete-computer, delete-workspace-archil, disconnect-git-hub, get-git-hub-connection, get-workspace-archil, list-composio-events, list-composio-triggers, list-computer-choices, list-computers, receive-hook-composio, rotate-composio-secret, test-computer, test-workspace-archil
|
|
125
140
|
- `agentrun login`: Check a server's token, read from stdin, and keep it with the server's address in the config file
|
|
126
141
|
- `agentrun logout`: Remove the config file login wrote, its address and token
|
|
127
142
|
- `agentrun mcp-servers`: delete, get, list, oauth-client, private-hosts, refresh
|
|
143
|
+
- `agentrun Observations`: get-observations
|
|
128
144
|
- `agentrun revisions`: list, set-current
|
|
129
145
|
- `agentrun runs`: archive, cancel, computer-call, computer-release, create-inline-run, files, get, grade-run, graph, hand-back-run-computer, learning, learning-diff, list, message, pause, raise-cap, read-file, resume, start, start-held, stop, take-over-run-computer, timeline, unarchive, wait
|
|
146
|
+
- `agentrun sdk-runs`: complete, events, get, start
|
|
130
147
|
- `agentrun server`: capabilities, health, mcp, openapi
|
|
131
148
|
- `agentrun skill`: install
|
|
132
149
|
- `agentrun stats`: Counts and cost over every agent and run
|
|
@@ -12,6 +12,17 @@ Archive the agent: hidden from the lists, kept with its history.
|
|
|
12
12
|
|
|
13
13
|
Route: `POST /agents/{agent_id}/archive`.
|
|
14
14
|
|
|
15
|
+
### `agentrun agents connect-native`
|
|
16
|
+
|
|
17
|
+
Connect a native project using ordinary agent and revision storage.
|
|
18
|
+
|
|
19
|
+
Route: `POST /native/connect`.
|
|
20
|
+
|
|
21
|
+
- `--project STRING` (string, required)
|
|
22
|
+
- `--runtime claude-code|codex` (string, one of these, required)
|
|
23
|
+
- `--body JSON|@FILE|-` (application/json, required): The whole body: inline, from a file or from stdin. The flags above win over a JSON body's fields.
|
|
24
|
+
- `--body-type TYPE` (string): The body's type, one of application/json; any other than JSON is sent as given.
|
|
25
|
+
|
|
15
26
|
### `agentrun agents create`
|
|
16
27
|
|
|
17
28
|
Create an agent home.
|
|
@@ -29,6 +40,23 @@ Remove an agent's own Archil disk, and everything on it.
|
|
|
29
40
|
|
|
30
41
|
Route: `DELETE /agents/{agent_id}/archil`.
|
|
31
42
|
|
|
43
|
+
### `agentrun agents disconnect-native AGENT_ID`
|
|
44
|
+
|
|
45
|
+
Disconnect future native jobs while retaining source configuration and history.
|
|
46
|
+
|
|
47
|
+
Route: `POST /agents/{agent_id}/native/disconnect`.
|
|
48
|
+
|
|
49
|
+
### `agentrun agents discover-native`
|
|
50
|
+
|
|
51
|
+
Discover existing native projects on this source machine without running a model.
|
|
52
|
+
|
|
53
|
+
Route: `POST /native/discover`.
|
|
54
|
+
|
|
55
|
+
- `--project STRING` (string, required)
|
|
56
|
+
- `--runtime claude-code|codex` (string, one of these)
|
|
57
|
+
- `--body JSON|@FILE|-` (application/json, required): The whole body: inline, from a file or from stdin. The flags above win over a JSON body's fields.
|
|
58
|
+
- `--body-type TYPE` (string): The body's type, one of application/json; any other than JSON is sent as given.
|
|
59
|
+
|
|
32
60
|
### `agentrun agents forget-sign-in AGENT_ID KEY`
|
|
33
61
|
|
|
34
62
|
Forget one of the agent's saved sign-ins.
|
|
@@ -53,6 +81,12 @@ The self-learning loop's own record: each compile turn, and each guarded step of
|
|
|
53
81
|
|
|
54
82
|
Route: `GET /agents/{agent_id}/learning/loop`.
|
|
55
83
|
|
|
84
|
+
### `agentrun agents get-native AGENT_ID`
|
|
85
|
+
|
|
86
|
+
Read a native connection.
|
|
87
|
+
|
|
88
|
+
Route: `GET /agents/{agent_id}/native`.
|
|
89
|
+
|
|
56
90
|
### `agentrun agents list`
|
|
57
91
|
|
|
58
92
|
List agents.
|
|
@@ -97,6 +131,101 @@ Route: `PUT /agents/{agent_id}/definition`.
|
|
|
97
131
|
- `--body JSON|@FILE|-` (application/json, required): The whole body: inline, from a file or from stdin. The flags above win over a JSON body's fields.
|
|
98
132
|
- `--body-type TYPE` (string): The body's type, one of application/json; any other than JSON is sent as given.
|
|
99
133
|
|
|
134
|
+
### `agentrun agents verify-native AGENT_ID`
|
|
135
|
+
|
|
136
|
+
Check native CLI and sign-in without a paid model call.
|
|
137
|
+
|
|
138
|
+
Route: `POST /agents/{agent_id}/native/verify`.
|
|
139
|
+
|
|
140
|
+
## connectors
|
|
141
|
+
|
|
142
|
+
### `agentrun connectors complete-remote-command CONNECTOR_ID COMMAND_ID`
|
|
143
|
+
|
|
144
|
+
Complete a source command once under its valid lease.
|
|
145
|
+
|
|
146
|
+
Route: `POST /connectors/{connector_id}/commands/{command_id}/complete`.
|
|
147
|
+
|
|
148
|
+
- `--lease-token STRING` (string, required)
|
|
149
|
+
- `--error STRING` (string)
|
|
150
|
+
- `--body JSON|@FILE|-` (application/json, required): The whole body: inline, from a file or from stdin. The flags above win over a JSON body's fields.
|
|
151
|
+
- `--body-type TYPE` (string): The body's type, one of application/json; any other than JSON is sent as given.
|
|
152
|
+
|
|
153
|
+
### `agentrun connectors enroll-remote-connector`
|
|
154
|
+
|
|
155
|
+
Create a ten-minute one-use connection code.
|
|
156
|
+
|
|
157
|
+
Route: `POST /connectors/enrollment`.
|
|
158
|
+
|
|
159
|
+
- `--label STRING` (string)
|
|
160
|
+
- `--body JSON|@FILE|-` (application/json, required): The whole body: inline, from a file or from stdin. The flags above win over a JSON body's fields.
|
|
161
|
+
- `--body-type TYPE` (string): The body's type, one of application/json; any other than JSON is sent as given.
|
|
162
|
+
|
|
163
|
+
### `agentrun connectors import-remote-history CONNECTOR_ID TARGET_ID`
|
|
164
|
+
|
|
165
|
+
Import explicitly selected, redacted past sessions without running or learning from them.
|
|
166
|
+
|
|
167
|
+
Route: `POST /connectors/{connector_id}/targets/{target_id}/history`.
|
|
168
|
+
|
|
169
|
+
- `--body JSON|@FILE|-` (application/json, required): The whole body: inline, from a file or from stdin. The flags above win over a JSON body's fields.
|
|
170
|
+
- `--body-type TYPE` (string): The body's type, one of application/json; any other than JSON is sent as given.
|
|
171
|
+
|
|
172
|
+
### `agentrun connectors import-remote-target CONNECTOR_ID`
|
|
173
|
+
|
|
174
|
+
Import an explicitly selected source-native agent reference.
|
|
175
|
+
|
|
176
|
+
Route: `POST /connectors/{connector_id}/import`.
|
|
177
|
+
|
|
178
|
+
- `--target-id STRING` (string, required)
|
|
179
|
+
- `--name STRING` (string)
|
|
180
|
+
- `--history-only` (boolean)
|
|
181
|
+
- `--body JSON|@FILE|-` (application/json, required): The whole body: inline, from a file or from stdin. The flags above win over a JSON body's fields.
|
|
182
|
+
- `--body-type TYPE` (string): The body's type, one of application/json; any other than JSON is sent as given.
|
|
183
|
+
|
|
184
|
+
### `agentrun connectors list-remote-connectors`
|
|
185
|
+
|
|
186
|
+
List remote source machines and imported agent targets.
|
|
187
|
+
|
|
188
|
+
Route: `GET /connectors`.
|
|
189
|
+
|
|
190
|
+
### `agentrun connectors poll-remote-connector CONNECTOR_ID`
|
|
191
|
+
|
|
192
|
+
Renew active source leases and claim one command without replay.
|
|
193
|
+
|
|
194
|
+
Route: `POST /connectors/{connector_id}/poll`.
|
|
195
|
+
|
|
196
|
+
- `--worker-id STRING` (string, required)
|
|
197
|
+
- `--body JSON|@FILE|-` (application/json, required): The whole body: inline, from a file or from stdin. The flags above win over a JSON body's fields.
|
|
198
|
+
- `--body-type TYPE` (string): The body's type, one of application/json; any other than JSON is sent as given.
|
|
199
|
+
|
|
200
|
+
### `agentrun connectors register-remote-connector`
|
|
201
|
+
|
|
202
|
+
Exchange a one-use enrollment code for a connector-scoped credential.
|
|
203
|
+
|
|
204
|
+
Route: `POST /connectors`.
|
|
205
|
+
|
|
206
|
+
- `--installation-id STRING` (string, required)
|
|
207
|
+
- `--operation-id STRING` (string, required)
|
|
208
|
+
- `--label STRING` (string)
|
|
209
|
+
- `--body JSON|@FILE|-` (application/json, required): The whole body: inline, from a file or from stdin. The flags above win over a JSON body's fields.
|
|
210
|
+
- `--body-type TYPE` (string): The body's type, one of application/json; any other than JSON is sent as given.
|
|
211
|
+
|
|
212
|
+
### `agentrun connectors remote-command-events CONNECTOR_ID COMMAND_ID`
|
|
213
|
+
|
|
214
|
+
Append an ordered idempotent native event batch for a valid command lease.
|
|
215
|
+
|
|
216
|
+
Route: `POST /connectors/{connector_id}/commands/{command_id}/events`.
|
|
217
|
+
|
|
218
|
+
- `--lease-token STRING` (string, required)
|
|
219
|
+
- `--sequence INTEGER` (integer, required)
|
|
220
|
+
- `--body JSON|@FILE|-` (application/json, required): The whole body: inline, from a file or from stdin. The flags above win over a JSON body's fields.
|
|
221
|
+
- `--body-type TYPE` (string): The body's type, one of application/json; any other than JSON is sent as given.
|
|
222
|
+
|
|
223
|
+
### `agentrun connectors revoke-remote-connector CONNECTOR_ID`
|
|
224
|
+
|
|
225
|
+
Revoke a source connector and stop its outstanding commands.
|
|
226
|
+
|
|
227
|
+
Route: `DELETE /connectors/{connector_id}`.
|
|
228
|
+
|
|
100
229
|
## files
|
|
101
230
|
|
|
102
231
|
### `agentrun files create`
|
|
@@ -215,7 +344,7 @@ The agent's cost per run, run after run: its own cost, what learning added and t
|
|
|
215
344
|
Route: `GET /agents/{agent_id}/learning/cost`.
|
|
216
345
|
|
|
217
346
|
- `--limit INTEGER` (integer): The latest runs to answer, each keeping its number. At most 10000.
|
|
218
|
-
- `--format json|csv` (string, one of these): `csv`: the runs as CSV, columns n, run_id, started_at, path, workflow, learned_revision, cost_usd, learning_usd, total_usd.
|
|
347
|
+
- `--format json|csv` (string, one of these): `csv`: the runs as CSV, columns n, run_id, started_at, path, workflow, learned_revision, cost_usd, cost_upper_bound, learning_usd, total_usd.
|
|
219
348
|
|
|
220
349
|
### `agentrun learning evals AGENT_ID`
|
|
221
350
|
|
|
@@ -273,6 +402,12 @@ Route: `POST /agents/{agent_id}/learning/evals`.
|
|
|
273
402
|
- `--body JSON|@FILE|-` (application/json, required): The whole body: inline, from a file or from stdin. The flags above win over a JSON body's fields.
|
|
274
403
|
- `--body-type TYPE` (string): The body's type, one of application/json; any other than JSON is sent as given.
|
|
275
404
|
|
|
405
|
+
### `agentrun learning replay AGENT_ID NAME DIGEST REPLAY_ID`
|
|
406
|
+
|
|
407
|
+
Read a replay's result: running, done or failed, its counts and its score (start one from the console's Learning tab).
|
|
408
|
+
|
|
409
|
+
Route: `GET /agents/{agent_id}/learning/workflows/{name}/revisions/{digest}/replays/{replay_id}`.
|
|
410
|
+
|
|
276
411
|
### `agentrun learning retire AGENT_ID FILE`
|
|
277
412
|
|
|
278
413
|
Retire a note, a skill or a workflow draft: out of every later run, kept in history.
|
|
@@ -309,6 +444,12 @@ A code that pairs a person's own computer with this server.
|
|
|
309
444
|
|
|
310
445
|
Route: `POST /computers/pairings`.
|
|
311
446
|
|
|
447
|
+
### `agentrun local delete-composio-subscription NAME`
|
|
448
|
+
|
|
449
|
+
Delete the Composio project's webhook subscription, once no trigger uses it.
|
|
450
|
+
|
|
451
|
+
Route: `DELETE /settings/mcp-servers/{name}/composio/subscription`.
|
|
452
|
+
|
|
312
453
|
### `agentrun local delete-computer COMPUTER_ID`
|
|
313
454
|
|
|
314
455
|
Remove a paired computer: its token ends and its socket closes.
|
|
@@ -339,6 +480,18 @@ Whether run folders are on Archil disks (Mode 2), the settings, and whether its
|
|
|
339
480
|
|
|
340
481
|
Route: `GET /workspace/archil`.
|
|
341
482
|
|
|
483
|
+
### `agentrun local list-composio-events NAME`
|
|
484
|
+
|
|
485
|
+
List a saved Composio server's toolkit's events, for a composio trigger.
|
|
486
|
+
|
|
487
|
+
Route: `GET /settings/mcp-servers/{name}/composio/events`.
|
|
488
|
+
|
|
489
|
+
### `agentrun local list-composio-triggers NAME`
|
|
490
|
+
|
|
491
|
+
A saved Composio server's triggers, each with its instance's state on Composio.
|
|
492
|
+
|
|
493
|
+
Route: `GET /settings/mcp-servers/{name}/composio/triggers`.
|
|
494
|
+
|
|
342
495
|
### `agentrun local list-computer-choices PROVIDER`
|
|
343
496
|
|
|
344
497
|
The values a computer provider's picked keys offer, read from the vendor.
|
|
@@ -351,6 +504,21 @@ Settings → Computers: the kinds of computer this server offers, each provider
|
|
|
351
504
|
|
|
352
505
|
Route: `GET /computers`.
|
|
353
506
|
|
|
507
|
+
### `agentrun local receive-hook-composio HOOK`
|
|
508
|
+
|
|
509
|
+
Fire a Composio trigger: a request it checks, no token.
|
|
510
|
+
|
|
511
|
+
Route: `POST /hooks/composio/{hook}`.
|
|
512
|
+
|
|
513
|
+
- `--body JSON|@FILE|-` (*/*, required): The whole body: inline, from a file or from stdin. The flags above win over a JSON body's fields.
|
|
514
|
+
- `--body-type TYPE` (string): The body's type, one of */*; any other than JSON is sent as given.
|
|
515
|
+
|
|
516
|
+
### `agentrun local rotate-composio-secret NAME`
|
|
517
|
+
|
|
518
|
+
Rotate the Composio project's webhook subscription's secret, and keep the new one.
|
|
519
|
+
|
|
520
|
+
Route: `POST /settings/mcp-servers/{name}/composio/rotate-secret`.
|
|
521
|
+
|
|
354
522
|
### `agentrun local test-computer PROVIDER`
|
|
355
523
|
|
|
356
524
|
Test a computer provider's account with its saved keys.
|
|
@@ -419,6 +587,17 @@ List a saved MCP server's tools again, keep them, and say what changed.
|
|
|
419
587
|
|
|
420
588
|
Route: `POST /settings/mcp-servers/{name}/refresh`.
|
|
421
589
|
|
|
590
|
+
## Observations
|
|
591
|
+
|
|
592
|
+
### `agentrun Observations get-observations`
|
|
593
|
+
|
|
594
|
+
Read activity and token usage reported by externally running agents.
|
|
595
|
+
|
|
596
|
+
Route: `GET /observations`.
|
|
597
|
+
|
|
598
|
+
- `--days INTEGER` (integer): UTC calendar days including today; session details remain visible for their full retention period.
|
|
599
|
+
- `--session-id STRING` (string)
|
|
600
|
+
|
|
422
601
|
## revisions
|
|
423
602
|
|
|
424
603
|
### `agentrun revisions list AGENT_ID`
|
|
@@ -485,7 +664,6 @@ Route: `POST /runs`.
|
|
|
485
664
|
- `--effort low|medium|high` (string, one of these): How hard a run works. It sets the model's thinking level, and adds a short note on how to work right after the agent's instructions, on every harness: low answers directly, medium plans briefly and checks once, high plans each part, fills the gaps and reviews. A run started with none thinks at its agent revision's own thinking level, else the host's default, and gets no note.
|
|
486
665
|
- `--max-cost-usd NUMBER` (number): This run's cap, for every turn of it. Default the definition's `max_cost_usd`, else the effort default.
|
|
487
666
|
- `--quote-id STRING` (string): Run at a quote's terms. A different `effort` or `max_cost_usd` than the quote's is `409 quote_invalid`.
|
|
488
|
-
- `--cap-mode expected|strict` (string, one of these): How the run's cap (`max_cost_usd`) prices each model request's input. `expected` (the default): the input the previous request of its conversation reported read from or written to the cache, at the cache-read price, when that request ended less than 4 minutes before; the rest of its input (the previous request's input after the cache, and what the conversation grew by since, a token a byte) at the input price, the cache write's when dearer. With no such request, all of it at that price. Output is limited to what the cap leaves, so output never passes it; a cache miss can, by at most the request's bound (its input uncached less its input expected), served as the run's `cost.overshoot_bound_usd` while it is in flight; its real cost is booked, and the timeline says so. `strict`: every input token at the input or cache-write price, the worst case: no request passes the cap, and a run pauses sooner. Only with a cap. Absent: the agent's (its definition's `cap_mode`), else expected. 422 not_allowed for a run with no cap.
|
|
489
667
|
- `--workflow-first` (boolean): Whether a run of an agent that learns may start on one of its learned workflows. On (absent or true), a run whose input fits exactly one active learned workflow (its input schema has a required field, and the run's input passes it) runs that workflow first, with no turn of the agent's model: its answer is the run's answer, and if it hands the job back (it escalates, a step fails), the same run goes on with the agent, given what the workflow found. The run keeps which path it took: `workflow`, `handed_back` or `agent`. false: the agent takes the run from its first turn.
|
|
490
668
|
- `--learning use` (string, one of these): `use`: the run starts from what its agent learned (its notes, learned skills and learned workflows, as a run that learns is given them), whatever its agent's `learning` says, and keeps nothing: no end-of-run turn, no proposal, no grade and no merge, at its end or after a follow-up. Its `learning` reads `seeded` while it runs, then `dropped` with reason `use`. So many runs of one agent read one learned state, frozen (a held-out evaluation). On a server whose learning is off it is given nothing, as every run there. Absent: the agent's own (`learning: true` learns). 422 not_an_option for anything else.
|
|
491
669
|
- `--repo STRING` (string): The GitHub repository (`owner/name`) this run reaches: the one its GitHub App token is made for, so its github MCP calls are scoped to it. It must be one the agent is bound to (a repository its GitHub triggers' `accept` names on `/repository/full_name`); another is 422 at `repo` in words naming the repositories it is bound to. Absent: the agent's repository when it is bound to exactly one and the first message names none; otherwise the repository a `https://github.com/<owner>/<repo>` URL in the first message names. A run a trigger starts takes its repository from its event, and `repo` there is 422.
|
|
@@ -612,7 +790,6 @@ Route: `POST /agents/{agent_id}/runs`.
|
|
|
612
790
|
- `--effort low|medium|high` (string, one of these): How hard a run works. It sets the model's thinking level, and adds a short note on how to work right after the agent's instructions, on every harness: low answers directly, medium plans briefly and checks once, high plans each part, fills the gaps and reviews. A run started with none thinks at its agent revision's own thinking level, else the host's default, and gets no note.
|
|
613
791
|
- `--max-cost-usd NUMBER` (number): This run's cap, for every turn of it. Default the definition's `max_cost_usd`, else the effort default.
|
|
614
792
|
- `--quote-id STRING` (string): Run at a quote's terms. A different `effort` or `max_cost_usd` than the quote's is `409 quote_invalid`.
|
|
615
|
-
- `--cap-mode expected|strict` (string, one of these): How the run's cap (`max_cost_usd`) prices each model request's input. `expected` (the default): the input the previous request of its conversation reported read from or written to the cache, at the cache-read price, when that request ended less than 4 minutes before; the rest of its input (the previous request's input after the cache, and what the conversation grew by since, a token a byte) at the input price, the cache write's when dearer. With no such request, all of it at that price. Output is limited to what the cap leaves, so output never passes it; a cache miss can, by at most the request's bound (its input uncached less its input expected), served as the run's `cost.overshoot_bound_usd` while it is in flight; its real cost is booked, and the timeline says so. `strict`: every input token at the input or cache-write price, the worst case: no request passes the cap, and a run pauses sooner. Only with a cap. Absent: the agent's (its definition's `cap_mode`), else expected. 422 not_allowed for a run with no cap.
|
|
616
793
|
- `--workflow-first` (boolean): Whether a run of an agent that learns may start on one of its learned workflows. On (absent or true), a run whose input fits exactly one active learned workflow (its input schema has a required field, and the run's input passes it) runs that workflow first, with no turn of the agent's model: its answer is the run's answer, and if it hands the job back (it escalates, a step fails), the same run goes on with the agent, given what the workflow found. The run keeps which path it took: `workflow`, `handed_back` or `agent`. false: the agent takes the run from its first turn.
|
|
617
794
|
- `--learning use` (string, one of these): `use`: the run starts from what its agent learned (its notes, learned skills and learned workflows, as a run that learns is given them), whatever its agent's `learning` says, and keeps nothing: no end-of-run turn, no proposal, no grade and no merge, at its end or after a follow-up. Its `learning` reads `seeded` while it runs, then `dropped` with reason `use`. So many runs of one agent read one learned state, frozen (a held-out evaluation). On a server whose learning is off it is given nothing, as every run there. Absent: the agent's own (`learning: true` learns). 422 not_an_option for anything else.
|
|
618
795
|
- `--repo STRING` (string): The GitHub repository (`owner/name`) this run reaches: the one its GitHub App token is made for, so its github MCP calls are scoped to it. It must be one the agent is bound to (a repository its GitHub triggers' `accept` names on `/repository/full_name`); another is 422 at `repo` in words naming the repositories it is bound to. Absent: the agent's repository when it is bound to exactly one and the first message names none; otherwise the repository a `https://github.com/<owner>/<repo>` URL in the first message names. A run a trigger starts takes its repository from its event, and `repo` there is 422.
|
|
@@ -656,6 +833,7 @@ Route: `GET /runs/{run_id}/timeline`.
|
|
|
656
833
|
- `--after INTEGER` (integer): The change cursor last applied, from `next_after` or the last SSE `id`. 0 is the start.
|
|
657
834
|
- `--wait-ms INTEGER` (integer): JSON only. How long to hold the request for a change after `after`.
|
|
658
835
|
- `--limit INTEGER` (integer): At most this many rows in a page (1 to 500, default 500); has_more says when another waits.
|
|
836
|
+
- `--calls whole` (string, one of these): `whole`: each `tool_use` row carries its call's arguments (`tool_input`) and each `tool_result` row the head of its output to 8000 characters (`tool_result_text`; a web call's every url, only its long texts cut), both through the run's redaction, for a reader that grades the run (a template eval). Its rows are another page sequence: a cursor (`after`, `Last-Event-ID`) from one read goes with the same `calls`.
|
|
659
837
|
- `--last-event-id STRING` (string): SSE reconnect. Same meaning as `after`, and wins over it.
|
|
660
838
|
- `--follow` (boolean, this CLI's own): the timeline as it changes, one page per line (NDJSON), until the run ends; resumes a dropped connection
|
|
661
839
|
|
|
@@ -673,6 +851,55 @@ Route: `GET /runs/{run_id}/timeline, long-polled, then GET /runs/{run_id}`.
|
|
|
673
851
|
|
|
674
852
|
- `--timeout SECONDS` (number, this CLI's own): stop waiting after this long, exit 1 (the run goes on)
|
|
675
853
|
|
|
854
|
+
## sdk-runs
|
|
855
|
+
|
|
856
|
+
### `agentrun sdk-runs complete RUN_ID`
|
|
857
|
+
|
|
858
|
+
Complete a backend SDK task.
|
|
859
|
+
|
|
860
|
+
Route: `POST /sdk-runs/{run_id}/complete`.
|
|
861
|
+
|
|
862
|
+
- `--idempotency-key STRING` (string)
|
|
863
|
+
- `--status completed|failed|cancelled` (string, one of these, required)
|
|
864
|
+
- `--answer STRING` (string, required)
|
|
865
|
+
- `--error STRING` (string)
|
|
866
|
+
- `--model STRING` (string)
|
|
867
|
+
- `--session-id STRING` (string)
|
|
868
|
+
- `--evidence-complete` (boolean)
|
|
869
|
+
- `--body JSON|@FILE|-` (application/json, required): The whole body: inline, from a file or from stdin. The flags above win over a JSON body's fields.
|
|
870
|
+
- `--body-type TYPE` (string): The body's type, one of application/json; any other than JSON is sent as given.
|
|
871
|
+
|
|
872
|
+
### `agentrun sdk-runs events RUN_ID`
|
|
873
|
+
|
|
874
|
+
Record bounded SDK execution evidence.
|
|
875
|
+
|
|
876
|
+
Route: `POST /sdk-runs/{run_id}/events`.
|
|
877
|
+
|
|
878
|
+
- `--idempotency-key STRING` (string)
|
|
879
|
+
- `--sequence INTEGER` (integer, required)
|
|
880
|
+
- `--body JSON|@FILE|-` (application/json, required): The whole body: inline, from a file or from stdin. The flags above win over a JSON body's fields.
|
|
881
|
+
- `--body-type TYPE` (string): The body's type, one of application/json; any other than JSON is sent as given.
|
|
882
|
+
|
|
883
|
+
### `agentrun sdk-runs get RUN_ID`
|
|
884
|
+
|
|
885
|
+
Read SDK run and learning state.
|
|
886
|
+
|
|
887
|
+
Route: `GET /sdk-runs/{run_id}`.
|
|
888
|
+
|
|
889
|
+
### `agentrun sdk-runs start AGENT_ID`
|
|
890
|
+
|
|
891
|
+
Register a task executed by an existing backend SDK.
|
|
892
|
+
|
|
893
|
+
Route: `POST /agents/{agent_id}/sdk-runs`.
|
|
894
|
+
|
|
895
|
+
- `--idempotency-key STRING` (string, required)
|
|
896
|
+
- `--runtime claude-agent-sdk|codex-sdk` (string, one of these, required)
|
|
897
|
+
- `--input STRING` (string, required)
|
|
898
|
+
- `--instructions STRING` (string, required)
|
|
899
|
+
- `--model STRING` (string)
|
|
900
|
+
- `--body JSON|@FILE|-` (application/json, required): The whole body: inline, from a file or from stdin. The flags above win over a JSON body's fields.
|
|
901
|
+
- `--body-type TYPE` (string): The body's type, one of application/json; any other than JSON is sent as given.
|
|
902
|
+
|
|
676
903
|
## server
|
|
677
904
|
|
|
678
905
|
### `agentrun server capabilities`
|