@parcha/agentrun-serve 0.0.0-bootstrap.0 → 0.1.0-beta.29

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.
Files changed (229) hide show
  1. package/CHANGELOG.md +560 -0
  2. package/LICENSE +202 -0
  3. package/NOTICE +5 -0
  4. package/README.md +1724 -0
  5. package/dist/adapters.d.ts +205 -0
  6. package/dist/adapters.js +459 -0
  7. package/dist/agents.d.ts +124 -0
  8. package/dist/agents.js +302 -0
  9. package/dist/app.d.ts +7 -0
  10. package/dist/app.js +324 -0
  11. package/dist/bound-files.d.ts +4 -0
  12. package/dist/bound-files.js +164 -0
  13. package/dist/box/record.d.ts +6 -0
  14. package/dist/box/record.js +41 -0
  15. package/dist/box/sweep.d.ts +53 -0
  16. package/dist/box/sweep.js +193 -0
  17. package/dist/box-image.d.ts +98 -0
  18. package/dist/box-image.js +283 -0
  19. package/dist/box-relay.d.ts +42 -0
  20. package/dist/box-relay.js +222 -0
  21. package/dist/boxes.d.ts +54 -0
  22. package/dist/boxes.js +182 -0
  23. package/dist/cap.d.ts +224 -0
  24. package/dist/cap.js +721 -0
  25. package/dist/catalog.d.ts +20 -0
  26. package/dist/catalog.js +53 -0
  27. package/dist/cli.d.ts +2 -0
  28. package/dist/cli.js +167 -0
  29. package/dist/coding-tools.d.ts +31 -0
  30. package/dist/coding-tools.js +81 -0
  31. package/dist/console/THIRD-PARTY-NOTICES.txt +1141 -0
  32. package/dist/console/assets/index-BN7oVcO4.js +445 -0
  33. package/dist/console/assets/index-By-jkqki.css +1 -0
  34. package/dist/console/assets/jetbrains-mono-cyrillic-400-normal-BEIGL1Tu.woff2 +0 -0
  35. package/dist/console/assets/jetbrains-mono-cyrillic-400-normal-CIEtRijs.woff +0 -0
  36. package/dist/console/assets/jetbrains-mono-cyrillic-600-normal-BB5xRk30.woff +0 -0
  37. package/dist/console/assets/jetbrains-mono-cyrillic-600-normal-EVf6-Yzo.woff2 +0 -0
  38. package/dist/console/assets/jetbrains-mono-cyrillic-ext-400-normal-BHyURHCj.woff +0 -0
  39. package/dist/console/assets/jetbrains-mono-cyrillic-ext-400-normal-C_uLvvQ5.woff2 +0 -0
  40. package/dist/console/assets/jetbrains-mono-cyrillic-ext-600-normal-Dj6eZy5f.woff2 +0 -0
  41. package/dist/console/assets/jetbrains-mono-cyrillic-ext-600-normal-DpeVePZf.woff +0 -0
  42. package/dist/console/assets/jetbrains-mono-greek-400-normal-C190GLew.woff2 +0 -0
  43. package/dist/console/assets/jetbrains-mono-greek-400-normal-CNojz0t3.woff +0 -0
  44. package/dist/console/assets/jetbrains-mono-greek-600-normal-3KAm9r92.woff +0 -0
  45. package/dist/console/assets/jetbrains-mono-greek-600-normal-H7WoG9Et.woff2 +0 -0
  46. package/dist/console/assets/jetbrains-mono-latin-400-normal-B11XCQ5g.woff +0 -0
  47. package/dist/console/assets/jetbrains-mono-latin-400-normal-V6pRDFza.woff2 +0 -0
  48. package/dist/console/assets/jetbrains-mono-latin-600-normal-C8RAYTDA.woff2 +0 -0
  49. package/dist/console/assets/jetbrains-mono-latin-600-normal-DXv3JcnD.woff +0 -0
  50. package/dist/console/assets/jetbrains-mono-latin-ext-400-normal-Bc8Ftmh3.woff2 +0 -0
  51. package/dist/console/assets/jetbrains-mono-latin-ext-400-normal-DHMOLxAi.woff +0 -0
  52. package/dist/console/assets/jetbrains-mono-latin-ext-600-normal-BfB_LPfz.woff2 +0 -0
  53. package/dist/console/assets/jetbrains-mono-latin-ext-600-normal-DiQlUoE6.woff +0 -0
  54. package/dist/console/assets/jetbrains-mono-vietnamese-400-normal-BeU3T8wf.woff +0 -0
  55. package/dist/console/assets/jetbrains-mono-vietnamese-400-normal-ByoDsISC.woff2 +0 -0
  56. package/dist/console/assets/jetbrains-mono-vietnamese-600-normal-CSpzN4cI.woff +0 -0
  57. package/dist/console/assets/jetbrains-mono-vietnamese-600-normal-Dtizs43-.woff2 +0 -0
  58. package/dist/console/assets/schibsted-grotesk-latin-400-normal-Cph9ettZ.woff2 +0 -0
  59. package/dist/console/assets/schibsted-grotesk-latin-400-normal-DfGZKnlb.woff +0 -0
  60. package/dist/console/assets/schibsted-grotesk-latin-600-normal-BGBUNdzT.woff2 +0 -0
  61. package/dist/console/assets/schibsted-grotesk-latin-600-normal-COje25QW.woff +0 -0
  62. package/dist/console/assets/schibsted-grotesk-latin-ext-400-normal-4l4lq8zr.woff2 +0 -0
  63. package/dist/console/assets/schibsted-grotesk-latin-ext-400-normal-BGzXWJeR.woff +0 -0
  64. package/dist/console/assets/schibsted-grotesk-latin-ext-600-normal-8_E36CQj.woff2 +0 -0
  65. package/dist/console/assets/schibsted-grotesk-latin-ext-600-normal-C27an7Zc.woff +0 -0
  66. package/dist/console/index.html +15 -0
  67. package/dist/daytona-api.d.ts +21 -0
  68. package/dist/daytona-api.js +101 -0
  69. package/dist/decision-rows.d.ts +11 -0
  70. package/dist/decision-rows.js +116 -0
  71. package/dist/decisions.d.ts +94 -0
  72. package/dist/decisions.js +184 -0
  73. package/dist/effort-guidance.d.ts +5 -0
  74. package/dist/effort-guidance.js +14 -0
  75. package/dist/environment.d.ts +5 -0
  76. package/dist/environment.js +11 -0
  77. package/dist/errors.d.ts +72 -0
  78. package/dist/errors.js +66 -0
  79. package/dist/exa-keyless.d.ts +35 -0
  80. package/dist/exa-keyless.js +202 -0
  81. package/dist/fetch-page.d.ts +114 -0
  82. package/dist/fetch-page.js +182 -0
  83. package/dist/files.d.ts +60 -0
  84. package/dist/files.js +153 -0
  85. package/dist/grade.d.ts +96 -0
  86. package/dist/grade.js +348 -0
  87. package/dist/graph-view.d.ts +100 -0
  88. package/dist/graph-view.js +212 -0
  89. package/dist/harness-app.d.ts +38 -0
  90. package/dist/harness-app.js +626 -0
  91. package/dist/harness.d.ts +53 -0
  92. package/dist/harness.js +74 -0
  93. package/dist/home-path.d.ts +27 -0
  94. package/dist/home-path.js +78 -0
  95. package/dist/host-tools.d.ts +20 -0
  96. package/dist/host-tools.js +140 -0
  97. package/dist/host.d.ts +39 -0
  98. package/dist/host.js +81 -0
  99. package/dist/hosted-search.d.ts +27 -0
  100. package/dist/hosted-search.js +129 -0
  101. package/dist/import-sources.d.ts +104 -0
  102. package/dist/import-sources.js +629 -0
  103. package/dist/import-summary.d.ts +25 -0
  104. package/dist/import-summary.js +75 -0
  105. package/dist/import-worker.d.ts +26 -0
  106. package/dist/import-worker.js +41 -0
  107. package/dist/import.d.ts +145 -0
  108. package/dist/import.js +1221 -0
  109. package/dist/index.d.ts +7 -0
  110. package/dist/index.js +6 -0
  111. package/dist/key-check.d.ts +36 -0
  112. package/dist/key-check.js +108 -0
  113. package/dist/key-refusal.d.ts +51 -0
  114. package/dist/key-refusal.js +187 -0
  115. package/dist/learn/check.d.ts +99 -0
  116. package/dist/learn/check.js +259 -0
  117. package/dist/learn/grade.d.ts +79 -0
  118. package/dist/learn/grade.js +433 -0
  119. package/dist/learn/index.d.ts +7 -0
  120. package/dist/learn/index.js +11 -0
  121. package/dist/learn/invisible.d.ts +5 -0
  122. package/dist/learn/invisible.js +42 -0
  123. package/dist/learn/notes.d.ts +59 -0
  124. package/dist/learn/notes.js +146 -0
  125. package/dist/learn/reflect.d.ts +49 -0
  126. package/dist/learn/reflect.js +167 -0
  127. package/dist/learn/secrets.d.ts +18 -0
  128. package/dist/learn/secrets.js +111 -0
  129. package/dist/learn/skills.d.ts +84 -0
  130. package/dist/learn/skills.js +198 -0
  131. package/dist/learning-routes.d.ts +196 -0
  132. package/dist/learning-routes.js +609 -0
  133. package/dist/learning-run.d.ts +304 -0
  134. package/dist/learning-run.js +797 -0
  135. package/dist/learning-words.d.ts +73 -0
  136. package/dist/learning-words.js +171 -0
  137. package/dist/learning.d.ts +377 -0
  138. package/dist/learning.js +801 -0
  139. package/dist/llm.d.ts +40 -0
  140. package/dist/llm.js +37 -0
  141. package/dist/llms.txt +37 -0
  142. package/dist/mcp-servers.d.ts +115 -0
  143. package/dist/mcp-servers.js +445 -0
  144. package/dist/mcp.d.ts +51 -0
  145. package/dist/mcp.js +392 -0
  146. package/dist/model.d.ts +184 -0
  147. package/dist/model.js +484 -0
  148. package/dist/monid.d.ts +74 -0
  149. package/dist/monid.js +277 -0
  150. package/dist/openapi/agentrun-v2.openapi.json +4805 -0
  151. package/dist/openapi.d.ts +10 -0
  152. package/dist/openapi.js +1417 -0
  153. package/dist/owner.d.ts +55 -0
  154. package/dist/owner.js +222 -0
  155. package/dist/packs.d.ts +71 -0
  156. package/dist/packs.js +180 -0
  157. package/dist/page.d.ts +32 -0
  158. package/dist/page.js +133 -0
  159. package/dist/paid-calls.d.ts +46 -0
  160. package/dist/paid-calls.js +110 -0
  161. package/dist/pause.d.ts +68 -0
  162. package/dist/pause.js +97 -0
  163. package/dist/pdf-pages.d.ts +44 -0
  164. package/dist/pdf-pages.js +147 -0
  165. package/dist/place.d.ts +46 -0
  166. package/dist/place.js +105 -0
  167. package/dist/print.d.ts +20 -0
  168. package/dist/print.js +29 -0
  169. package/dist/propose.d.ts +38 -0
  170. package/dist/propose.js +82 -0
  171. package/dist/quiet-sqlite-warning.d.ts +1 -0
  172. package/dist/quiet-sqlite-warning.js +14 -0
  173. package/dist/request-start.d.ts +14 -0
  174. package/dist/request-start.js +226 -0
  175. package/dist/result.d.ts +3 -0
  176. package/dist/result.js +5 -0
  177. package/dist/rows.d.ts +46 -0
  178. package/dist/rows.js +121 -0
  179. package/dist/run-box.d.ts +134 -0
  180. package/dist/run-box.js +440 -0
  181. package/dist/run-manifest.d.ts +27 -0
  182. package/dist/run-manifest.js +60 -0
  183. package/dist/runnable.d.ts +80 -0
  184. package/dist/runnable.js +162 -0
  185. package/dist/runs.d.ts +840 -0
  186. package/dist/runs.js +2279 -0
  187. package/dist/secret-cut.d.ts +27 -0
  188. package/dist/secret-cut.js +109 -0
  189. package/dist/secrets.d.ts +50 -0
  190. package/dist/secrets.js +140 -0
  191. package/dist/server-lock.d.ts +44 -0
  192. package/dist/server-lock.js +140 -0
  193. package/dist/server.d.ts +626 -0
  194. package/dist/server.js +1756 -0
  195. package/dist/sessions.d.ts +4 -0
  196. package/dist/sessions.js +105 -0
  197. package/dist/skills.d.ts +31 -0
  198. package/dist/skills.js +68 -0
  199. package/dist/stats.d.ts +101 -0
  200. package/dist/stats.js +82 -0
  201. package/dist/tool-keys.d.ts +151 -0
  202. package/dist/tool-keys.js +273 -0
  203. package/dist/tool-plane.d.ts +143 -0
  204. package/dist/tool-plane.js +242 -0
  205. package/dist/tools.d.ts +147 -0
  206. package/dist/tools.js +253 -0
  207. package/dist/turn-end.d.ts +23 -0
  208. package/dist/turn-end.js +14 -0
  209. package/dist/turns.d.ts +34 -0
  210. package/dist/turns.js +202 -0
  211. package/dist/uploads.d.ts +104 -0
  212. package/dist/uploads.js +474 -0
  213. package/dist/usage.d.ts +29 -0
  214. package/dist/usage.js +58 -0
  215. package/dist/validate.d.ts +55 -0
  216. package/dist/validate.js +175 -0
  217. package/dist/web-fetch.d.ts +64 -0
  218. package/dist/web-fetch.js +262 -0
  219. package/dist/web-search.d.ts +54 -0
  220. package/dist/web-search.js +136 -0
  221. package/dist/webhooks.d.ts +182 -0
  222. package/dist/webhooks.js +487 -0
  223. package/dist/workspace-paths.d.ts +33 -0
  224. package/dist/workspace-paths.js +104 -0
  225. package/dist/workspace.d.ts +88 -0
  226. package/dist/workspace.js +369 -0
  227. package/launcher/agentrun-serve +109 -0
  228. package/package.json +96 -1
  229. package/skills/agentrun-serve/SKILL.md +128 -0
