@parcha/agentrun 0.4.19 → 0.4.21

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.
@@ -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 bind-source-tool AGENT_ID`
16
+
17
+ Choose the existing destination account for a required source tool.
18
+
19
+ Route: `POST /agents/{agent_id}/source/tools`.
20
+
21
+ - `--tool STRING` (string, required)
22
+ - `--server STRING` (string, 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 connect-native`
16
27
 
17
28
  Connect a native project using ordinary agent and revision storage.
@@ -93,6 +104,12 @@ Read a native connection.
93
104
 
94
105
  Route: `GET /agents/{agent_id}/native`.
95
106
 
107
+ ### `agentrun agents get-source-sync AGENT_ID`
108
+
109
+ Read source sync and managed Move readiness.
110
+
111
+ Route: `GET /agents/{agent_id}/source`.
112
+
96
113
  ### `agentrun agents list`
97
114
 
98
115
  List agents.
@@ -116,6 +133,41 @@ Each learned workflow revision's promotion: its replay's numbers and whether it
116
133
 
117
134
  Route: `GET /agents/{agent_id}/learning/promotions`.
118
135
 
136
+ ### `agentrun agents move-source-agent AGENT_ID`
137
+
138
+ Move the same agent to server-managed execution from its complete synchronized setup.
139
+
140
+ Route: `POST /agents/{agent_id}/source/move`.
141
+
142
+ - `--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.
143
+ - `--body-type TYPE` (string): The body's type, one of application/json; any other than JSON is sent as given.
144
+
145
+ ### `agentrun agents package AGENT_ID`
146
+
147
+ The agent's current revision as a template package.
148
+
149
+ Route: `GET /agents/{agent_id}/package`.
150
+
151
+ ### `agentrun agents resolve-source-sync AGENT_ID`
152
+
153
+ Use an explicitly reviewed source snapshot while retaining the prior managed revision in history.
154
+
155
+ Route: `POST /agents/{agent_id}/source/resolve`.
156
+
157
+ - `--revision STRING` (string, required)
158
+ - `--snapshot STRING` (string, required)
159
+ - `--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.
160
+ - `--body-type TYPE` (string): The body's type, one of application/json; any other than JSON is sent as given.
161
+
162
+ ### `agentrun agents review-source-project AGENT_ID`
163
+
164
+ Acknowledge exact unresolved run receipts and allow later runs to use the saved project.
165
+
166
+ Route: `POST /agents/{agent_id}/source/project-review`.
167
+
168
+ - `--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.
169
+ - `--body-type TYPE` (string): The body's type, one of application/json; any other than JSON is sent as given.
170
+
119
171
  ### `agentrun agents runs AGENT_ID`
120
172
 
121
173
  The agent's runs index.
@@ -128,6 +180,16 @@ Route: `GET /agents/{agent_id}/runs`.
128
180
  - `--label STRING` (string): Only runs holding this label: `<key>:<value>`, split at the first `:` (a key holds none). Once per request; a second `label`, or one that does not read as a label, is 400.
129
181
  - `--all` (boolean, this CLI's own): every page: follows next_cursor and prints one list, its next_cursor null; stops past 1000 pages, exit 1
130
182
 
183
+ ### `agentrun agents set-source-sync AGENT_ID`
184
+
185
+ Enable or pause this agent’s source sync.
186
+
187
+ Route: `PATCH /agents/{agent_id}/source`.
188
+
189
+ - `--enabled` (boolean, required)
190
+ - `--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.
191
+ - `--body-type TYPE` (string): The body's type, one of application/json; any other than JSON is sent as given.
192
+
131
193
  ### `agentrun agents unarchive AGENT_ID`
132
194
 
133
195
  Show the archived agent in the lists again.
@@ -257,6 +319,16 @@ Create a ten-minute one-use connection code.
257
319
  Route: `POST /connectors/enrollment`.
258
320
 
259
321
  - `--label STRING` (string)
322
+ - `--connector-id STRING` (string)
323
+ - `--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.
324
+ - `--body-type TYPE` (string): The body's type, one of application/json; any other than JSON is sent as given.
325
+
326
+ ### `agentrun connectors grant-source-sync CONNECTOR_ID TARGET_ID`
327
+
328
+ Read or establish this explicitly authorized source sync grant without re-enabling a paused grant.
329
+
330
+ Route: `POST /connectors/{connector_id}/targets/{target_id}/sync/grant`.
331
+
260
332
  - `--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.
261
333
  - `--body-type TYPE` (string): The body's type, one of application/json; any other than JSON is sent as given.
262
334
 
@@ -297,6 +369,17 @@ Route: `POST /connectors/{connector_id}/poll`.
297
369
  - `--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.
298
370
  - `--body-type TYPE` (string): The body's type, one of application/json; any other than JSON is sent as given.
299
371
 
372
+ ### `agentrun connectors publish-source-sync CONNECTOR_ID TARGET_ID`
373
+
374
+ Publish a bounded source snapshot under its grant and sequence.
375
+
376
+ Route: `POST /connectors/{connector_id}/targets/{target_id}/sync`.
377
+
378
+ - `--generation STRING` (string, required)
379
+ - `--sequence INTEGER` (integer, required)
380
+ - `--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.
381
+ - `--body-type TYPE` (string): The body's type, one of application/json; any other than JSON is sent as given.
382
+
300
383
  ### `agentrun connectors register-remote-connector`
301
384
 
302
385
  Exchange a one-use enrollment code for a connector-scoped credential.
@@ -326,6 +409,49 @@ Revoke a source connector and stop its outstanding commands.
326
409
 
327
410
  Route: `DELETE /connectors/{connector_id}`.
328
411
 