@@ -0,0 +1,4805 @@
1
+ {
2
+ "openapi": "3.1.0",
3
+ "jsonSchemaDialect": "https://json-schema.org/draft/2020-12/schema",
4
+ "info": {
5
+ "title": "Agentrun API",
6
+ "version": "agentrun.v2/0",
7
+ "summary": "Agents with a home, and the runs they make. One contract for the hosted API and the local server.",
8
+ "description": "The frozen /v2 contract (the draft of 2026-10-16). One document serves both backends:\nthe hosted API at https://api.agentrun.ai/v2 and `npx @parcha/agentrun-serve` on this machine, at port 7340 (the local server below).\n\nThe unit is the **agent home** (agentrun #571): a definition, its skills, its sign-ins and its runs.\nA run's timeline rows are `@parcha/pi-durable-agent/timeline` rows (agentrun #572). The run routes follow\nthe example server (agentrun #577).\n\nConventions:\n- JSON bodies, snake_case fields, times in RFC 3339 UTC, money in US dollars as decimal numbers.\n- Every error is one envelope, `{\"error\": {\"code\", \"message\", \"retryable\", \"next_action\"?}}`, with a code from\n the closed list in `ErrorCode`. Each code has one HTTP status.\n- A backend that does not offer a feature answers `501 unsupported_here` and names the capability. It never\n answers 404 for a route in this document. `GET /capabilities` says in advance what each backend offers, so a\n client can refuse an unsupported call before it sends it.\n- `Idempotency-Key` is accepted on every create (`POST /agents`, `POST /agents/{agent_id}/runs`,\n `POST /runs/{run_id}/messages`, `POST /files`). The same key with the same body replays the first answer; the\n same key with another body is `409 idempotency_mismatch`.\n- Lists page with an opaque `cursor`; a page answers `next_cursor`, null on the last page.\n- Routes marked `x-agentrun-backends: [local]` exist only on the local server; hosted answers 501.\n- A method this document does not list on a path answers 405 `method_not_allowed` with an `Allow` header. A path\n this document does not list answers `404 not_found`.\n",
9
+ "license": {
10
+ "name": "Apache-2.0",
11
+ "identifier": "Apache-2.0"
12
+ },
13
+ "x-agentrun-source": {
14
+ "contract": "agentrun.v2/0",
15
+ "file": "agentrun-v2.openapi.yaml",
16
+ "sha256": "6f5906b9ff6b5ed84a063962b3361f39f904a84f4fe65451095b829e274b82b2",
17
+ "converted": "YAML 1.2 to JSON; descriptions edited for publication"
18
+ }
19
+ },
20
+ "servers": [
21
+ {
22
+ "url": "https://api.agentrun.ai/v2",
23
+ "description": "Hosted. Keys `ar_live_...`, or a console OAuth token."
24
+ },
25
+ {
26
+ "url": "http://127.0.0.1:7340/v2",
27
+ "description": "Local, `npx @parcha/agentrun-serve`. The token is in the data directory (mode 0600)."
28
+ }
29
+ ],
30
+ "security": [
31
+ {
32
+ "bearer": []
33
+ }
34
+ ],
35
+ "tags": [
36
+ {
37
+ "name": "capabilities",
38
+ "description": "What this backend offers."
39
+ },
40
+ {
41
+ "name": "agents",
42
+ "description": "Agents and their homes."
43
+ },
44
+ {
45
+ "name": "runs",
46
+ "description": "One run of an agent, its timeline, its messages and its files."
47
+ },
48
+ {
49
+ "name": "files",
50
+ "description": "Files a caller uploads for a run's input."
51
+ },
52
+ {
53
+ "name": "billing",
54
+ "description": "Quotes and usage."
55
+ },
56
+ {
57
+ "name": "local",
58
+ "description": "Local-only routes."
59
+ }
60
+ ],
61
+ "paths": {
62
+ "/capabilities": {
63
+ "get": {
64
+ "operationId": "getCapabilities",
65
+ "tags": [
66
+ "capabilities"
67
+ ],
68
+ "summary": "What this backend offers",
69
+ "description": "Readable without a credential, so a client learns the backend before it holds a key.",
70
+ "security": [
71
+ {},
72
+ {
73
+ "bearer": []
74
+ }
75
+ ],
76
+ "x-agentrun-backends": [
77
+ "hosted",
78
+ "local"
79
+ ],
80
+ "responses": {
81
+ "200": {
82
+ "description": "The capabilities document.",
83
+ "content": {
84
+ "application/json": {
85
+ "schema": {
86
+ "$ref": "#/components/schemas/Capabilities"
87
+ },
88
+ "examples": {
89
+ "hosted": {
90
+ "$ref": "#/components/examples/CapabilitiesHosted"
91
+ },
92
+ "local": {
93
+ "$ref": "#/components/examples/CapabilitiesLocal"
94
+ }
95
+ }
96
+ }
97
+ }
98
+ },
99
+ "429": {
100
+ "$ref": "#/components/responses/RateLimited"
101
+ },
102
+ "500": {
103
+ "$ref": "#/components/responses/Internal"
104
+ }
105
+ }
106
+ }
107
+ },
108
+ "/agents": {
109
+ "post": {
110
+ "operationId": "createAgent",
111
+ "tags": [
112
+ "agents"
113
+ ],
114
+ "summary": "Create an agent home",
115
+ "description": "Creates a home from a definition and its skill files, in one write. The definition holds exactly the fields\nof #571's `agent.definition`; any other field (a model, for one) is refused with `422 input_invalid` naming\nit, and nothing is created. A definition `id` that already names an agent here is `409 agent_exists`\n(replace a home with `PUT /agents/{agent_id}/home`). Tool names are not checked here: a run checks that\neach is bound (`409 agent_not_runnable`).\n",
116
+ "x-agentrun-backends": [
117
+ "hosted",
118
+ "local"
119
+ ],
120
+ "parameters": [
121
+ {
122
+ "$ref": "#/components/parameters/IdempotencyKey"
123
+ }
124
+ ],
125
+ "requestBody": {
126
+ "required": true,
127
+ "content": {
128
+ "application/json": {
129
+ "schema": {
130
+ "$ref": "#/components/schemas/AgentCreate"
131
+ }
132
+ }
133
+ }
134
+ },
135
+ "responses": {
136
+ "201": {
137
+ "description": "The agent.",
138
+ "headers": {
139
+ "Location": {
140
+ "$ref": "#/components/headers/Location"
141
+ },
142
+ "Idempotent-Replayed": {
143
+ "$ref": "#/components/headers/IdempotentReplayed"
144
+ }
145
+ },
146
+ "content": {
147
+ "application/json": {
148
+ "schema": {
149
+ "$ref": "#/components/schemas/Agent"
150
+ }
151
+ }
152
+ }
153
+ },
154
+ "400": {
155
+ "$ref": "#/components/responses/BadRequest"
156
+ },
157
+ "401": {
158
+ "$ref": "#/components/responses/Unauthenticated"
159
+ },
160
+ "403": {
161
+ "$ref": "#/components/responses/Forbidden"
162
+ },
163
+ "409": {
164
+ "$ref": "#/components/responses/Conflict"
165
+ },
166
+ "413": {
167
+ "$ref": "#/components/responses/PayloadTooLarge"
168
+ },
169
+ "422": {
170
+ "$ref": "#/components/responses/Unprocessable"
171
+ },
172
+ "429": {
173
+ "$ref": "#/components/responses/RateLimited"
174
+ },
175
+ "500": {
176
+ "$ref": "#/components/responses/Internal"
177
+ },
178
+ "503": {
179
+ "$ref": "#/components/responses/Unavailable"
180
+ }
181
+ }
182
+ },
183
+ "get": {
184
+ "operationId": "listAgents",
185
+ "tags": [
186
+ "agents"
187
+ ],
188
+ "summary": "List agents",
189
+ "x-agentrun-backends": [
190
+ "hosted",
191
+ "local"
192
+ ],
193
+ "parameters": [
194
+ {
195
+ "$ref": "#/components/parameters/Limit"
196
+ },
197
+ {
198
+ "$ref": "#/components/parameters/Cursor"
199
+ }
200
+ ],
201
+ "responses": {
202
+ "200": {
203
+ "description": "One page of agents, newest first.",
204
+ "content": {
205
+ "application/json": {
206
+ "schema": {
207
+ "$ref": "#/components/schemas/AgentList"
208
+ }
209
+ }
210
+ }
211
+ },
212
+ "400": {
213
+ "$ref": "#/components/responses/BadRequest"
214
+ },
215
+ "401": {
216
+ "$ref": "#/components/responses/Unauthenticated"
217
+ },
218
+ "429": {
219
+ "$ref": "#/components/responses/RateLimited"
220
+ },
221
+ "500": {
222
+ "$ref": "#/components/responses/Internal"
223
+ }
224
+ }
225
+ }
226
+ },
227
+ "/agents/{agent_id}": {
228
+ "parameters": [
229
+ {
230
+ "$ref": "#/components/parameters/AgentId"
231
+ }
232
+ ],
233
+ "get": {
234
+ "operationId": "getAgent",
235
+ "tags": [
236
+ "agents"
237
+ ],
238
+ "summary": "One agent",
239
+ "x-agentrun-backends": [
240
+ "hosted",
241
+ "local"
242
+ ],
243
+ "responses": {
244
+ "200": {
245
+ "description": "The agent.",
246
+ "headers": {
247
+ "ETag": {
248
+ "$ref": "#/components/headers/HomeETag"
249
+ }
250
+ },
251
+ "content": {
252
+ "application/json": {
253
+ "schema": {
254
+ "$ref": "#/components/schemas/Agent"
255
+ }
256
+ }
257
+ }
258
+ },
259
+ "401": {
260
+ "$ref": "#/components/responses/Unauthenticated"
261
+ },
262
+ "404": {
263
+ "$ref": "#/components/responses/NotFound"
264
+ },
265
+ "429": {
266
+ "$ref": "#/components/responses/RateLimited"
267
+ },
268
+ "500": {
269
+ "$ref": "#/components/responses/Internal"
270
+ }
271
+ }
272
+ }
273
+ },
274
+ "/agents/{agent_id}/definition": {
275
+ "parameters": [
276
+ {
277
+ "$ref": "#/components/parameters/AgentId"
278
+ }
279
+ ],
280
+ "put": {
281
+ "operationId": "updateDefinition",
282
+ "tags": [
283
+ "agents"
284
+ ],
285
+ "summary": "Replace the agent's definition",
286
+ "description": "Replaces the definition with the full one in the body, in one write. `If-Match` carries the home's ETag the\ncaller last read (from `GET /agents/{agent_id}`: the home revision, `homeRevision`). An ETag that is no longer\ncurrent is `412 precondition_failed`, and nothing is written. The body's `version` must be greater than the\ncurrent definition's (`422 input_invalid` on `definition.version`), and its `id`, when present, must be\n`agent_id`. The same field rules as `POST /agents` apply: any field #571 does not keep is refused.\n\nEvery home has a repo: hosted keeps a repo for each agent, and local serve creates `<home>/repo`\nwith no remote when it is absent. The server commits the new definition into that repo, then refreshes the\nhome from it in one check under the owner lock: `refreshAgentHome(home, {sha: <new commit>, from: <its parent,\nthe cached source.sha>, ifRevision: <the If-Match revision>, definition, skills})`. A mismatch on either\n`from` or `ifRevision` is `412 precondition_failed` with nothing written. The answer's `source.sha` is the new\ncommit. A moved home arrives without `<home>/repo` (it never travels in a pack): the target clones the agent's\nrepo, or creates one and commits the definition and skills at this first refresh.\n\nRuns already started keep the definition they started with (`Run.agent_version`, `Run.sha`); the next run\nstarts from this one. Skill files do not change here: a skill the new definition names must already be in the\nhome, or the run refuses with `409 agent_not_runnable`. The home's ETag changes with the write.\n",
287
+ "x-agentrun-backends": [
288
+ "hosted",
289
+ "local"
290
+ ],
291
+ "x-agentrun-capability": "features.agents.update",
292
+ "parameters": [
293
+ {
294
+ "name": "If-Match",
295
+ "in": "header",
296
+ "required": true,
297
+ "description": "The home's current ETag (`homeRevision`), as `GET /agents/{agent_id}` returned it.",
298
+ "schema": {
299
+ "type": "string"
300
+ }
301
+ }
302
+ ],
303
+ "requestBody": {
304
+ "required": true,
305
+ "content": {
306
+ "application/json": {
307
+ "schema": {
308
+ "$ref": "#/components/schemas/DefinitionInput"
309
+ }
310
+ }
311
+ }
312
+ },
313
+ "responses": {
314
+ "200": {
315
+ "description": "The agent, with the new definition, version and `source.sha`.",
316
+ "headers": {
317
+ "ETag": {
318
+ "$ref": "#/components/headers/HomeETag"
319
+ }
320
+ },
321
+ "content": {
322
+ "application/json": {
323
+ "schema": {
324
+ "$ref": "#/components/schemas/Agent"
325
+ }
326
+ }
327
+ }
328
+ },
329
+ "400": {
330
+ "$ref": "#/components/responses/BadRequest"
331
+ },
332
+ "401": {
333
+ "$ref": "#/components/responses/Unauthenticated"
334
+ },
335
+ "403": {
336
+ "$ref": "#/components/responses/Forbidden"
337
+ },
338
+ "404": {
339
+ "$ref": "#/components/responses/NotFound"
340
+ },
341
+ "409": {
342
+ "$ref": "#/components/responses/Conflict"
343
+ },
344
+ "412": {
345
+ "$ref": "#/components/responses/PreconditionFailed"
346
+ },
347
+ "413": {
348
+ "$ref": "#/components/responses/PayloadTooLarge"
349
+ },
350
+ "422": {
351
+ "$ref": "#/components/responses/Unprocessable"
352
+ },
353
+ "429": {
354
+ "$ref": "#/components/responses/RateLimited"
355
+ },
356
+ "500": {
357
+ "$ref": "#/components/responses/Internal"
358
+ },
359
+ "501": {
360
+ "$ref": "#/components/responses/Unsupported"
361
+ },
362
+ "503": {
363
+ "$ref": "#/components/responses/Unavailable"
364
+ }
365
+ }
366
+ }
367
+ },
368
+ "/agents/{agent_id}/runs": {
369
+ "parameters": [
370
+ {
371
+ "$ref": "#/components/parameters/AgentId"
372
+ }
373
+ ],
374
+ "post": {
375
+ "operationId": "createRun",
376
+ "tags": [
377
+ "runs"
378
+ ],
379
+ "summary": "Start a run",
380
+ "description": "Starts a run of the agent with a typed input. The input is checked against the definition's `input_schema`,\nor against the default schema `{content: string}` when the definition has none.\n\nAdmission checks, in order: every tool in the definition is bound here (`409 agent_not_runnable`), the\nquote when one is named (`409 quote_invalid`), then the run's spend authority, the least of the run cap, the\naccount and key caps left this month and the balance (`402 spend_cap_reached`, `402 insufficient_credits`).\nA local server checks only the first.\n",
381
+ "x-agentrun-backends": [
382
+ "hosted",
383
+ "local"
384
+ ],
385
+ "parameters": [
386
+ {
387
+ "$ref": "#/components/parameters/IdempotencyKey"
388
+ }
389
+ ],
390
+ "requestBody": {
391
+ "required": true,
392
+ "content": {
393
+ "application/json": {
394
+ "schema": {
395
+ "$ref": "#/components/schemas/RunCreate"
396
+ }
397
+ }
398
+ }
399
+ },
400
+ "responses": {
401
+ "202": {
402
+ "description": "The run, accepted. Follow it on its timeline.",
403
+ "headers": {
404
+ "Location": {
405
+ "$ref": "#/components/headers/Location"
406
+ },
407
+ "Idempotent-Replayed": {
408
+ "$ref": "#/components/headers/IdempotentReplayed"
409
+ }
410
+ },
411
+ "content": {
412
+ "application/json": {
413
+ "schema": {
414
+ "$ref": "#/components/schemas/Run"
415
+ },
416
+ "examples": {
417
+ "queued": {
418
+ "$ref": "#/components/examples/RunQueued"
419
+ }
420
+ }
421
+ }
422
+ }
423
+ },
424
+ "400": {
425
+ "$ref": "#/components/responses/BadRequest"
426
+ },
427
+ "401": {
428
+ "$ref": "#/components/responses/Unauthenticated"
429
+ },
430
+ "402": {
431
+ "$ref": "#/components/responses/PaymentRequired"
432
+ },
433
+ "403": {
434
+ "$ref": "#/components/responses/Forbidden"
435
+ },
436
+ "404": {
437
+ "$ref": "#/components/responses/NotFound"
438
+ },
439
+ "409": {
440
+ "$ref": "#/components/responses/Conflict"
441
+ },
442
+ "422": {
443
+ "$ref": "#/components/responses/Unprocessable"
444
+ },
445
+ "429": {
446
+ "$ref": "#/components/responses/RateLimited"
447
+ },
448
+ "500": {
449
+ "$ref": "#/components/responses/Internal"
450
+ },
451
+ "503": {
452
+ "$ref": "#/components/responses/Unavailable"
453
+ }
454
+ }
455
+ },
456
+ "get": {
457
+ "operationId": "listRuns",
458
+ "tags": [
459
+ "runs"
460
+ ],
461
+ "summary": "The agent's runs index",
462
+ "x-agentrun-backends": [
463
+ "hosted",
464
+ "local"
465
+ ],
466
+ "parameters": [
467
+ {
468
+ "$ref": "#/components/parameters/Limit"
469
+ },
470
+ {
471
+ "$ref": "#/components/parameters/Cursor"
472
+ },
473
+ {
474
+ "name": "status",
475
+ "in": "query",
476
+ "required": false,
477
+ "description": "Only runs with this status.",
478
+ "schema": {
479
+ "$ref": "#/components/schemas/RunStatus"
480
+ }
481
+ }
482
+ ],
483
+ "responses": {
484
+ "200": {
485
+ "description": "One page of runs, newest first.",
486
+ "content": {
487
+ "application/json": {
488
+ "schema": {
489
+ "$ref": "#/components/schemas/RunList"
490
+ }
491
+ }
492
+ }
493
+ },
494
+ "400": {
495
+ "$ref": "#/components/responses/BadRequest"
496
+ },
497
+ "401": {
498
+ "$ref": "#/components/responses/Unauthenticated"
499
+ },
500
+ "404": {
501
+ "$ref": "#/components/responses/NotFound"
502
+ },
503
+ "429": {
504
+ "$ref": "#/components/responses/RateLimited"
505
+ },
506
+ "500": {
507
+ "$ref": "#/components/responses/Internal"
508
+ }
509
+ }
510
+ }
511
+ },
512
+ "/agents/{agent_id}/home": {
513
+ "parameters": [
514
+ {
515
+ "$ref": "#/components/parameters/AgentId"
516
+ }
517
+ ],
518
+ "get": {
519
+ "operationId": "exportHome",
520
+ "tags": [
521
+ "agents"
522
+ ],
523
+ "summary": "Export the packed home, or its manifest",
524
+ "description": "With `Accept: application/vnd.agentrun.home+tar`, the packed home: a tar whose first member is\n`manifest.json` (a `HomeManifest`). With `Accept: application/json`, the manifest alone, which is what\n`PUT ...?check=1` takes at another backend.\n\n**The pack is an allowlist** (`x-agentrun-pack`): `manifest.json` first, then `agent.sqlite`, then for each\nrun `runs/<run_id>/store/run.sqlite` and `runs/<run_id>/work/**`. Members are regular files and directories\nonly: no symlink, no absolute path, no `..`, and no dotfile at the top of `work/`. Everything else stays out,\n`<home>/chrome/` (live session cookies) and `<home>/repo/` (it moves by its own remote) by name.\n\nEach `.sqlite` is a `VACUUM INTO` copy, `agent.sqlite` taken under the home's writer lock. A run whose claim is\nlive is not copied: its runs-index entry travels, its store and files stay out, and the manifest counts it in\n`runs.live`.\n\n`agent.sqlite` carries the kinds `agent.identity`, `agent.definition`, `agent.skills`, `agent.runs` (with\n`host` removed) and `agent.source`. Never `agent.bindings`, `agent.aliases`, `agent.leases` or\n`browser.profiles`: **no sign-in travels in agentrun.v2/0**. The manifest lists the sign-ins the source had,\nso the target can ask the person to sign in again.\n\nEvery run store in any pack, hosted or local, is the redacted export (`SECRET_KINDS`\ndropped, then vacuumed). Until that export ships, packs carry no run store: the runs index and each run's `work/`\nonly. `@parcha/pi-durable-agent` (`packHome`) writes every pack.\n",
525
+ "x-agentrun-backends": [
526
+ "hosted",
527
+ "local"
528
+ ],
529
+ "x-agentrun-capability": "features.home.export",
530
+ "responses": {
531
+ "200": {
532
+ "description": "The packed home, or its manifest.",
533
+ "headers": {
534
+ "ETag": {
535
+ "$ref": "#/components/headers/HomeETag"
536
+ }
537
+ },
538
+ "content": {
539
+ "application/vnd.agentrun.home+tar": {
540
+ "schema": {
541
+ "type": "string",
542
+ "contentMediaType": "application/vnd.agentrun.home+tar"
543
+ },
544
+ "x-agentrun-pack": {
545
+ "$ref": "#/components/x-agentrun-pack"
546
+ }
547
+ },
548
+ "application/json": {
549
+ "schema": {
550
+ "$ref": "#/components/schemas/HomeManifest"
551
+ }
552
+ }
553
+ }
554
+ },
555
+ "401": {
556
+ "$ref": "#/components/responses/Unauthenticated"
557
+ },
558
+ "404": {
559
+ "$ref": "#/components/responses/NotFound"
560
+ },
561
+ "409": {
562
+ "$ref": "#/components/responses/Conflict"
563
+ },
564
+ "429": {
565
+ "$ref": "#/components/responses/RateLimited"
566
+ },
567
+ "500": {
568
+ "$ref": "#/components/responses/Internal"
569
+ },
570
+ "501": {
571
+ "$ref": "#/components/responses/Unsupported"
572
+ }
573
+ }
574
+ },
575
+ "put": {
576
+ "operationId": "importHome",
577
+ "tags": [
578
+ "agents"
579
+ ],
580
+ "summary": "Import a home, or check one without writing",
581
+ "description": "`?check=1` takes the source's `HomeManifest` as JSON, runs every target check (format, definition, tools\nbound, sign-ins, vault, quote, size, live runs) and writes nothing. It answers 200 with the report when no\ncheck fails, and `422 home_check_failed` with the same report when one does.\n\nWithout `check`, the body is the packed home, in the format `GET .../home` describes (`@parcha/pi-durable-agent`\n`readPack` reads it). The target runs the same checks on the pack's own manifest; a member outside the\nallowlist fails check `format` and names the member. Any failure refuses with `422 home_check_failed` and\nwrites nothing. Otherwise the home is written in one step: 201 when the agent is new here, 200 when it\nreplaced one.\n\nThe manifest's `agent_id` must be the path's `agent_id` (`422 input_invalid` on `manifest.agent_id`), for the\ncheck and for the import. No sign-in travels: check `sign_ins` warns with the sign-ins to redo at the target.\nUntil the redacted run-store export ships, a pack holds no run store (see `GET .../home`).\n\n`<home>/repo` never travels, so a moved home arrives with `source.sha` and no repo. The target clones the\nagent's repo, or creates one and commits the definition and skills at the home's next refresh.\n\nReplacing an agent that exists here needs `If-Match` with its current home ETag (from `GET /agents/{agent_id}`\nor `GET .../home`); without it the answer is `409 agent_exists`, and a stale ETag is\n`412 precondition_failed`. `If-None-Match: *` asks for create only.\n",
582
+ "x-agentrun-backends": [
583
+ "hosted",
584
+ "local"
585
+ ],
586
+ "x-agentrun-capability": "features.home.import",
587
+ "parameters": [
588
+ {
589
+ "$ref": "#/components/parameters/Check"
590
+ },
591
+ {
592
+ "name": "If-Match",
593
+ "in": "header",
594
+ "required": false,
595
+ "description": "Replace only the home with this revision ETag (`home_etag`, `homeRevision`).",
596
+ "schema": {
597
+ "type": "string"
598
+ }
599
+ },
600
+ {
601
+ "name": "If-None-Match",
602
+ "in": "header",
603
+ "required": false,
604
+ "description": "`*`: create only; refuse when the agent exists here.",
605
+ "schema": {
606
+ "type": "string",
607
+ "const": "*"
608
+ }
609
+ }
610
+ ],
611
+ "requestBody": {
612
+ "required": true,
613
+ "content": {
614
+ "application/json": {
615
+ "schema": {
616
+ "$ref": "#/components/schemas/HomeManifest"
617
+ }
618
+ },
619
+ "application/vnd.agentrun.home+tar": {
620
+ "schema": {
621
+ "type": "string",
622
+ "contentMediaType": "application/vnd.agentrun.home+tar"
623
+ },
624
+ "x-agentrun-pack": {
625
+ "$ref": "#/components/x-agentrun-pack"
626
+ }
627
+ }
628
+ }
629
+ },
630
+ "responses": {
631
+ "200": {
632
+ "description": "`?check=1`: the report, every check passed or warned, nothing written. Without it: the home replaced an existing one.",
633
+ "headers": {
634
+ "ETag": {
635
+ "$ref": "#/components/headers/HomeETag"
636
+ }
637
+ },
638
+ "content": {
639
+ "application/json": {
640
+ "schema": {
641
+ "oneOf": [
642
+ {
643
+ "$ref": "#/components/schemas/HomeCheckReport"
644
+ },
645
+ {
646
+ "$ref": "#/components/schemas/HomeImportResult"
647
+ }
648
+ ]
649
+ }
650
+ }
651
+ }
652
+ },
653
+ "201": {
654
+ "description": "The home was written and the agent is new here.",
655
+ "headers": {
656
+ "ETag": {
657
+ "$ref": "#/components/headers/HomeETag"
658
+ },
659
+ "Location": {
660
+ "$ref": "#/components/headers/Location"
661
+ }
662
+ },
663
+ "content": {
664
+ "application/json": {
665
+ "schema": {
666
+ "$ref": "#/components/schemas/HomeImportResult"
667
+ }
668
+ }
669
+ }
670
+ },
671
+ "400": {
672
+ "$ref": "#/components/responses/BadRequest"
673
+ },
674
+ "401": {
675
+ "$ref": "#/components/responses/Unauthenticated"
676
+ },
677
+ "403": {
678
+ "$ref": "#/components/responses/Forbidden"
679
+ },
680
+ "409": {
681
+ "$ref": "#/components/responses/Conflict"
682
+ },
683
+ "412": {
684
+ "$ref": "#/components/responses/PreconditionFailed"
685
+ },
686
+ "413": {
687
+ "$ref": "#/components/responses/PayloadTooLarge"
688
+ },
689
+ "415": {
690
+ "$ref": "#/components/responses/UnsupportedMediaType"
691
+ },
692
+ "422": {
693
+ "$ref": "#/components/responses/Unprocessable"
694
+ },
695
+ "429": {
696
+ "$ref": "#/components/responses/RateLimited"
697
+ },
698
+ "500": {
699
+ "$ref": "#/components/responses/Internal"
700
+ },
701
+ "501": {
702
+ "$ref": "#/components/responses/Unsupported"
703
+ },
704
+ "503": {
705
+ "$ref": "#/components/responses/Unavailable"
706
+ }
707
+ }
708
+ }
709
+ },
710
+ "/runs/{run_id}": {
711
+ "parameters": [
712
+ {
713
+ "$ref": "#/components/parameters/RunId"
714
+ }
715
+ ],
716
+ "get": {
717
+ "operationId": "getRun",
718
+ "tags": [
719
+ "runs"
720
+ ],
721
+ "summary": "One run",
722
+ "description": "Answers at once. To wait for a change, long-poll the timeline.",
723
+ "x-agentrun-backends": [
724
+ "hosted",
725
+ "local"
726
+ ],
727
+ "responses": {
728
+ "200": {
729
+ "description": "The run.",
730
+ "content": {
731
+ "application/json": {
732
+ "schema": {
733
+ "$ref": "#/components/schemas/Run"
734
+ },
735
+ "examples": {
736
+ "completed": {
737
+ "$ref": "#/components/examples/RunCompleted"
738
+ }
739
+ }
740
+ }
741
+ }
742
+ },
743
+ "401": {
744
+ "$ref": "#/components/responses/Unauthenticated"
745
+ },
746
+ "404": {
747
+ "$ref": "#/components/responses/NotFound"
748
+ },
749
+ "429": {
750
+ "$ref": "#/components/responses/RateLimited"
751
+ },
752
+ "500": {
753
+ "$ref": "#/components/responses/Internal"
754
+ }
755
+ }
756
+ }
757
+ },
758
+ "/runs/{run_id}/timeline": {
759
+ "parameters": [
760
+ {
761
+ "$ref": "#/components/parameters/RunId"
762
+ }
763
+ ],
764
+ "get": {
765
+ "operationId": "getTimeline",
766
+ "tags": [
767
+ "runs"
768
+ ],
769
+ "summary": "The run's timeline, as a page or a stream",
770
+ "description": "The run's rows (#572 `TimelineEvent`), with one cursor for both forms.\n\n**The cursor is a change number, not a row's `seq`.** A row can change after it was sent (a call's label\nonce its result lands, a subagent's parent, the cost row) and a live row can be dropped (a streaming\nthinking or text row, a wait). So the server numbers every change to the run's rows, and `after=N` answers\nthe current version of each row changed after change N, plus the ids dropped after N. Change numbers\nincrease strictly within a run and may have gaps. A client upserts rows by `id`, deletes the `drop` ids, and\nsorts by `seq`, never by time.\n\n`after=0` (the default) answers every row with `reset: true`. A server that cannot answer from N (it lost\nthe change log, or N is ahead of it) also answers every row with `reset: true`: the client drops what it\nholds first. A local server starts its change numbers at its process start time in microseconds, so any\ncursor from before a restart is below that and answers `reset: true`.\n\nA live row (a streaming thinking or text row, a wait) keeps its `seq` while it changes. When the committed row\nlands, the live row's id is in `drop` and the committed row comes with its own id and `seq`.\n\n**JSON** (default): `wait_ms` above 0 holds the request until a change after `after` or the wait ends, then\nanswers; `unchanged: true` when nothing changed. Poll again after `poll_after_ms` with `after=next_after`.\nA terminal status alone does not mean the rows are all in: the last rows can land after the status flips.\n`final: true` says they are. A follow-up message reopens a completed run, and a later page is `final: false`.\n\n**SSE** (`Accept: text/event-stream`): each `rows` event carries one `TimelinePage` (without `poll_after_ms`)\nand `id: <next_after>`. Reconnect with `Last-Event-ID`, which wins over `after`. A comment line every 15 s\nkeeps the stream open. The server may end the stream with an `end` event (`reason: reconnect`), and ends it\nwith `reason: terminal` right after the first page with `final: true`. A backend with\n`features.timeline.sse` false answers `Accept: text/event-stream` with `501 unsupported_here`\n(`timeline.sse`), never with JSON.\n",
771
+ "x-agentrun-backends": [
772
+ "hosted",
773
+ "local"
774
+ ],
775
+ "parameters": [
776
+ {
777
+ "name": "after",
778
+ "in": "query",
779
+ "required": false,
780
+ "description": "The change cursor last applied, from `next_after` or the last SSE `id`. 0 is the start.",
781
+ "schema": {
782
+ "type": "integer",
783
+ "minimum": 0,
784
+ "default": 0
785
+ }
786
+ },
787
+ {
788
+ "name": "wait_ms",
789
+ "in": "query",
790
+ "required": false,
791
+ "description": "JSON only. How long to hold the request for a change after `after`.",
792
+ "schema": {
793
+ "type": "integer",
794
+ "minimum": 0,
795
+ "maximum": 25000,
796
+ "default": 0
797
+ }
798
+ },
799
+ {
800
+ "name": "Last-Event-ID",
801
+ "in": "header",
802
+ "required": false,
803
+ "description": "SSE reconnect. Same meaning as `after`, and wins over it.",
804
+ "schema": {
805
+ "type": "string",
806
+ "pattern": "^[0-9]+$"
807
+ }
808
+ }
809
+ ],
810
+ "responses": {
811
+ "200": {
812
+ "description": "A page of changes, or a stream of them.",
813
+ "content": {
814
+ "application/json": {
815
+ "schema": {
816
+ "$ref": "#/components/schemas/TimelinePage"
817
+ },
818
+ "examples": {
819
+ "live": {
820
+ "$ref": "#/components/examples/TimelinePageLive"
821
+ }
822
+ }
823
+ },
824
+ "text/event-stream": {
825
+ "schema": {
826
+ "type": "string",
827
+ "description": "Server-sent events. `event: rows` with `id: <next_after>` and a `TimelinePage` as `data`;\n`event: end` with a `TimelineEnd` as `data`; comment keepalives.\n"
828
+ },
829
+ "x-agentrun-sse": {
830
+ "rows": {
831
+ "$ref": "#/components/schemas/TimelinePage"
832
+ },
833
+ "end": {
834
+ "$ref": "#/components/schemas/TimelineEnd"
835
+ }
836
+ }
837
+ }
838
+ }
839
+ },
840
+ "400": {
841
+ "$ref": "#/components/responses/BadRequest"
842
+ },
843
+ "401": {
844
+ "$ref": "#/components/responses/Unauthenticated"
845
+ },
846
+ "404": {
847
+ "$ref": "#/components/responses/NotFound"
848
+ },
849
+ "429": {
850
+ "$ref": "#/components/responses/RateLimited"
851
+ },
852
+ "500": {
853
+ "$ref": "#/components/responses/Internal"
854
+ },
855
+ "501": {
856
+ "$ref": "#/components/responses/Unsupported"
857
+ }
858
+ }
859
+ }
860
+ },
861
+ "/runs/{run_id}/messages": {
862
+ "parameters": [
863
+ {
864
+ "$ref": "#/components/parameters/RunId"
865
+ }
866
+ ],
867
+ "post": {
868
+ "operationId": "sendMessage",
869
+ "tags": [
870
+ "runs"
871
+ ],
872
+ "summary": "Send the run a message",
873
+ "description": "One route for every message a person or a program sends a run. The run's state decides what it does, and\nthe answer says which (`mode`):\n\n| Run | `mode` | What happens |\n| --- | --- | --- |\n| `queued`, or `working` with state `working` | `steer` | Lands after the current tool round. |\n| `input_required` with state `waiting` | `answer` | Answers what the agent asked; the run goes back to work. |\n| `input_required` with state `idle` (stopped), `working` with state `idle` (parked), `completed` | `follow_up` | Starts a new turn of the same run, under the same cap. |\n| `failed`, `cancelled` | none | `409 not_continuable`. |\n\nEach mode is gated by `features.messages`: an off mode answers `501 unsupported_here` naming\n`messages.<mode>`. A steer to a workflow run where `features.messages.steer_workflow_runs` is false answers\n`501 unsupported_here` naming `messages.steer_workflow_runs`. A local run whose sign-ins already went back to\nits agent is finished: `409 not_continuable`.\n",
874
+ "x-agentrun-backends": [
875
+ "hosted",
876
+ "local"
877
+ ],
878
+ "parameters": [
879
+ {
880
+ "$ref": "#/components/parameters/IdempotencyKey"
881
+ }
882
+ ],
883
+ "requestBody": {
884
+ "required": true,
885
+ "content": {
886
+ "application/json": {
887
+ "schema": {
888
+ "$ref": "#/components/schemas/MessageCreate"
889
+ }
890
+ }
891
+ }
892
+ },
893
+ "responses": {
894
+ "202": {
895
+ "description": "The message is accepted; the timeline shows it applied.",
896
+ "headers": {
897
+ "Idempotent-Replayed": {
898
+ "$ref": "#/components/headers/IdempotentReplayed"
899
+ }
900
+ },
901
+ "content": {
902
+ "application/json": {
903
+ "schema": {
904
+ "$ref": "#/components/schemas/MessageResult"
905
+ }
906
+ }
907
+ }
908
+ },
909
+ "400": {
910
+ "$ref": "#/components/responses/BadRequest"
911
+ },
912
+ "401": {
913
+ "$ref": "#/components/responses/Unauthenticated"
914
+ },
915
+ "402": {
916
+ "$ref": "#/components/responses/PaymentRequired"
917
+ },
918
+ "404": {
919
+ "$ref": "#/components/responses/NotFound"
920
+ },
921
+ "409": {
922
+ "$ref": "#/components/responses/Conflict"
923
+ },
924
+ "422": {
925
+ "$ref": "#/components/responses/Unprocessable"
926
+ },
927
+ "429": {
928
+ "$ref": "#/components/responses/RateLimited"
929
+ },
930
+ "500": {
931
+ "$ref": "#/components/responses/Internal"
932
+ },
933
+ "501": {
934
+ "$ref": "#/components/responses/Unsupported"
935
+ },
936
+ "503": {
937
+ "$ref": "#/components/responses/Unavailable"
938
+ }
939
+ }
940
+ }
941
+ },
942
+ "/runs/{run_id}/stop": {
943
+ "parameters": [
944
+ {
945
+ "$ref": "#/components/parameters/RunId"
946
+ }
947
+ ],
948
+ "post": {
949
+ "operationId": "stopRun",
950
+ "tags": [
951
+ "runs"
952
+ ],
953
+ "summary": "End the current turn",
954
+ "description": "Aborts the turn that is running. The run stays open: its status becomes `input_required` with state `idle`,\nand a message within `limits.input_wait_s` starts a new turn (after that the run ends `input_expired`). Stopping a run with no turn running changes nothing and answers\n`stopped: false`.\n",
955
+ "x-agentrun-backends": [
956
+ "hosted",
957
+ "local"
958
+ ],
959
+ "x-agentrun-capability": "features.runs.stop",
960
+ "responses": {
961
+ "200": {
962
+ "description": "Whether a turn was stopped, and the run now.",
963
+ "content": {
964
+ "application/json": {
965
+ "schema": {
966
+ "$ref": "#/components/schemas/StopResult"
967
+ }
968
+ }
969
+ }
970
+ },
971
+ "401": {
972
+ "$ref": "#/components/responses/Unauthenticated"
973
+ },
974
+ "404": {
975
+ "$ref": "#/components/responses/NotFound"
976
+ },
977
+ "429": {
978
+ "$ref": "#/components/responses/RateLimited"
979
+ },
980
+ "500": {
981
+ "$ref": "#/components/responses/Internal"
982
+ },
983
+ "501": {
984
+ "$ref": "#/components/responses/Unsupported"
985
+ },
986
+ "503": {
987
+ "$ref": "#/components/responses/Unavailable"
988
+ }
989
+ }
990
+ }
991
+ },
992
+ "/runs/{run_id}/cancel": {
993
+ "parameters": [
994
+ {
995
+ "$ref": "#/components/parameters/RunId"
996
+ }
997
+ ],
998
+ "post": {
999
+ "operationId": "cancelRun",
1000
+ "tags": [
1001
+ "runs"
1002
+ ],
1003
+ "summary": "End the run",
1004
+ "description": "Records the intent to cancel and signals the run. The run reaches `cancelled` when it has stopped; read the\nstatus for the final truth. Cancelling a run that already ended answers `already_terminal: true`.\nUsage consumed before the cancel is billed.\n",
1005
+ "x-agentrun-backends": [
1006
+ "hosted",
1007
+ "local"
1008
+ ],
1009
+ "x-agentrun-capability": "features.runs.cancel",
1010
+ "responses": {
1011
+ "202": {
1012
+ "description": "The cancel intent.",
1013
+ "content": {
1014
+ "application/json": {
1015
+ "schema": {
1016
+ "$ref": "#/components/schemas/CancelResult"
1017
+ }
1018
+ }
1019
+ }
1020
+ },
1021
+ "401": {
1022
+ "$ref": "#/components/responses/Unauthenticated"
1023
+ },
1024
+ "404": {
1025
+ "$ref": "#/components/responses/NotFound"
1026
+ },
1027
+ "429": {
1028
+ "$ref": "#/components/responses/RateLimited"
1029
+ },
1030
+ "500": {
1031
+ "$ref": "#/components/responses/Internal"
1032
+ },
1033
+ "501": {
1034
+ "$ref": "#/components/responses/Unsupported"
1035
+ },
1036
+ "503": {
1037
+ "$ref": "#/components/responses/Unavailable"
1038
+ }
1039
+ }
1040
+ }
1041
+ },
1042
+ "/runs/{run_id}/kill": {
1043
+ "parameters": [
1044
+ {
1045
+ "$ref": "#/components/parameters/RunId"
1046
+ }
1047
+ ],
1048
+ "post": {
1049
+ "operationId": "killRun",
1050
+ "tags": [
1051
+ "local"
1052
+ ],
1053
+ "summary": "Kill the run's process; the run resumes on the same directory",
1054
+ "description": "Local only. The server kills the run's process group and starts it again on the same run directory, where\nthe run resumes at the next generation. Hosted answers `501 unsupported_here` (`runs.kill`).\n",
1055
+ "x-agentrun-backends": [
1056
+ "local"
1057
+ ],
1058
+ "x-agentrun-capability": "features.runs.kill",
1059
+ "requestBody": {
1060
+ "required": false,
1061
+ "content": {
1062
+ "application/json": {
1063
+ "schema": {
1064
+ "$ref": "#/components/schemas/KillRequest"
1065
+ }
1066
+ }
1067
+ }
1068
+ },
1069
+ "responses": {
1070
+ "200": {
1071
+ "description": "The run was killed and started again.",
1072
+ "content": {
1073
+ "application/json": {
1074
+ "schema": {
1075
+ "$ref": "#/components/schemas/KillResult"
1076
+ }
1077
+ }
1078
+ }
1079
+ },
1080
+ "401": {
1081
+ "$ref": "#/components/responses/Unauthenticated"
1082
+ },
1083
+ "404": {
1084
+ "$ref": "#/components/responses/NotFound"
1085
+ },
1086
+ "409": {
1087
+ "$ref": "#/components/responses/Conflict"
1088
+ },
1089
+ "500": {
1090
+ "$ref": "#/components/responses/Internal"
1091
+ },
1092
+ "501": {
1093
+ "$ref": "#/components/responses/Unsupported"
1094
+ }
1095
+ }
1096
+ }
1097
+ },
1098
+ "/runs/{run_id}/files": {
1099
+ "parameters": [
1100
+ {
1101
+ "$ref": "#/components/parameters/RunId"
1102
+ }
1103
+ ],
1104
+ "get": {
1105
+ "operationId": "listRunFiles",
1106
+ "tags": [
1107
+ "runs"
1108
+ ],
1109
+ "summary": "The files the run wrote",
1110
+ "description": "The run's workspace files. Never the run store: a path with any segment that starts with `.` is not listed\n(`.agentrun/`, `.agents/skills/`). `complete: false` while the backend still syncs files: hosted lists a\nrun's files after its terminal push, so during a run it shows only inputs and earlier turns.\n",
1111
+ "x-agentrun-backends": [
1112
+ "hosted",
1113
+ "local"
1114
+ ],
1115
+ "responses": {
1116
+ "200": {
1117
+ "description": "The files.",
1118
+ "content": {
1119
+ "application/json": {
1120
+ "schema": {
1121
+ "$ref": "#/components/schemas/RunFileList"
1122
+ }
1123
+ }
1124
+ }
1125
+ },
1126
+ "401": {
1127
+ "$ref": "#/components/responses/Unauthenticated"
1128
+ },
1129
+ "404": {
1130
+ "$ref": "#/components/responses/NotFound"
1131
+ },
1132
+ "429": {
1133
+ "$ref": "#/components/responses/RateLimited"
1134
+ },
1135
+ "500": {
1136
+ "$ref": "#/components/responses/Internal"
1137
+ }
1138
+ }
1139
+ }
1140
+ },
1141
+ "/runs/{run_id}/files/{path}": {
1142
+ "parameters": [
1143
+ {
1144
+ "$ref": "#/components/parameters/RunId"
1145
+ },
1146
+ {
1147
+ "$ref": "#/components/parameters/FilePath"
1148
+ }
1149
+ ],
1150
+ "get": {
1151
+ "operationId": "readRunFile",
1152
+ "tags": [
1153
+ "runs"
1154
+ ],
1155
+ "summary": "One file's raw bytes",
1156
+ "description": "Raw bytes with the file's content type, never the run store. A path with an empty, `.` or `..` segment, a\nbackslash, a NUL or a leading `/` is `400 invalid_file_path`. A path with any segment that starts with `.`\nis `403 system_file_forbidden`. A symlink on the way is `404 not_found`.\n\nEvery answer carries `X-Content-Type-Options: nosniff`. HTML carries\n`Content-Security-Policy: default-src 'none'; style-src 'unsafe-inline'; img-src data:; sandbox; form-action 'none'`.\n`?download=1` forces `Content-Disposition: attachment`. `Range` is honoured when `features.files.range`.\n",
1157
+ "x-agentrun-backends": [
1158
+ "hosted",
1159
+ "local"
1160
+ ],
1161
+ "parameters": [
1162
+ {
1163
+ "name": "download",
1164
+ "in": "query",
1165
+ "required": false,
1166
+ "description": "`1` forces a download.",
1167
+ "schema": {
1168
+ "type": "integer",
1169
+ "enum": [
1170
+ 0,
1171
+ 1
1172
+ ],
1173
+ "default": 0
1174
+ }
1175
+ },
1176
+ {
1177
+ "name": "Range",
1178
+ "in": "header",
1179
+ "required": false,
1180
+ "description": "One byte range, `bytes=<start>-<end>`.",
1181
+ "schema": {
1182
+ "type": "string"
1183
+ }
1184
+ }
1185
+ ],
1186
+ "responses": {
1187
+ "200": {
1188
+ "description": "The whole file.",
1189
+ "headers": {
1190
+ "Content-Disposition": {
1191
+ "$ref": "#/components/headers/ContentDisposition"
1192
+ },
1193
+ "X-Content-Type-Options": {
1194
+ "$ref": "#/components/headers/NoSniff"
1195
+ }
1196
+ },
1197
+ "content": {
1198
+ "application/octet-stream": {
1199
+ "schema": {
1200
+ "type": "string",
1201
+ "contentMediaType": "application/octet-stream"
1202
+ }
1203
+ },
1204
+ "*/*": {
1205
+ "schema": {
1206
+ "type": "string"
1207
+ }
1208
+ }
1209
+ }
1210
+ },
1211
+ "206": {
1212
+ "description": "The requested byte range.",
1213
+ "headers": {
1214
+ "Content-Range": {
1215
+ "$ref": "#/components/headers/ContentRange"
1216
+ },
1217
+ "X-Content-Type-Options": {
1218
+ "$ref": "#/components/headers/NoSniff"
1219
+ }
1220
+ },
1221
+ "content": {
1222
+ "application/octet-stream": {
1223
+ "schema": {
1224
+ "type": "string",
1225
+ "contentMediaType": "application/octet-stream"
1226
+ }
1227
+ },
1228
+ "*/*": {
1229
+ "schema": {
1230
+ "type": "string"
1231
+ }
1232
+ }
1233
+ }
1234
+ },
1235
+ "400": {
1236
+ "$ref": "#/components/responses/BadRequest"
1237
+ },
1238
+ "401": {
1239
+ "$ref": "#/components/responses/Unauthenticated"
1240
+ },
1241
+ "403": {
1242
+ "$ref": "#/components/responses/Forbidden"
1243
+ },
1244
+ "404": {
1245
+ "$ref": "#/components/responses/NotFound"
1246
+ },
1247
+ "416": {
1248
+ "$ref": "#/components/responses/RangeNotSatisfiable"
1249
+ },
1250
+ "429": {
1251
+ "$ref": "#/components/responses/RateLimited"
1252
+ },
1253
+ "500": {
1254
+ "$ref": "#/components/responses/Internal"
1255
+ }
1256
+ }
1257
+ }
1258
+ },
1259
+ "/files": {
1260
+ "post": {
1261
+ "operationId": "createFile",
1262
+ "tags": [
1263
+ "files"
1264
+ ],
1265
+ "summary": "Reserve an upload",
1266
+ "description": "Reserves a file for a run's input and answers where to send its bytes (`upload`). The file is `pending`\nuntil its bytes arrive. Its `path` is relative and keeps its folders: a run sees the file at the same path\non both backends.\n\nThe upload URL is this server's `PUT /files/{file_id}`, or a presigned URL on hosted. A client sends its\nbearer credential only when the URL's origin is the API's own.\n",
1267
+ "x-agentrun-backends": [
1268
+ "hosted",
1269
+ "local"
1270
+ ],
1271
+ "x-agentrun-capability": "features.files.upload",
1272
+ "parameters": [
1273
+ {
1274
+ "$ref": "#/components/parameters/IdempotencyKey"
1275
+ }
1276
+ ],
1277
+ "requestBody": {
1278
+ "required": true,
1279
+ "content": {
1280
+ "application/json": {
1281
+ "schema": {
1282
+ "$ref": "#/components/schemas/FileCreate"
1283
+ }
1284
+ }
1285
+ }
1286
+ },
1287
+ "responses": {
1288
+ "201": {
1289
+ "description": "The reserved file and where to send its bytes.",
1290
+ "headers": {
1291
+ "Idempotent-Replayed": {
1292
+ "$ref": "#/components/headers/IdempotentReplayed"
1293
+ }
1294
+ },
1295
+ "content": {
1296
+ "application/json": {
1297
+ "schema": {
1298
+ "$ref": "#/components/schemas/FileUpload"
1299
+ }
1300
+ }
1301
+ }
1302
+ },
1303
+ "400": {
1304
+ "$ref": "#/components/responses/BadRequest"
1305
+ },
1306
+ "401": {
1307
+ "$ref": "#/components/responses/Unauthenticated"
1308
+ },
1309
+ "409": {
1310
+ "$ref": "#/components/responses/Conflict"
1311
+ },
1312
+ "413": {
1313
+ "$ref": "#/components/responses/PayloadTooLarge"
1314
+ },
1315
+ "422": {
1316
+ "$ref": "#/components/responses/Unprocessable"
1317
+ },
1318
+ "429": {
1319
+ "$ref": "#/components/responses/RateLimited"
1320
+ },
1321
+ "500": {
1322
+ "$ref": "#/components/responses/Internal"
1323
+ },
1324
+ "501": {
1325
+ "$ref": "#/components/responses/Unsupported"
1326
+ }
1327
+ }
1328
+ }
1329
+ },
1330
+ "/files/{file_id}": {
1331
+ "parameters": [
1332
+ {
1333
+ "$ref": "#/components/parameters/FileId"
1334
+ }
1335
+ ],
1336
+ "put": {
1337
+ "operationId": "uploadFile",
1338
+ "tags": [
1339
+ "files"
1340
+ ],
1341
+ "summary": "Send a reserved file's bytes",
1342
+ "description": "The body is the file's bytes. Its length must equal the reserved `size_bytes`, and its SHA-256 the reserved\n`sha256` when one was given (`422 input_invalid`). Sending the same bytes again is a no-op.\n",
1343
+ "x-agentrun-backends": [
1344
+ "hosted",
1345
+ "local"
1346
+ ],
1347
+ "x-agentrun-capability": "features.files.upload",
1348
+ "requestBody": {
1349
+ "required": true,
1350
+ "content": {
1351
+ "application/octet-stream": {
1352
+ "schema": {
1353
+ "type": "string",
1354
+ "contentMediaType": "application/octet-stream"
1355
+ }
1356
+ }
1357
+ }
1358
+ },
1359
+ "responses": {
1360
+ "200": {
1361
+ "description": "The file, ready.",
1362
+ "content": {
1363
+ "application/json": {
1364
+ "schema": {
1365
+ "$ref": "#/components/schemas/File"
1366
+ }
1367
+ }
1368
+ }
1369
+ },
1370
+ "400": {
1371
+ "$ref": "#/components/responses/BadRequest"
1372
+ },
1373
+ "401": {
1374
+ "$ref": "#/components/responses/Unauthenticated"
1375
+ },
1376
+ "404": {
1377
+ "$ref": "#/components/responses/NotFound"
1378
+ },
1379
+ "409": {
1380
+ "$ref": "#/components/responses/Conflict"
1381
+ },
1382
+ "413": {
1383
+ "$ref": "#/components/responses/PayloadTooLarge"
1384
+ },
1385
+ "422": {
1386
+ "$ref": "#/components/responses/Unprocessable"
1387
+ },
1388
+ "429": {
1389
+ "$ref": "#/components/responses/RateLimited"
1390
+ },
1391
+ "500": {
1392
+ "$ref": "#/components/responses/Internal"
1393
+ },
1394
+ "501": {
1395
+ "$ref": "#/components/responses/Unsupported"
1396
+ }
1397
+ }
1398
+ }
1399
+ },
1400
+ "/quotes": {
1401
+ "post": {
1402
+ "operationId": "createQuote",
1403
+ "tags": [
1404
+ "billing"
1405
+ ],
1406
+ "summary": "Price a run before it starts",
1407
+ "description": "The full price of one run, before anything is charged: a hold at the start, settled to metered usage at the\nend, never above `max_cost_usd`. Name the `quote_id` on `POST /agents/{agent_id}/runs` to run at these terms.\nLocal answers `501 unsupported_here` (`quotes`); a local run honours `max_cost_usd` with a meter instead.\n",
1408
+ "x-agentrun-backends": [
1409
+ "hosted"
1410
+ ],
1411
+ "x-agentrun-capability": "features.quotes",
1412
+ "requestBody": {
1413
+ "required": true,
1414
+ "content": {
1415
+ "application/json": {
1416
+ "schema": {
1417
+ "$ref": "#/components/schemas/QuoteCreate"
1418
+ }
1419
+ }
1420
+ }
1421
+ },
1422
+ "responses": {
1423
+ "200": {
1424
+ "description": "The quote.",
1425
+ "content": {
1426
+ "application/json": {
1427
+ "schema": {
1428
+ "$ref": "#/components/schemas/Quote"
1429
+ }
1430
+ }
1431
+ }
1432
+ },
1433
+ "400": {
1434
+ "$ref": "#/components/responses/BadRequest"
1435
+ },
1436
+ "401": {
1437
+ "$ref": "#/components/responses/Unauthenticated"
1438
+ },
1439
+ "404": {
1440
+ "$ref": "#/components/responses/NotFound"
1441
+ },
1442
+ "409": {
1443
+ "$ref": "#/components/responses/Conflict"
1444
+ },
1445
+ "422": {
1446
+ "$ref": "#/components/responses/Unprocessable"
1447
+ },
1448
+ "429": {
1449
+ "$ref": "#/components/responses/RateLimited"
1450
+ },
1451
+ "500": {
1452
+ "$ref": "#/components/responses/Internal"
1453
+ },
1454
+ "501": {
1455
+ "$ref": "#/components/responses/Unsupported"
1456
+ }
1457
+ }
1458
+ }
1459
+ },
1460
+ "/usage": {
1461
+ "get": {
1462
+ "operationId": "getUsage",
1463
+ "tags": [
1464
+ "billing"
1465
+ ],
1466
+ "summary": "Usage by meter over a period",
1467
+ "description": "Hosted: what was charged, per meter, at the rate card, with the account's cap and balance. Local: the model\ncost the runs report, as an estimate, with no account.\n",
1468
+ "x-agentrun-backends": [
1469
+ "hosted",
1470
+ "local"
1471
+ ],
1472
+ "parameters": [
1473
+ {
1474
+ "name": "from",
1475
+ "in": "query",
1476
+ "required": false,
1477
+ "description": "Start of the period, inclusive. Default the start of this calendar month, UTC.",
1478
+ "schema": {
1479
+ "type": "string",
1480
+ "format": "date-time"
1481
+ }
1482
+ },
1483
+ {
1484
+ "name": "to",
1485
+ "in": "query",
1486
+ "required": false,
1487
+ "description": "End of the period, exclusive. Default now.",
1488
+ "schema": {
1489
+ "type": "string",
1490
+ "format": "date-time"
1491
+ }
1492
+ },
1493
+ {
1494
+ "name": "group_by",
1495
+ "in": "query",
1496
+ "required": false,
1497
+ "schema": {
1498
+ "type": "string",
1499
+ "enum": [
1500
+ "meter",
1501
+ "agent",
1502
+ "key",
1503
+ "day",
1504
+ "region"
1505
+ ],
1506
+ "default": "meter"
1507
+ }
1508
+ }
1509
+ ],
1510
+ "responses": {
1511
+ "200": {
1512
+ "description": "The usage.",
1513
+ "content": {
1514
+ "application/json": {
1515
+ "schema": {
1516
+ "$ref": "#/components/schemas/Usage"
1517
+ }
1518
+ }
1519
+ }
1520
+ },
1521
+ "400": {
1522
+ "$ref": "#/components/responses/BadRequest"
1523
+ },
1524
+ "401": {
1525
+ "$ref": "#/components/responses/Unauthenticated"
1526
+ },
1527
+ "429": {
1528
+ "$ref": "#/components/responses/RateLimited"
1529
+ },
1530
+ "500": {
1531
+ "$ref": "#/components/responses/Internal"
1532
+ }
1533
+ }
1534
+ }
1535
+ }
1536
+ },
1537
+ "components": {
1538
+ "x-agentrun-pack": {
1539
+ "description": "The members a packed home may hold, in this order: `manifest.json` first, then `agent.sqlite`, then the runs.\nMember types are regular files and directories only. Anything that does not match `member_pattern` is refused\nby the import (check `format`) and never written by an export.\n",
1540
+ "first_member": "manifest.json",
1541
+ "member_types": [
1542
+ "file",
1543
+ "directory"
1544
+ ],
1545
+ "member_pattern": "^(?:manifest\\.json|agent\\.sqlite|runs/|runs/[A-Za-z0-9][A-Za-z0-9._-]{0,127}/|runs/[A-Za-z0-9][A-Za-z0-9._-]{0,127}/store/|runs/[A-Za-z0-9][A-Za-z0-9._-]{0,127}/store/run\\.sqlite|runs/[A-Za-z0-9][A-Za-z0-9._-]{0,127}/work/|runs/[A-Za-z0-9][A-Za-z0-9._-]{0,127}/work/(?!\\.)[^/\\\\\\u0000]+(?:/(?!\\.\\.?(?:/|$))[^/\\\\\\u0000]+)*/?)$",
1546
+ "never": [
1547
+ "chrome/",
1548
+ "repo/",
1549
+ "owner.lock",
1550
+ "runs/<run_id>/run.json",
1551
+ "runs/<run_id>/live.json",
1552
+ "runs/<run_id>/tmp/",
1553
+ "runs/<run_id>/work/.agents/"
1554
+ ]
1555
+ },
1556
+ "securitySchemes": {
1557
+ "bearer": {
1558
+ "type": "http",
1559
+ "scheme": "bearer",
1560
+ "description": "Hosted: an Agentrun API key (`ar_live_` prefix; `parcha-` keys stay valid) or a console OAuth token.\nLocal: the token `agentrun-serve` writes to its data directory, mode 0600.\n"
1561
+ }
1562
+ },
1563
+ "parameters": {
1564
+ "AgentId": {
1565
+ "name": "agent_id",
1566
+ "in": "path",
1567
+ "required": true,
1568
+ "description": "The agent's id, the definition's `id`.",
1569
+ "schema": {
1570
+ "$ref": "#/components/schemas/Id"
1571
+ }
1572
+ },
1573
+ "RunId": {
1574
+ "name": "run_id",
1575
+ "in": "path",
1576
+ "required": true,
1577
+ "schema": {
1578
+ "$ref": "#/components/schemas/Id"
1579
+ }
1580
+ },
1581
+ "FileId": {
1582
+ "name": "file_id",
1583
+ "in": "path",
1584
+ "required": true,
1585
+ "schema": {
1586
+ "$ref": "#/components/schemas/Id"
1587
+ }
1588
+ },
1589
+ "FilePath": {
1590
+ "name": "path",
1591
+ "in": "path",
1592
+ "required": true,
1593
+ "description": "A path relative to the run's workspace. It may hold `/` between segments, sent as is; each segment is\npercent-encoded. The server matches the rest of the URL after `/files/`.\n",
1594
+ "schema": {
1595
+ "type": "string",
1596
+ "minLength": 1,
1597
+ "maxLength": 1024
1598
+ }
1599
+ },
1600
+ "IdempotencyKey": {
1601
+ "name": "Idempotency-Key",
1602
+ "in": "header",
1603
+ "required": false,
1604
+ "description": "Makes a create safe to retry. The same key and body within `limits.idempotency_ttl_s` replays the first\nanswer with `Idempotent-Replayed: true`; another body is `409 idempotency_mismatch`; a retry while the first\nis in flight is `409 idempotency_in_progress`. Keys are scoped to the credential's account and the route.\n",
1605
+ "schema": {
1606
+ "type": "string",
1607
+ "minLength": 1,
1608
+ "maxLength": 255
1609
+ }
1610
+ },
1611
+ "Limit": {
1612
+ "name": "limit",
1613
+ "in": "query",
1614
+ "required": false,
1615
+ "schema": {
1616
+ "type": "integer",
1617
+ "minimum": 1,
1618
+ "maximum": 100,
1619
+ "default": 20
1620
+ }
1621
+ },
1622
+ "Cursor": {
1623
+ "name": "cursor",
1624
+ "in": "query",
1625
+ "required": false,
1626
+ "description": "`next_cursor` from the previous page.",
1627
+ "schema": {
1628
+ "type": "string",
1629
+ "minLength": 1,
1630
+ "maxLength": 1024
1631
+ }
1632
+ },
1633
+ "Check": {
1634
+ "name": "check",
1635
+ "in": "query",
1636
+ "required": false,
1637
+ "description": "`1`: run the target's checks on a manifest and write nothing.",
1638
+ "schema": {
1639
+ "type": "integer",
1640
+ "enum": [
1641
+ 0,
1642
+ 1
1643
+ ],
1644
+ "default": 0
1645
+ }
1646
+ }
1647
+ },
1648
+ "headers": {
1649
+ "Location": {
1650
+ "description": "The new resource's URL.",
1651
+ "schema": {
1652
+ "type": "string"
1653
+ }
1654
+ },
1655
+ "IdempotentReplayed": {
1656
+ "description": "`true` when this answer replays an earlier request with the same `Idempotency-Key`.",
1657
+ "schema": {
1658
+ "type": "string",
1659
+ "enum": [
1660
+ "true"
1661
+ ]
1662
+ }
1663
+ },
1664
+ "HomeETag": {
1665
+ "description": "The home's revision (`homeRevision`). Changes with every write to `agent.sqlite`. `If-Match` on `PUT .../home` and `PUT .../definition` takes it.",
1666
+ "schema": {
1667
+ "type": "string"
1668
+ }
1669
+ },
1670
+ "RetryAfter": {
1671
+ "description": "Seconds to wait before retrying.",
1672
+ "schema": {
1673
+ "type": "integer",
1674
+ "minimum": 0
1675
+ }
1676
+ },
1677
+ "RequestId": {
1678
+ "description": "This request's id, also in `error.request_id`.",
1679
+ "schema": {
1680
+ "type": "string"
1681
+ }
1682
+ },
1683
+ "ContentDisposition": {
1684
+ "description": "`attachment; filename=\"...\"` for downloads and non-preview types.",
1685
+ "schema": {
1686
+ "type": "string"
1687
+ }
1688
+ },
1689
+ "ContentRange": {
1690
+ "description": "`bytes <start>-<end>/<size>`.",
1691
+ "schema": {
1692
+ "type": "string"
1693
+ }
1694
+ },
1695
+ "NoSniff": {
1696
+ "description": "Always `nosniff`.",
1697
+ "schema": {
1698
+ "type": "string",
1699
+ "const": "nosniff"
1700
+ }
1701
+ }
1702
+ },
1703
+ "responses": {
1704
+ "BadRequest": {
1705
+ "description": "`bad_request` (the body is not JSON, or a parameter is malformed) or `invalid_file_path`.",
1706
+ "headers": {
1707
+ "X-Request-Id": {
1708
+ "$ref": "#/components/headers/RequestId"
1709
+ }
1710
+ },
1711
+ "content": {
1712
+ "application/json": {
1713
+ "schema": {
1714
+ "$ref": "#/components/schemas/Error"
1715
+ }
1716
+ }
1717
+ }
1718
+ },
1719
+ "Unauthenticated": {
1720
+ "description": "`unauthenticated`: no credential, or one this backend does not accept.",
1721
+ "headers": {
1722
+ "X-Request-Id": {
1723
+ "$ref": "#/components/headers/RequestId"
1724
+ }
1725
+ },
1726
+ "content": {
1727
+ "application/json": {
1728
+ "schema": {
1729
+ "$ref": "#/components/schemas/Error"
1730
+ }
1731
+ }
1732
+ }
1733
+ },
1734
+ "PaymentRequired": {
1735
+ "description": "`insufficient_credits` or `spend_cap_reached`. `next_action` says what raises the authority.",
1736
+ "headers": {
1737
+ "X-Request-Id": {
1738
+ "$ref": "#/components/headers/RequestId"
1739
+ }
1740
+ },
1741
+ "content": {
1742
+ "application/json": {
1743
+ "schema": {
1744
+ "$ref": "#/components/schemas/Error"
1745
+ },
1746
+ "examples": {
1747
+ "cap": {
1748
+ "$ref": "#/components/examples/ErrorSpendCap"
1749
+ }
1750
+ }
1751
+ }
1752
+ }
1753
+ },
1754
+ "Forbidden": {
1755
+ "description": "`forbidden` (the credential lacks the scope) or `system_file_forbidden`.",
1756
+ "headers": {
1757
+ "X-Request-Id": {
1758
+ "$ref": "#/components/headers/RequestId"
1759
+ }
1760
+ },
1761
+ "content": {
1762
+ "application/json": {
1763
+ "schema": {
1764
+ "$ref": "#/components/schemas/Error"
1765
+ }
1766
+ }
1767
+ }
1768
+ },
1769
+ "NotFound": {
1770
+ "description": "`not_found`. Another account's agent or run is not found, never forbidden.",
1771
+ "headers": {
1772
+ "X-Request-Id": {
1773
+ "$ref": "#/components/headers/RequestId"
1774
+ }
1775
+ },
1776
+ "content": {
1777
+ "application/json": {
1778
+ "schema": {
1779
+ "$ref": "#/components/schemas/Error"
1780
+ }
1781
+ }
1782
+ }
1783
+ },
1784
+ "Conflict": {
1785
+ "description": "`agent_exists`, `agent_not_runnable`, `home_busy`, `idempotency_mismatch`, `idempotency_in_progress`,\n`not_continuable` or `quote_invalid`.\n",
1786
+ "headers": {
1787
+ "X-Request-Id": {
1788
+ "$ref": "#/components/headers/RequestId"
1789
+ }
1790
+ },
1791
+ "content": {
1792
+ "application/json": {
1793
+ "schema": {
1794
+ "$ref": "#/components/schemas/Error"
1795
+ },
1796
+ "examples": {
1797
+ "not_continuable": {
1798
+ "$ref": "#/components/examples/ErrorNotContinuable"
1799
+ }
1800
+ }
1801
+ }
1802
+ }
1803
+ },
1804
+ "PreconditionFailed": {
1805
+ "description": "`precondition_failed`: the `If-Match` home ETag is not current, or the home's source moved since it was read.",
1806
+ "headers": {
1807
+ "X-Request-Id": {
1808
+ "$ref": "#/components/headers/RequestId"
1809
+ }
1810
+ },
1811
+ "content": {
1812
+ "application/json": {
1813
+ "schema": {
1814
+ "$ref": "#/components/schemas/Error"
1815
+ }
1816
+ }
1817
+ }
1818
+ },
1819
+ "PayloadTooLarge": {
1820
+ "description": "`payload_too_large`: over a limit in `limits`, named in `details.limit`.",
1821
+ "headers": {
1822
+ "X-Request-Id": {
1823
+ "$ref": "#/components/headers/RequestId"
1824
+ }
1825
+ },
1826
+ "content": {
1827
+ "application/json": {
1828
+ "schema": {
1829
+ "$ref": "#/components/schemas/Error"
1830
+ }
1831
+ }
1832
+ }
1833
+ },
1834
+ "UnsupportedMediaType": {
1835
+ "description": "`unsupported_media_type`.",
1836
+ "headers": {
1837
+ "X-Request-Id": {
1838
+ "$ref": "#/components/headers/RequestId"
1839
+ }
1840
+ },
1841
+ "content": {
1842
+ "application/json": {
1843
+ "schema": {
1844
+ "$ref": "#/components/schemas/Error"
1845
+ }
1846
+ }
1847
+ }
1848
+ },
1849
+ "RangeNotSatisfiable": {
1850
+ "description": "`range_not_satisfiable`.",
1851
+ "headers": {
1852
+ "X-Request-Id": {
1853
+ "$ref": "#/components/headers/RequestId"
1854
+ }
1855
+ },
1856
+ "content": {
1857
+ "application/json": {
1858
+ "schema": {
1859
+ "$ref": "#/components/schemas/Error"
1860
+ }
1861
+ }
1862
+ }
1863
+ },
1864
+ "Unprocessable": {
1865
+ "description": "`input_invalid` (with `fields`) or `home_check_failed` (with `checks`).",
1866
+ "headers": {
1867
+ "X-Request-Id": {
1868
+ "$ref": "#/components/headers/RequestId"
1869
+ }
1870
+ },
1871
+ "content": {
1872
+ "application/json": {
1873
+ "schema": {
1874
+ "$ref": "#/components/schemas/Error"
1875
+ },
1876
+ "examples": {
1877
+ "input": {
1878
+ "$ref": "#/components/examples/ErrorInputInvalid"
1879
+ }
1880
+ }
1881
+ }
1882
+ }
1883
+ },
1884
+ "RateLimited": {
1885
+ "description": "`rate_limited`.",
1886
+ "headers": {
1887
+ "Retry-After": {
1888
+ "$ref": "#/components/headers/RetryAfter"
1889
+ },
1890
+ "X-Request-Id": {
1891
+ "$ref": "#/components/headers/RequestId"
1892
+ }
1893
+ },
1894
+ "content": {
1895
+ "application/json": {
1896
+ "schema": {
1897
+ "$ref": "#/components/schemas/Error"
1898
+ }
1899
+ }
1900
+ }
1901
+ },
1902
+ "Internal": {
1903
+ "description": "`internal`.",
1904
+ "headers": {
1905
+ "X-Request-Id": {
1906
+ "$ref": "#/components/headers/RequestId"
1907
+ }
1908
+ },
1909
+ "content": {
1910
+ "application/json": {
1911
+ "schema": {
1912
+ "$ref": "#/components/schemas/Error"
1913
+ }
1914
+ }
1915
+ }
1916
+ },
1917
+ "Unsupported": {
1918
+ "description": "`unsupported_here`: this backend does not offer the feature named in `capability`.",
1919
+ "headers": {
1920
+ "X-Request-Id": {
1921
+ "$ref": "#/components/headers/RequestId"
1922
+ }
1923
+ },
1924
+ "content": {
1925
+ "application/json": {
1926
+ "schema": {
1927
+ "$ref": "#/components/schemas/Error"
1928
+ },
1929
+ "examples": {
1930
+ "quotes_local": {
1931
+ "$ref": "#/components/examples/ErrorUnsupported"
1932
+ }
1933
+ }
1934
+ }
1935
+ }
1936
+ },
1937
+ "Unavailable": {
1938
+ "description": "`unavailable`: try again after `Retry-After`.",
1939
+ "headers": {
1940
+ "Retry-After": {
1941
+ "$ref": "#/components/headers/RetryAfter"
1942
+ },
1943
+ "X-Request-Id": {
1944
+ "$ref": "#/components/headers/RequestId"
1945
+ }
1946
+ },
1947
+ "content": {
1948
+ "application/json": {
1949
+ "schema": {
1950
+ "$ref": "#/components/schemas/Error"
1951
+ }
1952
+ }
1953
+ }
1954
+ }
1955
+ },
1956
+ "schemas": {
1957
+ "Id": {
1958
+ "type": "string",
1959
+ "description": "An id safe in a URL path segment. UUIDs, UUIDv7s and slugs like `site-reporter` all match.",
1960
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$"
1961
+ },
1962
+ "Timestamp": {
1963
+ "type": "string",
1964
+ "format": "date-time"
1965
+ },
1966
+ "Usd": {
1967
+ "type": "number",
1968
+ "minimum": 0,
1969
+ "description": "US dollars."
1970
+ },
1971
+ "JsonObject": {
1972
+ "type": "object",
1973
+ "additionalProperties": true
1974
+ },
1975
+ "Error": {
1976
+ "type": "object",
1977
+ "additionalProperties": false,
1978
+ "required": [
1979
+ "error"
1980
+ ],
1981
+ "properties": {
1982
+ "error": {
1983
+ "$ref": "#/components/schemas/ErrorBody"
1984
+ }
1985
+ }
1986
+ },
1987
+ "ErrorBody": {
1988
+ "type": "object",
1989
+ "additionalProperties": false,
1990
+ "required": [
1991
+ "code",
1992
+ "message",
1993
+ "retryable"
1994
+ ],
1995
+ "properties": {
1996
+ "code": {
1997
+ "$ref": "#/components/schemas/ErrorCode"
1998
+ },
1999
+ "message": {
2000
+ "type": "string",
2001
+ "description": "One plain sentence for a person. Never parse it."
2002
+ },
2003
+ "retryable": {
2004
+ "type": "boolean",
2005
+ "description": "The same request may succeed later, unchanged."
2006
+ },
2007
+ "next_action": {
2008
+ "$ref": "#/components/schemas/NextAction"
2009
+ },
2010
+ "request_id": {
2011
+ "type": "string"
2012
+ },
2013
+ "retry_after_ms": {
2014
+ "type": "integer",
2015
+ "minimum": 0
2016
+ },
2017
+ "capability": {
2018
+ "type": "string",
2019
+ "description": "`unsupported_here` only: the dotted path under `features` that is off, e.g. `quotes`, `messages.steer`."
2020
+ },
2021
+ "fields": {
2022
+ "type": "array",
2023
+ "description": "`input_invalid` only: each field that is missing or wrong.",
2024
+ "items": {
2025
+ "$ref": "#/components/schemas/InputIssue"
2026
+ }
2027
+ },
2028
+ "checks": {
2029
+ "type": "array",
2030
+ "description": "`home_check_failed` only: every check, failed ones included.",
2031
+ "items": {
2032
+ "$ref": "#/components/schemas/HomeCheck"
2033
+ }
2034
+ },
2035
+ "details": {
2036
+ "type": "object",
2037
+ "description": "The figures behind the refusal, e.g. `{cap_usd, used_usd, period, scope}` for `spend_cap_reached`.",
2038
+ "additionalProperties": true
2039
+ }
2040
+ }
2041
+ },
2042
+ "ErrorCode": {
2043
+ "type": "string",
2044
+ "description": "The closed list. Each code has one HTTP status:\n\n| Code | Status | Retryable |\n| --- | --- | --- |\n| `bad_request` | 400 | no |\n| `invalid_file_path` | 400 | no |\n| `unauthenticated` | 401 | no |\n| `insufficient_credits` | 402 | no |\n| `spend_cap_reached` | 402 | no |\n| `forbidden` | 403 | no |\n| `system_file_forbidden` | 403 | no |\n| `not_found` | 404 | no |\n| `method_not_allowed` | 405 | no |\n| `agent_exists` | 409 | no |\n| `agent_not_runnable` | 409 | no |\n| `home_busy` | 409 | yes |\n| `idempotency_mismatch` | 409 | no |\n| `idempotency_in_progress` | 409 | yes |\n| `not_continuable` | 409 | no |\n| `quote_invalid` | 409 | no |\n| `precondition_failed` | 412 | no |\n| `payload_too_large` | 413 | no |\n| `unsupported_media_type` | 415 | no |\n| `range_not_satisfiable` | 416 | no |\n| `input_invalid` | 422 | no |\n| `home_check_failed` | 422 | no |\n| `rate_limited` | 429 | yes |\n| `internal` | 500 | yes |\n| `unsupported_here` | 501 | no |\n| `unavailable` | 503 | yes |\n",
2045
+ "enum": [
2046
+ "bad_request",
2047
+ "invalid_file_path",
2048
+ "unauthenticated",
2049
+ "insufficient_credits",
2050
+ "spend_cap_reached",
2051
+ "forbidden",
2052
+ "system_file_forbidden",
2053
+ "not_found",
2054
+ "method_not_allowed",
2055
+ "agent_exists",
2056
+ "agent_not_runnable",
2057
+ "home_busy",
2058
+ "idempotency_mismatch",
2059
+ "idempotency_in_progress",
2060
+ "not_continuable",
2061
+ "quote_invalid",
2062
+ "precondition_failed",
2063
+ "payload_too_large",
2064
+ "unsupported_media_type",
2065
+ "range_not_satisfiable",
2066
+ "input_invalid",
2067
+ "home_check_failed",
2068
+ "rate_limited",
2069
+ "internal",
2070
+ "unsupported_here",
2071
+ "unavailable"
2072
+ ]
2073
+ },
2074
+ "NextAction": {
2075
+ "description": "The exact next step, so a client never infers the protocol. A request it can make, or a page a person opens.",
2076
+ "oneOf": [
2077
+ {
2078
+ "$ref": "#/components/schemas/RequestAction"
2079
+ },
2080
+ {
2081
+ "$ref": "#/components/schemas/PersonAction"
2082
+ }
2083
+ ],
2084
+ "discriminator": {
2085
+ "propertyName": "type"
2086
+ }
2087
+ },
2088
+ "RequestAction": {
2089
+ "type": "object",
2090
+ "additionalProperties": false,
2091
+ "required": [
2092
+ "type",
2093
+ "method",
2094
+ "path"
2095
+ ],
2096
+ "properties": {
2097
+ "type": {
2098
+ "type": "string",
2099
+ "const": "request"
2100
+ },
2101
+ "method": {
2102
+ "type": "string",
2103
+ "enum": [
2104
+ "GET",
2105
+ "POST",
2106
+ "PUT"
2107
+ ]
2108
+ },
2109
+ "path": {
2110
+ "type": "string",
2111
+ "description": "Relative to the server URL, starting with `/`, e.g. `/quotes`.",
2112
+ "pattern": "^/"
2113
+ },
2114
+ "body": {
2115
+ "type": "object",
2116
+ "description": "The arguments the server already knows.",
2117
+ "additionalProperties": true
2118
+ },
2119
+ "caller_supplies": {
2120
+ "type": "array",
2121
+ "description": "What the caller adds, e.g. a new `Idempotency-Key`.",
2122
+ "items": {
2123
+ "type": "string"
2124
+ }
2125
+ }
2126
+ }
2127
+ },
2128
+ "PersonAction": {
2129
+ "type": "object",
2130
+ "additionalProperties": false,
2131
+ "required": [
2132
+ "type",
2133
+ "url",
2134
+ "description"
2135
+ ],
2136
+ "properties": {
2137
+ "type": {
2138
+ "type": "string",
2139
+ "const": "person"
2140
+ },
2141
+ "url": {
2142
+ "type": "string",
2143
+ "format": "uri",
2144
+ "description": "A page a person opens, e.g. the console's limits page."
2145
+ },
2146
+ "description": {
2147
+ "type": "string"
2148
+ }
2149
+ }
2150
+ },
2151
+ "InputIssue": {
2152
+ "type": "object",
2153
+ "additionalProperties": false,
2154
+ "required": [
2155
+ "field",
2156
+ "reason",
2157
+ "message"
2158
+ ],
2159
+ "properties": {
2160
+ "field": {
2161
+ "type": "string",
2162
+ "description": "The path the caller writes to reach the value, e.g. `input.task` or `definition.model`."
2163
+ },
2164
+ "reason": {
2165
+ "type": "string",
2166
+ "enum": [
2167
+ "missing",
2168
+ "wrong_type",
2169
+ "not_allowed",
2170
+ "not_an_option",
2171
+ "too_short",
2172
+ "too_long",
2173
+ "too_few",
2174
+ "too_many",
2175
+ "bad_format",
2176
+ "duplicate",
2177
+ "invalid"
2178
+ ]
2179
+ },
2180
+ "expected": {
2181
+ "type": "string"
2182
+ },
2183
+ "message": {
2184
+ "type": "string"
2185
+ },
2186
+ "fix": {
2187
+ "type": "string",
2188
+ "description": "The exact change that makes the call valid."
2189
+ }
2190
+ }
2191
+ },
2192
+ "Capabilities": {
2193
+ "type": "object",
2194
+ "additionalProperties": false,
2195
+ "required": [
2196
+ "backend",
2197
+ "contract",
2198
+ "server",
2199
+ "runtimes",
2200
+ "features",
2201
+ "regions",
2202
+ "limits"
2203
+ ],
2204
+ "properties": {
2205
+ "backend": {
2206
+ "type": "string",
2207
+ "enum": [
2208
+ "hosted",
2209
+ "local"
2210
+ ]
2211
+ },
2212
+ "contract": {
2213
+ "type": "string",
2214
+ "description": "The contract this backend serves. This document is `agentrun.v2/0`.",
2215
+ "pattern": "^agentrun\\.v2/[0-9]+$"
2216
+ },
2217
+ "server": {
2218
+ "type": "object",
2219
+ "additionalProperties": false,
2220
+ "required": [
2221
+ "name",
2222
+ "version"
2223
+ ],
2224
+ "properties": {
2225
+ "name": {
2226
+ "type": "string",
2227
+ "description": "e.g. `api.agentrun.ai` or `@parcha/agentrun-serve`."
2228
+ },
2229
+ "version": {
2230
+ "type": "string"
2231
+ },
2232
+ "platform": {
2233
+ "type": "string",
2234
+ "description": "Local: the OS a run opens on today, e.g. `linux`."
2235
+ }
2236
+ }
2237
+ },
2238
+ "runtimes": {
2239
+ "type": "array",
2240
+ "description": "What runs a run here. Informational; a run never names one.",
2241
+ "items": {
2242
+ "type": "string"
2243
+ }
2244
+ },
2245
+ "models": {
2246
+ "type": "object",
2247
+ "description": "Where this backend's models come from. The definition names no model; the host binds it.",
2248
+ "additionalProperties": false,
2249
+ "required": [
2250
+ "source"
2251
+ ],
2252
+ "properties": {
2253
+ "source": {
2254
+ "type": "string",
2255
+ "enum": [
2256
+ "managed",
2257
+ "chatgpt",
2258
+ "env",
2259
+ "faux"
2260
+ ]
2261
+ },
2262
+ "default": {
2263
+ "type": [
2264
+ "string",
2265
+ "null"
2266
+ ],
2267
+ "description": "`provider/model` of the lead model, when one is fixed."
2268
+ }
2269
+ }
2270
+ },
2271
+ "features": {
2272
+ "$ref": "#/components/schemas/Features"
2273
+ },
2274
+ "regions": {
2275
+ "type": "array",
2276
+ "minItems": 1,
2277
+ "items": {
2278
+ "$ref": "#/components/schemas/Region"
2279
+ }
2280
+ },
2281
+ "limits": {
2282
+ "$ref": "#/components/schemas/Limits"
2283
+ }
2284
+ }
2285
+ },
2286
+ "Features": {
2287
+ "type": "object",
2288
+ "description": "Every flag is present, so a client never guesses. An off feature answers `501 unsupported_here`.",
2289
+ "additionalProperties": false,
2290
+ "required": [
2291
+ "agents",
2292
+ "home",
2293
+ "runs",
2294
+ "messages",
2295
+ "timeline",
2296
+ "files",
2297
+ "quotes",
2298
+ "usage",
2299
+ "efforts",
2300
+ "browser",
2301
+ "sign_ins",
2302
+ "vault",
2303
+ "query"
2304
+ ],
2305
+ "properties": {
2306
+ "agents": {
2307
+ "type": "object",
2308
+ "additionalProperties": false,
2309
+ "required": [
2310
+ "create",
2311
+ "list",
2312
+ "update"
2313
+ ],
2314
+ "properties": {
2315
+ "create": {
2316
+ "type": "boolean"
2317
+ },
2318
+ "update": {
2319
+ "type": "boolean",
2320
+ "description": "`PUT /agents/{agent_id}/definition`."
2321
+ },
2322
+ "list": {
2323
+ "type": "boolean"
2324
+ }
2325
+ }
2326
+ },
2327
+ "home": {
2328
+ "type": "object",
2329
+ "additionalProperties": false,
2330
+ "required": [
2331
+ "export",
2332
+ "import",
2333
+ "check"
2334
+ ],
2335
+ "properties": {
2336
+ "export": {
2337
+ "type": "boolean"
2338
+ },
2339
+ "import": {
2340
+ "type": "boolean"
2341
+ },
2342
+ "check": {
2343
+ "type": "boolean"
2344
+ }
2345
+ }
2346
+ },
2347
+ "runs": {
2348
+ "type": "object",
2349
+ "additionalProperties": false,
2350
+ "required": [
2351
+ "stop",
2352
+ "cancel",
2353
+ "kill"
2354
+ ],
2355
+ "properties": {
2356
+ "stop": {
2357
+ "type": "boolean"
2358
+ },
2359
+ "cancel": {
2360
+ "type": "boolean"
2361
+ },
2362
+ "kill": {
2363
+ "type": "boolean",
2364
+ "description": "Local only."
2365
+ }
2366
+ }
2367
+ },
2368
+ "messages": {
2369
+ "type": "object",
2370
+ "description": "Which modes `POST /runs/{run_id}/messages` takes here.",
2371
+ "additionalProperties": false,
2372
+ "required": [
2373
+ "steer",
2374
+ "answer",
2375
+ "follow_up",
2376
+ "steer_workflow_runs"
2377
+ ],
2378
+ "properties": {
2379
+ "steer": {
2380
+ "type": "boolean"
2381
+ },
2382
+ "answer": {
2383
+ "type": "boolean"
2384
+ },
2385
+ "follow_up": {
2386
+ "type": "boolean"
2387
+ },
2388
+ "steer_workflow_runs": {
2389
+ "type": "boolean",
2390
+ "description": "Whether a steer reaches a run of a definition with a `workflow`. Hosted false today."
2391
+ }
2392
+ }
2393
+ },
2394
+ "timeline": {
2395
+ "type": "object",
2396
+ "additionalProperties": false,
2397
+ "required": [
2398
+ "long_poll",
2399
+ "sse",
2400
+ "live_rows"
2401
+ ],
2402
+ "properties": {
2403
+ "long_poll": {
2404
+ "type": "boolean"
2405
+ },
2406
+ "sse": {
2407
+ "type": "boolean"
2408
+ },
2409
+ "live_rows": {
2410
+ "type": "boolean",
2411
+ "description": "The server sends rows it later drops (a streaming thinking or text row, a wait)."
2412
+ }
2413
+ }
2414
+ },
2415
+ "files": {
2416
+ "type": "object",
2417
+ "additionalProperties": false,
2418
+ "required": [
2419
+ "upload",
2420
+ "read",
2421
+ "range",
2422
+ "during_run"
2423
+ ],
2424
+ "properties": {
2425
+ "upload": {
2426
+ "type": "boolean"
2427
+ },
2428
+ "read": {
2429
+ "type": "boolean"
2430
+ },
2431
+ "range": {
2432
+ "type": "boolean"
2433
+ },
2434
+ "during_run": {
2435
+ "type": "boolean",
2436
+ "description": "The file list shows what a live run wrote. Hosted false until the terminal push."
2437
+ }
2438
+ }
2439
+ },
2440
+ "quotes": {
2441
+ "type": "boolean"
2442
+ },
2443
+ "usage": {
2444
+ "type": "object",
2445
+ "additionalProperties": false,
2446
+ "required": [
2447
+ "basis",
2448
+ "meters"
2449
+ ],
2450
+ "properties": {
2451
+ "basis": {
2452
+ "type": "string",
2453
+ "enum": [
2454
+ "charge",
2455
+ "estimate"
2456
+ ]
2457
+ },
2458
+ "meters": {
2459
+ "type": "array",
2460
+ "items": {
2461
+ "$ref": "#/components/schemas/Meter"
2462
+ }
2463
+ }
2464
+ }
2465
+ },
2466
+ "efforts": {
2467
+ "type": "array",
2468
+ "description": "The `effort` values a run takes here. The host maps each to its model and thinking level.",
2469
+ "items": {
2470
+ "$ref": "#/components/schemas/Effort"
2471
+ }
2472
+ },
2473
+ "browser": {
2474
+ "type": "string",
2475
+ "enum": [
2476
+ "browserbase",
2477
+ "chrome",
2478
+ "none"
2479
+ ]
2480
+ },
2481
+ "sign_ins": {
2482
+ "type": "boolean",
2483
+ "description": "Runs carry the agent's saved sign-ins between runs."
2484
+ },
2485
+ "vault": {
2486
+ "type": "boolean"
2487
+ },
2488
+ "query": {
2489
+ "type": "boolean",
2490
+ "description": "Read-only SQL on a run's store. Not in `agentrun.v2/0`; false everywhere."
2491
+ }
2492
+ }
2493
+ },
2494
+ "Region": {
2495
+ "type": "object",
2496
+ "additionalProperties": false,
2497
+ "required": [
2498
+ "id",
2499
+ "jurisdiction",
2500
+ "state"
2501
+ ],
2502
+ "properties": {
2503
+ "id": {
2504
+ "type": "string",
2505
+ "description": "e.g. `us`, `eu`, `local`."
2506
+ },
2507
+ "jurisdiction": {
2508
+ "type": [
2509
+ "string",
2510
+ "null"
2511
+ ],
2512
+ "description": "Where the data rests, e.g. `US`, `EU`. Null for `local` (the user's own machine)."
2513
+ },
2514
+ "state": {
2515
+ "type": "string",
2516
+ "enum": [
2517
+ "live",
2518
+ "beta",
2519
+ "planned"
2520
+ ]
2521
+ }
2522
+ }
2523
+ },
2524
+ "Limits": {
2525
+ "type": "object",
2526
+ "additionalProperties": false,
2527
+ "required": [
2528
+ "max_body_bytes",
2529
+ "max_upload_bytes",
2530
+ "max_files_per_run",
2531
+ "max_message_chars",
2532
+ "max_concurrent_runs",
2533
+ "timeline_max_wait_ms",
2534
+ "timeline_page_rows",
2535
+ "idempotency_ttl_s",
2536
+ "input_wait_s",
2537
+ "max_cost_usd"
2538
+ ],
2539
+ "properties": {
2540
+ "max_body_bytes": {
2541
+ "type": "integer",
2542
+ "minimum": 1,
2543
+ "description": "Largest JSON body."
2544
+ },
2545
+ "max_upload_bytes": {
2546
+ "type": [
2547
+ "integer",
2548
+ "null"
2549
+ ],
2550
+ "minimum": 1,
2551
+ "description": "The largest upload body: a file's bytes (`PUT /files/{file_id}`) or a packed home (`PUT .../home`).\nHosted 99614720 (95 MiB) under the 100 MB request cap of its edge; local may say more, and null is no\nlimit.\n"
2552
+ },
2553
+ "max_files_per_run": {
2554
+ "type": "integer",
2555
+ "minimum": 0
2556
+ },
2557
+ "max_message_chars": {
2558
+ "type": "integer",
2559
+ "minimum": 1
2560
+ },
2561
+ "max_concurrent_runs": {
2562
+ "type": [
2563
+ "integer",
2564
+ "null"
2565
+ ],
2566
+ "minimum": 1,
2567
+ "description": "Null is no limit."
2568
+ },
2569
+ "timeline_max_wait_ms": {
2570
+ "type": "integer",
2571
+ "minimum": 0,
2572
+ "maximum": 25000
2573
+ },
2574
+ "timeline_page_rows": {
2575
+ "type": "integer",
2576
+ "minimum": 1
2577
+ },
2578
+ "idempotency_ttl_s": {
2579
+ "type": "integer",
2580
+ "minimum": 1
2581
+ },
2582
+ "input_wait_s": {
2583
+ "type": [
2584
+ "integer",
2585
+ "null"
2586
+ ],
2587
+ "minimum": 1,
2588
+ "description": "How long an `input_required` run waits for a message before it ends `failed` (`input_expired`)."
2589
+ },
2590
+ "max_cost_usd": {
2591
+ "type": [
2592
+ "object",
2593
+ "null"
2594
+ ],
2595
+ "description": "The range a run's `max_cost_usd` may take. Null when this backend has no billing.",
2596
+ "additionalProperties": false,
2597
+ "required": [
2598
+ "min",
2599
+ "max"
2600
+ ],
2601
+ "properties": {
2602
+ "min": {
2603
+ "$ref": "#/components/schemas/Usd"
2604
+ },
2605
+ "max": {
2606
+ "$ref": "#/components/schemas/Usd"
2607
+ }
2608
+ }
2609
+ }
2610
+ }
2611
+ },
2612
+ "Definition": {
2613
+ "description": "#571's `agent.definition`, field for field. No model and no thinking level: the host binds them. `skills` and\n`tools` are names; where each tool runs is the host's binding. Any other field is refused.\n",
2614
+ "allOf": [
2615
+ {
2616
+ "$ref": "#/components/schemas/DefinitionInput"
2617
+ }
2618
+ ],
2619
+ "required": [
2620
+ "id",
2621
+ "version",
2622
+ "name",
2623
+ "instructions",
2624
+ "skills",
2625
+ "tools"
2626
+ ]
2627
+ },
2628
+ "DefinitionInput": {
2629
+ "type": "object",
2630
+ "description": "A definition as given. `id` is optional; the server mints a UUIDv7 when it is absent.",
2631
+ "additionalProperties": false,
2632
+ "required": [
2633
+ "version",
2634
+ "name",
2635
+ "instructions",
2636
+ "skills",
2637
+ "tools"
2638
+ ],
2639
+ "properties": {
2640
+ "id": {
2641
+ "$ref": "#/components/schemas/Id"
2642
+ },
2643
+ "version": {
2644
+ "type": "integer",
2645
+ "minimum": 1
2646
+ },
2647
+ "name": {
2648
+ "type": "string",
2649
+ "minLength": 1
2650
+ },
2651
+ "description": {
2652
+ "type": "string"
2653
+ },
2654
+ "instructions": {
2655
+ "type": "string"
2656
+ },
2657
+ "skills": {
2658
+ "type": "array",
2659
+ "uniqueItems": true,
2660
+ "items": {
2661
+ "type": "string",
2662
+ "minLength": 1
2663
+ }
2664
+ },
2665
+ "tools": {
2666
+ "type": "array",
2667
+ "uniqueItems": true,
2668
+ "items": {
2669
+ "type": "string",
2670
+ "minLength": 1
2671
+ }
2672
+ },
2673
+ "input_schema": {
2674
+ "$ref": "#/components/schemas/JsonObject",
2675
+ "description": "A JSON Schema for a run's `input`."
2676
+ },
2677
+ "output_schema": {
2678
+ "$ref": "#/components/schemas/JsonObject",
2679
+ "description": "A JSON Schema for a run's `result.output`."
2680
+ },
2681
+ "workflow": {
2682
+ "$ref": "#/components/schemas/JsonObject",
2683
+ "description": "An AgentRun workflow document (no model in it)."
2684
+ },
2685
+ "max_cost_usd": {
2686
+ "type": "number",
2687
+ "minimum": 0,
2688
+ "description": "The default cap of each run, in US dollars."
2689
+ }
2690
+ }
2691
+ },
2692
+ "SkillFiles": {
2693
+ "type": "object",
2694
+ "description": "Skill files by path under `.agents/skills/`, e.g. `cite/SKILL.md`, to their text.",
2695
+ "propertyNames": {
2696
+ "type": "string",
2697
+ "minLength": 1,
2698
+ "maxLength": 512,
2699
+ "pattern": "^(?!.*(?:^|/)\\.{1,2}(?:/|$))(?!.*//)(?!.*/$)[^/\\\\\\u0000][^\\\\\\u0000]*$"
2700
+ },
2701
+ "additionalProperties": {
2702
+ "type": "string"
2703
+ }
2704
+ },
2705
+ "AgentCreate": {
2706
+ "type": "object",
2707
+ "additionalProperties": false,
2708
+ "required": [
2709
+ "definition"
2710
+ ],
2711
+ "properties": {
2712
+ "definition": {
2713
+ "$ref": "#/components/schemas/DefinitionInput"
2714
+ },
2715
+ "skills": {
2716
+ "$ref": "#/components/schemas/SkillFiles"
2717
+ }
2718
+ }
2719
+ },
2720
+ "SkillFileInfo": {
2721
+ "type": "object",
2722
+ "additionalProperties": false,
2723
+ "required": [
2724
+ "path",
2725
+ "sha256",
2726
+ "size_bytes"
2727
+ ],
2728
+ "properties": {
2729
+ "path": {
2730
+ "type": "string"
2731
+ },
2732
+ "sha256": {
2733
+ "type": "string",
2734
+ "pattern": "^[0-9a-f]{64}$"
2735
+ },
2736
+ "size_bytes": {
2737
+ "type": "integer",
2738
+ "minimum": 0
2739
+ }
2740
+ }
2741
+ },
2742
+ "SignIn": {
2743
+ "type": "object",
2744
+ "description": "One saved sign-in, by its profile key. Never its `ref`, which opens a signed-in session. A profile with an\nempty `ref` is not listed. `state` is `held` while an unexpired `agent.leases` entry names a run, and\n`held_by` is that run's id; otherwise `ready` and `held_by` null.\n",
2745
+ "additionalProperties": false,
2746
+ "required": [
2747
+ "key",
2748
+ "provider",
2749
+ "state",
2750
+ "held_by"
2751
+ ],
2752
+ "properties": {
2753
+ "key": {
2754
+ "type": "string",
2755
+ "description": "The profile key, e.g. `acme.example`."
2756
+ },
2757
+ "provider": {
2758
+ "type": "string",
2759
+ "description": "e.g. `browserbase`."
2760
+ },
2761
+ "state": {
2762
+ "type": "string",
2763
+ "enum": [
2764
+ "ready",
2765
+ "held"
2766
+ ]
2767
+ },
2768
+ "held_by": {
2769
+ "oneOf": [
2770
+ {
2771
+ "$ref": "#/components/schemas/Id"
2772
+ },
2773
+ {
2774
+ "type": "null"
2775
+ }
2776
+ ],
2777
+ "description": "`held`: the run whose save lease names this profile."
2778
+ },
2779
+ "verified_at": {
2780
+ "oneOf": [
2781
+ {
2782
+ "$ref": "#/components/schemas/Timestamp"
2783
+ },
2784
+ {
2785
+ "type": "null"
2786
+ }
2787
+ ]
2788
+ }
2789
+ },
2790
+ "if": {
2791
+ "properties": {
2792
+ "state": {
2793
+ "const": "held"
2794
+ }
2795
+ }
2796
+ },
2797
+ "then": {
2798
+ "properties": {
2799
+ "held_by": {
2800
+ "$ref": "#/components/schemas/Id"
2801
+ }
2802
+ }
2803
+ },
2804
+ "else": {
2805
+ "properties": {
2806
+ "held_by": {
2807
+ "type": "null"
2808
+ }
2809
+ }
2810
+ }
2811
+ },
2812
+ "Source": {
2813
+ "type": "object",
2814
+ "description": "The commit of the home's repo that the home was last refreshed from.",
2815
+ "additionalProperties": false,
2816
+ "required": [
2817
+ "sha",
2818
+ "refreshed_at"
2819
+ ],
2820
+ "properties": {
2821
+ "sha": {
2822
+ "$ref": "#/components/schemas/CommitSha"
2823
+ },
2824
+ "refreshed_at": {
2825
+ "$ref": "#/components/schemas/Timestamp"
2826
+ }
2827
+ }
2828
+ },
2829
+ "CommitSha": {
2830
+ "type": "string",
2831
+ "description": "A git commit id, SHA-1 or SHA-256.",
2832
+ "pattern": "^(?:[0-9a-f]{40}|[0-9a-f]{64})$"
2833
+ },
2834
+ "Agent": {
2835
+ "type": "object",
2836
+ "additionalProperties": false,
2837
+ "required": [
2838
+ "agent_id",
2839
+ "definition",
2840
+ "source",
2841
+ "skills",
2842
+ "sign_ins",
2843
+ "runs",
2844
+ "region",
2845
+ "home_etag",
2846
+ "created_at",
2847
+ "updated_at"
2848
+ ],
2849
+ "properties": {
2850
+ "agent_id": {
2851
+ "$ref": "#/components/schemas/Id"
2852
+ },
2853
+ "definition": {
2854
+ "$ref": "#/components/schemas/Definition"
2855
+ },
2856
+ "source": {
2857
+ "oneOf": [
2858
+ {
2859
+ "$ref": "#/components/schemas/Source"
2860
+ },
2861
+ {
2862
+ "type": "null"
2863
+ }
2864
+ ],
2865
+ "description": "The repo commit the home was last refreshed from."
2866
+ },
2867
+ "skills": {
2868
+ "type": "array",
2869
+ "items": {
2870
+ "$ref": "#/components/schemas/SkillFileInfo"
2871
+ }
2872
+ },
2873
+ "sign_ins": {
2874
+ "type": "array",
2875
+ "items": {
2876
+ "$ref": "#/components/schemas/SignIn"
2877
+ }
2878
+ },
2879
+ "runs": {
2880
+ "type": "object",
2881
+ "additionalProperties": false,
2882
+ "required": [
2883
+ "count",
2884
+ "live"
2885
+ ],
2886
+ "properties": {
2887
+ "count": {
2888
+ "type": "integer",
2889
+ "minimum": 0
2890
+ },
2891
+ "live": {
2892
+ "type": "integer",
2893
+ "minimum": 0
2894
+ }
2895
+ }
2896
+ },
2897
+ "region": {
2898
+ "type": "string",
2899
+ "description": "The `regions[].id` the home rests in."
2900
+ },
2901
+ "home_etag": {
2902
+ "type": "string",
2903
+ "description": "The home's revision (`homeRevision`), for `If-Match` on `PUT .../home` and `PUT .../definition`."
2904
+ },
2905
+ "created_at": {
2906
+ "$ref": "#/components/schemas/Timestamp"
2907
+ },
2908
+ "updated_at": {
2909
+ "$ref": "#/components/schemas/Timestamp"
2910
+ }
2911
+ }
2912
+ },
2913
+ "AgentList": {
2914
+ "type": "object",
2915
+ "additionalProperties": false,
2916
+ "required": [
2917
+ "agents",
2918
+ "next_cursor"
2919
+ ],
2920
+ "properties": {
2921
+ "agents": {
2922
+ "type": "array",
2923
+ "items": {
2924
+ "$ref": "#/components/schemas/Agent"
2925
+ }
2926
+ },
2927
+ "next_cursor": {
2928
+ "type": [
2929
+ "string",
2930
+ "null"
2931
+ ]
2932
+ }
2933
+ }
2934
+ },
2935
+ "HomeManifest": {
2936
+ "type": "object",
2937
+ "description": "What a packed home holds, without its bytes. The first member of a pack, and the body of `PUT ...?check=1`.",
2938
+ "additionalProperties": false,
2939
+ "required": [
2940
+ "format",
2941
+ "agent_id",
2942
+ "definition",
2943
+ "source",
2944
+ "skills",
2945
+ "sign_ins",
2946
+ "vault",
2947
+ "runs",
2948
+ "size_bytes"
2949
+ ],
2950
+ "properties": {
2951
+ "format": {
2952
+ "type": "string",
2953
+ "description": "The pack format. `agentrun.home/1` is",
2954
+ "pattern": "^agentrun\\.home/[0-9]+$"
2955
+ },
2956
+ "agent_id": {
2957
+ "$ref": "#/components/schemas/Id"
2958
+ },
2959
+ "definition": {
2960
+ "$ref": "#/components/schemas/Definition"
2961
+ },
2962
+ "source": {
2963
+ "oneOf": [
2964
+ {
2965
+ "$ref": "#/components/schemas/Source"
2966
+ },
2967
+ {
2968
+ "type": "null"
2969
+ }
2970
+ ],
2971
+ "description": "The source home's `agent.source`. The repo itself is not in the pack."
2972
+ },
2973
+ "skills": {
2974
+ "type": "array",
2975
+ "items": {
2976
+ "$ref": "#/components/schemas/SkillFileInfo"
2977
+ }
2978
+ },
2979
+ "sign_ins": {
2980
+ "type": "array",
2981
+ "description": "What the source had, by key and provider; none travel in agentrun.v2/0. Never a `ref`.",
2982
+ "items": {
2983
+ "type": "object",
2984
+ "additionalProperties": false,
2985
+ "required": [
2986
+ "key",
2987
+ "provider"
2988
+ ],
2989
+ "properties": {
2990
+ "key": {
2991
+ "type": "string"
2992
+ },
2993
+ "provider": {
2994
+ "type": "string"
2995
+ }
2996
+ }
2997
+ }
2998
+ },
2999
+ "vault": {
3000
+ "type": "array",
3001
+ "description": "What the source had, by name; none travel in agentrun.v2/0, and it is empty there. Never a value.",
3002
+ "items": {
3003
+ "type": "object",
3004
+ "additionalProperties": false,
3005
+ "required": [
3006
+ "name"
3007
+ ],
3008
+ "properties": {
3009
+ "name": {
3010
+ "type": "string"
3011
+ }
3012
+ }
3013
+ }
3014
+ },
3015
+ "runs": {
3016
+ "type": "object",
3017
+ "additionalProperties": false,
3018
+ "required": [
3019
+ "count",
3020
+ "live"
3021
+ ],
3022
+ "properties": {
3023
+ "count": {
3024
+ "type": "integer",
3025
+ "minimum": 0
3026
+ },
3027
+ "live": {
3028
+ "type": "integer",
3029
+ "minimum": 0,
3030
+ "description": "Runs whose claim was live at pack time. Their index entries travel; their stores and files do not."
3031
+ }
3032
+ }
3033
+ },
3034
+ "size_bytes": {
3035
+ "type": "integer",
3036
+ "minimum": 0
3037
+ },
3038
+ "created_at": {
3039
+ "$ref": "#/components/schemas/Timestamp"
3040
+ }
3041
+ }
3042
+ },
3043
+ "HomeCheck": {
3044
+ "type": "object",
3045
+ "additionalProperties": false,
3046
+ "required": [
3047
+ "name",
3048
+ "status",
3049
+ "message"
3050
+ ],
3051
+ "properties": {
3052
+ "name": {
3053
+ "type": "string",
3054
+ "enum": [
3055
+ "format",
3056
+ "definition",
3057
+ "tools",
3058
+ "sign_ins",
3059
+ "vault",
3060
+ "quote",
3061
+ "size",
3062
+ "live_runs"
3063
+ ],
3064
+ "description": "`format` fails on a newer format or a pack member outside the allowlist. `sign_ins` warns when the source\nhad sign-ins: they are to redo at the target, since none travel in agentrun.v2/0.\n"
3065
+ },
3066
+ "status": {
3067
+ "type": "string",
3068
+ "enum": [
3069
+ "ok",
3070
+ "warn",
3071
+ "fail"
3072
+ ],
3073
+ "description": "Only `fail` refuses."
3074
+ },
3075
+ "message": {
3076
+ "type": "string",
3077
+ "description": "One line, e.g. `7 of 7 bound at hosted` or `1 sign-in to redo at the target: acme.example`."
3078
+ },
3079
+ "detail": {
3080
+ "type": "object",
3081
+ "description": "e.g. `{bound: [...], unbound: [...]}` for `tools`.",
3082
+ "additionalProperties": true
3083
+ }
3084
+ }
3085
+ },
3086
+ "HomeCheckReport": {
3087
+ "type": "object",
3088
+ "additionalProperties": false,
3089
+ "required": [
3090
+ "ok",
3091
+ "agent_id",
3092
+ "target",
3093
+ "checks",
3094
+ "written"
3095
+ ],
3096
+ "properties": {
3097
+ "ok": {
3098
+ "type": "boolean",
3099
+ "description": "No check failed."
3100
+ },
3101
+ "agent_id": {
3102
+ "$ref": "#/components/schemas/Id"
3103
+ },
3104
+ "target": {
3105
+ "type": "object",
3106
+ "additionalProperties": false,
3107
+ "required": [
3108
+ "backend",
3109
+ "region"
3110
+ ],
3111
+ "properties": {
3112
+ "backend": {
3113
+ "type": "string",
3114
+ "enum": [
3115
+ "hosted",
3116
+ "local"
3117
+ ]
3118
+ },
3119
+ "region": {
3120
+ "type": "string"
3121
+ }
3122
+ }
3123
+ },
3124
+ "checks": {
3125
+ "type": "array",
3126
+ "items": {
3127
+ "$ref": "#/components/schemas/HomeCheck"
3128
+ }
3129
+ },
3130
+ "written": {
3131
+ "type": "boolean",
3132
+ "description": "Always false for `?check=1` and for a refusal."
3133
+ },
3134
+ "replaces": {
3135
+ "type": "boolean",
3136
+ "description": "The agent exists at the target, so the import needs `If-Match`."
3137
+ }
3138
+ }
3139
+ },
3140
+ "HomeImportResult": {
3141
+ "type": "object",
3142
+ "additionalProperties": false,
3143
+ "required": [
3144
+ "agent",
3145
+ "report"
3146
+ ],
3147
+ "properties": {
3148
+ "agent": {
3149
+ "$ref": "#/components/schemas/Agent"
3150
+ },
3151
+ "report": {
3152
+ "$ref": "#/components/schemas/HomeCheckReport"
3153
+ }
3154
+ }
3155
+ },
3156
+ "Effort": {
3157
+ "description": "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.",
3158
+ "type": "string",
3159
+ "enum": [
3160
+ "low",
3161
+ "medium",
3162
+ "high"
3163
+ ]
3164
+ },
3165
+ "RunStatus": {
3166
+ "type": "string",
3167
+ "description": "The six public statuses of a run. `completed`, `failed` and `cancelled` end a\nturn of work; only a follow-up message reopens a `completed` run.\n",
3168
+ "enum": [
3169
+ "queued",
3170
+ "working",
3171
+ "input_required",
3172
+ "completed",
3173
+ "failed",
3174
+ "cancelled"
3175
+ ]
3176
+ },
3177
+ "RunState": {
3178
+ "type": "string",
3179
+ "description": "What a run page shows (#577). The only combinations:\n\n| `status` | `state` |\n| --- | --- |\n| `queued` | `working` |\n| `working` | `working`, or `idle` when the run is parked between turns (a scheduled wake) |\n| `input_required` | `waiting` (the agent asked the person), or `idle` (a person stopped the turn) |\n| `completed`, `failed`, `cancelled` | `idle` |\n\nAn `input_required` run that gets no message for `limits.input_wait_s` (30 minutes) ends `failed` with\n`input_expired`, and its browser closes. A hosted browser is billed while it stays open. A message after that\nis `409 not_continuable`; start a new run.\n",
3180
+ "enum": [
3181
+ "working",
3182
+ "waiting",
3183
+ "idle"
3184
+ ]
3185
+ },
3186
+ "RunCreate": {
3187
+ "type": "object",
3188
+ "additionalProperties": false,
3189
+ "required": [
3190
+ "input"
3191
+ ],
3192
+ "properties": {
3193
+ "input": {
3194
+ "type": "object",
3195
+ "description": "Checked against the definition's `input_schema`, or `{content: string}` when it has none.",
3196
+ "additionalProperties": true
3197
+ },
3198
+ "file_ids": {
3199
+ "type": "array",
3200
+ "maxItems": 100,
3201
+ "uniqueItems": true,
3202
+ "description": "Ready files from `POST /files`, at most `limits.max_files_per_run`.",
3203
+ "items": {
3204
+ "$ref": "#/components/schemas/Id"
3205
+ }
3206
+ },
3207
+ "effort": {
3208
+ "$ref": "#/components/schemas/Effort"
3209
+ },
3210
+ "max_cost_usd": {
3211
+ "type": "number",
3212
+ "exclusiveMinimum": 0,
3213
+ "description": "This run's cap, for every turn of it. Default the definition's `max_cost_usd`, else the effort default."
3214
+ },
3215
+ "quote_id": {
3216
+ "type": "string",
3217
+ "minLength": 1,
3218
+ "maxLength": 2048,
3219
+ "description": "Run at a quote's terms. A different `effort` or `max_cost_usd` than the quote's is `409 quote_invalid`."
3220
+ }
3221
+ }
3222
+ },
3223
+ "RunResult": {
3224
+ "type": "object",
3225
+ "additionalProperties": false,
3226
+ "required": [
3227
+ "output",
3228
+ "final_answer"
3229
+ ],
3230
+ "properties": {
3231
+ "output": {
3232
+ "description": "The structured output, checked against `output_schema`. Null when the definition has none."
3233
+ },
3234
+ "final_answer": {
3235
+ "type": [
3236
+ "string",
3237
+ "null"
3238
+ ],
3239
+ "description": "The agent's last answer as text."
3240
+ }
3241
+ }
3242
+ },
3243
+ "RunError": {
3244
+ "type": "object",
3245
+ "description": "Why a run failed, and what to do next.",
3246
+ "additionalProperties": false,
3247
+ "required": [
3248
+ "code",
3249
+ "message",
3250
+ "retryable"
3251
+ ],
3252
+ "properties": {
3253
+ "code": {
3254
+ "$ref": "#/components/schemas/RunErrorCode"
3255
+ },
3256
+ "message": {
3257
+ "type": "string"
3258
+ },
3259
+ "retryable": {
3260
+ "type": "boolean"
3261
+ },
3262
+ "next_action": {
3263
+ "$ref": "#/components/schemas/NextAction"
3264
+ }
3265
+ }
3266
+ },
3267
+ "RunErrorCode": {
3268
+ "type": "string",
3269
+ "description": "Why a run ended `failed`. A closed list apart from `ErrorCode`: these describe a run, not a request.\nThe first six are the hosted API's own terminal errors.\n",
3270
+ "enum": [
3271
+ "run_failed",
3272
+ "moderated",
3273
+ "agent_not_runnable",
3274
+ "needs_connection",
3275
+ "needs_reconnect",
3276
+ "connection_revoked",
3277
+ "output_invalid",
3278
+ "spend_cap_reached",
3279
+ "wall_clock_timeout",
3280
+ "input_expired",
3281
+ "internal"
3282
+ ]
3283
+ },
3284
+ "Cost": {
3285
+ "type": "object",
3286
+ "additionalProperties": false,
3287
+ "required": [
3288
+ "usd",
3289
+ "basis"
3290
+ ],
3291
+ "properties": {
3292
+ "usd": {
3293
+ "type": [
3294
+ "number",
3295
+ "null"
3296
+ ],
3297
+ "minimum": 0,
3298
+ "description": "Null while unknown. A client shows null as \"unknown\", never as $0."
3299
+ },
3300
+ "basis": {
3301
+ "type": "string",
3302
+ "enum": [
3303
+ "charge",
3304
+ "estimate"
3305
+ ],
3306
+ "description": "`charge`: what the account pays (hosted). `estimate`: the model cost the run reports (local)."
3307
+ },
3308
+ "charge_state": {
3309
+ "type": [
3310
+ "string",
3311
+ "null"
3312
+ ],
3313
+ "enum": [
3314
+ "held",
3315
+ "settled",
3316
+ "released",
3317
+ null
3318
+ ],
3319
+ "description": "`charge` only. `held` may still settle lower; `released` is not billed."
3320
+ },
3321
+ "cap_usd": {
3322
+ "type": [
3323
+ "number",
3324
+ "null"
3325
+ ],
3326
+ "minimum": 0,
3327
+ "description": "The run's spend authority, when it has one."
3328
+ }
3329
+ }
3330
+ },
3331
+ "Run": {
3332
+ "type": "object",
3333
+ "additionalProperties": false,
3334
+ "required": [
3335
+ "run_id",
3336
+ "agent_id",
3337
+ "agent_version",
3338
+ "status",
3339
+ "state",
3340
+ "title",
3341
+ "created_at",
3342
+ "updated_at",
3343
+ "ended_at",
3344
+ "result",
3345
+ "error",
3346
+ "cost",
3347
+ "poll_after_ms",
3348
+ "sha"
3349
+ ],
3350
+ "properties": {
3351
+ "run_id": {
3352
+ "$ref": "#/components/schemas/Id"
3353
+ },
3354
+ "agent_id": {
3355
+ "$ref": "#/components/schemas/Id"
3356
+ },
3357
+ "agent_version": {
3358
+ "type": "integer",
3359
+ "minimum": 1,
3360
+ "description": "The definition's `version` the run started from."
3361
+ },
3362
+ "sha": {
3363
+ "oneOf": [
3364
+ {
3365
+ "$ref": "#/components/schemas/CommitSha"
3366
+ },
3367
+ {
3368
+ "type": "null"
3369
+ }
3370
+ ],
3371
+ "description": "The repo commit the run's skills came from."
3372
+ },
3373
+ "status": {
3374
+ "$ref": "#/components/schemas/RunStatus"
3375
+ },
3376
+ "state": {
3377
+ "$ref": "#/components/schemas/RunState"
3378
+ },
3379
+ "title": {
3380
+ "type": "string",
3381
+ "maxLength": 80,
3382
+ "description": "The first message or input, on one line."
3383
+ },
3384
+ "effort": {
3385
+ "$ref": "#/components/schemas/Effort"
3386
+ },
3387
+ "created_at": {
3388
+ "$ref": "#/components/schemas/Timestamp"
3389
+ },
3390
+ "updated_at": {
3391
+ "$ref": "#/components/schemas/Timestamp"
3392
+ },
3393
+ "ended_at": {
3394
+ "oneOf": [
3395
+ {
3396
+ "$ref": "#/components/schemas/Timestamp"
3397
+ },
3398
+ {
3399
+ "type": "null"
3400
+ }
3401
+ ]
3402
+ },
3403
+ "result": {
3404
+ "oneOf": [
3405
+ {
3406
+ "$ref": "#/components/schemas/RunResult"
3407
+ },
3408
+ {
3409
+ "type": "null"
3410
+ }
3411
+ ],
3412
+ "description": "Set when `completed`."
3413
+ },
3414
+ "error": {
3415
+ "oneOf": [
3416
+ {
3417
+ "$ref": "#/components/schemas/RunError"
3418
+ },
3419
+ {
3420
+ "type": "null"
3421
+ }
3422
+ ],
3423
+ "description": "Set when `failed`."
3424
+ },
3425
+ "cost": {
3426
+ "$ref": "#/components/schemas/Cost"
3427
+ },
3428
+ "poll_after_ms": {
3429
+ "type": "integer",
3430
+ "minimum": 0,
3431
+ "description": "When to look again."
3432
+ }
3433
+ }
3434
+ },
3435
+ "RunList": {
3436
+ "type": "object",
3437
+ "additionalProperties": false,
3438
+ "required": [
3439
+ "runs",
3440
+ "next_cursor"
3441
+ ],
3442
+ "properties": {
3443
+ "runs": {
3444
+ "type": "array",
3445
+ "items": {
3446
+ "$ref": "#/components/schemas/RunSummary"
3447
+ }
3448
+ },
3449
+ "next_cursor": {
3450
+ "type": [
3451
+ "string",
3452
+ "null"
3453
+ ]
3454
+ }
3455
+ }
3456
+ },
3457
+ "RunSummary": {
3458
+ "type": "object",
3459
+ "description": "A runs-index row.",
3460
+ "additionalProperties": false,
3461
+ "required": [
3462
+ "run_id",
3463
+ "agent_id",
3464
+ "agent_version",
3465
+ "sha",
3466
+ "status",
3467
+ "state",
3468
+ "title",
3469
+ "created_at",
3470
+ "ended_at",
3471
+ "cost"
3472
+ ],
3473
+ "properties": {
3474
+ "run_id": {
3475
+ "$ref": "#/components/schemas/Id"
3476
+ },
3477
+ "agent_id": {
3478
+ "$ref": "#/components/schemas/Id"
3479
+ },
3480
+ "agent_version": {
3481
+ "type": "integer",
3482
+ "minimum": 1
3483
+ },
3484
+ "sha": {
3485
+ "oneOf": [
3486
+ {
3487
+ "$ref": "#/components/schemas/CommitSha"
3488
+ },
3489
+ {
3490
+ "type": "null"
3491
+ }
3492
+ ],
3493
+ "description": "The repo commit the run's skills came from."
3494
+ },
3495
+ "status": {
3496
+ "$ref": "#/components/schemas/RunStatus"
3497
+ },
3498
+ "state": {
3499
+ "$ref": "#/components/schemas/RunState"
3500
+ },
3501
+ "title": {
3502
+ "type": "string",
3503
+ "maxLength": 80
3504
+ },
3505
+ "created_at": {
3506
+ "$ref": "#/components/schemas/Timestamp"
3507
+ },
3508
+ "ended_at": {
3509
+ "oneOf": [
3510
+ {
3511
+ "$ref": "#/components/schemas/Timestamp"
3512
+ },
3513
+ {
3514
+ "type": "null"
3515
+ }
3516
+ ]
3517
+ },
3518
+ "cost": {
3519
+ "$ref": "#/components/schemas/Cost"
3520
+ }
3521
+ }
3522
+ },
3523
+ "TimelineKind": {
3524
+ "type": "string",
3525
+ "description": "#572 `TimelineKind`: Grep's ten kinds, then `user_message`, `waiting` and `usage`.",
3526
+ "enum": [
3527
+ "thinking",
3528
+ "text_block",
3529
+ "tool_use",
3530
+ "tool_result",
3531
+ "phase",
3532
+ "subagent_started",
3533
+ "subagent_progress",
3534
+ "subagent_completed",
3535
+ "final_answer",
3536
+ "error",
3537
+ "user_message",
3538
+ "waiting",
3539
+ "usage"
3540
+ ]
3541
+ },
3542
+ "TimelineRow": {
3543
+ "type": "object",
3544
+ "description": "#572 `TimelineEvent`, field for field: Grep's 13 fields, then the open additions. `seq` is optional in the\ntype (Grep's rows have none) and required here: every /v2 row has it, and a page sorts by it.\nCaps are Grep's: summary and previews 500, text 2000. A row never carries a live-view URL, a browser\ncontext id or a cookie; every string but a person's own message keeps a URL's origin, path and query keys\nand drops the rest.\n",
3545
+ "additionalProperties": false,
3546
+ "required": [
3547
+ "id",
3548
+ "timestamp",
3549
+ "created_at",
3550
+ "kind",
3551
+ "summary",
3552
+ "agent_label",
3553
+ "tool_name",
3554
+ "tool_use_id",
3555
+ "tool_status",
3556
+ "tool_input_preview",
3557
+ "tool_result_preview",
3558
+ "tool_result_size_bytes",
3559
+ "text",
3560
+ "seq"
3561
+ ],
3562
+ "properties": {
3563
+ "id": {
3564
+ "type": "string",
3565
+ "minLength": 1
3566
+ },
3567
+ "timestamp": {
3568
+ "$ref": "#/components/schemas/Timestamp"
3569
+ },
3570
+ "created_at": {
3571
+ "$ref": "#/components/schemas/Timestamp"
3572
+ },
3573
+ "kind": {
3574
+ "$ref": "#/components/schemas/TimelineKind"
3575
+ },
3576
+ "summary": {
3577
+ "type": [
3578
+ "string",
3579
+ "null"
3580
+ ],
3581
+ "maxLength": 500
3582
+ },
3583
+ "agent_label": {
3584
+ "type": [
3585
+ "string",
3586
+ "null"
3587
+ ]
3588
+ },
3589
+ "tool_name": {
3590
+ "type": [
3591
+ "string",
3592
+ "null"
3593
+ ]
3594
+ },
3595
+ "tool_use_id": {
3596
+ "type": [
3597
+ "string",
3598
+ "null"
3599
+ ]
3600
+ },
3601
+ "tool_status": {
3602
+ "type": [
3603
+ "string",
3604
+ "null"
3605
+ ],
3606
+ "enum": [
3607
+ "success",
3608
+ "failed",
3609
+ null
3610
+ ]
3611
+ },
3612
+ "tool_input_preview": {
3613
+ "type": [
3614
+ "string",
3615
+ "null"
3616
+ ],
3617
+ "maxLength": 500
3618
+ },
3619
+ "tool_result_preview": {
3620
+ "type": [
3621
+ "string",
3622
+ "null"
3623
+ ],
3624
+ "maxLength": 500
3625
+ },
3626
+ "tool_result_size_bytes": {
3627
+ "type": [
3628
+ "integer",
3629
+ "null"
3630
+ ],
3631
+ "minimum": 0
3632
+ },
3633
+ "text": {
3634
+ "type": [
3635
+ "string",
3636
+ "null"
3637
+ ],
3638
+ "maxLength": 2000
3639
+ },
3640
+ "seq": {
3641
+ "type": "integer",
3642
+ "minimum": 0,
3643
+ "description": "Log order inside the run. Sort by it, never by time. Not a cursor."
3644
+ },
3645
+ "conversation_id": {
3646
+ "type": "integer"
3647
+ },
3648
+ "round": {
3649
+ "type": "integer",
3650
+ "description": "The assistant entry whose calls these are."
3651
+ },
3652
+ "parent_tool_use_id": {
3653
+ "type": "string",
3654
+ "description": "A nested call's caller, or a subagent's spawning call."
3655
+ },
3656
+ "session": {
3657
+ "type": "string",
3658
+ "pattern": "^[\\w.-]{1,64}$",
3659
+ "description": "The browser session a hand-over is about, as a tag; never a URL."
3660
+ },
3661
+ "path": {
3662
+ "type": "string",
3663
+ "description": "The file a \"Saved\" phase row is about."
3664
+ },
3665
+ "usage": {
3666
+ "$ref": "#/components/schemas/TimelineUsage"
3667
+ }
3668
+ }
3669
+ },
3670
+ "TimelineUsage": {
3671
+ "type": "object",
3672
+ "additionalProperties": false,
3673
+ "required": [
3674
+ "usd",
3675
+ "requests"
3676
+ ],
3677
+ "properties": {
3678
+ "usd": {
3679
+ "type": [
3680
+ "number",
3681
+ "null"
3682
+ ]
3683
+ },
3684
+ "requests": {
3685
+ "type": "integer",
3686
+ "minimum": 0
3687
+ }
3688
+ }
3689
+ },
3690
+ "TimelinePage": {
3691
+ "type": "object",
3692
+ "additionalProperties": false,
3693
+ "required": [
3694
+ "run_id",
3695
+ "status",
3696
+ "state",
3697
+ "reset",
3698
+ "rows",
3699
+ "drop",
3700
+ "next_after",
3701
+ "unchanged",
3702
+ "has_more",
3703
+ "final",
3704
+ "cost"
3705
+ ],
3706
+ "properties": {
3707
+ "run_id": {
3708
+ "$ref": "#/components/schemas/Id"
3709
+ },
3710
+ "status": {
3711
+ "$ref": "#/components/schemas/RunStatus"
3712
+ },
3713
+ "state": {
3714
+ "$ref": "#/components/schemas/RunState"
3715
+ },
3716
+ "reset": {
3717
+ "type": "boolean",
3718
+ "description": "Drop every row held, then apply `rows`."
3719
+ },
3720
+ "rows": {
3721
+ "type": "array",
3722
+ "description": "Rows added or changed after `after`, each at its current version, in `seq` order.",
3723
+ "items": {
3724
+ "$ref": "#/components/schemas/TimelineRow"
3725
+ }
3726
+ },
3727
+ "drop": {
3728
+ "type": "array",
3729
+ "description": "Ids of rows removed after `after`. A live row is replaced this way by its committed row.",
3730
+ "items": {
3731
+ "type": "string"
3732
+ }
3733
+ },
3734
+ "next_after": {
3735
+ "type": "integer",
3736
+ "minimum": 0,
3737
+ "description": "The change cursor to send as `after` next (and the SSE `id`)."
3738
+ },
3739
+ "unchanged": {
3740
+ "type": "boolean",
3741
+ "description": "Nothing changed after `after`, status and state included."
3742
+ },
3743
+ "has_more": {
3744
+ "type": "boolean",
3745
+ "description": "The page stopped at `limits.timeline_page_rows`; ask again at once with `next_after`."
3746
+ },
3747
+ "final": {
3748
+ "type": "boolean",
3749
+ "description": "The run is completed, failed or cancelled, and every row it will write is in this page or an earlier one.\nOnly a follow-up message changes the rows after this. `cost` may still settle: read the run for it.\n"
3750
+ },
3751
+ "cost": {
3752
+ "$ref": "#/components/schemas/Cost"
3753
+ },
3754
+ "poll_after_ms": {
3755
+ "type": "integer",
3756
+ "minimum": 0,
3757
+ "description": "JSON only. When to ask again."
3758
+ }
3759
+ }
3760
+ },
3761
+ "TimelineEnd": {
3762
+ "type": "object",
3763
+ "additionalProperties": false,
3764
+ "required": [
3765
+ "reason"
3766
+ ],
3767
+ "properties": {
3768
+ "reason": {
3769
+ "type": "string",
3770
+ "enum": [
3771
+ "terminal",
3772
+ "reconnect"
3773
+ ],
3774
+ "description": "`terminal`: the run ended and its last rows are sent. `reconnect`: the server closes the stream; reconnect with `Last-Event-ID`."
3775
+ }
3776
+ }
3777
+ },
3778
+ "MessageCreate": {
3779
+ "type": "object",
3780
+ "additionalProperties": false,
3781
+ "required": [
3782
+ "content"
3783
+ ],
3784
+ "properties": {
3785
+ "content": {
3786
+ "type": "string",
3787
+ "minLength": 1,
3788
+ "description": "At most `limits.max_message_chars`. Not only whitespace.",
3789
+ "pattern": "\\S"
3790
+ }
3791
+ }
3792
+ },
3793
+ "MessageResult": {
3794
+ "type": "object",
3795
+ "additionalProperties": false,
3796
+ "required": [
3797
+ "run_id",
3798
+ "message_id",
3799
+ "mode",
3800
+ "status",
3801
+ "state",
3802
+ "poll_after_ms"
3803
+ ],
3804
+ "properties": {
3805
+ "run_id": {
3806
+ "$ref": "#/components/schemas/Id"
3807
+ },
3808
+ "message_id": {
3809
+ "$ref": "#/components/schemas/Id"
3810
+ },
3811
+ "mode": {
3812
+ "type": "string",
3813
+ "enum": [
3814
+ "steer",
3815
+ "answer",
3816
+ "follow_up"
3817
+ ],
3818
+ "description": "What the message did."
3819
+ },
3820
+ "status": {
3821
+ "$ref": "#/components/schemas/RunStatus"
3822
+ },
3823
+ "state": {
3824
+ "$ref": "#/components/schemas/RunState"
3825
+ },
3826
+ "poll_after_ms": {
3827
+ "type": "integer",
3828
+ "minimum": 0
3829
+ }
3830
+ }
3831
+ },
3832
+ "StopResult": {
3833
+ "type": "object",
3834
+ "additionalProperties": false,
3835
+ "required": [
3836
+ "run_id",
3837
+ "stopped",
3838
+ "status",
3839
+ "state"
3840
+ ],
3841
+ "properties": {
3842
+ "run_id": {
3843
+ "$ref": "#/components/schemas/Id"
3844
+ },
3845
+ "stopped": {
3846
+ "type": "boolean",
3847
+ "description": "A turn was running and is now stopped."
3848
+ },
3849
+ "status": {
3850
+ "$ref": "#/components/schemas/RunStatus"
3851
+ },
3852
+ "state": {
3853
+ "$ref": "#/components/schemas/RunState"
3854
+ }
3855
+ }
3856
+ },
3857
+ "CancelResult": {
3858
+ "type": "object",
3859
+ "additionalProperties": false,
3860
+ "required": [
3861
+ "run_id",
3862
+ "cancel_requested",
3863
+ "already_terminal",
3864
+ "status"
3865
+ ],
3866
+ "properties": {
3867
+ "run_id": {
3868
+ "$ref": "#/components/schemas/Id"
3869
+ },
3870
+ "cancel_requested": {
3871
+ "type": "boolean"
3872
+ },
3873
+ "already_terminal": {
3874
+ "type": "boolean"
3875
+ },
3876
+ "status": {
3877
+ "$ref": "#/components/schemas/RunStatus"
3878
+ }
3879
+ }
3880
+ },
3881
+ "KillRequest": {
3882
+ "type": "object",
3883
+ "additionalProperties": false,
3884
+ "properties": {
3885
+ "kind": {
3886
+ "type": "string",
3887
+ "enum": [
3888
+ "process"
3889
+ ],
3890
+ "default": "process",
3891
+ "description": "`process` kills the run's process group. Other kinds come later."
3892
+ }
3893
+ }
3894
+ },
3895
+ "KillResult": {
3896
+ "type": "object",
3897
+ "additionalProperties": false,
3898
+ "required": [
3899
+ "run_id",
3900
+ "kind",
3901
+ "generation_before",
3902
+ "generation_after"
3903
+ ],
3904
+ "properties": {
3905
+ "run_id": {
3906
+ "$ref": "#/components/schemas/Id"
3907
+ },
3908
+ "kind": {
3909
+ "type": "string",
3910
+ "enum": [
3911
+ "process"
3912
+ ]
3913
+ },
3914
+ "generation_before": {
3915
+ "type": "integer",
3916
+ "minimum": 0
3917
+ },
3918
+ "generation_after": {
3919
+ "type": "integer",
3920
+ "minimum": 1
3921
+ }
3922
+ }
3923
+ },
3924
+ "RunFile": {
3925
+ "type": "object",
3926
+ "additionalProperties": false,
3927
+ "required": [
3928
+ "path",
3929
+ "size_bytes",
3930
+ "modified_at"
3931
+ ],
3932
+ "properties": {
3933
+ "path": {
3934
+ "type": "string",
3935
+ "description": "Relative to the run's workspace, `/` between segments."
3936
+ },
3937
+ "size_bytes": {
3938
+ "type": "integer",
3939
+ "minimum": 0
3940
+ },
3941
+ "modified_at": {
3942
+ "$ref": "#/components/schemas/Timestamp"
3943
+ },
3944
+ "content_type": {
3945
+ "type": [
3946
+ "string",
3947
+ "null"
3948
+ ]
3949
+ }
3950
+ }
3951
+ },
3952
+ "RunFileList": {
3953
+ "type": "object",
3954
+ "additionalProperties": false,
3955
+ "required": [
3956
+ "run_id",
3957
+ "files",
3958
+ "complete",
3959
+ "truncated"
3960
+ ],
3961
+ "properties": {
3962
+ "run_id": {
3963
+ "$ref": "#/components/schemas/Id"
3964
+ },
3965
+ "files": {
3966
+ "type": "array",
3967
+ "items": {
3968
+ "$ref": "#/components/schemas/RunFile"
3969
+ }
3970
+ },
3971
+ "complete": {
3972
+ "type": "boolean",
3973
+ "description": "False while the backend still syncs the run's files."
3974
+ },
3975
+ "truncated": {
3976
+ "type": "boolean",
3977
+ "description": "The list stopped at the server's cap."
3978
+ }
3979
+ }
3980
+ },
3981
+ "FilePathString": {
3982
+ "type": "string",
3983
+ "description": "A relative path, `/` between segments, no `.` or `..` segment, no segment that starts with `.`.",
3984
+ "minLength": 1,
3985
+ "maxLength": 1024,
3986
+ "pattern": "^(?!.*(?:^|/)\\.)(?!.*//)(?!.*/$)[^/\\\\\\u0000][^\\\\\\u0000]*$"
3987
+ },
3988
+ "FileCreate": {
3989
+ "type": "object",
3990
+ "additionalProperties": false,
3991
+ "required": [
3992
+ "path",
3993
+ "size_bytes"
3994
+ ],
3995
+ "properties": {
3996
+ "path": {
3997
+ "$ref": "#/components/schemas/FilePathString"
3998
+ },
3999
+ "size_bytes": {
4000
+ "type": "integer",
4001
+ "minimum": 0,
4002
+ "description": "At most `limits.max_upload_bytes`."
4003
+ },
4004
+ "content_type": {
4005
+ "type": "string"
4006
+ },
4007
+ "sha256": {
4008
+ "type": "string",
4009
+ "pattern": "^[0-9a-f]{64}$"
4010
+ }
4011
+ }
4012
+ },
4013
+ "File": {
4014
+ "type": "object",
4015
+ "additionalProperties": false,
4016
+ "required": [
4017
+ "file_id",
4018
+ "path",
4019
+ "size_bytes",
4020
+ "content_type",
4021
+ "sha256",
4022
+ "status",
4023
+ "created_at",
4024
+ "expires_at"
4025
+ ],
4026
+ "properties": {
4027
+ "file_id": {
4028
+ "$ref": "#/components/schemas/Id"
4029
+ },
4030
+ "path": {
4031
+ "$ref": "#/components/schemas/FilePathString"
4032
+ },
4033
+ "size_bytes": {
4034
+ "type": "integer",
4035
+ "minimum": 0
4036
+ },
4037
+ "content_type": {
4038
+ "type": "string"
4039
+ },
4040
+ "sha256": {
4041
+ "type": [
4042
+ "string",
4043
+ "null"
4044
+ ],
4045
+ "pattern": "^[0-9a-f]{64}$"
4046
+ },
4047
+ "status": {
4048
+ "type": "string",
4049
+ "enum": [
4050
+ "pending",
4051
+ "ready"
4052
+ ]
4053
+ },
4054
+ "created_at": {
4055
+ "$ref": "#/components/schemas/Timestamp"
4056
+ },
4057
+ "expires_at": {
4058
+ "oneOf": [
4059
+ {
4060
+ "$ref": "#/components/schemas/Timestamp"
4061
+ },
4062
+ {
4063
+ "type": "null"
4064
+ }
4065
+ ],
4066
+ "description": "When an unused file is deleted. Null locally."
4067
+ }
4068
+ }
4069
+ },
4070
+ "FileUpload": {
4071
+ "type": "object",
4072
+ "additionalProperties": false,
4073
+ "required": [
4074
+ "file",
4075
+ "upload"
4076
+ ],
4077
+ "properties": {
4078
+ "file": {
4079
+ "$ref": "#/components/schemas/File"
4080
+ },
4081
+ "upload": {
4082
+ "type": "object",
4083
+ "additionalProperties": false,
4084
+ "required": [
4085
+ "method",
4086
+ "url",
4087
+ "expires_at"
4088
+ ],
4089
+ "properties": {
4090
+ "method": {
4091
+ "type": "string",
4092
+ "const": "PUT"
4093
+ },
4094
+ "url": {
4095
+ "type": "string",
4096
+ "description": "Absolute, or relative to the server URL. Send the bearer only to the API's own origin."
4097
+ },
4098
+ "headers": {
4099
+ "type": "object",
4100
+ "description": "Headers the upload must carry, e.g. a presigned URL's content type.",
4101
+ "additionalProperties": {
4102
+ "type": "string"
4103
+ }
4104
+ },
4105
+ "expires_at": {
4106
+ "$ref": "#/components/schemas/Timestamp"
4107
+ }
4108
+ }
4109
+ }
4110
+ }
4111
+ },
4112
+ "QuoteCreate": {
4113
+ "type": "object",
4114
+ "additionalProperties": false,
4115
+ "required": [
4116
+ "agent_id"
4117
+ ],
4118
+ "properties": {
4119
+ "agent_id": {
4120
+ "$ref": "#/components/schemas/Id"
4121
+ },
4122
+ "input": {
4123
+ "type": "object",
4124
+ "description": "Checked like a run's input, so a quote never prices a run that would be refused.",
4125
+ "additionalProperties": true
4126
+ },
4127
+ "file_ids": {
4128
+ "type": "array",
4129
+ "uniqueItems": true,
4130
+ "items": {
4131
+ "$ref": "#/components/schemas/Id"
4132
+ }
4133
+ },
4134
+ "effort": {
4135
+ "$ref": "#/components/schemas/Effort"
4136
+ },
4137
+ "max_cost_usd": {
4138
+ "type": "number",
4139
+ "exclusiveMinimum": 0
4140
+ }
4141
+ }
4142
+ },
4143
+ "Quote": {
4144
+ "type": "object",
4145
+ "additionalProperties": false,
4146
+ "required": [
4147
+ "quote_id",
4148
+ "expires_at",
4149
+ "agent_id",
4150
+ "agent_version",
4151
+ "effort",
4152
+ "pricing_model",
4153
+ "currency",
4154
+ "min_cost_usd",
4155
+ "max_cost_usd",
4156
+ "typical_duration_s",
4157
+ "charge_timing",
4158
+ "balance",
4159
+ "next_action"
4160
+ ],
4161
+ "properties": {
4162
+ "quote_id": {
4163
+ "type": "string",
4164
+ "minLength": 1,
4165
+ "maxLength": 2048
4166
+ },
4167
+ "expires_at": {
4168
+ "$ref": "#/components/schemas/Timestamp"
4169
+ },
4170
+ "agent_id": {
4171
+ "$ref": "#/components/schemas/Id"
4172
+ },
4173
+ "agent_version": {
4174
+ "type": "integer",
4175
+ "minimum": 1
4176
+ },
4177
+ "effort": {
4178
+ "$ref": "#/components/schemas/Effort"
4179
+ },
4180
+ "pricing_model": {
4181
+ "type": "string",
4182
+ "const": "metered_with_cap"
4183
+ },
4184
+ "currency": {
4185
+ "type": "string",
4186
+ "const": "USD"
4187
+ },
4188
+ "min_cost_usd": {
4189
+ "$ref": "#/components/schemas/Usd"
4190
+ },
4191
+ "max_cost_usd": {
4192
+ "$ref": "#/components/schemas/Usd"
4193
+ },
4194
+ "typical_duration_s": {
4195
+ "type": [
4196
+ "object",
4197
+ "null"
4198
+ ],
4199
+ "additionalProperties": false,
4200
+ "required": [
4201
+ "min",
4202
+ "max"
4203
+ ],
4204
+ "properties": {
4205
+ "min": {
4206
+ "type": "integer",
4207
+ "minimum": 0
4208
+ },
4209
+ "max": {
4210
+ "type": "integer",
4211
+ "minimum": 0
4212
+ }
4213
+ }
4214
+ },
4215
+ "charge_timing": {
4216
+ "type": "object",
4217
+ "additionalProperties": false,
4218
+ "required": [
4219
+ "at_start",
4220
+ "hold_usd",
4221
+ "at_end",
4222
+ "never_above_usd",
4223
+ "summary"
4224
+ ],
4225
+ "properties": {
4226
+ "at_start": {
4227
+ "type": "string",
4228
+ "const": "hold"
4229
+ },
4230
+ "hold_usd": {
4231
+ "$ref": "#/components/schemas/Usd"
4232
+ },
4233
+ "at_end": {
4234
+ "type": "string",
4235
+ "const": "settle_to_metered_usage"
4236
+ },
4237
+ "never_above_usd": {
4238
+ "$ref": "#/components/schemas/Usd"
4239
+ },
4240
+ "summary": {
4241
+ "type": "string"
4242
+ }
4243
+ }
4244
+ },
4245
+ "balance": {
4246
+ "type": [
4247
+ "object",
4248
+ "null"
4249
+ ],
4250
+ "description": "What this credential draws from, at quote time.",
4251
+ "additionalProperties": false,
4252
+ "required": [
4253
+ "usd_remaining",
4254
+ "can_start",
4255
+ "covers_cap"
4256
+ ],
4257
+ "properties": {
4258
+ "usd_remaining": {
4259
+ "type": "number"
4260
+ },
4261
+ "can_start": {
4262
+ "type": "boolean"
4263
+ },
4264
+ "reason": {
4265
+ "type": [
4266
+ "string",
4267
+ "null"
4268
+ ]
4269
+ },
4270
+ "covers_cap": {
4271
+ "type": "boolean"
4272
+ },
4273
+ "shortfall_usd": {
4274
+ "type": [
4275
+ "number",
4276
+ "null"
4277
+ ],
4278
+ "minimum": 0
4279
+ },
4280
+ "monthly_cap_usd": {
4281
+ "type": [
4282
+ "number",
4283
+ "null"
4284
+ ],
4285
+ "minimum": 0
4286
+ },
4287
+ "monthly_cap_left_usd": {
4288
+ "type": [
4289
+ "number",
4290
+ "null"
4291
+ ]
4292
+ }
4293
+ }
4294
+ },
4295
+ "next_action": {
4296
+ "$ref": "#/components/schemas/RequestAction"
4297
+ }
4298
+ }
4299
+ },
4300
+ "Meter": {
4301
+ "type": "string",
4302
+ "enum": [
4303
+ "tokens",
4304
+ "agent_time",
4305
+ "browser_time",
4306
+ "disk"
4307
+ ]
4308
+ },
4309
+ "Usage": {
4310
+ "type": "object",
4311
+ "additionalProperties": false,
4312
+ "required": [
4313
+ "from",
4314
+ "to",
4315
+ "currency",
4316
+ "basis",
4317
+ "group_by",
4318
+ "total_usd",
4319
+ "lines",
4320
+ "account"
4321
+ ],
4322
+ "properties": {
4323
+ "from": {
4324
+ "$ref": "#/components/schemas/Timestamp"
4325
+ },
4326
+ "to": {
4327
+ "$ref": "#/components/schemas/Timestamp"
4328
+ },
4329
+ "currency": {
4330
+ "type": "string",
4331
+ "const": "USD"
4332
+ },
4333
+ "basis": {
4334
+ "type": "string",
4335
+ "enum": [
4336
+ "charge",
4337
+ "estimate"
4338
+ ]
4339
+ },
4340
+ "group_by": {
4341
+ "type": "string",
4342
+ "enum": [
4343
+ "meter",
4344
+ "agent",
4345
+ "key",
4346
+ "day",
4347
+ "region"
4348
+ ]
4349
+ },
4350
+ "total_usd": {
4351
+ "type": [
4352
+ "number",
4353
+ "null"
4354
+ ],
4355
+ "minimum": 0
4356
+ },
4357
+ "lines": {
4358
+ "type": "array",
4359
+ "items": {
4360
+ "$ref": "#/components/schemas/UsageLine"
4361
+ }
4362
+ },
4363
+ "account": {
4364
+ "type": [
4365
+ "object",
4366
+ "null"
4367
+ ],
4368
+ "description": "Hosted only. The account's month and balance.",
4369
+ "additionalProperties": false,
4370
+ "required": [
4371
+ "monthly_cap_usd",
4372
+ "month_to_date_usd",
4373
+ "balance_usd",
4374
+ "hard_stop"
4375
+ ],
4376
+ "properties": {
4377
+ "monthly_cap_usd": {
4378
+ "type": [
4379
+ "number",
4380
+ "null"
4381
+ ],
4382
+ "minimum": 0
4383
+ },
4384
+ "month_to_date_usd": {
4385
+ "type": "number",
4386
+ "minimum": 0
4387
+ },
4388
+ "balance_usd": {
4389
+ "type": [
4390
+ "number",
4391
+ "null"
4392
+ ]
4393
+ },
4394
+ "hard_stop": {
4395
+ "type": "boolean"
4396
+ }
4397
+ }
4398
+ }
4399
+ }
4400
+ },
4401
+ "UsageLine": {
4402
+ "type": "object",
4403
+ "additionalProperties": false,
4404
+ "required": [
4405
+ "group",
4406
+ "usd"
4407
+ ],
4408
+ "properties": {
4409
+ "group": {
4410
+ "type": "string",
4411
+ "description": "The value grouped by, e.g. `tokens`, an agent id, `2026-10-16`, `us`."
4412
+ },
4413
+ "meter": {
4414
+ "$ref": "#/components/schemas/Meter"
4415
+ },
4416
+ "quantity": {
4417
+ "type": "number",
4418
+ "minimum": 0
4419
+ },
4420
+ "unit": {
4421
+ "type": "string",
4422
+ "enum": [
4423
+ "token",
4424
+ "second",
4425
+ "gib_month"
4426
+ ]
4427
+ },
4428
+ "usd": {
4429
+ "type": [
4430
+ "number",
4431
+ "null"
4432
+ ],
4433
+ "minimum": 0
4434
+ }
4435
+ }
4436
+ }
4437
+ },
4438
+ "examples": {
4439
+ "CapabilitiesHosted": {
4440
+ "summary": "Hosted at launch",
4441
+ "value": {
4442
+ "backend": "hosted",
4443
+ "contract": "agentrun.v2/0",
4444
+ "server": {
4445
+ "name": "api.agentrun.ai",
4446
+ "version": "2026.10.16"
4447
+ },
4448
+ "runtimes": [
4449
+ "agentrun"
4450
+ ],
4451
+ "models": {
4452
+ "source": "managed",
4453
+ "default": null
4454
+ },
4455
+ "features": {
4456
+ "agents": {
4457
+ "create": true,
4458
+ "list": true,
4459
+ "update": true
4460
+ },
4461
+ "home": {
4462
+ "export": true,
4463
+ "import": true,
4464
+ "check": true
4465
+ },
4466
+ "runs": {
4467
+ "stop": true,
4468
+ "cancel": true,
4469
+ "kill": false
4470
+ },
4471
+ "messages": {
4472
+ "steer": true,
4473
+ "answer": false,
4474
+ "follow_up": true,
4475
+ "steer_workflow_runs": false
4476
+ },
4477
+ "timeline": {
4478
+ "long_poll": true,
4479
+ "sse": false,
4480
+ "live_rows": false
4481
+ },
4482
+ "files": {
4483
+ "upload": true,
4484
+ "read": true,
4485
+ "range": true,
4486
+ "during_run": false
4487
+ },
4488
+ "quotes": true,
4489
+ "usage": {
4490
+ "basis": "charge",
4491
+ "meters": [
4492
+ "tokens",
4493
+ "agent_time",
4494
+ "browser_time",
4495
+ "disk"
4496
+ ]
4497
+ },
4498
+ "efforts": [
4499
+ "low",
4500
+ "medium",
4501
+ "high"
4502
+ ],
4503
+ "browser": "browserbase",
4504
+ "sign_ins": true,
4505
+ "vault": false,
4506
+ "query": false
4507
+ },
4508
+ "regions": [
4509
+ {
4510
+ "id": "us",
4511
+ "jurisdiction": "US",
4512
+ "state": "live"
4513
+ },
4514
+ {
4515
+ "id": "eu",
4516
+ "jurisdiction": "EU",
4517
+ "state": "planned"
4518
+ }
4519
+ ],
4520
+ "limits": {
4521
+ "max_body_bytes": 1048576,
4522
+ "max_upload_bytes": 99614720,
4523
+ "max_files_per_run": 10,
4524
+ "max_message_chars": 20000,
4525
+ "max_concurrent_runs": null,
4526
+ "timeline_max_wait_ms": 25000,
4527
+ "timeline_page_rows": 200,
4528
+ "idempotency_ttl_s": 86400,
4529
+ "input_wait_s": 1800,
4530
+ "max_cost_usd": {
4531
+ "min": 0.5,
4532
+ "max": 2000
4533
+ }
4534
+ }
4535
+ }
4536
+ },
4537
+ "CapabilitiesLocal": {
4538
+ "summary": "agentrun-serve 0.1.0 on Linux",
4539
+ "value": {
4540
+ "backend": "local",
4541
+ "contract": "agentrun.v2/0",
4542
+ "server": {
4543
+ "name": "@parcha/agentrun-serve",
4544
+ "version": "0.1.0",
4545
+ "platform": "linux"
4546
+ },
4547
+ "runtimes": [
4548
+ "reference"
4549
+ ],
4550
+ "models": {
4551
+ "source": "chatgpt",
4552
+ "default": null
4553
+ },
4554
+ "features": {
4555
+ "agents": {
4556
+ "create": true,
4557
+ "list": true,
4558
+ "update": true
4559
+ },
4560
+ "home": {
4561
+ "export": true,
4562
+ "import": true,
4563
+ "check": true
4564
+ },
4565
+ "runs": {
4566
+ "stop": true,
4567
+ "cancel": true,
4568
+ "kill": true
4569
+ },
4570
+ "messages": {
4571
+ "steer": true,
4572
+ "answer": true,
4573
+ "follow_up": false,
4574
+ "steer_workflow_runs": false
4575
+ },
4576
+ "timeline": {
4577
+ "long_poll": true,
4578
+ "sse": true,
4579
+ "live_rows": true
4580
+ },
4581
+ "files": {
4582
+ "upload": true,
4583
+ "read": true,
4584
+ "range": false,
4585
+ "during_run": true
4586
+ },
4587
+ "quotes": false,
4588
+ "usage": {
4589
+ "basis": "estimate",
4590
+ "meters": [
4591
+ "tokens"
4592
+ ]
4593
+ },
4594
+ "efforts": [
4595
+ "low",
4596
+ "medium",
4597
+ "high"
4598
+ ],
4599
+ "browser": "browserbase",
4600
+ "sign_ins": true,
4601
+ "vault": false,
4602
+ "query": false
4603
+ },
4604
+ "regions": [
4605
+ {
4606
+ "id": "local",
4607
+ "jurisdiction": null,
4608
+ "state": "live"
4609
+ }
4610
+ ],
4611
+ "limits": {
4612
+ "max_body_bytes": 1048576,
4613
+ "max_upload_bytes": null,
4614
+ "max_files_per_run": 100,
4615
+ "max_message_chars": 20000,
4616
+ "max_concurrent_runs": 2,
4617
+ "timeline_max_wait_ms": 25000,
4618
+ "timeline_page_rows": 500,
4619
+ "idempotency_ttl_s": 86400,
4620
+ "input_wait_s": 1800,
4621
+ "max_cost_usd": null
4622
+ }
4623
+ }
4624
+ },
4625
+ "RunQueued": {
4626
+ "value": {
4627
+ "run_id": "0199e7a2-5c1e-7b3a-9f10-2d4c8e6a1b20",
4628
+ "agent_id": "site-reporter",
4629
+ "agent_version": 1,
4630
+ "sha": "3f1c2a9b8e7d6c5b4a3f2e1d0c9b8a7f6e5d4c3b",
4631
+ "status": "queued",
4632
+ "state": "working",
4633
+ "title": "Log in to acme.example and report what is behind the login",
4634
+ "effort": "low",
4635
+ "created_at": "2026-10-16T05:30:00Z",
4636
+ "updated_at": "2026-10-16T05:30:00Z",
4637
+ "ended_at": null,
4638
+ "result": null,
4639
+ "error": null,
4640
+ "cost": {
4641
+ "usd": null,
4642
+ "basis": "charge",
4643
+ "charge_state": "held",
4644
+ "cap_usd": 2
4645
+ },
4646
+ "poll_after_ms": 2000
4647
+ }
4648
+ },
4649
+ "RunCompleted": {
4650
+ "value": {
4651
+ "run_id": "r1k2j3h4-9f2a",
4652
+ "agent_id": "site-reporter",
4653
+ "agent_version": 1,
4654
+ "sha": null,
4655
+ "status": "completed",
4656
+ "state": "idle",
4657
+ "title": "Log in to acme.example and report what is behind the login",
4658
+ "created_at": "2026-10-16T05:30:00Z",
4659
+ "updated_at": "2026-10-16T05:41:12Z",
4660
+ "ended_at": "2026-10-16T05:41:12Z",
4661
+ "result": {
4662
+ "output": {
4663
+ "report": "report.md",
4664
+ "pages": "pages.csv"
4665
+ },
4666
+ "final_answer": "I signed in and wrote report.md and pages.csv."
4667
+ },
4668
+ "error": null,
4669
+ "cost": {
4670
+ "usd": 0.4123,
4671
+ "basis": "estimate",
4672
+ "charge_state": null,
4673
+ "cap_usd": 1
4674
+ },
4675
+ "poll_after_ms": 0
4676
+ }
4677
+ },
4678
+ "TimelinePageLive": {
4679
+ "value": {
4680
+ "run_id": "r1k2j3h4-9f2a",
4681
+ "status": "input_required",
4682
+ "state": "waiting",
4683
+ "reset": false,
4684
+ "rows": [
4685
+ {
4686
+ "id": "0:7:1",
4687
+ "timestamp": "2026-10-16T05:33:02.120Z",
4688
+ "created_at": "2026-10-16T05:33:02.120Z",
4689
+ "kind": "tool_use",
4690
+ "summary": "Asked you to sign in to acme.example",
4691
+ "agent_label": null,
4692
+ "tool_name": "request_sign_in",
4693
+ "tool_use_id": "call_9",
4694
+ "tool_status": null,
4695
+ "tool_input_preview": "{\"site\":\"acme.example\"}",
4696
+ "tool_result_preview": null,
4697
+ "tool_result_size_bytes": null,
4698
+ "text": null,
4699
+ "seq": 41,
4700
+ "conversation_id": 0,
4701
+ "round": 7
4702
+ },
4703
+ {
4704
+ "id": "0:8:waiting",
4705
+ "timestamp": "2026-10-16T05:33:02.300Z",
4706
+ "created_at": "2026-10-16T05:33:02.300Z",
4707
+ "kind": "waiting",
4708
+ "summary": "Waiting for you: sign in on the live browser",
4709
+ "agent_label": null,
4710
+ "tool_name": null,
4711
+ "tool_use_id": null,
4712
+ "tool_status": null,
4713
+ "tool_input_preview": null,
4714
+ "tool_result_preview": null,
4715
+ "tool_result_size_bytes": null,
4716
+ "text": null,
4717
+ "seq": 43,
4718
+ "conversation_id": 0
4719
+ }
4720
+ ],
4721
+ "drop": [
4722
+ "0:live:text_block"
4723
+ ],
4724
+ "next_after": 118,
4725
+ "unchanged": false,
4726
+ "has_more": false,
4727
+ "final": false,
4728
+ "cost": {
4729
+ "usd": 0.0812,
4730
+ "basis": "estimate",
4731
+ "charge_state": null,
4732
+ "cap_usd": 1
4733
+ },
4734
+ "poll_after_ms": 2000
4735
+ }
4736
+ },
4737
+ "ErrorSpendCap": {
4738
+ "value": {
4739
+ "error": {
4740
+ "code": "spend_cap_reached",
4741
+ "message": "This run needs $2.00 and the account has $0.40 left of its $200.00 monthly cap.",
4742
+ "retryable": false,
4743
+ "details": {
4744
+ "scope": "account",
4745
+ "period": "month",
4746
+ "cap_usd": 200,
4747
+ "used_usd": 199.6,
4748
+ "needed_usd": 2
4749
+ },
4750
+ "next_action": {
4751
+ "type": "person",
4752
+ "url": "https://agentrun.ai/console/limits",
4753
+ "description": "Raise the monthly cap, up to $2,000."
4754
+ }
4755
+ }
4756
+ }
4757
+ },
4758
+ "ErrorNotContinuable": {
4759
+ "value": {
4760
+ "error": {
4761
+ "code": "not_continuable",
4762
+ "message": "This run failed. Start a new run of the agent.",
4763
+ "retryable": false,
4764
+ "next_action": {
4765
+ "type": "request",
4766
+ "method": "POST",
4767
+ "path": "/agents/site-reporter/runs",
4768
+ "caller_supplies": [
4769
+ "input",
4770
+ "Idempotency-Key"
4771
+ ]
4772
+ }
4773
+ }
4774
+ }
4775
+ },
4776
+ "ErrorInputInvalid": {
4777
+ "value": {
4778
+ "error": {
4779
+ "code": "input_invalid",
4780
+ "message": "The definition has a field it does not keep.",
4781
+ "retryable": false,
4782
+ "fields": [
4783
+ {
4784
+ "field": "definition.model",
4785
+ "reason": "not_allowed",
4786
+ "message": "The definition names no model; the host binds it.",
4787
+ "fix": "Remove definition.model."
4788
+ }
4789
+ ]
4790
+ }
4791
+ }
4792
+ },
4793
+ "ErrorUnsupported": {
4794
+ "value": {
4795
+ "error": {
4796
+ "code": "unsupported_here",
4797
+ "message": "This server has no billing, so it gives no quotes.",
4798
+ "retryable": false,
4799
+ "capability": "quotes"
4800
+ }
4801
+ }
4802
+ }
4803
+ }
4804
+ }
4805
+ }