412
+ ### `agentrun connectors source-sync-failure CONNECTOR_ID TARGET_ID`
413
+
414
+ Record a fixed source failure while preserving its last complete snapshot.
415
+
416
+ Route: `POST /connectors/{connector_id}/targets/{target_id}/sync/status`.
417
+
418
+ - `--generation STRING` (string, required)
419
+ - `--sequence INTEGER` (integer, required)
420
+ - `--code unsupported_platform|source_changed|source_unavailable|snapshot_too_large` (string, one of these, required)
421
+ - `--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.
422
+ - `--body-type TYPE` (string): The body's type, one of application/json; any other than JSON is sent as given.
423
+
424
+ ## deploy
425
+
426
+ ### `agentrun deploy SOURCE`
427
+
428
+ Deploy an agent's package to another AgentRun: upload, plan, apply, lock (deploy rollback, deploy delete).
429
+
430
+ Route: none, it runs on this machine.
431
+
432
+ - `--to URL` (string, this CLI's own): where: cloud (the hosted AgentRun; AGENTRUN_CLOUD_URL overrides its address), or an AgentRun's address; left out after the first deploy, the lock's target (a folder's, only where this CLI deployed it, or cloud)
433
+ - `--yes` (boolean, this CLI's own): apply without asking (needed off a terminal)
434
+ - `--force` (boolean, this CLI's own): replace an agent edited on the target since the last deploy
435
+ - `--params FILE` (string, this CLI's own): the package's parameters, a JSON object
436
+ - `--pause-source` (boolean, this CLI's own): an install agent: turn its schedules off on this install once deployed (else they fire in both places)
437
+
438
+ ### `agentrun deploy delete SOURCE`
439
+
440
+ Delete the deployed agent from its target (archived first), and the lock here.
441
+
442
+ Route: none, it runs on this machine.
443
+
444
+ - `--to URL` (string, this CLI's own): the target, in place of the lock's
445
+ - `--yes` (boolean, this CLI's own): delete without asking (needed off a terminal)
446
+
447
+ ### `agentrun deploy rollback SOURCE`
448
+
449
+ Make the deployed agent's previous revision current on its target, and the lock follow.
450
+
451
+ Route: none, it runs on this machine.
452
+
453
+ - `--to URL` (string, this CLI's own): the target, in place of the lock's
454
+
329
455
  ## doctor
330
456
 
331
457
  ### `agentrun doctor`
@@ -337,6 +463,16 @@ Route: none, it runs on this machine.
337
463
  - `--data DIR` (string, this CLI's own): the data directory whose server it checks (default ~/.agentrun)
338
464
  - `--json` (boolean, this CLI's own): print the checks as JSON: {exit, server, checks: [{id, status, summary, fix, docs}]}
339
465
 
466
+ ## export
467
+
468
+ ### `agentrun export AGENT`
469
+
470
+ Write an agent's current revision as a template package folder, and say what the target sets up again.
471
+
472
+ Route: none, it runs on this machine.
473
+
474
+ - `--out DIR` (string, this CLI's own): the folder to write: a new one, or an empty one
475
+
340
476
  ## files
341
477
 
342
478
  ### `agentrun files create`
@@ -395,6 +531,15 @@ Route: none, it runs on this machine.
395
531
  - `--recipe FILE` (string, this CLI's own): in place of HARNESS: a recipe file (HARNESS.md#a-recipe), checked against its five rules before anything is downloaded
396
532
  - `--data DIR` (string, this CLI's own): the data directory of the AgentRun it is for (default ~/.agentrun, where npx @parcha/agentrun keeps it)
397
533
 
534
+ ### `agentrun harness sign-in`
535
+
536
+ Sign a recipe's agent in to your own account with the agent's own sign-in, in this terminal (Antigravity's agy acp --login); a server you start with --harness-sign-in on your own machine then runs your own runs on it.
537
+
538
+ Route: none, it runs on this machine.
539
+
540
+ - `--recipe FILE` (string, this CLI's own): the recipe file, whose signIn names the agent's own sign-in flags; its agent installed first with agentrun harness install --recipe FILE
541
+ - `--data DIR` (string, this CLI's own): the data directory the recipe's agent was installed into (default ~/.agentrun)
542
+
398
543
  ## harness-check
399
544
 
400
545
  ### `agentrun harness-check`
@@ -485,6 +630,12 @@ Read a replay's result: running, done or failed, its counts and its score (start
485
630
 
486
631
  Route: `GET /agents/{agent_id}/learning/workflows/{name}/revisions/{digest}/replays/{replay_id}`.
487
632
 
633
+ ### `agentrun learning reset AGENT_ID`
634
+
635
+ Reset the agent's learning: everything it learned deleted, the agent and its runs kept.
636
+
637
+ Route: `DELETE /agents/{agent_id}/learning`.
638
+
488
639
  ### `agentrun learning retire AGENT_ID FILE`
489
640
 
490
641
  Retire a workflow draft: out of every later run, kept in history.
@@ -586,6 +737,12 @@ Settings → Computers: the kinds of computer this server offers, each provider
586
737
 
587
738
  Route: `GET /computers`.
588
739
 
740
+ ### `agentrun local list-mcp-server-names`
741
+
742
+ The names of the MCP servers saved here, and nothing else of them.
743
+
744
+ Route: `GET /settings/mcp-server-names`.
745
+
589
746
  ### `agentrun local receive-hook-composio HOOK`
590
747
 
591
748
  Fire a Composio trigger: a request it checks, no token.
@@ -617,11 +774,12 @@ Route: `POST /workspace/archil/test`.
617
774
 
618
775
  ### `agentrun login`
619
776
 
620
- Check a server's token, read from stdin, and keep it with the server's address in the config file.
777
+ Sign in to a server, with a device code when it offers one, else a token read from stdin, and keep the token with the server's address in the config file.
621
778
 
622
- Route: `GET /agents?limit=1, to check the token`.
779
+ Route: `GET /capabilities, then its device sign-in; else GET /agents?limit=1, to check a token from stdin`.
623
780
 
624
- - `--base-url URL` (string, this CLI's own): the server's API, ending /v2 (default AGENTRUN_BASE_URL)
781
+ - `--to URL|cloud` (string, this CLI's own): the server, /v2 added when its address lacks it; cloud is AgentRun cloud (AGENTRUN_CLOUD_URL, else https://api.agentrun.ai). When its capabilities offer a device sign-in, prints an address and a code to approve there, else reads the token from stdin
782
+ - `--base-url URL` (string, this CLI's own): the server's API, ending /v2 (default AGENTRUN_BASE_URL); the token from stdin
625
783
 
626
784
  ## logout
627
785
 
@@ -757,7 +915,7 @@ Route: `POST /runs`.
757
915
  - `--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.
758
916
  - `--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.
759
917
  - `--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`.
760
- - `--model-key STRING` (string): The run's own model key: a key for the model gateway at AGENT_MODEL_BASE_URL, such as a LiteLLM virtual key minted for this run, which every model request tied to the run carries in place of the server's own key (its turns, its subagents, its learned workflows' nodes, a workflow's model nodes, its end-of-run compile turn). AgentRun never mints, lists or revokes it. Sealed into the run's launch bound to the gateway's origin, read at each claim (a reclaim after a crash among them), erased by the write that ends the run's turn; never in its saved body, its timeline, its view, a log or an Idempotency-Key's fingerprint (a retry with a new key answers the first request's run, its first key kept). The harness, its tools and its sandbox never see it. 422 at `model_key` when the run's model never goes to that gateway (no AGENT_MODEL_BASE_URL here, a native run, or a model routed elsewhere). Absent, the run spends on the server's key for its route; where the server holds none (no AGENT_MODEL_API_KEY, none saved in Settings), a start without it is 422 `model_key_required`, never a failure at its first model call.
918
+ - `--model-key STRING` (string): The run's own model key: a key for the model gateway at AGENT_MODEL_BASE_URL, such as a LiteLLM virtual key minted for this run, which every model request tied to the run carries in place of the server's own key (its turns, its subagents, its learned workflows' nodes, a workflow's model nodes, its end-of-run compile turn). AgentRun never mints, lists or revokes it. Sealed into the run's launch bound to the gateway's origin, read at each claim (a reclaim after a crash among them), erased from the store by the write that ends the run's turn (the runner's redactor keeps the value in memory to cut it); never in its saved body, its timeline, its view, a log or an Idempotency-Key's fingerprint (a retry with a new key answers the first request's run, its first key kept). The harness, its tools and its sandbox never see it. 422 `invalid` at `model_key` for a key under 8 characters (no cut could hold it) or one with a space or a control character; 422 at `model_key` when the run's model never goes to that gateway (no AGENT_MODEL_BASE_URL here, a native run, or a model routed elsewhere). Absent, the run spends on the server's key for its route; where the server holds none (no AGENT_MODEL_API_KEY, none saved in Settings), a start without it is 422 `model_key_required`, never a failure at its first model call.
761
919
  - `--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.
762
920
  - `--learning use` (string, one of these): `use`: the run starts from what its agent learned (its corrections and learned workflows, as a run that learns is given them), whatever its agent's `learning` says, and keeps nothing: no compile turn, no correction 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.
763
921
  - `--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.
@@ -856,7 +1014,7 @@ Route: `POST /runs/{run_id}/messages`.
856
1014
 
857
1015
  - `--idempotency-key STRING` (string): Makes a create safe to retry. The same key and body within `limits.idempotency_ttl_s` replays the first answer with `Idempotent-Replayed: true`; another body is `409 idempotency_mismatch`; a retry while the first is in flight is `409 idempotency_in_progress`. Keys are scoped to the credential's account and the route.
858
1016
  - `--content STRING` (string, required): At most `limits.max_message_chars`. Not only whitespace.
859
- - `--model-key STRING` (string): The run's own model key: a key for the model gateway at AGENT_MODEL_BASE_URL, such as a LiteLLM virtual key minted for this run, which every model request tied to the run carries in place of the server's own key (its turns, its subagents, its learned workflows' nodes, a workflow's model nodes, its end-of-run compile turn). AgentRun never mints, lists or revokes it. Sealed into the run's launch bound to the gateway's origin, read at each claim (a reclaim after a crash among them), erased by the write that ends the run's turn; never in its saved body, its timeline, its view, a log or an Idempotency-Key's fingerprint (a retry with a new key answers the first request's run, its first key kept). The harness, its tools and its sandbox never see it. 422 at `model_key` when the run's model never goes to that gateway (no AGENT_MODEL_BASE_URL here, a native run, or a model routed elsewhere). Absent, the run spends on the server's key for its route; where the server holds none (no AGENT_MODEL_API_KEY, none saved in Settings), a start without it is 422 `model_key_required`, never a failure at its first model call. On a message it replaces the run's key from the run's next model request on, a turn still going included, and it is the first key of a run that started on the server's (mint one per turn); a message without one keeps the key the run holds, which is none once its last turn ended: then, where the server holds no key for the run's model, the message is 422 `model_key_required` and nothing is written.
1017
+ - `--model-key STRING` (string): The run's own model key: a key for the model gateway at AGENT_MODEL_BASE_URL, such as a LiteLLM virtual key minted for this run, which every model request tied to the run carries in place of the server's own key (its turns, its subagents, its learned workflows' nodes, a workflow's model nodes, its end-of-run compile turn). AgentRun never mints, lists or revokes it. Sealed into the run's launch bound to the gateway's origin, read at each claim (a reclaim after a crash among them), erased from the store by the write that ends the run's turn (the runner's redactor keeps the value in memory to cut it); never in its saved body, its timeline, its view, a log or an Idempotency-Key's fingerprint (a retry with a new key answers the first request's run, its first key kept). The harness, its tools and its sandbox never see it. 422 `invalid` at `model_key` for a key under 8 characters (no cut could hold it) or one with a space or a control character; 422 at `model_key` when the run's model never goes to that gateway (no AGENT_MODEL_BASE_URL here, a native run, or a model routed elsewhere). Absent, the run spends on the server's key for its route; where the server holds none (no AGENT_MODEL_API_KEY, none saved in Settings), a start without it is 422 `model_key_required`, never a failure at its first model call. On a message it replaces the run's key from the run's next model request on, a turn still going included, and it is the first key of a run that started on the server's (mint one per turn); a message without one keeps the key the run holds, which is none once its last turn ended: then, where the server holds no key for the run's model, the message is 422 `model_key_required` and nothing is written.
860
1018
  - `--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.
861
1019
  - `--body-type TYPE` (string): The body's type, one of application/json; any other than JSON is sent as given.
862
1020
 
@@ -901,7 +1059,7 @@ Route: `POST /agents/{agent_id}/runs`.
901
1059
  - `--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.
902
1060
  - `--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.
903
1061
  - `--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`.
904
- - `--model-key STRING` (string): The run's own model key: a key for the model gateway at AGENT_MODEL_BASE_URL, such as a LiteLLM virtual key minted for this run, which every model request tied to the run carries in place of the server's own key (its turns, its subagents, its learned workflows' nodes, a workflow's model nodes, its end-of-run compile turn). AgentRun never mints, lists or revokes it. Sealed into the run's launch bound to the gateway's origin, read at each claim (a reclaim after a crash among them), erased by the write that ends the run's turn; never in its saved body, its timeline, its view, a log or an Idempotency-Key's fingerprint (a retry with a new key answers the first request's run, its first key kept). The harness, its tools and its sandbox never see it. 422 at `model_key` when the run's model never goes to that gateway (no AGENT_MODEL_BASE_URL here, a native run, or a model routed elsewhere). Absent, the run spends on the server's key for its route; where the server holds none (no AGENT_MODEL_API_KEY, none saved in Settings), a start without it is 422 `model_key_required`, never a failure at its first model call.
1062
+ - `--model-key STRING` (string): The run's own model key: a key for the model gateway at AGENT_MODEL_BASE_URL, such as a LiteLLM virtual key minted for this run, which every model request tied to the run carries in place of the server's own key (its turns, its subagents, its learned workflows' nodes, a workflow's model nodes, its end-of-run compile turn). AgentRun never mints, lists or revokes it. Sealed into the run's launch bound to the gateway's origin, read at each claim (a reclaim after a crash among them), erased from the store by the write that ends the run's turn (the runner's redactor keeps the value in memory to cut it); never in its saved body, its timeline, its view, a log or an Idempotency-Key's fingerprint (a retry with a new key answers the first request's run, its first key kept). The harness, its tools and its sandbox never see it. 422 `invalid` at `model_key` for a key under 8 characters (no cut could hold it) or one with a space or a control character; 422 at `model_key` when the run's model never goes to that gateway (no AGENT_MODEL_BASE_URL here, a native run, or a model routed elsewhere). Absent, the run spends on the server's key for its route; where the server holds none (no AGENT_MODEL_API_KEY, none saved in Settings), a start without it is 422 `model_key_required`, never a failure at its first model call.
905
1063
  - `--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.
906
1064
  - `--learning use` (string, one of these): `use`: the run starts from what its agent learned (its corrections and learned workflows, as a run that learns is given them), whatever its agent's `learning` says, and keeps nothing: no compile turn, no correction 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.
907
1065
  - `--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.
@@ -1021,6 +1179,8 @@ Route: `POST /agents/{agent_id}/sdk-runs`.
1021
1179
  - `--input STRING` (string, required)
1022
1180
  - `--instructions STRING` (string, required)
1023
1181
  - `--model STRING` (string)
1182
+ - `--started-at STRING` (string): When the backend began the task, as an RFC 3339 date-time: the run's created_at. At most 60 seconds ahead of the server's clock and at most 7 days behind it. Absent: now. The evidence deadline is still counted from this request.
1183
+ - `--title STRING` (string): The run's title, trimmed and with whitespace collapsed. Absent: the first 80 characters of input.
1024
1184
  - `--platform STRING` (string): External source's display label, such as openclaw or capy. Preserved exactly; no surrounding whitespace, controls or lone surrogates. Never selects a managed harness or workflow capability.
1025
1185
  - `--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.
1026
1186
  - `--body-type TYPE` (string): The body's type, one of application/json; any other than JSON is sent as given.
@@ -1185,7 +1345,10 @@ Apply a template package: make its agent, with its skills, then its triggers.
1185
1345
  Route: `POST /templates/{template}/apply`.
1186
1346
 
1187
1347
  - `--idempotency-key STRING` (string): Makes a create safe to retry. The same key and body within `limits.idempotency_ttl_s` replays the first answer with `Idempotent-Replayed: true`; another body is `409 idempotency_mismatch`; a retry while the first is in flight is `409 idempotency_in_progress`. Keys are scoped to the credential's account and the route.
1348
+ - `--dry-run` (boolean): True: answer the apply's plan (200 `{plan}`) from the same reads and checks, writing nothing and keeping no Idempotency-Key record. Missing keys and MCP servers are listed in the plan where the apply would be 409; any other refusal is the apply's own.
1188
1349
  - `--agent-id STRING` (string): An agent this package made here (GET /agents `template.id` is the package's id): the apply writes a new revision of it in place of making another, answered 200 with the same id. Its runs and its learning (corrections and workflows) stay. The parameters and grants are checked as a fresh apply checks them. Its triggers are reconciled by name: one of a name it has is changed in place (its id, a feed trigger's seen items, a webhook trigger's secret and whether it is on are kept; a `catchup_window_s` or `max_active_runs` the package leaves out goes back to its default, as a fresh apply makes it; a source the package leaves as it was is not rewritten, so a schedule keeps its next time, and an `every_s` one with no `start_at` the grid its first apply set), a new name is made, and one this package's apply made or kept that the package no longer lists is removed (a feed trigger whose feeds are left empty is not listed). Which triggers are the package's is kept on each trigger, never in an API body: one the owner made, one moved to the agent from another (or away and back), and one made before this was kept are never removed. A Composio trigger it removes (the package dropped it, or makes it again) goes at Composio first: one whose instance Composio does not delete is kept here as it was (on or off, the package's, its config sealed), and the next apply removes it; a dropped one is said in `warnings` under `triggers`, naming it and what is left at Composio. Such an unmarked trigger with a package trigger's name is adopted only when it can be changed in place (the same kind, and for a Composio trigger the same server, event and config), and is the package's from then on; one that would have to be made again, or one another package made, is 409 name_taken under `triggers.<i>.name` before anything is written: rename or delete it, then apply again. A trigger moved to another agent while the update runs is neither changed nor removed; its name is made anew. A Composio trigger it keeps keeps its sealed config when the package sends the same values; one whose server, event or config the package changes (another key too) is made again, as one whose source kind changed is: the old trigger and its Composio instance are removed first, and the new one is off where the owner turned the old one off. When Composio does not delete the old instance, the new one is not made, and the apply is 424 upstream_failed with the new revision standing and the old trigger kept as it was (remove the instance at Composio, or wait, and apply again: the old trigger's off carries to the new one). What the package owns and its new version leaves out (an input or answer schema, a checkout, a default cap, learning) is gone from the agent; what the host set (its harness, computer, sdk and native references) is kept. Updates of one agent run one after the other on a server, and each writes only onto the revision it read: one whose read went stale meanwhile (an edit, or an update elsewhere) is 412 precondition_failed, with nothing changed. An agent made otherwise, or from another package, is 422 under `agent_id`, saying which; an unknown id is 404; an archived agent is 409 agent_archived.
1350
+ - `--revision STRING` (string): With `agent_id`: the agent's revision as you read it (GET /agents/{agent_id} `revision`, or a plan's `current_revision_id`). The apply, or its plan, writes only while it is the agent's current one: another is 412 precondition_failed, nothing changed. Without `agent_id` it is 422.
1351
+ - `--sha STRING` (string): The package's sha as you read it (GET /templates `sha`, or an import's answer): the apply, or its plan, is 412 precondition_failed when the package stored under this id is another (an upload of the same name replaced it), nothing changed.
1189
1352
  - `--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.
1190
1353
  - `--body-type TYPE` (string): The body's type, one of application/json; any other than JSON is sent as given.
1191
1354
 
@@ -1208,13 +1371,19 @@ Route: none, it runs on this machine.
1208
1371
  - `--report FILE` (string, this CLI's own): the whole report, as JSON (a summary goes to stdout either way)
1209
1372
  - `--faux MODULE` (string, this CLI's own): answer every model request from MODULE's default export: no key, no network
1210
1373
 
1374
+ ### `agentrun template get TEMPLATE`
1375
+
1376
+ One template package, whole: what it makes and needs, its instructions and every skill file it would give the agent.
1377
+
1378
+ Route: `GET /templates/{template}`.
1379
+
1211
1380
  ### `agentrun template import`
1212
1381
 
1213
- Import a template package from a public GitHub repository, or preview it (dry_run).
1382
+ Import a template package from a public GitHub repository or upload it whole, or preview it (dry_run).
1214
1383
 
1215
1384
  Route: `POST /templates/import`.
1216
1385
 
1217
- - `--source STRING` (string, required): Where the package is: `github:<owner>/<repo>[/<path>][@<ref>]` (the ref, a branch, tag or commit, defaults to the default branch), or the folder's https://github.com/<owner>/<repo>/tree/<ref>/<path> URL. A public repository on github.com alone.
1386
+ - `--source STRING` (string): Where the package is: `github:<owner>/<repo>[/<path>][@<ref>]` (the ref, a branch, tag or commit, defaults to the default branch), or the folder's https://github.com/<owner>/<repo>/tree/<ref>/<path> URL. A public repository on github.com alone. Not with `files`; refused on a server that serves the API alone.
1218
1387
  - `--dry-run` (boolean): True: read and check the package and answer it, storing nothing (the install preview). Absent or false: store it, listed by GET /templates.
1219
1388
  - `--trust-publisher` (boolean): The owner's "I trust <publisher>": needed (true) for the first import this server stores from a GitHub account, and remembered for that account. Never needed for a dry run.
1220
1389
  - `--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.