agentgui 1.0.418 → 1.0.419
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/openapi.json +3310 -0
- package/package.json +1 -1
package/openapi.json
ADDED
|
@@ -0,0 +1,3310 @@
|
|
|
1
|
+
{
|
|
2
|
+
"openapi": "3.1.1",
|
|
3
|
+
"info": {
|
|
4
|
+
"title": "Agent Connect Protocol",
|
|
5
|
+
"version": "0.2.3"
|
|
6
|
+
},
|
|
7
|
+
"tags": [
|
|
8
|
+
{
|
|
9
|
+
"name": "Agents",
|
|
10
|
+
"description": "Agents are AI workflows that can be configured and/or executed on this server. This means that a client of this server can start a Run on any of the Agents supported by this server.\nEach agent may support different features of ACP, also each agent specifies the schemas of the objects carried by ACP for configuration, input, output, interrupts and state. \nDetails of the ACP features and the schemas are kept in the ACP descriptor of the specific agent. This object can be retrieved through this ACP interface or is found in the ACP extension of the agent record in the agent directory.\nSee `Agent` and `AgentACPDescriptor` models below for more info."
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
"name": "Threads",
|
|
14
|
+
"description": "If supported by the involved agents, Run can be grouped in Threads. \nWhen a run is executed on a thread is called Thread Run. At the end of a Thread Run, the server keeps a thread state associated to the thread.\nA thread keeps track of agent states at every step so that continuity of the context is preserved. Moreover, such a book-keeping enables us some granular controls like debugging, interrupting or replaying a run/invocation.\n\nA thread state is a data context defined by the developer and can be anything and it gets passed through from one invocation to another so that business logic is instrumented by data.\n\nA thread keeps track of the whole state history. At every step, it also applies a checkpoint, which is primarily a `uuid`, so that it is easier to refer to a chunk of the history.\n\nOne can easily query the last state, a specific state (by checkpoint id), the whole state history, or, a part of the history (from a checkpoint).\n\nSee `Thread`, `ThreadState` and `Checkpoint` models below for more info."
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"name": "Thread Runs",
|
|
18
|
+
"description": "Thread Runs are runs created on a thread. \nA Thread Run can be created on a thread **only** if there is no run in the `pending` status on the same thread, i.e. if the thread is in the state `idle`\nNote that runs over the same thread can be executed on different agents, as long as the agents support the same thread state format.\nSee `Thread` and `RunCreateStateful` for more info."
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"name": "Stateless Runs",
|
|
22
|
+
"description": "A Run represents an execution of an agent.\nThe output of a Run can be a final result or an interrupt.\nResult from a run can be retrieved by polling or by blocking and waiting for the result.\nSee `Run` and `RunOutput` models below for more info."
|
|
23
|
+
}
|
|
24
|
+
],
|
|
25
|
+
"paths": {
|
|
26
|
+
"/agents/search": {
|
|
27
|
+
"post": {
|
|
28
|
+
"tags": [
|
|
29
|
+
"Agents"
|
|
30
|
+
],
|
|
31
|
+
"summary": "Search Agents",
|
|
32
|
+
"description": "Returns a list of agents matching the criteria provided in the request.\n\nThis endpoint also functions as the endpoint to list all agents.",
|
|
33
|
+
"operationId": "search_agents",
|
|
34
|
+
"requestBody": {
|
|
35
|
+
"content": {
|
|
36
|
+
"application/json": {
|
|
37
|
+
"schema": {
|
|
38
|
+
"$ref": "#/components/schemas/AgentSearchRequest"
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
"required": true
|
|
43
|
+
},
|
|
44
|
+
"responses": {
|
|
45
|
+
"200": {
|
|
46
|
+
"description": "Success",
|
|
47
|
+
"content": {
|
|
48
|
+
"application/json": {
|
|
49
|
+
"schema": {
|
|
50
|
+
"items": {
|
|
51
|
+
"$ref": "#/components/schemas/Agent"
|
|
52
|
+
},
|
|
53
|
+
"type": "array",
|
|
54
|
+
"title": "Matching Agent List"
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
"422": {
|
|
60
|
+
"description": "Validation Error",
|
|
61
|
+
"content": {
|
|
62
|
+
"application/json": {
|
|
63
|
+
"schema": {
|
|
64
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
"/agents/{agent_id}": {
|
|
73
|
+
"get": {
|
|
74
|
+
"tags": [
|
|
75
|
+
"Agents"
|
|
76
|
+
],
|
|
77
|
+
"summary": "Get Agent",
|
|
78
|
+
"description": "Get an agent by ID.",
|
|
79
|
+
"operationId": "get_agent_by_id",
|
|
80
|
+
"parameters": [
|
|
81
|
+
{
|
|
82
|
+
"description": "The ID of the agent.",
|
|
83
|
+
"required": true,
|
|
84
|
+
"schema": {
|
|
85
|
+
"type": "string",
|
|
86
|
+
"format": "uuid",
|
|
87
|
+
"title": "Agent Id",
|
|
88
|
+
"description": "The ID of the agent."
|
|
89
|
+
},
|
|
90
|
+
"name": "agent_id",
|
|
91
|
+
"in": "path"
|
|
92
|
+
}
|
|
93
|
+
],
|
|
94
|
+
"responses": {
|
|
95
|
+
"200": {
|
|
96
|
+
"description": "Success",
|
|
97
|
+
"content": {
|
|
98
|
+
"application/json": {
|
|
99
|
+
"schema": {
|
|
100
|
+
"$ref": "#/components/schemas/Agent"
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
},
|
|
105
|
+
"404": {
|
|
106
|
+
"description": "Not Found",
|
|
107
|
+
"content": {
|
|
108
|
+
"application/json": {
|
|
109
|
+
"schema": {
|
|
110
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
},
|
|
118
|
+
"/agents/{agent_id}/descriptor": {
|
|
119
|
+
"get": {
|
|
120
|
+
"tags": [
|
|
121
|
+
"Agents"
|
|
122
|
+
],
|
|
123
|
+
"summary": "Get Agent ACP Descriptor from its id",
|
|
124
|
+
"description": "Get agent ACP descriptor by agent ID.",
|
|
125
|
+
"operationId": "get_acp_descriptor_by_id",
|
|
126
|
+
"parameters": [
|
|
127
|
+
{
|
|
128
|
+
"description": "The ID of the agent.",
|
|
129
|
+
"required": true,
|
|
130
|
+
"schema": {
|
|
131
|
+
"type": "string",
|
|
132
|
+
"format": "uuid",
|
|
133
|
+
"title": "Agent Id",
|
|
134
|
+
"description": "The ID of the agent."
|
|
135
|
+
},
|
|
136
|
+
"name": "agent_id",
|
|
137
|
+
"in": "path"
|
|
138
|
+
}
|
|
139
|
+
],
|
|
140
|
+
"responses": {
|
|
141
|
+
"200": {
|
|
142
|
+
"description": "Success",
|
|
143
|
+
"content": {
|
|
144
|
+
"application/json": {
|
|
145
|
+
"schema": {
|
|
146
|
+
"$ref": "#/components/schemas/AgentACPDescriptor"
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
},
|
|
151
|
+
"404": {
|
|
152
|
+
"description": "Not Found",
|
|
153
|
+
"content": {
|
|
154
|
+
"application/json": {
|
|
155
|
+
"schema": {
|
|
156
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
},
|
|
161
|
+
"422": {
|
|
162
|
+
"description": "Validation Error",
|
|
163
|
+
"content": {
|
|
164
|
+
"application/json": {
|
|
165
|
+
"schema": {
|
|
166
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
},
|
|
174
|
+
"/threads": {
|
|
175
|
+
"post": {
|
|
176
|
+
"tags": [
|
|
177
|
+
"Threads"
|
|
178
|
+
],
|
|
179
|
+
"summary": "Create an empty Thread",
|
|
180
|
+
"description": "Create a new thread. ",
|
|
181
|
+
"operationId": "create_thread",
|
|
182
|
+
"requestBody": {
|
|
183
|
+
"content": {
|
|
184
|
+
"application/json": {
|
|
185
|
+
"schema": {
|
|
186
|
+
"$ref": "#/components/schemas/ThreadCreate"
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
},
|
|
190
|
+
"required": true
|
|
191
|
+
},
|
|
192
|
+
"responses": {
|
|
193
|
+
"200": {
|
|
194
|
+
"description": "Success",
|
|
195
|
+
"content": {
|
|
196
|
+
"application/json": {
|
|
197
|
+
"schema": {
|
|
198
|
+
"$ref": "#/components/schemas/Thread"
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
},
|
|
203
|
+
"409": {
|
|
204
|
+
"description": "Conflict",
|
|
205
|
+
"content": {
|
|
206
|
+
"application/json": {
|
|
207
|
+
"schema": {
|
|
208
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
},
|
|
213
|
+
"422": {
|
|
214
|
+
"description": "Validation Error",
|
|
215
|
+
"content": {
|
|
216
|
+
"application/json": {
|
|
217
|
+
"schema": {
|
|
218
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
},
|
|
226
|
+
"/threads/search": {
|
|
227
|
+
"post": {
|
|
228
|
+
"tags": [
|
|
229
|
+
"Threads"
|
|
230
|
+
],
|
|
231
|
+
"summary": "Search Threads",
|
|
232
|
+
"description": "Search for threads.\n\nThis endpoint also functions as the endpoint to list all threads.",
|
|
233
|
+
"operationId": "search_threads",
|
|
234
|
+
"requestBody": {
|
|
235
|
+
"content": {
|
|
236
|
+
"application/json": {
|
|
237
|
+
"schema": {
|
|
238
|
+
"$ref": "#/components/schemas/ThreadSearchRequest"
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
},
|
|
242
|
+
"required": true
|
|
243
|
+
},
|
|
244
|
+
"responses": {
|
|
245
|
+
"200": {
|
|
246
|
+
"description": "Success",
|
|
247
|
+
"content": {
|
|
248
|
+
"application/json": {
|
|
249
|
+
"schema": {
|
|
250
|
+
"items": {
|
|
251
|
+
"$ref": "#/components/schemas/Thread"
|
|
252
|
+
},
|
|
253
|
+
"type": "array",
|
|
254
|
+
"title": "Response Search Agents Agents Search Post"
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
},
|
|
259
|
+
"422": {
|
|
260
|
+
"description": "Validation Error",
|
|
261
|
+
"content": {
|
|
262
|
+
"application/json": {
|
|
263
|
+
"schema": {
|
|
264
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
},
|
|
272
|
+
"/threads/{thread_id}/history": {
|
|
273
|
+
"get": {
|
|
274
|
+
"tags": [
|
|
275
|
+
"Threads"
|
|
276
|
+
],
|
|
277
|
+
"summary": "Get Thread History",
|
|
278
|
+
"description": "Get all past states for a thread.",
|
|
279
|
+
"operationId": "get_thread_history",
|
|
280
|
+
"parameters": [
|
|
281
|
+
{
|
|
282
|
+
"description": "The ID of the thread.",
|
|
283
|
+
"required": true,
|
|
284
|
+
"schema": {
|
|
285
|
+
"type": "string",
|
|
286
|
+
"format": "uuid",
|
|
287
|
+
"title": "Thread Id",
|
|
288
|
+
"description": "The ID of the thread."
|
|
289
|
+
},
|
|
290
|
+
"name": "thread_id",
|
|
291
|
+
"in": "path"
|
|
292
|
+
},
|
|
293
|
+
{
|
|
294
|
+
"required": false,
|
|
295
|
+
"schema": {
|
|
296
|
+
"type": "integer",
|
|
297
|
+
"title": "Limit",
|
|
298
|
+
"default": 10
|
|
299
|
+
},
|
|
300
|
+
"name": "limit",
|
|
301
|
+
"in": "query"
|
|
302
|
+
},
|
|
303
|
+
{
|
|
304
|
+
"required": false,
|
|
305
|
+
"schema": {
|
|
306
|
+
"type": "string",
|
|
307
|
+
"title": "Before"
|
|
308
|
+
},
|
|
309
|
+
"name": "before",
|
|
310
|
+
"in": "query"
|
|
311
|
+
}
|
|
312
|
+
],
|
|
313
|
+
"responses": {
|
|
314
|
+
"200": {
|
|
315
|
+
"description": "Success",
|
|
316
|
+
"content": {
|
|
317
|
+
"application/json": {
|
|
318
|
+
"schema": {
|
|
319
|
+
"items": {
|
|
320
|
+
"$ref": "#/components/schemas/ThreadState"
|
|
321
|
+
},
|
|
322
|
+
"type": "array"
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
},
|
|
327
|
+
"404": {
|
|
328
|
+
"description": "Not Found",
|
|
329
|
+
"content": {
|
|
330
|
+
"application/json": {
|
|
331
|
+
"schema": {
|
|
332
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
},
|
|
337
|
+
"422": {
|
|
338
|
+
"description": "Validation Error",
|
|
339
|
+
"content": {
|
|
340
|
+
"application/json": {
|
|
341
|
+
"schema": {
|
|
342
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
}
|
|
349
|
+
},
|
|
350
|
+
"/threads/{thread_id}/copy": {
|
|
351
|
+
"post": {
|
|
352
|
+
"tags": [
|
|
353
|
+
"Threads"
|
|
354
|
+
],
|
|
355
|
+
"summary": "Copy Thread",
|
|
356
|
+
"description": "Create a new thread with a copy of the state and checkpoints from an existing thread.",
|
|
357
|
+
"operationId": "copy_thread",
|
|
358
|
+
"parameters": [
|
|
359
|
+
{
|
|
360
|
+
"description": "The ID of the thread.",
|
|
361
|
+
"required": true,
|
|
362
|
+
"schema": {
|
|
363
|
+
"type": "string",
|
|
364
|
+
"format": "uuid",
|
|
365
|
+
"title": "Thread Id",
|
|
366
|
+
"description": "The ID of the thread."
|
|
367
|
+
},
|
|
368
|
+
"name": "thread_id",
|
|
369
|
+
"in": "path"
|
|
370
|
+
}
|
|
371
|
+
],
|
|
372
|
+
"responses": {
|
|
373
|
+
"200": {
|
|
374
|
+
"description": "Success",
|
|
375
|
+
"content": {
|
|
376
|
+
"application/json": {
|
|
377
|
+
"schema": {
|
|
378
|
+
"$ref": "#/components/schemas/Thread"
|
|
379
|
+
}
|
|
380
|
+
}
|
|
381
|
+
}
|
|
382
|
+
},
|
|
383
|
+
"404": {
|
|
384
|
+
"description": "Not Found",
|
|
385
|
+
"content": {
|
|
386
|
+
"application/json": {
|
|
387
|
+
"schema": {
|
|
388
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
389
|
+
}
|
|
390
|
+
}
|
|
391
|
+
}
|
|
392
|
+
},
|
|
393
|
+
"422": {
|
|
394
|
+
"description": "Validation Error",
|
|
395
|
+
"content": {
|
|
396
|
+
"application/json": {
|
|
397
|
+
"schema": {
|
|
398
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
399
|
+
}
|
|
400
|
+
}
|
|
401
|
+
}
|
|
402
|
+
}
|
|
403
|
+
}
|
|
404
|
+
}
|
|
405
|
+
},
|
|
406
|
+
"/threads/{thread_id}": {
|
|
407
|
+
"parameters": [
|
|
408
|
+
{
|
|
409
|
+
"description": "The ID of the thread.",
|
|
410
|
+
"required": true,
|
|
411
|
+
"schema": {
|
|
412
|
+
"type": "string",
|
|
413
|
+
"format": "uuid",
|
|
414
|
+
"title": "Thread ID",
|
|
415
|
+
"description": "The ID of the thread."
|
|
416
|
+
},
|
|
417
|
+
"name": "thread_id",
|
|
418
|
+
"in": "path"
|
|
419
|
+
}
|
|
420
|
+
],
|
|
421
|
+
"get": {
|
|
422
|
+
"tags": [
|
|
423
|
+
"Threads"
|
|
424
|
+
],
|
|
425
|
+
"summary": "Get Thread",
|
|
426
|
+
"description": "Get a thread from its ID. ",
|
|
427
|
+
"operationId": "get_thread",
|
|
428
|
+
"responses": {
|
|
429
|
+
"200": {
|
|
430
|
+
"description": "Success",
|
|
431
|
+
"content": {
|
|
432
|
+
"application/json": {
|
|
433
|
+
"schema": {
|
|
434
|
+
"$ref": "#/components/schemas/Thread"
|
|
435
|
+
}
|
|
436
|
+
}
|
|
437
|
+
}
|
|
438
|
+
},
|
|
439
|
+
"404": {
|
|
440
|
+
"description": "Not Found",
|
|
441
|
+
"content": {
|
|
442
|
+
"application/json": {
|
|
443
|
+
"schema": {
|
|
444
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
445
|
+
}
|
|
446
|
+
}
|
|
447
|
+
}
|
|
448
|
+
},
|
|
449
|
+
"422": {
|
|
450
|
+
"description": "Validation Error",
|
|
451
|
+
"content": {
|
|
452
|
+
"application/json": {
|
|
453
|
+
"schema": {
|
|
454
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
455
|
+
}
|
|
456
|
+
}
|
|
457
|
+
}
|
|
458
|
+
}
|
|
459
|
+
}
|
|
460
|
+
},
|
|
461
|
+
"delete": {
|
|
462
|
+
"tags": [
|
|
463
|
+
"Threads"
|
|
464
|
+
],
|
|
465
|
+
"summary": "Delete a thread. If the thread contains any pending run, deletion fails.",
|
|
466
|
+
"description": "Delete a thread.",
|
|
467
|
+
"operationId": "delete_thread",
|
|
468
|
+
"responses": {
|
|
469
|
+
"204": {
|
|
470
|
+
"description": "Success"
|
|
471
|
+
},
|
|
472
|
+
"404": {
|
|
473
|
+
"description": "Not Found",
|
|
474
|
+
"content": {
|
|
475
|
+
"application/json": {
|
|
476
|
+
"schema": {
|
|
477
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
478
|
+
}
|
|
479
|
+
}
|
|
480
|
+
}
|
|
481
|
+
},
|
|
482
|
+
"422": {
|
|
483
|
+
"description": "Validation Error",
|
|
484
|
+
"content": {
|
|
485
|
+
"application/json": {
|
|
486
|
+
"schema": {
|
|
487
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
488
|
+
}
|
|
489
|
+
}
|
|
490
|
+
}
|
|
491
|
+
}
|
|
492
|
+
}
|
|
493
|
+
},
|
|
494
|
+
"patch": {
|
|
495
|
+
"tags": [
|
|
496
|
+
"Threads"
|
|
497
|
+
],
|
|
498
|
+
"summary": "Patch Thread",
|
|
499
|
+
"description": "Update a thread.",
|
|
500
|
+
"operationId": "patch_thread",
|
|
501
|
+
"requestBody": {
|
|
502
|
+
"content": {
|
|
503
|
+
"application/json": {
|
|
504
|
+
"schema": {
|
|
505
|
+
"$ref": "#/components/schemas/ThreadPatch"
|
|
506
|
+
}
|
|
507
|
+
}
|
|
508
|
+
},
|
|
509
|
+
"required": true
|
|
510
|
+
},
|
|
511
|
+
"responses": {
|
|
512
|
+
"200": {
|
|
513
|
+
"description": "Success",
|
|
514
|
+
"content": {
|
|
515
|
+
"application/json": {
|
|
516
|
+
"schema": {
|
|
517
|
+
"$ref": "#/components/schemas/Thread"
|
|
518
|
+
}
|
|
519
|
+
}
|
|
520
|
+
}
|
|
521
|
+
},
|
|
522
|
+
"404": {
|
|
523
|
+
"description": "Not Found",
|
|
524
|
+
"content": {
|
|
525
|
+
"application/json": {
|
|
526
|
+
"schema": {
|
|
527
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
528
|
+
}
|
|
529
|
+
}
|
|
530
|
+
}
|
|
531
|
+
},
|
|
532
|
+
"422": {
|
|
533
|
+
"description": "Validation Error",
|
|
534
|
+
"content": {
|
|
535
|
+
"application/json": {
|
|
536
|
+
"schema": {
|
|
537
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
538
|
+
}
|
|
539
|
+
}
|
|
540
|
+
}
|
|
541
|
+
}
|
|
542
|
+
}
|
|
543
|
+
}
|
|
544
|
+
},
|
|
545
|
+
"/threads/{thread_id}/runs": {
|
|
546
|
+
"parameters": [
|
|
547
|
+
{
|
|
548
|
+
"description": "The ID of the thread.",
|
|
549
|
+
"required": true,
|
|
550
|
+
"schema": {
|
|
551
|
+
"type": "string",
|
|
552
|
+
"format": "uuid",
|
|
553
|
+
"title": "Thread ID",
|
|
554
|
+
"description": "The ID of the thread."
|
|
555
|
+
},
|
|
556
|
+
"name": "thread_id",
|
|
557
|
+
"in": "path"
|
|
558
|
+
}
|
|
559
|
+
],
|
|
560
|
+
"get": {
|
|
561
|
+
"tags": [
|
|
562
|
+
"Thread Runs"
|
|
563
|
+
],
|
|
564
|
+
"summary": "List Runs for a thread",
|
|
565
|
+
"description": "List runs for a thread.",
|
|
566
|
+
"operationId": "list_thread_runs",
|
|
567
|
+
"parameters": [
|
|
568
|
+
{
|
|
569
|
+
"required": false,
|
|
570
|
+
"schema": {
|
|
571
|
+
"type": "integer",
|
|
572
|
+
"title": "Limit",
|
|
573
|
+
"default": 10
|
|
574
|
+
},
|
|
575
|
+
"name": "limit",
|
|
576
|
+
"in": "query"
|
|
577
|
+
},
|
|
578
|
+
{
|
|
579
|
+
"required": false,
|
|
580
|
+
"schema": {
|
|
581
|
+
"type": "integer",
|
|
582
|
+
"title": "Offset",
|
|
583
|
+
"default": 0
|
|
584
|
+
},
|
|
585
|
+
"name": "offset",
|
|
586
|
+
"in": "query"
|
|
587
|
+
}
|
|
588
|
+
],
|
|
589
|
+
"responses": {
|
|
590
|
+
"200": {
|
|
591
|
+
"description": "Success",
|
|
592
|
+
"content": {
|
|
593
|
+
"application/json": {
|
|
594
|
+
"schema": {
|
|
595
|
+
"items": {
|
|
596
|
+
"$ref": "#/components/schemas/RunStateful"
|
|
597
|
+
},
|
|
598
|
+
"type": "array"
|
|
599
|
+
}
|
|
600
|
+
}
|
|
601
|
+
}
|
|
602
|
+
},
|
|
603
|
+
"404": {
|
|
604
|
+
"description": "Not Found",
|
|
605
|
+
"content": {
|
|
606
|
+
"application/json": {
|
|
607
|
+
"schema": {
|
|
608
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
609
|
+
}
|
|
610
|
+
}
|
|
611
|
+
}
|
|
612
|
+
},
|
|
613
|
+
"422": {
|
|
614
|
+
"description": "Validation Error",
|
|
615
|
+
"content": {
|
|
616
|
+
"application/json": {
|
|
617
|
+
"schema": {
|
|
618
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
619
|
+
}
|
|
620
|
+
}
|
|
621
|
+
}
|
|
622
|
+
}
|
|
623
|
+
}
|
|
624
|
+
},
|
|
625
|
+
"post": {
|
|
626
|
+
"tags": [
|
|
627
|
+
"Thread Runs"
|
|
628
|
+
],
|
|
629
|
+
"summary": "Create a Background Run on a thread",
|
|
630
|
+
"description": "Create a run on a thread, return the run ID immediately. Don't wait for the final run output.",
|
|
631
|
+
"operationId": "create_thread_run",
|
|
632
|
+
"requestBody": {
|
|
633
|
+
"content": {
|
|
634
|
+
"application/json": {
|
|
635
|
+
"schema": {
|
|
636
|
+
"$ref": "#/components/schemas/RunCreateStateful"
|
|
637
|
+
}
|
|
638
|
+
}
|
|
639
|
+
},
|
|
640
|
+
"required": true
|
|
641
|
+
},
|
|
642
|
+
"callbacks": {
|
|
643
|
+
"runstatuschange": {
|
|
644
|
+
"{$request.body#/webhook}": {
|
|
645
|
+
"post": {
|
|
646
|
+
"requestBody": {
|
|
647
|
+
"required": true,
|
|
648
|
+
"content": {
|
|
649
|
+
"application/json": {
|
|
650
|
+
"schema": {
|
|
651
|
+
"$ref": "#/components/schemas/RunStateful"
|
|
652
|
+
}
|
|
653
|
+
}
|
|
654
|
+
}
|
|
655
|
+
},
|
|
656
|
+
"responses": {
|
|
657
|
+
"200": {
|
|
658
|
+
"description": "Your server returns this code if it accepts the callback"
|
|
659
|
+
}
|
|
660
|
+
}
|
|
661
|
+
}
|
|
662
|
+
}
|
|
663
|
+
}
|
|
664
|
+
},
|
|
665
|
+
"responses": {
|
|
666
|
+
"200": {
|
|
667
|
+
"description": "Success",
|
|
668
|
+
"content": {
|
|
669
|
+
"application/json": {
|
|
670
|
+
"schema": {
|
|
671
|
+
"$ref": "#/components/schemas/RunStateful"
|
|
672
|
+
}
|
|
673
|
+
}
|
|
674
|
+
}
|
|
675
|
+
},
|
|
676
|
+
"404": {
|
|
677
|
+
"description": "Not Found",
|
|
678
|
+
"content": {
|
|
679
|
+
"application/json": {
|
|
680
|
+
"schema": {
|
|
681
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
682
|
+
}
|
|
683
|
+
}
|
|
684
|
+
}
|
|
685
|
+
},
|
|
686
|
+
"409": {
|
|
687
|
+
"description": "Conflict",
|
|
688
|
+
"content": {
|
|
689
|
+
"application/json": {
|
|
690
|
+
"schema": {
|
|
691
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
692
|
+
}
|
|
693
|
+
}
|
|
694
|
+
}
|
|
695
|
+
},
|
|
696
|
+
"422": {
|
|
697
|
+
"description": "Validation Error",
|
|
698
|
+
"content": {
|
|
699
|
+
"application/json": {
|
|
700
|
+
"schema": {
|
|
701
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
702
|
+
}
|
|
703
|
+
}
|
|
704
|
+
}
|
|
705
|
+
}
|
|
706
|
+
}
|
|
707
|
+
}
|
|
708
|
+
},
|
|
709
|
+
"/threads/{thread_id}/runs/stream": {
|
|
710
|
+
"post": {
|
|
711
|
+
"tags": [
|
|
712
|
+
"Thread Runs"
|
|
713
|
+
],
|
|
714
|
+
"summary": "Create a run on a thread and stream its output",
|
|
715
|
+
"description": "Create a run on a thread and join its output stream. See 'GET /runs/{run_id}/stream' for details on the return values.",
|
|
716
|
+
"operationId": "create_and_stream_thread_run_output",
|
|
717
|
+
"parameters": [
|
|
718
|
+
{
|
|
719
|
+
"description": "The ID of the thread.",
|
|
720
|
+
"required": true,
|
|
721
|
+
"schema": {
|
|
722
|
+
"type": "string",
|
|
723
|
+
"format": "uuid",
|
|
724
|
+
"title": "Thread Id",
|
|
725
|
+
"description": "The ID of the thread."
|
|
726
|
+
},
|
|
727
|
+
"name": "thread_id",
|
|
728
|
+
"in": "path"
|
|
729
|
+
}
|
|
730
|
+
],
|
|
731
|
+
"requestBody": {
|
|
732
|
+
"content": {
|
|
733
|
+
"application/json": {
|
|
734
|
+
"schema": {
|
|
735
|
+
"$ref": "#/components/schemas/RunCreateStateful"
|
|
736
|
+
}
|
|
737
|
+
}
|
|
738
|
+
},
|
|
739
|
+
"required": true
|
|
740
|
+
},
|
|
741
|
+
"responses": {
|
|
742
|
+
"200": {
|
|
743
|
+
"description": "Stream of agent results either as `ValueRunResultUpdate` objects or `CustomRunResultUpdate` objects, according to the specific streaming mode requested. Note that the stream of events is carried using the format specified in SSE spec `text/event-stream`",
|
|
744
|
+
"content": {
|
|
745
|
+
"text/event-stream": {
|
|
746
|
+
"schema": {
|
|
747
|
+
"$ref": "#/components/schemas/RunOutputStream"
|
|
748
|
+
}
|
|
749
|
+
}
|
|
750
|
+
}
|
|
751
|
+
},
|
|
752
|
+
"404": {
|
|
753
|
+
"description": "Not Found",
|
|
754
|
+
"content": {
|
|
755
|
+
"application/json": {
|
|
756
|
+
"schema": {
|
|
757
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
758
|
+
}
|
|
759
|
+
}
|
|
760
|
+
}
|
|
761
|
+
},
|
|
762
|
+
"409": {
|
|
763
|
+
"description": "Conflict",
|
|
764
|
+
"content": {
|
|
765
|
+
"application/json": {
|
|
766
|
+
"schema": {
|
|
767
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
768
|
+
}
|
|
769
|
+
}
|
|
770
|
+
}
|
|
771
|
+
},
|
|
772
|
+
"422": {
|
|
773
|
+
"description": "Validation Error",
|
|
774
|
+
"content": {
|
|
775
|
+
"application/json": {
|
|
776
|
+
"schema": {
|
|
777
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
778
|
+
}
|
|
779
|
+
}
|
|
780
|
+
}
|
|
781
|
+
}
|
|
782
|
+
}
|
|
783
|
+
}
|
|
784
|
+
},
|
|
785
|
+
"/threads/{thread_id}/runs/wait": {
|
|
786
|
+
"post": {
|
|
787
|
+
"tags": [
|
|
788
|
+
"Thread Runs"
|
|
789
|
+
],
|
|
790
|
+
"summary": "Create a run on a thread and block waiting for the result of the run",
|
|
791
|
+
"description": "Create a run on a thread and block waiting for its output. See 'GET /runs/{run_id}/wait' for details on the return values.",
|
|
792
|
+
"operationId": "create_and_wait_for_thread_run_output",
|
|
793
|
+
"parameters": [
|
|
794
|
+
{
|
|
795
|
+
"description": "The ID of the thread.",
|
|
796
|
+
"required": true,
|
|
797
|
+
"schema": {
|
|
798
|
+
"type": "string",
|
|
799
|
+
"format": "uuid",
|
|
800
|
+
"title": "Thread Id",
|
|
801
|
+
"description": "The ID of the thread."
|
|
802
|
+
},
|
|
803
|
+
"name": "thread_id",
|
|
804
|
+
"in": "path"
|
|
805
|
+
}
|
|
806
|
+
],
|
|
807
|
+
"requestBody": {
|
|
808
|
+
"content": {
|
|
809
|
+
"application/json": {
|
|
810
|
+
"schema": {
|
|
811
|
+
"$ref": "#/components/schemas/RunCreateStateful"
|
|
812
|
+
}
|
|
813
|
+
}
|
|
814
|
+
},
|
|
815
|
+
"required": true
|
|
816
|
+
},
|
|
817
|
+
"responses": {
|
|
818
|
+
"200": {
|
|
819
|
+
"description": "Success",
|
|
820
|
+
"content": {
|
|
821
|
+
"application/json": {
|
|
822
|
+
"schema": {
|
|
823
|
+
"$ref": "#/components/schemas/RunWaitResponseStateful"
|
|
824
|
+
}
|
|
825
|
+
}
|
|
826
|
+
}
|
|
827
|
+
},
|
|
828
|
+
"404": {
|
|
829
|
+
"description": "Not Found",
|
|
830
|
+
"content": {
|
|
831
|
+
"application/json": {
|
|
832
|
+
"schema": {
|
|
833
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
834
|
+
}
|
|
835
|
+
}
|
|
836
|
+
}
|
|
837
|
+
},
|
|
838
|
+
"409": {
|
|
839
|
+
"description": "Conflict",
|
|
840
|
+
"content": {
|
|
841
|
+
"application/json": {
|
|
842
|
+
"schema": {
|
|
843
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
844
|
+
}
|
|
845
|
+
}
|
|
846
|
+
}
|
|
847
|
+
},
|
|
848
|
+
"422": {
|
|
849
|
+
"description": "Validation Error",
|
|
850
|
+
"content": {
|
|
851
|
+
"application/json": {
|
|
852
|
+
"schema": {
|
|
853
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
854
|
+
}
|
|
855
|
+
}
|
|
856
|
+
}
|
|
857
|
+
}
|
|
858
|
+
}
|
|
859
|
+
}
|
|
860
|
+
},
|
|
861
|
+
"/threads/{thread_id}/runs/{run_id}/wait": {
|
|
862
|
+
"get": {
|
|
863
|
+
"tags": [
|
|
864
|
+
"Thread Runs"
|
|
865
|
+
],
|
|
866
|
+
"summary": "Blocks waiting for the result of the run.",
|
|
867
|
+
"description": "Blocks waiting for the result of the run. See 'GET /runs/{run_id}/wait' for details on the return values.",
|
|
868
|
+
"operationId": "wait_for_thread_run_output",
|
|
869
|
+
"parameters": [
|
|
870
|
+
{
|
|
871
|
+
"description": "The ID of the thread.",
|
|
872
|
+
"required": true,
|
|
873
|
+
"schema": {
|
|
874
|
+
"type": "string",
|
|
875
|
+
"format": "uuid",
|
|
876
|
+
"title": "Thread Id",
|
|
877
|
+
"description": "The ID of the thread."
|
|
878
|
+
},
|
|
879
|
+
"name": "thread_id",
|
|
880
|
+
"in": "path"
|
|
881
|
+
},
|
|
882
|
+
{
|
|
883
|
+
"description": "The ID of the run.",
|
|
884
|
+
"required": true,
|
|
885
|
+
"schema": {
|
|
886
|
+
"type": "string",
|
|
887
|
+
"format": "uuid",
|
|
888
|
+
"title": "Run Id",
|
|
889
|
+
"description": "The ID of the run."
|
|
890
|
+
},
|
|
891
|
+
"name": "run_id",
|
|
892
|
+
"in": "path"
|
|
893
|
+
}
|
|
894
|
+
],
|
|
895
|
+
"responses": {
|
|
896
|
+
"200": {
|
|
897
|
+
"description": "Success",
|
|
898
|
+
"content": {
|
|
899
|
+
"application/json": {
|
|
900
|
+
"schema": {
|
|
901
|
+
"$ref": "#/components/schemas/RunWaitResponseStateful"
|
|
902
|
+
}
|
|
903
|
+
}
|
|
904
|
+
}
|
|
905
|
+
},
|
|
906
|
+
"404": {
|
|
907
|
+
"description": "Not Found",
|
|
908
|
+
"content": {
|
|
909
|
+
"application/json": {
|
|
910
|
+
"schema": {
|
|
911
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
912
|
+
}
|
|
913
|
+
}
|
|
914
|
+
}
|
|
915
|
+
},
|
|
916
|
+
"422": {
|
|
917
|
+
"description": "Validation Error",
|
|
918
|
+
"content": {
|
|
919
|
+
"application/json": {
|
|
920
|
+
"schema": {
|
|
921
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
922
|
+
}
|
|
923
|
+
}
|
|
924
|
+
}
|
|
925
|
+
}
|
|
926
|
+
}
|
|
927
|
+
}
|
|
928
|
+
},
|
|
929
|
+
"/threads/{thread_id}/runs/{run_id}": {
|
|
930
|
+
"parameters": [
|
|
931
|
+
{
|
|
932
|
+
"description": "The ID of the thread.",
|
|
933
|
+
"required": true,
|
|
934
|
+
"schema": {
|
|
935
|
+
"type": "string",
|
|
936
|
+
"format": "uuid",
|
|
937
|
+
"title": "Thread Id",
|
|
938
|
+
"description": "The ID of the thread."
|
|
939
|
+
},
|
|
940
|
+
"name": "thread_id",
|
|
941
|
+
"in": "path"
|
|
942
|
+
},
|
|
943
|
+
{
|
|
944
|
+
"description": "The ID of the run.",
|
|
945
|
+
"required": true,
|
|
946
|
+
"schema": {
|
|
947
|
+
"type": "string",
|
|
948
|
+
"format": "uuid",
|
|
949
|
+
"title": "Run Id",
|
|
950
|
+
"description": "The ID of the run."
|
|
951
|
+
},
|
|
952
|
+
"name": "run_id",
|
|
953
|
+
"in": "path"
|
|
954
|
+
}
|
|
955
|
+
],
|
|
956
|
+
"get": {
|
|
957
|
+
"tags": [
|
|
958
|
+
"Thread Runs"
|
|
959
|
+
],
|
|
960
|
+
"summary": "Get Run",
|
|
961
|
+
"description": "Get a run by ID.",
|
|
962
|
+
"operationId": "get_thread_run",
|
|
963
|
+
"responses": {
|
|
964
|
+
"200": {
|
|
965
|
+
"description": "Success",
|
|
966
|
+
"content": {
|
|
967
|
+
"application/json": {
|
|
968
|
+
"schema": {
|
|
969
|
+
"$ref": "#/components/schemas/RunStateful"
|
|
970
|
+
}
|
|
971
|
+
}
|
|
972
|
+
}
|
|
973
|
+
},
|
|
974
|
+
"404": {
|
|
975
|
+
"description": "Not Found",
|
|
976
|
+
"content": {
|
|
977
|
+
"application/json": {
|
|
978
|
+
"schema": {
|
|
979
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
980
|
+
}
|
|
981
|
+
}
|
|
982
|
+
}
|
|
983
|
+
},
|
|
984
|
+
"422": {
|
|
985
|
+
"description": "Validation Error",
|
|
986
|
+
"content": {
|
|
987
|
+
"application/json": {
|
|
988
|
+
"schema": {
|
|
989
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
990
|
+
}
|
|
991
|
+
}
|
|
992
|
+
}
|
|
993
|
+
}
|
|
994
|
+
}
|
|
995
|
+
},
|
|
996
|
+
"post": {
|
|
997
|
+
"tags": [
|
|
998
|
+
"Thread Runs"
|
|
999
|
+
],
|
|
1000
|
+
"summary": "Resume an interrupted Run",
|
|
1001
|
+
"description": "Provide the needed input to a run to resume its execution. Can only be called for runs that are in the interrupted state Schema of the provided input must match with the schema specified in the agent specs under interrupts for the interrupt type the agent generated for this specific interruption.",
|
|
1002
|
+
"operationId": "resume_thread_run",
|
|
1003
|
+
"requestBody": {
|
|
1004
|
+
"content": {
|
|
1005
|
+
"application/json": {
|
|
1006
|
+
"schema": {
|
|
1007
|
+
"$ref": "#/components/schemas/ResumePayloadSchema"
|
|
1008
|
+
}
|
|
1009
|
+
}
|
|
1010
|
+
},
|
|
1011
|
+
"required": true
|
|
1012
|
+
},
|
|
1013
|
+
"responses": {
|
|
1014
|
+
"200": {
|
|
1015
|
+
"description": "Success",
|
|
1016
|
+
"content": {
|
|
1017
|
+
"application/json": {
|
|
1018
|
+
"schema": {
|
|
1019
|
+
"$ref": "#/components/schemas/RunStateful"
|
|
1020
|
+
}
|
|
1021
|
+
}
|
|
1022
|
+
}
|
|
1023
|
+
},
|
|
1024
|
+
"404": {
|
|
1025
|
+
"description": "Not Found",
|
|
1026
|
+
"content": {
|
|
1027
|
+
"application/json": {
|
|
1028
|
+
"schema": {
|
|
1029
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
1030
|
+
}
|
|
1031
|
+
}
|
|
1032
|
+
}
|
|
1033
|
+
},
|
|
1034
|
+
"409": {
|
|
1035
|
+
"description": "Conflict",
|
|
1036
|
+
"content": {
|
|
1037
|
+
"application/json": {
|
|
1038
|
+
"schema": {
|
|
1039
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
1040
|
+
}
|
|
1041
|
+
}
|
|
1042
|
+
}
|
|
1043
|
+
},
|
|
1044
|
+
"422": {
|
|
1045
|
+
"description": "Validation Error",
|
|
1046
|
+
"content": {
|
|
1047
|
+
"application/json": {
|
|
1048
|
+
"schema": {
|
|
1049
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
1050
|
+
}
|
|
1051
|
+
}
|
|
1052
|
+
}
|
|
1053
|
+
}
|
|
1054
|
+
}
|
|
1055
|
+
},
|
|
1056
|
+
"delete": {
|
|
1057
|
+
"tags": [
|
|
1058
|
+
"Thread Runs"
|
|
1059
|
+
],
|
|
1060
|
+
"summary": "Delete Run",
|
|
1061
|
+
"description": "Delete a run by ID.",
|
|
1062
|
+
"operationId": "delete_thread_run",
|
|
1063
|
+
"responses": {
|
|
1064
|
+
"204": {
|
|
1065
|
+
"description": "Success"
|
|
1066
|
+
},
|
|
1067
|
+
"404": {
|
|
1068
|
+
"description": "Not Found",
|
|
1069
|
+
"content": {
|
|
1070
|
+
"application/json": {
|
|
1071
|
+
"schema": {
|
|
1072
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
1073
|
+
}
|
|
1074
|
+
}
|
|
1075
|
+
}
|
|
1076
|
+
},
|
|
1077
|
+
"422": {
|
|
1078
|
+
"description": "Validation Error",
|
|
1079
|
+
"content": {
|
|
1080
|
+
"application/json": {
|
|
1081
|
+
"schema": {
|
|
1082
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
1083
|
+
}
|
|
1084
|
+
}
|
|
1085
|
+
}
|
|
1086
|
+
}
|
|
1087
|
+
}
|
|
1088
|
+
}
|
|
1089
|
+
},
|
|
1090
|
+
"/threads/{thread_id}/runs/{run_id}/stream": {
|
|
1091
|
+
"get": {
|
|
1092
|
+
"tags": [
|
|
1093
|
+
"Thread Runs"
|
|
1094
|
+
],
|
|
1095
|
+
"summary": "Stream output from Run",
|
|
1096
|
+
"description": "Join the output stream of an existing run. See 'GET /runs/{run_id}/stream' for details on the return values.",
|
|
1097
|
+
"operationId": "stream_thread_run_output",
|
|
1098
|
+
"parameters": [
|
|
1099
|
+
{
|
|
1100
|
+
"description": "The ID of the thread.",
|
|
1101
|
+
"required": true,
|
|
1102
|
+
"schema": {
|
|
1103
|
+
"type": "string",
|
|
1104
|
+
"format": "uuid",
|
|
1105
|
+
"title": "Thread Id",
|
|
1106
|
+
"description": "The ID of the thread."
|
|
1107
|
+
},
|
|
1108
|
+
"name": "thread_id",
|
|
1109
|
+
"in": "path"
|
|
1110
|
+
},
|
|
1111
|
+
{
|
|
1112
|
+
"description": "The ID of the run.",
|
|
1113
|
+
"required": true,
|
|
1114
|
+
"schema": {
|
|
1115
|
+
"type": "string",
|
|
1116
|
+
"format": "uuid",
|
|
1117
|
+
"title": "Run Id",
|
|
1118
|
+
"description": "The ID of the run."
|
|
1119
|
+
},
|
|
1120
|
+
"name": "run_id",
|
|
1121
|
+
"in": "path"
|
|
1122
|
+
}
|
|
1123
|
+
],
|
|
1124
|
+
"responses": {
|
|
1125
|
+
"200": {
|
|
1126
|
+
"description": "Stream of agent results either as `ValueRunResultUpdate` objects or `CustomRunResultUpdate` objects, according to the specific streaming mode requested. Note that the stream of events is carried using the format specified in SSE spec `text/event-stream`",
|
|
1127
|
+
"content": {
|
|
1128
|
+
"text/event-stream": {
|
|
1129
|
+
"schema": {
|
|
1130
|
+
"$ref": "#/components/schemas/RunOutputStream"
|
|
1131
|
+
}
|
|
1132
|
+
}
|
|
1133
|
+
}
|
|
1134
|
+
},
|
|
1135
|
+
"404": {
|
|
1136
|
+
"description": "Not Found",
|
|
1137
|
+
"content": {
|
|
1138
|
+
"application/json": {
|
|
1139
|
+
"schema": {
|
|
1140
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
1141
|
+
}
|
|
1142
|
+
}
|
|
1143
|
+
}
|
|
1144
|
+
},
|
|
1145
|
+
"422": {
|
|
1146
|
+
"description": "Validation Error",
|
|
1147
|
+
"content": {
|
|
1148
|
+
"application/json": {
|
|
1149
|
+
"schema": {
|
|
1150
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
1151
|
+
}
|
|
1152
|
+
}
|
|
1153
|
+
}
|
|
1154
|
+
}
|
|
1155
|
+
}
|
|
1156
|
+
}
|
|
1157
|
+
},
|
|
1158
|
+
"/threads/{thread_id}/runs/{run_id}/cancel": {
|
|
1159
|
+
"post": {
|
|
1160
|
+
"tags": [
|
|
1161
|
+
"Thread Runs"
|
|
1162
|
+
],
|
|
1163
|
+
"summary": "Cancel Run",
|
|
1164
|
+
"operationId": "cancel_thread_run",
|
|
1165
|
+
"parameters": [
|
|
1166
|
+
{
|
|
1167
|
+
"description": "The ID of the thread.",
|
|
1168
|
+
"required": true,
|
|
1169
|
+
"schema": {
|
|
1170
|
+
"type": "string",
|
|
1171
|
+
"format": "uuid",
|
|
1172
|
+
"title": "Thread Id",
|
|
1173
|
+
"description": "The ID of the thread."
|
|
1174
|
+
},
|
|
1175
|
+
"name": "thread_id",
|
|
1176
|
+
"in": "path"
|
|
1177
|
+
},
|
|
1178
|
+
{
|
|
1179
|
+
"description": "The ID of the run.",
|
|
1180
|
+
"required": true,
|
|
1181
|
+
"schema": {
|
|
1182
|
+
"type": "string",
|
|
1183
|
+
"format": "uuid",
|
|
1184
|
+
"title": "Run Id",
|
|
1185
|
+
"description": "The ID of the run."
|
|
1186
|
+
},
|
|
1187
|
+
"name": "run_id",
|
|
1188
|
+
"in": "path"
|
|
1189
|
+
},
|
|
1190
|
+
{
|
|
1191
|
+
"required": false,
|
|
1192
|
+
"schema": {
|
|
1193
|
+
"type": "boolean",
|
|
1194
|
+
"title": "Wait",
|
|
1195
|
+
"default": false
|
|
1196
|
+
},
|
|
1197
|
+
"name": "wait",
|
|
1198
|
+
"in": "query"
|
|
1199
|
+
},
|
|
1200
|
+
{
|
|
1201
|
+
"description": "Action to take when cancelling the run. Possible values are `interrupt` or `rollback`. `interrupt` will simply cancel the run. `rollback` will cancel the run and delete the run and associated checkpoints afterwards.",
|
|
1202
|
+
"required": false,
|
|
1203
|
+
"schema": {
|
|
1204
|
+
"type": "string",
|
|
1205
|
+
"enum": [
|
|
1206
|
+
"interrupt",
|
|
1207
|
+
"rollback"
|
|
1208
|
+
],
|
|
1209
|
+
"title": "Action",
|
|
1210
|
+
"default": "interrupt"
|
|
1211
|
+
},
|
|
1212
|
+
"name": "action",
|
|
1213
|
+
"in": "query"
|
|
1214
|
+
}
|
|
1215
|
+
],
|
|
1216
|
+
"responses": {
|
|
1217
|
+
"204": {
|
|
1218
|
+
"description": "Success"
|
|
1219
|
+
},
|
|
1220
|
+
"404": {
|
|
1221
|
+
"description": "Not Found",
|
|
1222
|
+
"content": {
|
|
1223
|
+
"application/json": {
|
|
1224
|
+
"schema": {
|
|
1225
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
1226
|
+
}
|
|
1227
|
+
}
|
|
1228
|
+
}
|
|
1229
|
+
},
|
|
1230
|
+
"422": {
|
|
1231
|
+
"description": "Validation Error",
|
|
1232
|
+
"content": {
|
|
1233
|
+
"application/json": {
|
|
1234
|
+
"schema": {
|
|
1235
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
1236
|
+
}
|
|
1237
|
+
}
|
|
1238
|
+
}
|
|
1239
|
+
}
|
|
1240
|
+
}
|
|
1241
|
+
}
|
|
1242
|
+
},
|
|
1243
|
+
"/runs": {
|
|
1244
|
+
"post": {
|
|
1245
|
+
"tags": [
|
|
1246
|
+
"Stateless Runs"
|
|
1247
|
+
],
|
|
1248
|
+
"summary": "Create a Background stateless Run",
|
|
1249
|
+
"description": "Create a stateless run, return the run ID immediately. Don't wait for the final run output.",
|
|
1250
|
+
"operationId": "create_stateless_run",
|
|
1251
|
+
"requestBody": {
|
|
1252
|
+
"content": {
|
|
1253
|
+
"application/json": {
|
|
1254
|
+
"schema": {
|
|
1255
|
+
"$ref": "#/components/schemas/RunCreateStateless"
|
|
1256
|
+
}
|
|
1257
|
+
}
|
|
1258
|
+
},
|
|
1259
|
+
"required": true
|
|
1260
|
+
},
|
|
1261
|
+
"callbacks": {
|
|
1262
|
+
"runstatuschange": {
|
|
1263
|
+
"{$request.body#/webhook}": {
|
|
1264
|
+
"post": {
|
|
1265
|
+
"requestBody": {
|
|
1266
|
+
"required": true,
|
|
1267
|
+
"content": {
|
|
1268
|
+
"application/json": {
|
|
1269
|
+
"schema": {
|
|
1270
|
+
"$ref": "#/components/schemas/RunStateless"
|
|
1271
|
+
}
|
|
1272
|
+
}
|
|
1273
|
+
}
|
|
1274
|
+
},
|
|
1275
|
+
"responses": {
|
|
1276
|
+
"200": {
|
|
1277
|
+
"description": "Your server returns this code if it accepts the callback"
|
|
1278
|
+
}
|
|
1279
|
+
}
|
|
1280
|
+
}
|
|
1281
|
+
}
|
|
1282
|
+
}
|
|
1283
|
+
},
|
|
1284
|
+
"responses": {
|
|
1285
|
+
"200": {
|
|
1286
|
+
"description": "Success",
|
|
1287
|
+
"content": {
|
|
1288
|
+
"application/json": {
|
|
1289
|
+
"schema": {
|
|
1290
|
+
"$ref": "#/components/schemas/RunStateless"
|
|
1291
|
+
}
|
|
1292
|
+
}
|
|
1293
|
+
}
|
|
1294
|
+
},
|
|
1295
|
+
"404": {
|
|
1296
|
+
"description": "Not Found",
|
|
1297
|
+
"content": {
|
|
1298
|
+
"application/json": {
|
|
1299
|
+
"schema": {
|
|
1300
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
1301
|
+
}
|
|
1302
|
+
}
|
|
1303
|
+
}
|
|
1304
|
+
},
|
|
1305
|
+
"409": {
|
|
1306
|
+
"description": "Conflict",
|
|
1307
|
+
"content": {
|
|
1308
|
+
"application/json": {
|
|
1309
|
+
"schema": {
|
|
1310
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
1311
|
+
}
|
|
1312
|
+
}
|
|
1313
|
+
}
|
|
1314
|
+
},
|
|
1315
|
+
"422": {
|
|
1316
|
+
"description": "Validation Error",
|
|
1317
|
+
"content": {
|
|
1318
|
+
"application/json": {
|
|
1319
|
+
"schema": {
|
|
1320
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
1321
|
+
}
|
|
1322
|
+
}
|
|
1323
|
+
}
|
|
1324
|
+
}
|
|
1325
|
+
}
|
|
1326
|
+
}
|
|
1327
|
+
},
|
|
1328
|
+
"/runs/search": {
|
|
1329
|
+
"post": {
|
|
1330
|
+
"tags": [
|
|
1331
|
+
"Stateless Runs"
|
|
1332
|
+
],
|
|
1333
|
+
"summary": "Search Stateless Runs",
|
|
1334
|
+
"description": "Search for stateless run.\n\nThis endpoint also functions as the endpoint to list all stateless Runs.",
|
|
1335
|
+
"operationId": "search_stateless_runs",
|
|
1336
|
+
"requestBody": {
|
|
1337
|
+
"content": {
|
|
1338
|
+
"application/json": {
|
|
1339
|
+
"schema": {
|
|
1340
|
+
"$ref": "#/components/schemas/RunSearchRequest"
|
|
1341
|
+
}
|
|
1342
|
+
}
|
|
1343
|
+
},
|
|
1344
|
+
"required": true
|
|
1345
|
+
},
|
|
1346
|
+
"responses": {
|
|
1347
|
+
"200": {
|
|
1348
|
+
"description": "Success",
|
|
1349
|
+
"content": {
|
|
1350
|
+
"application/json": {
|
|
1351
|
+
"schema": {
|
|
1352
|
+
"items": {
|
|
1353
|
+
"$ref": "#/components/schemas/RunStateless"
|
|
1354
|
+
},
|
|
1355
|
+
"type": "array",
|
|
1356
|
+
"title": "Run Search Response"
|
|
1357
|
+
}
|
|
1358
|
+
}
|
|
1359
|
+
}
|
|
1360
|
+
},
|
|
1361
|
+
"422": {
|
|
1362
|
+
"description": "Validation Error",
|
|
1363
|
+
"content": {
|
|
1364
|
+
"application/json": {
|
|
1365
|
+
"schema": {
|
|
1366
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
1367
|
+
}
|
|
1368
|
+
}
|
|
1369
|
+
}
|
|
1370
|
+
}
|
|
1371
|
+
}
|
|
1372
|
+
}
|
|
1373
|
+
},
|
|
1374
|
+
"/runs/stream": {
|
|
1375
|
+
"post": {
|
|
1376
|
+
"tags": [
|
|
1377
|
+
"Stateless Runs"
|
|
1378
|
+
],
|
|
1379
|
+
"summary": "Create a stateless run and stream its output",
|
|
1380
|
+
"description": "Create a stateless run and join its output stream. See 'GET /runs/{run_id}/stream' for details on the return values.",
|
|
1381
|
+
"operationId": "create_and_stream_stateless_run_output",
|
|
1382
|
+
"requestBody": {
|
|
1383
|
+
"content": {
|
|
1384
|
+
"application/json": {
|
|
1385
|
+
"schema": {
|
|
1386
|
+
"$ref": "#/components/schemas/RunCreateStateless"
|
|
1387
|
+
}
|
|
1388
|
+
}
|
|
1389
|
+
},
|
|
1390
|
+
"required": true
|
|
1391
|
+
},
|
|
1392
|
+
"responses": {
|
|
1393
|
+
"200": {
|
|
1394
|
+
"description": "Stream of agent results either as `ValueRunResultUpdate` objects or `CustomRunResultUpdate` objects, according to the specific streaming mode requested. Note that the stream of events is carried using the format specified in SSE spec `text/event-stream`",
|
|
1395
|
+
"content": {
|
|
1396
|
+
"text/event-stream": {
|
|
1397
|
+
"schema": {
|
|
1398
|
+
"$ref": "#/components/schemas/RunOutputStream"
|
|
1399
|
+
}
|
|
1400
|
+
}
|
|
1401
|
+
}
|
|
1402
|
+
},
|
|
1403
|
+
"404": {
|
|
1404
|
+
"description": "Not Found",
|
|
1405
|
+
"content": {
|
|
1406
|
+
"application/json": {
|
|
1407
|
+
"schema": {
|
|
1408
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
1409
|
+
}
|
|
1410
|
+
}
|
|
1411
|
+
}
|
|
1412
|
+
},
|
|
1413
|
+
"409": {
|
|
1414
|
+
"description": "Conflict",
|
|
1415
|
+
"content": {
|
|
1416
|
+
"application/json": {
|
|
1417
|
+
"schema": {
|
|
1418
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
1419
|
+
}
|
|
1420
|
+
}
|
|
1421
|
+
}
|
|
1422
|
+
},
|
|
1423
|
+
"422": {
|
|
1424
|
+
"description": "Validation Error",
|
|
1425
|
+
"content": {
|
|
1426
|
+
"application/json": {
|
|
1427
|
+
"schema": {
|
|
1428
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
1429
|
+
}
|
|
1430
|
+
}
|
|
1431
|
+
}
|
|
1432
|
+
}
|
|
1433
|
+
}
|
|
1434
|
+
}
|
|
1435
|
+
},
|
|
1436
|
+
"/runs/wait": {
|
|
1437
|
+
"post": {
|
|
1438
|
+
"tags": [
|
|
1439
|
+
"Stateless Runs"
|
|
1440
|
+
],
|
|
1441
|
+
"summary": "Create a stateless run and wait for its output",
|
|
1442
|
+
"description": "Create a stateless run and wait for its output. See 'GET /runs/{run_id}/wait' for details on the return values.",
|
|
1443
|
+
"operationId": "create_and_wait_for_stateless_run_output",
|
|
1444
|
+
"requestBody": {
|
|
1445
|
+
"content": {
|
|
1446
|
+
"application/json": {
|
|
1447
|
+
"schema": {
|
|
1448
|
+
"$ref": "#/components/schemas/RunCreateStateless"
|
|
1449
|
+
}
|
|
1450
|
+
}
|
|
1451
|
+
},
|
|
1452
|
+
"required": true
|
|
1453
|
+
},
|
|
1454
|
+
"responses": {
|
|
1455
|
+
"200": {
|
|
1456
|
+
"description": "Success",
|
|
1457
|
+
"content": {
|
|
1458
|
+
"application/json": {
|
|
1459
|
+
"schema": {
|
|
1460
|
+
"$ref": "#/components/schemas/RunWaitResponseStateless"
|
|
1461
|
+
}
|
|
1462
|
+
}
|
|
1463
|
+
}
|
|
1464
|
+
},
|
|
1465
|
+
"404": {
|
|
1466
|
+
"description": "Not Found",
|
|
1467
|
+
"content": {
|
|
1468
|
+
"application/json": {
|
|
1469
|
+
"schema": {
|
|
1470
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
1471
|
+
}
|
|
1472
|
+
}
|
|
1473
|
+
}
|
|
1474
|
+
},
|
|
1475
|
+
"409": {
|
|
1476
|
+
"description": "Conflict",
|
|
1477
|
+
"content": {
|
|
1478
|
+
"application/json": {
|
|
1479
|
+
"schema": {
|
|
1480
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
1481
|
+
}
|
|
1482
|
+
}
|
|
1483
|
+
}
|
|
1484
|
+
},
|
|
1485
|
+
"422": {
|
|
1486
|
+
"description": "Validation Error",
|
|
1487
|
+
"content": {
|
|
1488
|
+
"application/json": {
|
|
1489
|
+
"schema": {
|
|
1490
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
1491
|
+
}
|
|
1492
|
+
}
|
|
1493
|
+
}
|
|
1494
|
+
}
|
|
1495
|
+
}
|
|
1496
|
+
}
|
|
1497
|
+
},
|
|
1498
|
+
"/runs/{run_id}/wait": {
|
|
1499
|
+
"get": {
|
|
1500
|
+
"tags": [
|
|
1501
|
+
"Stateless Runs"
|
|
1502
|
+
],
|
|
1503
|
+
"summary": "Blocks waiting for the result of the run.",
|
|
1504
|
+
"description": "Blocks waiting for the result of the run. The output can be:\n * an interrupt, this happens when the agent run status is `interrupted`\n * the final result of the run, this happens when the agent run status is `success`\n * an error, this happens when the agent run status is `error` or `timeout`\n\n\nThis call blocks until the output is available.",
|
|
1505
|
+
"operationId": "wait_for_stateless_run_output",
|
|
1506
|
+
"parameters": [
|
|
1507
|
+
{
|
|
1508
|
+
"description": "The ID of the run.",
|
|
1509
|
+
"required": true,
|
|
1510
|
+
"schema": {
|
|
1511
|
+
"type": "string",
|
|
1512
|
+
"format": "uuid",
|
|
1513
|
+
"title": "Run Id",
|
|
1514
|
+
"description": "The ID of the run."
|
|
1515
|
+
},
|
|
1516
|
+
"name": "run_id",
|
|
1517
|
+
"in": "path"
|
|
1518
|
+
}
|
|
1519
|
+
],
|
|
1520
|
+
"responses": {
|
|
1521
|
+
"200": {
|
|
1522
|
+
"description": "Success",
|
|
1523
|
+
"content": {
|
|
1524
|
+
"application/json": {
|
|
1525
|
+
"schema": {
|
|
1526
|
+
"$ref": "#/components/schemas/RunWaitResponseStateless"
|
|
1527
|
+
}
|
|
1528
|
+
}
|
|
1529
|
+
}
|
|
1530
|
+
},
|
|
1531
|
+
"404": {
|
|
1532
|
+
"description": "Not Found",
|
|
1533
|
+
"content": {
|
|
1534
|
+
"application/json": {
|
|
1535
|
+
"schema": {
|
|
1536
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
1537
|
+
}
|
|
1538
|
+
}
|
|
1539
|
+
}
|
|
1540
|
+
},
|
|
1541
|
+
"422": {
|
|
1542
|
+
"description": "Validation Error",
|
|
1543
|
+
"content": {
|
|
1544
|
+
"application/json": {
|
|
1545
|
+
"schema": {
|
|
1546
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
1547
|
+
}
|
|
1548
|
+
}
|
|
1549
|
+
}
|
|
1550
|
+
}
|
|
1551
|
+
}
|
|
1552
|
+
}
|
|
1553
|
+
},
|
|
1554
|
+
"/runs/{run_id}": {
|
|
1555
|
+
"parameters": [
|
|
1556
|
+
{
|
|
1557
|
+
"description": "The ID of the run.",
|
|
1558
|
+
"required": true,
|
|
1559
|
+
"schema": {
|
|
1560
|
+
"type": "string",
|
|
1561
|
+
"format": "uuid",
|
|
1562
|
+
"title": "Run Id",
|
|
1563
|
+
"description": "The ID of the run."
|
|
1564
|
+
},
|
|
1565
|
+
"name": "run_id",
|
|
1566
|
+
"in": "path"
|
|
1567
|
+
}
|
|
1568
|
+
],
|
|
1569
|
+
"get": {
|
|
1570
|
+
"tags": [
|
|
1571
|
+
"Stateless Runs"
|
|
1572
|
+
],
|
|
1573
|
+
"summary": "Get Run",
|
|
1574
|
+
"description": "Get a stateless run by ID.",
|
|
1575
|
+
"operationId": "get_stateless_run",
|
|
1576
|
+
"responses": {
|
|
1577
|
+
"200": {
|
|
1578
|
+
"description": "Success",
|
|
1579
|
+
"content": {
|
|
1580
|
+
"application/json": {
|
|
1581
|
+
"schema": {
|
|
1582
|
+
"$ref": "#/components/schemas/RunStateless"
|
|
1583
|
+
}
|
|
1584
|
+
}
|
|
1585
|
+
}
|
|
1586
|
+
},
|
|
1587
|
+
"404": {
|
|
1588
|
+
"description": "Not Found",
|
|
1589
|
+
"content": {
|
|
1590
|
+
"application/json": {
|
|
1591
|
+
"schema": {
|
|
1592
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
1593
|
+
}
|
|
1594
|
+
}
|
|
1595
|
+
}
|
|
1596
|
+
},
|
|
1597
|
+
"422": {
|
|
1598
|
+
"description": "Validation Error",
|
|
1599
|
+
"content": {
|
|
1600
|
+
"application/json": {
|
|
1601
|
+
"schema": {
|
|
1602
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
1603
|
+
}
|
|
1604
|
+
}
|
|
1605
|
+
}
|
|
1606
|
+
}
|
|
1607
|
+
}
|
|
1608
|
+
},
|
|
1609
|
+
"post": {
|
|
1610
|
+
"tags": [
|
|
1611
|
+
"Stateless Runs"
|
|
1612
|
+
],
|
|
1613
|
+
"summary": "Resume an interrupted Run",
|
|
1614
|
+
"description": "Provide the needed input to a run to resume its execution. Can only be called for runs that are in the interrupted state Schema of the provided input must match with the schema specified in the agent specs under interrupts for the interrupt type the agent generated for this specific interruption.",
|
|
1615
|
+
"operationId": "resume_stateless_run",
|
|
1616
|
+
"requestBody": {
|
|
1617
|
+
"content": {
|
|
1618
|
+
"application/json": {
|
|
1619
|
+
"schema": {
|
|
1620
|
+
"$ref": "#/components/schemas/ResumePayloadSchema"
|
|
1621
|
+
}
|
|
1622
|
+
}
|
|
1623
|
+
},
|
|
1624
|
+
"required": true
|
|
1625
|
+
},
|
|
1626
|
+
"responses": {
|
|
1627
|
+
"200": {
|
|
1628
|
+
"description": "Success",
|
|
1629
|
+
"content": {
|
|
1630
|
+
"application/json": {
|
|
1631
|
+
"schema": {
|
|
1632
|
+
"$ref": "#/components/schemas/RunStateless"
|
|
1633
|
+
}
|
|
1634
|
+
}
|
|
1635
|
+
}
|
|
1636
|
+
},
|
|
1637
|
+
"404": {
|
|
1638
|
+
"description": "Not Found",
|
|
1639
|
+
"content": {
|
|
1640
|
+
"application/json": {
|
|
1641
|
+
"schema": {
|
|
1642
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
1643
|
+
}
|
|
1644
|
+
}
|
|
1645
|
+
}
|
|
1646
|
+
},
|
|
1647
|
+
"409": {
|
|
1648
|
+
"description": "Conflict",
|
|
1649
|
+
"content": {
|
|
1650
|
+
"application/json": {
|
|
1651
|
+
"schema": {
|
|
1652
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
1653
|
+
}
|
|
1654
|
+
}
|
|
1655
|
+
}
|
|
1656
|
+
},
|
|
1657
|
+
"422": {
|
|
1658
|
+
"description": "Validation Error",
|
|
1659
|
+
"content": {
|
|
1660
|
+
"application/json": {
|
|
1661
|
+
"schema": {
|
|
1662
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
1663
|
+
}
|
|
1664
|
+
}
|
|
1665
|
+
}
|
|
1666
|
+
}
|
|
1667
|
+
}
|
|
1668
|
+
},
|
|
1669
|
+
"delete": {
|
|
1670
|
+
"tags": [
|
|
1671
|
+
"Stateless Runs"
|
|
1672
|
+
],
|
|
1673
|
+
"summary": "Delete Stateless Run",
|
|
1674
|
+
"description": "Delete a stateless run by ID.",
|
|
1675
|
+
"operationId": "delete_stateless_run",
|
|
1676
|
+
"responses": {
|
|
1677
|
+
"204": {
|
|
1678
|
+
"description": "Success"
|
|
1679
|
+
},
|
|
1680
|
+
"404": {
|
|
1681
|
+
"description": "Not Found",
|
|
1682
|
+
"content": {
|
|
1683
|
+
"application/json": {
|
|
1684
|
+
"schema": {
|
|
1685
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
1686
|
+
}
|
|
1687
|
+
}
|
|
1688
|
+
}
|
|
1689
|
+
},
|
|
1690
|
+
"422": {
|
|
1691
|
+
"description": "Validation Error",
|
|
1692
|
+
"content": {
|
|
1693
|
+
"application/json": {
|
|
1694
|
+
"schema": {
|
|
1695
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
1696
|
+
}
|
|
1697
|
+
}
|
|
1698
|
+
}
|
|
1699
|
+
}
|
|
1700
|
+
}
|
|
1701
|
+
}
|
|
1702
|
+
},
|
|
1703
|
+
"/runs/{run_id}/stream": {
|
|
1704
|
+
"get": {
|
|
1705
|
+
"tags": [
|
|
1706
|
+
"Stateless Runs"
|
|
1707
|
+
],
|
|
1708
|
+
"summary": "Stream output from Stateless Run",
|
|
1709
|
+
"description": "Join the output stream of an existing run. This endpoint streams output in real-time from a run. Only output produced after this endpoint is called will be streamed.",
|
|
1710
|
+
"operationId": "stream_stateless_run_output",
|
|
1711
|
+
"parameters": [
|
|
1712
|
+
{
|
|
1713
|
+
"description": "The ID of the run.",
|
|
1714
|
+
"required": true,
|
|
1715
|
+
"schema": {
|
|
1716
|
+
"type": "string",
|
|
1717
|
+
"format": "uuid",
|
|
1718
|
+
"title": "Run Id",
|
|
1719
|
+
"description": "The ID of the run."
|
|
1720
|
+
},
|
|
1721
|
+
"name": "run_id",
|
|
1722
|
+
"in": "path"
|
|
1723
|
+
}
|
|
1724
|
+
],
|
|
1725
|
+
"responses": {
|
|
1726
|
+
"200": {
|
|
1727
|
+
"description": "Stream of agent results either as `ValueRunResultUpdate` objects or `CustomRunResultUpdate` objects, according to the specific streaming mode requested. Note that the stream of events is carried using the format specified in SSE spec `text/event-stream`",
|
|
1728
|
+
"content": {
|
|
1729
|
+
"text/event-stream": {
|
|
1730
|
+
"schema": {
|
|
1731
|
+
"$ref": "#/components/schemas/RunOutputStream"
|
|
1732
|
+
}
|
|
1733
|
+
}
|
|
1734
|
+
}
|
|
1735
|
+
},
|
|
1736
|
+
"404": {
|
|
1737
|
+
"description": "Not Found",
|
|
1738
|
+
"content": {
|
|
1739
|
+
"application/json": {
|
|
1740
|
+
"schema": {
|
|
1741
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
1742
|
+
}
|
|
1743
|
+
}
|
|
1744
|
+
}
|
|
1745
|
+
},
|
|
1746
|
+
"422": {
|
|
1747
|
+
"description": "Validation Error",
|
|
1748
|
+
"content": {
|
|
1749
|
+
"application/json": {
|
|
1750
|
+
"schema": {
|
|
1751
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
1752
|
+
}
|
|
1753
|
+
}
|
|
1754
|
+
}
|
|
1755
|
+
}
|
|
1756
|
+
}
|
|
1757
|
+
}
|
|
1758
|
+
},
|
|
1759
|
+
"/runs/{run_id}/cancel": {
|
|
1760
|
+
"post": {
|
|
1761
|
+
"tags": [
|
|
1762
|
+
"Stateless Runs"
|
|
1763
|
+
],
|
|
1764
|
+
"summary": "Cancel Stateless Run",
|
|
1765
|
+
"operationId": "cancel_stateless_run",
|
|
1766
|
+
"parameters": [
|
|
1767
|
+
{
|
|
1768
|
+
"description": "The ID of the run.",
|
|
1769
|
+
"required": true,
|
|
1770
|
+
"schema": {
|
|
1771
|
+
"type": "string",
|
|
1772
|
+
"format": "uuid",
|
|
1773
|
+
"title": "Run Id",
|
|
1774
|
+
"description": "The ID of the run."
|
|
1775
|
+
},
|
|
1776
|
+
"name": "run_id",
|
|
1777
|
+
"in": "path"
|
|
1778
|
+
},
|
|
1779
|
+
{
|
|
1780
|
+
"required": false,
|
|
1781
|
+
"schema": {
|
|
1782
|
+
"type": "boolean",
|
|
1783
|
+
"title": "Wait",
|
|
1784
|
+
"default": false
|
|
1785
|
+
},
|
|
1786
|
+
"name": "wait",
|
|
1787
|
+
"in": "query"
|
|
1788
|
+
},
|
|
1789
|
+
{
|
|
1790
|
+
"description": "Action to take when cancelling the run. Possible values are `interrupt` or `rollback`. `interrupt` will simply cancel the run. `rollback` will cancel the run and delete the run and associated checkpoints afterwards.",
|
|
1791
|
+
"required": false,
|
|
1792
|
+
"schema": {
|
|
1793
|
+
"type": "string",
|
|
1794
|
+
"enum": [
|
|
1795
|
+
"interrupt",
|
|
1796
|
+
"rollback"
|
|
1797
|
+
],
|
|
1798
|
+
"title": "Action",
|
|
1799
|
+
"default": "interrupt"
|
|
1800
|
+
},
|
|
1801
|
+
"name": "action",
|
|
1802
|
+
"in": "query"
|
|
1803
|
+
}
|
|
1804
|
+
],
|
|
1805
|
+
"responses": {
|
|
1806
|
+
"204": {
|
|
1807
|
+
"description": "Success"
|
|
1808
|
+
},
|
|
1809
|
+
"404": {
|
|
1810
|
+
"description": "Not Found",
|
|
1811
|
+
"content": {
|
|
1812
|
+
"application/json": {
|
|
1813
|
+
"schema": {
|
|
1814
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
1815
|
+
}
|
|
1816
|
+
}
|
|
1817
|
+
}
|
|
1818
|
+
},
|
|
1819
|
+
"422": {
|
|
1820
|
+
"description": "Validation Error",
|
|
1821
|
+
"content": {
|
|
1822
|
+
"application/json": {
|
|
1823
|
+
"schema": {
|
|
1824
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
1825
|
+
}
|
|
1826
|
+
}
|
|
1827
|
+
}
|
|
1828
|
+
}
|
|
1829
|
+
}
|
|
1830
|
+
}
|
|
1831
|
+
}
|
|
1832
|
+
},
|
|
1833
|
+
"components": {
|
|
1834
|
+
"schemas": {
|
|
1835
|
+
"Agent": {
|
|
1836
|
+
"title": "Agent",
|
|
1837
|
+
"description": "A description of an agent supported by this server",
|
|
1838
|
+
"type": "object",
|
|
1839
|
+
"properties": {
|
|
1840
|
+
"agent_id": {
|
|
1841
|
+
"type": "string",
|
|
1842
|
+
"format": "uuid",
|
|
1843
|
+
"title": "Agent Id",
|
|
1844
|
+
"description": "Unique identifier of the agent in this server."
|
|
1845
|
+
},
|
|
1846
|
+
"metadata": {
|
|
1847
|
+
"$ref": "#/components/schemas/AgentMetadata"
|
|
1848
|
+
}
|
|
1849
|
+
},
|
|
1850
|
+
"required": [
|
|
1851
|
+
"agent_id",
|
|
1852
|
+
"metadata"
|
|
1853
|
+
]
|
|
1854
|
+
},
|
|
1855
|
+
"AgentMetadata": {
|
|
1856
|
+
"title": "Agent Metadata",
|
|
1857
|
+
"description": "Basic information associated to the agent",
|
|
1858
|
+
"type": "object",
|
|
1859
|
+
"properties": {
|
|
1860
|
+
"ref": {
|
|
1861
|
+
"$ref": "#/components/schemas/AgentRef"
|
|
1862
|
+
},
|
|
1863
|
+
"description": {
|
|
1864
|
+
"description": "Description of this agent, which should include what the intended use is, what tasks it accomplishes and how uses input and configs to produce the output and any other side effect",
|
|
1865
|
+
"title": "Description",
|
|
1866
|
+
"type": "string"
|
|
1867
|
+
}
|
|
1868
|
+
},
|
|
1869
|
+
"required": [
|
|
1870
|
+
"ref",
|
|
1871
|
+
"description"
|
|
1872
|
+
]
|
|
1873
|
+
},
|
|
1874
|
+
"AgentRef": {
|
|
1875
|
+
"title": "Agent Reference",
|
|
1876
|
+
"description": "Reference to an Agent Record in the Agent Directory, it includes name, version and a locator.",
|
|
1877
|
+
"type": "object",
|
|
1878
|
+
"properties": {
|
|
1879
|
+
"name": {
|
|
1880
|
+
"description": "Name of the agent that identifies the agent in its record",
|
|
1881
|
+
"title": "Name",
|
|
1882
|
+
"type": "string"
|
|
1883
|
+
},
|
|
1884
|
+
"version": {
|
|
1885
|
+
"description": "Version of the agent in its record. Should be formatted according to semantic versioning (https://semver.org)",
|
|
1886
|
+
"title": "Version",
|
|
1887
|
+
"type": "string"
|
|
1888
|
+
},
|
|
1889
|
+
"url": {
|
|
1890
|
+
"title": "Agent Record URL",
|
|
1891
|
+
"description": "URL of the record. Can be a network location, i.e. an entry in the Agent Directory or a file.",
|
|
1892
|
+
"type": "string",
|
|
1893
|
+
"format": "uri"
|
|
1894
|
+
}
|
|
1895
|
+
},
|
|
1896
|
+
"required": [
|
|
1897
|
+
"name",
|
|
1898
|
+
"version"
|
|
1899
|
+
]
|
|
1900
|
+
},
|
|
1901
|
+
"AgentACPDescriptor": {
|
|
1902
|
+
"title": "Agent ACP Descriptor",
|
|
1903
|
+
"description": "Describe all the ACP specs of an agent, including schemas and protocol features.",
|
|
1904
|
+
"type": "object",
|
|
1905
|
+
"properties": {
|
|
1906
|
+
"metadata": {
|
|
1907
|
+
"$ref": "#/components/schemas/AgentMetadata"
|
|
1908
|
+
},
|
|
1909
|
+
"specs": {
|
|
1910
|
+
"$ref": "#/components/schemas/AgentACPSpec"
|
|
1911
|
+
}
|
|
1912
|
+
},
|
|
1913
|
+
"required": [
|
|
1914
|
+
"metadata",
|
|
1915
|
+
"specs"
|
|
1916
|
+
]
|
|
1917
|
+
},
|
|
1918
|
+
"AgentACPSpec": {
|
|
1919
|
+
"title": "Agent ACP Specs",
|
|
1920
|
+
"description": "Specification of agent capabilities, config, input, output, and interrupts",
|
|
1921
|
+
"type": "object",
|
|
1922
|
+
"properties": {
|
|
1923
|
+
"capabilities": {
|
|
1924
|
+
"type": "object",
|
|
1925
|
+
"title": "Agent Capabilities",
|
|
1926
|
+
"description": "Declares what invocation features this agent is capable of.",
|
|
1927
|
+
"properties": {
|
|
1928
|
+
"threads": {
|
|
1929
|
+
"type": "boolean",
|
|
1930
|
+
"title": "Thread Support",
|
|
1931
|
+
"default": false,
|
|
1932
|
+
"description": "This is `true` if the agent supports run threads. If this is `false`, then the threads tagged with `Threads` are not available. If missing, it means `false`"
|
|
1933
|
+
},
|
|
1934
|
+
"interrupts": {
|
|
1935
|
+
"type": "boolean",
|
|
1936
|
+
"title": "Interrupt Support",
|
|
1937
|
+
"default": false,
|
|
1938
|
+
"description": "This is `true` if the agent runs can interrupt to request additional input and can be subsequently resumed. If missing, it means `false`"
|
|
1939
|
+
},
|
|
1940
|
+
"callbacks": {
|
|
1941
|
+
"type": "boolean",
|
|
1942
|
+
"title": "Callback Support",
|
|
1943
|
+
"default": false,
|
|
1944
|
+
"description": "This is `true` if the agent supports a webhook to report run results. If this is `false`, providing a `webhook` at run creation has no effect. If missing, it means `false`"
|
|
1945
|
+
},
|
|
1946
|
+
"streaming": {
|
|
1947
|
+
"type": "object",
|
|
1948
|
+
"title": "Streaming Modes",
|
|
1949
|
+
"description": "Supported streaming modes. If missing, streaming is not supported. If no mode is supported attempts to stream output will result in an error.",
|
|
1950
|
+
"properties": {
|
|
1951
|
+
"values": {
|
|
1952
|
+
"type": "boolean",
|
|
1953
|
+
"title": "Values Streaming",
|
|
1954
|
+
"description": "This is `true` if the agent supports values streaming. If `false` or missing, values streaming is not supported. Values streaming consists of a stream of objects of type `ValueRunResultUpdate`, where each one sent over the stream fully replace the previous one."
|
|
1955
|
+
},
|
|
1956
|
+
"custom": {
|
|
1957
|
+
"type": "boolean",
|
|
1958
|
+
"title": "Custom Objects Streaming",
|
|
1959
|
+
"description": "This is `true` if the agent supports custom objects streaming. If `false` or missing, custom streaming is not supported. Custom Objects streaming consists of a stream of object whose schema is specified by the agent ACP descriptor under `specs.custom_streaming_update`."
|
|
1960
|
+
}
|
|
1961
|
+
}
|
|
1962
|
+
}
|
|
1963
|
+
}
|
|
1964
|
+
},
|
|
1965
|
+
"input": {
|
|
1966
|
+
"type": "object",
|
|
1967
|
+
"description": "This object contains an instance of an OpenAPI schema object, formatted as per the OpenAPI specs: https://spec.openapis.org/oas/v3.1.1.html#schema-object",
|
|
1968
|
+
"examples": [
|
|
1969
|
+
{
|
|
1970
|
+
"type": "object",
|
|
1971
|
+
"required": [
|
|
1972
|
+
"name"
|
|
1973
|
+
],
|
|
1974
|
+
"properties": {
|
|
1975
|
+
"name": {
|
|
1976
|
+
"type": "string"
|
|
1977
|
+
},
|
|
1978
|
+
"address": {
|
|
1979
|
+
"type": "string"
|
|
1980
|
+
},
|
|
1981
|
+
"age": {
|
|
1982
|
+
"type": "integer",
|
|
1983
|
+
"format": "int32",
|
|
1984
|
+
"minimum": 0
|
|
1985
|
+
}
|
|
1986
|
+
}
|
|
1987
|
+
},
|
|
1988
|
+
{
|
|
1989
|
+
"type": "integer",
|
|
1990
|
+
"format": "int32",
|
|
1991
|
+
"minimum": 0,
|
|
1992
|
+
"description": "User's age"
|
|
1993
|
+
|
|
1994
|
+
}
|
|
1995
|
+
]
|
|
1996
|
+
},
|
|
1997
|
+
"output": {
|
|
1998
|
+
"type": "object",
|
|
1999
|
+
"description": "This object contains an instance of an OpenAPI schema object, formatted as per the OpenAPI specs: https://spec.openapis.org/oas/v3.1.1.html#schema-object",
|
|
2000
|
+
"examples": [
|
|
2001
|
+
{
|
|
2002
|
+
"type": "object",
|
|
2003
|
+
"required": [
|
|
2004
|
+
"name"
|
|
2005
|
+
],
|
|
2006
|
+
"properties": null,
|
|
2007
|
+
"name": {
|
|
2008
|
+
"type": "string"
|
|
2009
|
+
},
|
|
2010
|
+
"address": {
|
|
2011
|
+
"type": "string"
|
|
2012
|
+
},
|
|
2013
|
+
"age": {
|
|
2014
|
+
"type": "integer",
|
|
2015
|
+
"format": "int32",
|
|
2016
|
+
"minimum": 0
|
|
2017
|
+
}
|
|
2018
|
+
},
|
|
2019
|
+
{
|
|
2020
|
+
"type": "integer",
|
|
2021
|
+
"format": "int32",
|
|
2022
|
+
"minimum": 0,
|
|
2023
|
+
"description": "User's age"
|
|
2024
|
+
|
|
2025
|
+
}
|
|
2026
|
+
]
|
|
2027
|
+
},
|
|
2028
|
+
"custom_streaming_update": {
|
|
2029
|
+
"type": "object",
|
|
2030
|
+
"description": "This describes the format of an Update in the streaming. Must be specified if `streaming.custom` capability is true and cannot be specified otherwise. Format follows: https://spec.openapis.org/oas/v3.1.1.html#schema-object",
|
|
2031
|
+
"examples": [
|
|
2032
|
+
{
|
|
2033
|
+
"type": "object",
|
|
2034
|
+
"required": [
|
|
2035
|
+
"name"
|
|
2036
|
+
],
|
|
2037
|
+
"properties": null,
|
|
2038
|
+
"name": {
|
|
2039
|
+
"type": "string"
|
|
2040
|
+
},
|
|
2041
|
+
"address": {
|
|
2042
|
+
"type": "string"
|
|
2043
|
+
},
|
|
2044
|
+
"age": {
|
|
2045
|
+
"type": "integer",
|
|
2046
|
+
"format": "int32",
|
|
2047
|
+
"minimum": 0
|
|
2048
|
+
}
|
|
2049
|
+
}
|
|
2050
|
+
]
|
|
2051
|
+
},
|
|
2052
|
+
"thread_state": {
|
|
2053
|
+
"type": "object",
|
|
2054
|
+
"description": "This describes the format of ThreadState. Cannot be specified if `threads` capability is false. If not specified, when `threads` capability is true, then the API to retrieve ThreadState from a Thread or a Run is not available. This object contains an instance of an OpenAPI schema object, formatted as per the OpenAPI specs: https://spec.openapis.org/oas/v3.1.1.html#schema-object",
|
|
2055
|
+
"examples": [
|
|
2056
|
+
{
|
|
2057
|
+
"type": "object",
|
|
2058
|
+
"required": [
|
|
2059
|
+
"name"
|
|
2060
|
+
],
|
|
2061
|
+
"properties": null,
|
|
2062
|
+
"name": {
|
|
2063
|
+
"type": "string"
|
|
2064
|
+
},
|
|
2065
|
+
"address": {
|
|
2066
|
+
"type": "string"
|
|
2067
|
+
},
|
|
2068
|
+
"age": {
|
|
2069
|
+
"type": "integer",
|
|
2070
|
+
"format": "int32",
|
|
2071
|
+
"minimum": 0
|
|
2072
|
+
}
|
|
2073
|
+
},
|
|
2074
|
+
{
|
|
2075
|
+
"type": "integer",
|
|
2076
|
+
"format": "int32",
|
|
2077
|
+
"description": "An integer value"
|
|
2078
|
+
}
|
|
2079
|
+
]
|
|
2080
|
+
},
|
|
2081
|
+
"config": {
|
|
2082
|
+
"type": "object",
|
|
2083
|
+
"description": "This object contains an instance of an OpenAPI schema object, formatted as per the OpenAPI specs: https://spec.openapis.org/oas/v3.1.1.html#schema-object",
|
|
2084
|
+
"examples": [
|
|
2085
|
+
{
|
|
2086
|
+
"type": "object",
|
|
2087
|
+
"required": [
|
|
2088
|
+
"name"
|
|
2089
|
+
],
|
|
2090
|
+
"properties": null,
|
|
2091
|
+
"name": {
|
|
2092
|
+
"type": "string"
|
|
2093
|
+
},
|
|
2094
|
+
"address": {
|
|
2095
|
+
"type": "string"
|
|
2096
|
+
},
|
|
2097
|
+
"age": {
|
|
2098
|
+
"type": "integer",
|
|
2099
|
+
"format": "int32",
|
|
2100
|
+
"minimum": 0
|
|
2101
|
+
}
|
|
2102
|
+
},
|
|
2103
|
+
{
|
|
2104
|
+
"type": "integer",
|
|
2105
|
+
"format": "int32",
|
|
2106
|
+
"minimum": 0,
|
|
2107
|
+
"description": "An integer value"
|
|
2108
|
+
|
|
2109
|
+
}
|
|
2110
|
+
]
|
|
2111
|
+
},
|
|
2112
|
+
"interrupts": {
|
|
2113
|
+
"type": "array",
|
|
2114
|
+
"description": "List of possible interrupts that can be provided by the agent. If `interrupts` capability is true, this needs to have at least one item.",
|
|
2115
|
+
"items": {
|
|
2116
|
+
"type": "object",
|
|
2117
|
+
"properties": {
|
|
2118
|
+
"interrupt_type": {
|
|
2119
|
+
"description": "Name of this interrupt type. Needs to be unique in the list of interrupts.",
|
|
2120
|
+
"title": "Interrupt Type Name",
|
|
2121
|
+
"type": "string"
|
|
2122
|
+
},
|
|
2123
|
+
"interrupt_payload": {
|
|
2124
|
+
"type": "object",
|
|
2125
|
+
"description": "This object contains an instance of an OpenAPI schema object, formatted as per the OpenAPI specs: https://spec.openapis.org/oas/v3.1.1.html#schema-object",
|
|
2126
|
+
"examples": [
|
|
2127
|
+
{
|
|
2128
|
+
"type": "object",
|
|
2129
|
+
"required": [
|
|
2130
|
+
"name"
|
|
2131
|
+
],
|
|
2132
|
+
"properties": null,
|
|
2133
|
+
"name": {
|
|
2134
|
+
"type": "string"
|
|
2135
|
+
},
|
|
2136
|
+
"address": {
|
|
2137
|
+
"type": "string"
|
|
2138
|
+
},
|
|
2139
|
+
"age": {
|
|
2140
|
+
"type": "integer",
|
|
2141
|
+
"format": "int32",
|
|
2142
|
+
"minimum": 0
|
|
2143
|
+
}
|
|
2144
|
+
}
|
|
2145
|
+
]
|
|
2146
|
+
},
|
|
2147
|
+
"resume_payload": {
|
|
2148
|
+
"type": "object",
|
|
2149
|
+
"description": "This object contains an instance of an OpenAPI schema object, formatted as per the OpenAPI specs: https://spec.openapis.org/oas/v3.1.1.html#schema-object",
|
|
2150
|
+
"examples": [
|
|
2151
|
+
{
|
|
2152
|
+
"type": "object",
|
|
2153
|
+
"required": [
|
|
2154
|
+
"name"
|
|
2155
|
+
],
|
|
2156
|
+
"properties": null,
|
|
2157
|
+
"name": {
|
|
2158
|
+
"type": "string"
|
|
2159
|
+
},
|
|
2160
|
+
"address": {
|
|
2161
|
+
"type": "string"
|
|
2162
|
+
},
|
|
2163
|
+
"age": {
|
|
2164
|
+
"type": "integer",
|
|
2165
|
+
"format": "int32",
|
|
2166
|
+
"minimum": 0
|
|
2167
|
+
}
|
|
2168
|
+
}
|
|
2169
|
+
]
|
|
2170
|
+
}
|
|
2171
|
+
},
|
|
2172
|
+
"required": [
|
|
2173
|
+
"interrupt_type",
|
|
2174
|
+
"resume_payload",
|
|
2175
|
+
"interrupt_payload"
|
|
2176
|
+
]
|
|
2177
|
+
}
|
|
2178
|
+
}
|
|
2179
|
+
},
|
|
2180
|
+
"required": [
|
|
2181
|
+
"capabilities",
|
|
2182
|
+
"input",
|
|
2183
|
+
"output",
|
|
2184
|
+
"config"
|
|
2185
|
+
]
|
|
2186
|
+
},
|
|
2187
|
+
"AgentSearchRequest": {
|
|
2188
|
+
"properties": {
|
|
2189
|
+
"name": {
|
|
2190
|
+
"type": "string",
|
|
2191
|
+
"title": "Name",
|
|
2192
|
+
"description": "Match all agents with the name specified."
|
|
2193
|
+
},
|
|
2194
|
+
"version": {
|
|
2195
|
+
"type": "string",
|
|
2196
|
+
"title": "Version",
|
|
2197
|
+
"description": "Match all agents with the version specified. Formatted according to semantic versioning (https://semver.org)"
|
|
2198
|
+
},
|
|
2199
|
+
"limit": {
|
|
2200
|
+
"type": "integer",
|
|
2201
|
+
"title": "Limit",
|
|
2202
|
+
"description": "Maximum number to return.",
|
|
2203
|
+
"default": 10,
|
|
2204
|
+
"minimum": 1,
|
|
2205
|
+
"maximum": 1000
|
|
2206
|
+
},
|
|
2207
|
+
"offset": {
|
|
2208
|
+
"type": "integer",
|
|
2209
|
+
"title": "Offset",
|
|
2210
|
+
"description": "Offset to start from.",
|
|
2211
|
+
"default": 0,
|
|
2212
|
+
"minimum": 0
|
|
2213
|
+
}
|
|
2214
|
+
},
|
|
2215
|
+
"type": "object",
|
|
2216
|
+
"title": "AgentSearchRequest",
|
|
2217
|
+
"description": "Payload for listing agents."
|
|
2218
|
+
},
|
|
2219
|
+
"Run": {
|
|
2220
|
+
"title": "Agent Run",
|
|
2221
|
+
"description": "Holds common information of a run",
|
|
2222
|
+
"properties": {
|
|
2223
|
+
"run_id": {
|
|
2224
|
+
"type": "string",
|
|
2225
|
+
"format": "uuid",
|
|
2226
|
+
"title": "Run Id",
|
|
2227
|
+
"description": "The ID of the run."
|
|
2228
|
+
},
|
|
2229
|
+
"thread_id": {
|
|
2230
|
+
"type": "string",
|
|
2231
|
+
"format": "uuid",
|
|
2232
|
+
"title": "Agent ID",
|
|
2233
|
+
"description": "Optional Thread ID wher the Run belongs to. This is populated only for runs on agents agents supporting Threads."
|
|
2234
|
+
},
|
|
2235
|
+
"agent_id": {
|
|
2236
|
+
"type": "string",
|
|
2237
|
+
"format": "uuid",
|
|
2238
|
+
"title": "Agent Id",
|
|
2239
|
+
"description": "The agent that was used for this run."
|
|
2240
|
+
},
|
|
2241
|
+
"created_at": {
|
|
2242
|
+
"type": "string",
|
|
2243
|
+
"format": "date-time",
|
|
2244
|
+
"title": "Created At",
|
|
2245
|
+
"description": "The time the run was created."
|
|
2246
|
+
},
|
|
2247
|
+
"updated_at": {
|
|
2248
|
+
"type": "string",
|
|
2249
|
+
"format": "date-time",
|
|
2250
|
+
"title": "Updated At",
|
|
2251
|
+
"description": "The last time the run was updated."
|
|
2252
|
+
},
|
|
2253
|
+
"status": {
|
|
2254
|
+
"$ref": "#/components/schemas/RunStatus",
|
|
2255
|
+
"title": "Status",
|
|
2256
|
+
"description": "The status of the run. One of 'pending', 'error', 'success', 'timeout', 'interrupted'."
|
|
2257
|
+
}
|
|
2258
|
+
},
|
|
2259
|
+
"required": [
|
|
2260
|
+
"run_id",
|
|
2261
|
+
"agent_id",
|
|
2262
|
+
"created_at",
|
|
2263
|
+
"updated_at",
|
|
2264
|
+
"status"
|
|
2265
|
+
]
|
|
2266
|
+
},
|
|
2267
|
+
"RunStateless": {
|
|
2268
|
+
"title": "Agent Run Stateless",
|
|
2269
|
+
"description": "Holds all the information of a stateless run",
|
|
2270
|
+
"allOf": [
|
|
2271
|
+
{
|
|
2272
|
+
"$ref": "#/components/schemas/Run"
|
|
2273
|
+
},
|
|
2274
|
+
{
|
|
2275
|
+
"type": "object",
|
|
2276
|
+
"properties": {
|
|
2277
|
+
"creation": {
|
|
2278
|
+
"$ref": "#/components/schemas/RunCreateStateless",
|
|
2279
|
+
"title": "Creation",
|
|
2280
|
+
"description": ""
|
|
2281
|
+
}
|
|
2282
|
+
},
|
|
2283
|
+
"required": [
|
|
2284
|
+
"creation"
|
|
2285
|
+
]
|
|
2286
|
+
}
|
|
2287
|
+
]
|
|
2288
|
+
},
|
|
2289
|
+
"RunStateful": {
|
|
2290
|
+
"title": "Agent Run Stateful",
|
|
2291
|
+
"description": "Holds all the information of a stateful run",
|
|
2292
|
+
"allOf": [
|
|
2293
|
+
{
|
|
2294
|
+
"$ref": "#/components/schemas/Run"
|
|
2295
|
+
},
|
|
2296
|
+
{
|
|
2297
|
+
"type": "object",
|
|
2298
|
+
"properties": {
|
|
2299
|
+
"creation": {
|
|
2300
|
+
"$ref": "#/components/schemas/RunCreateStateful",
|
|
2301
|
+
"title": "Creation",
|
|
2302
|
+
"description": ""
|
|
2303
|
+
}
|
|
2304
|
+
},
|
|
2305
|
+
"required": [
|
|
2306
|
+
"creation"
|
|
2307
|
+
]
|
|
2308
|
+
}
|
|
2309
|
+
]
|
|
2310
|
+
},
|
|
2311
|
+
"RunCreateStateful": {
|
|
2312
|
+
"allOf": [
|
|
2313
|
+
{
|
|
2314
|
+
"$ref": "#/components/schemas/RunCreate"
|
|
2315
|
+
},
|
|
2316
|
+
{
|
|
2317
|
+
"type": "object",
|
|
2318
|
+
"properties": {
|
|
2319
|
+
"stream_subgraphs": {
|
|
2320
|
+
"type": "boolean",
|
|
2321
|
+
"title": "Stream Subgraphs",
|
|
2322
|
+
"description": "Whether to stream output from subgraphs.",
|
|
2323
|
+
"default": false
|
|
2324
|
+
},
|
|
2325
|
+
"if_not_exists": {
|
|
2326
|
+
"type": "string",
|
|
2327
|
+
"enum": [
|
|
2328
|
+
"create",
|
|
2329
|
+
"reject"
|
|
2330
|
+
],
|
|
2331
|
+
"title": "If Not Exists",
|
|
2332
|
+
"description": "How to handle missing thread. Must be either 'reject' (raise error if missing), or 'create' (create new thread).",
|
|
2333
|
+
"default": "reject"
|
|
2334
|
+
}
|
|
2335
|
+
}
|
|
2336
|
+
}
|
|
2337
|
+
],
|
|
2338
|
+
"title": "RunCreateStateful",
|
|
2339
|
+
"description": "Payload for creating a stateful run."
|
|
2340
|
+
},
|
|
2341
|
+
"RunWaitResponseStateful": {
|
|
2342
|
+
"type": "object",
|
|
2343
|
+
"properties": {
|
|
2344
|
+
"run": {
|
|
2345
|
+
"$ref": "#/components/schemas/RunStateful",
|
|
2346
|
+
"title": "Run",
|
|
2347
|
+
"description": "The run information."
|
|
2348
|
+
},
|
|
2349
|
+
"output": {
|
|
2350
|
+
"$ref": "#/components/schemas/RunOutput"
|
|
2351
|
+
}
|
|
2352
|
+
}
|
|
2353
|
+
},
|
|
2354
|
+
"RunWaitResponseStateless": {
|
|
2355
|
+
"type": "object",
|
|
2356
|
+
"properties": {
|
|
2357
|
+
"run": {
|
|
2358
|
+
"$ref": "#/components/schemas/RunStateless",
|
|
2359
|
+
"title": "Run",
|
|
2360
|
+
"description": "The run information."
|
|
2361
|
+
},
|
|
2362
|
+
"output": {
|
|
2363
|
+
"$ref": "#/components/schemas/RunOutput"
|
|
2364
|
+
}
|
|
2365
|
+
}
|
|
2366
|
+
},
|
|
2367
|
+
"RunCreateStateless": {
|
|
2368
|
+
"allOf": [
|
|
2369
|
+
{
|
|
2370
|
+
"$ref": "#/components/schemas/RunCreate"
|
|
2371
|
+
},
|
|
2372
|
+
{
|
|
2373
|
+
"type": "object",
|
|
2374
|
+
"properties": {
|
|
2375
|
+
"on_completion": {
|
|
2376
|
+
"type": "string",
|
|
2377
|
+
"enum": [
|
|
2378
|
+
"delete",
|
|
2379
|
+
"keep"
|
|
2380
|
+
],
|
|
2381
|
+
"title": "On Completion",
|
|
2382
|
+
"description": "Whether to delete or keep the thread created for a stateless run. Must be one of 'delete' or 'keep'.",
|
|
2383
|
+
"default": "delete"
|
|
2384
|
+
}
|
|
2385
|
+
}
|
|
2386
|
+
}
|
|
2387
|
+
],
|
|
2388
|
+
"title": "RunCreateStateless",
|
|
2389
|
+
"description": "Payload for creating a stateless run."
|
|
2390
|
+
},
|
|
2391
|
+
"ThreadSearchRequest": {
|
|
2392
|
+
"properties": {
|
|
2393
|
+
"metadata": {
|
|
2394
|
+
"type": "object",
|
|
2395
|
+
"title": "Metadata Filter",
|
|
2396
|
+
"description": "Matches all threads for which metadata has keys and values equal to those specified in this object."
|
|
2397
|
+
},
|
|
2398
|
+
"values": {
|
|
2399
|
+
"type": "object",
|
|
2400
|
+
"title": "Values",
|
|
2401
|
+
"description": "State values to filter on."
|
|
2402
|
+
},
|
|
2403
|
+
"status": {
|
|
2404
|
+
"$ref": "#/components/schemas/ThreadStatus"
|
|
2405
|
+
},
|
|
2406
|
+
"limit": {
|
|
2407
|
+
"type": "integer",
|
|
2408
|
+
"title": "Limit",
|
|
2409
|
+
"description": "Maximum number to return.",
|
|
2410
|
+
"default": 10,
|
|
2411
|
+
"minimum": 1,
|
|
2412
|
+
"maximum": 1000
|
|
2413
|
+
},
|
|
2414
|
+
"offset": {
|
|
2415
|
+
"type": "integer",
|
|
2416
|
+
"title": "Offset",
|
|
2417
|
+
"description": "Offset to start from.",
|
|
2418
|
+
"default": 0,
|
|
2419
|
+
"minimum": 0
|
|
2420
|
+
}
|
|
2421
|
+
},
|
|
2422
|
+
"type": "object",
|
|
2423
|
+
"title": "Thread Search Request",
|
|
2424
|
+
"description": "Payload for listing threads."
|
|
2425
|
+
},
|
|
2426
|
+
"Thread": {
|
|
2427
|
+
"type": "object",
|
|
2428
|
+
"title": "Thread",
|
|
2429
|
+
"description": "Represents a collection of consecutive runs over a thread. Thread is associated with a state. Runs for a thread can potentially happen across different agents, if the state format is compatible.",
|
|
2430
|
+
"properties": {
|
|
2431
|
+
"thread_id": {
|
|
2432
|
+
"type": "string",
|
|
2433
|
+
"title": "Thread ID",
|
|
2434
|
+
"description": "unique identifier of a thread"
|
|
2435
|
+
},
|
|
2436
|
+
"created_at": {
|
|
2437
|
+
"type": "string",
|
|
2438
|
+
"format": "date-time",
|
|
2439
|
+
"title": "Created At",
|
|
2440
|
+
"description": "The time the thread was created."
|
|
2441
|
+
},
|
|
2442
|
+
"updated_at": {
|
|
2443
|
+
"type": "string",
|
|
2444
|
+
"format": "date-time",
|
|
2445
|
+
"title": "Updated At",
|
|
2446
|
+
"description": "The last time the thread was updated."
|
|
2447
|
+
},
|
|
2448
|
+
"metadata": {
|
|
2449
|
+
"type": "object",
|
|
2450
|
+
"title": "Metadata",
|
|
2451
|
+
"description": "Free form metadata for this thread"
|
|
2452
|
+
},
|
|
2453
|
+
"status": {
|
|
2454
|
+
"type": "string",
|
|
2455
|
+
"enum": [
|
|
2456
|
+
"idle",
|
|
2457
|
+
"busy",
|
|
2458
|
+
"interrupted",
|
|
2459
|
+
"error"
|
|
2460
|
+
],
|
|
2461
|
+
"title": "Status",
|
|
2462
|
+
"description": "The status of the thread."
|
|
2463
|
+
},
|
|
2464
|
+
"values": {
|
|
2465
|
+
"title": "Values",
|
|
2466
|
+
"description": "The current state of the thread.",
|
|
2467
|
+
"$ref": "#/components/schemas/ThreadStateSchema"
|
|
2468
|
+
},
|
|
2469
|
+
"messages": {
|
|
2470
|
+
"type": "array",
|
|
2471
|
+
"items": {
|
|
2472
|
+
"$ref": "#/components/schemas/Message"
|
|
2473
|
+
},
|
|
2474
|
+
"title": "Messages",
|
|
2475
|
+
"description": "The current Messages of the thread. If messages are contained in Thread.values, implementations should remove them from values when returning messages. When this key isn't present it means the thread/agent doesn't support messages."
|
|
2476
|
+
}
|
|
2477
|
+
},
|
|
2478
|
+
"required": [
|
|
2479
|
+
"thread_id",
|
|
2480
|
+
"created_at",
|
|
2481
|
+
"updated_at",
|
|
2482
|
+
"metadata",
|
|
2483
|
+
"status"
|
|
2484
|
+
]
|
|
2485
|
+
},
|
|
2486
|
+
"ThreadCheckpoint": {
|
|
2487
|
+
"properties": {
|
|
2488
|
+
"checkpoint_id": {
|
|
2489
|
+
"type": "string",
|
|
2490
|
+
"format": "uuid",
|
|
2491
|
+
"title": "Checkpoint Id",
|
|
2492
|
+
"description": "The ID of the checkpoint."
|
|
2493
|
+
}
|
|
2494
|
+
},
|
|
2495
|
+
"type": "object",
|
|
2496
|
+
"required": [
|
|
2497
|
+
"checkpoint_id"
|
|
2498
|
+
],
|
|
2499
|
+
"title": "ThreadCheckpoint",
|
|
2500
|
+
"description": "Structured identifier for a thread checkpoint, ie. an entry in the thread's history."
|
|
2501
|
+
},
|
|
2502
|
+
"ThreadState": {
|
|
2503
|
+
"properties": {
|
|
2504
|
+
"checkpoint": {
|
|
2505
|
+
"$ref": "#/components/schemas/ThreadCheckpoint",
|
|
2506
|
+
"title": "Checkpoint",
|
|
2507
|
+
"description": "The identifier for this checkpoint."
|
|
2508
|
+
},
|
|
2509
|
+
"values": {
|
|
2510
|
+
"title": "Values",
|
|
2511
|
+
"description": "The current state of the thread.",
|
|
2512
|
+
"$ref": "#/components/schemas/ThreadStateSchema"
|
|
2513
|
+
},
|
|
2514
|
+
"messages": {
|
|
2515
|
+
"type": "array",
|
|
2516
|
+
"items": {
|
|
2517
|
+
"$ref": "#/components/schemas/Message"
|
|
2518
|
+
},
|
|
2519
|
+
"title": "Messages",
|
|
2520
|
+
"description": "The current messages of the thread. If messages are contained in Thread.values, implementations should remove them from values when returning messages. When this key isn't present it means the thread/agent doesn't support messages."
|
|
2521
|
+
},
|
|
2522
|
+
"metadata": {
|
|
2523
|
+
"type": "object",
|
|
2524
|
+
"title": "Metadata",
|
|
2525
|
+
"description": "The checkpoint metadata."
|
|
2526
|
+
}
|
|
2527
|
+
},
|
|
2528
|
+
"type": "object",
|
|
2529
|
+
"required": [
|
|
2530
|
+
"checkpoint",
|
|
2531
|
+
"values"
|
|
2532
|
+
],
|
|
2533
|
+
"title": "ThreadState"
|
|
2534
|
+
},
|
|
2535
|
+
"ThreadCreate": {
|
|
2536
|
+
"type": "object",
|
|
2537
|
+
"title": "Thread",
|
|
2538
|
+
"description": "Detail of an empty thread to be created.",
|
|
2539
|
+
"properties": {
|
|
2540
|
+
"thread_id": {
|
|
2541
|
+
"type": "string",
|
|
2542
|
+
"format": "uuid",
|
|
2543
|
+
"title": "Thread Id",
|
|
2544
|
+
"description": "The ID of the thread. If not provided, a random UUID will be generated."
|
|
2545
|
+
},
|
|
2546
|
+
"metadata": {
|
|
2547
|
+
"type": "object",
|
|
2548
|
+
"title": "Metadata",
|
|
2549
|
+
"description": "Free form metadata for this thread"
|
|
2550
|
+
},
|
|
2551
|
+
"if_exists": {
|
|
2552
|
+
"type": "string",
|
|
2553
|
+
"enum": [
|
|
2554
|
+
"raise",
|
|
2555
|
+
"do_nothing"
|
|
2556
|
+
],
|
|
2557
|
+
"title": "If Exists",
|
|
2558
|
+
"description": "How to handle duplicate creation. Must be either 'raise' (raise error if duplicate), or 'do_nothing' (return existing thread).",
|
|
2559
|
+
"default": "raise"
|
|
2560
|
+
}
|
|
2561
|
+
}
|
|
2562
|
+
},
|
|
2563
|
+
"ThreadPatch": {
|
|
2564
|
+
"properties": {
|
|
2565
|
+
"checkpoint": {
|
|
2566
|
+
"$ref": "#/components/schemas/ThreadCheckpoint",
|
|
2567
|
+
"title": "Checkpoint",
|
|
2568
|
+
"description": "The identifier of the checkpoint to branch from. Ignored for metadata-only patches. If not provided, defaults to the latest checkpoint."
|
|
2569
|
+
},
|
|
2570
|
+
"metadata": {
|
|
2571
|
+
"type": "object",
|
|
2572
|
+
"title": "Metadata",
|
|
2573
|
+
"description": "Metadata to merge with existing thread metadata."
|
|
2574
|
+
},
|
|
2575
|
+
"values": {
|
|
2576
|
+
"title": "Values",
|
|
2577
|
+
"description": "The current state of the thread.",
|
|
2578
|
+
"$ref": "#/components/schemas/ThreadStateSchema"
|
|
2579
|
+
},
|
|
2580
|
+
"messages": {
|
|
2581
|
+
"type": "array",
|
|
2582
|
+
"items": {
|
|
2583
|
+
"$ref": "#/components/schemas/Message"
|
|
2584
|
+
},
|
|
2585
|
+
"title": "Messages",
|
|
2586
|
+
"description": "The current Messages of the thread. If messages are contained in Thread.values, implementations should remove them from values when returning messages. When this key isn't present it means the thread/agent doesn't support messages."
|
|
2587
|
+
}
|
|
2588
|
+
},
|
|
2589
|
+
"type": "object",
|
|
2590
|
+
"title": "ThreadPatch",
|
|
2591
|
+
"description": "Payload for updating a thread."
|
|
2592
|
+
},
|
|
2593
|
+
"Message": {
|
|
2594
|
+
"type": "object",
|
|
2595
|
+
"properties": {
|
|
2596
|
+
"role": {
|
|
2597
|
+
"type": "string",
|
|
2598
|
+
"title": "Role",
|
|
2599
|
+
"description": "The role of the message."
|
|
2600
|
+
},
|
|
2601
|
+
"content": {
|
|
2602
|
+
"title": "Content",
|
|
2603
|
+
"description": "The content of the message.",
|
|
2604
|
+
"oneOf": [
|
|
2605
|
+
{
|
|
2606
|
+
"type": "string"
|
|
2607
|
+
},
|
|
2608
|
+
{
|
|
2609
|
+
"type": "array",
|
|
2610
|
+
"items": {
|
|
2611
|
+
"anyOf": [
|
|
2612
|
+
{
|
|
2613
|
+
"type": "object",
|
|
2614
|
+
"properties": {
|
|
2615
|
+
"text": {
|
|
2616
|
+
"type": "string"
|
|
2617
|
+
},
|
|
2618
|
+
"type": {
|
|
2619
|
+
"const": "text"
|
|
2620
|
+
},
|
|
2621
|
+
"metadata": {
|
|
2622
|
+
"type": "object"
|
|
2623
|
+
}
|
|
2624
|
+
},
|
|
2625
|
+
"required": [
|
|
2626
|
+
"text",
|
|
2627
|
+
"type"
|
|
2628
|
+
],
|
|
2629
|
+
"title": "MessageTextBlock"
|
|
2630
|
+
},
|
|
2631
|
+
{
|
|
2632
|
+
"type": "object",
|
|
2633
|
+
"properties": {
|
|
2634
|
+
"type": {
|
|
2635
|
+
"type": "string"
|
|
2636
|
+
},
|
|
2637
|
+
"metadata": {
|
|
2638
|
+
"type": "object"
|
|
2639
|
+
}
|
|
2640
|
+
},
|
|
2641
|
+
"required": [
|
|
2642
|
+
"type"
|
|
2643
|
+
],
|
|
2644
|
+
"title": "MessageAnyBlock"
|
|
2645
|
+
}
|
|
2646
|
+
]
|
|
2647
|
+
}
|
|
2648
|
+
}
|
|
2649
|
+
]
|
|
2650
|
+
},
|
|
2651
|
+
"id": {
|
|
2652
|
+
"type": "string",
|
|
2653
|
+
"title": "Id",
|
|
2654
|
+
"description": "The ID of the message."
|
|
2655
|
+
},
|
|
2656
|
+
"metadata": {
|
|
2657
|
+
"type": "object",
|
|
2658
|
+
"title": "Metadata",
|
|
2659
|
+
"description": "The metadata of the message."
|
|
2660
|
+
}
|
|
2661
|
+
},
|
|
2662
|
+
"required": [
|
|
2663
|
+
"role",
|
|
2664
|
+
"content"
|
|
2665
|
+
]
|
|
2666
|
+
},
|
|
2667
|
+
"ErrorResponse": {
|
|
2668
|
+
"type": "string",
|
|
2669
|
+
"title": "ErrorResponse",
|
|
2670
|
+
"description": "Error message returned from the server"
|
|
2671
|
+
},
|
|
2672
|
+
"RunCreate": {
|
|
2673
|
+
"properties": {
|
|
2674
|
+
"agent_id": {
|
|
2675
|
+
"type": "string",
|
|
2676
|
+
"title": "Agent Id",
|
|
2677
|
+
"description": "The agent ID to run. If not provided will use the default agent for this service."
|
|
2678
|
+
},
|
|
2679
|
+
"input": {
|
|
2680
|
+
"$ref": "#/components/schemas/InputSchema"
|
|
2681
|
+
},
|
|
2682
|
+
"metadata": {
|
|
2683
|
+
"type": "object",
|
|
2684
|
+
"title": "Metadata",
|
|
2685
|
+
"description": "Metadata to assign to the run."
|
|
2686
|
+
},
|
|
2687
|
+
"config": {
|
|
2688
|
+
"properties": {
|
|
2689
|
+
"tags": {
|
|
2690
|
+
"items": {
|
|
2691
|
+
"type": "string"
|
|
2692
|
+
},
|
|
2693
|
+
"type": "array",
|
|
2694
|
+
"title": "Tags"
|
|
2695
|
+
},
|
|
2696
|
+
"recursion_limit": {
|
|
2697
|
+
"type": "integer",
|
|
2698
|
+
"title": "Recursion Limit"
|
|
2699
|
+
},
|
|
2700
|
+
"configurable": {
|
|
2701
|
+
"$ref": "#/components/schemas/ConfigSchema"
|
|
2702
|
+
}
|
|
2703
|
+
},
|
|
2704
|
+
"type": "object",
|
|
2705
|
+
"title": "Config",
|
|
2706
|
+
"description": "The configuration for the agent."
|
|
2707
|
+
},
|
|
2708
|
+
"webhook": {
|
|
2709
|
+
"type": "string",
|
|
2710
|
+
"format": "uri",
|
|
2711
|
+
"maxLength": 65536,
|
|
2712
|
+
"minLength": 1,
|
|
2713
|
+
"title": "Status change webhook",
|
|
2714
|
+
"description": "Webhook to call upon change of run status. This is a url that accepts a POST containing the `Run` object as body. See Callbacks definition."
|
|
2715
|
+
},
|
|
2716
|
+
"stream_mode": {
|
|
2717
|
+
"anyOf": [
|
|
2718
|
+
{
|
|
2719
|
+
"items": {
|
|
2720
|
+
"$ref": "#/components/schemas/StreamingMode"
|
|
2721
|
+
},
|
|
2722
|
+
"type": "array"
|
|
2723
|
+
},
|
|
2724
|
+
{
|
|
2725
|
+
"$ref": "#/components/schemas/StreamingMode"
|
|
2726
|
+
},
|
|
2727
|
+
{ "type": "null" }
|
|
2728
|
+
],
|
|
2729
|
+
"title": "Stream Mode",
|
|
2730
|
+
"description": "If populated, indicates that the client requests to stream results with the specified streaming mode(s). The requested streaming mode(s) must be one or more of those supported by the agent as declared in agent ACP descriptor under `specs.capabilities`",
|
|
2731
|
+
"default": null
|
|
2732
|
+
},
|
|
2733
|
+
"on_disconnect": {
|
|
2734
|
+
"type": "string",
|
|
2735
|
+
"enum": [
|
|
2736
|
+
"cancel",
|
|
2737
|
+
"continue"
|
|
2738
|
+
],
|
|
2739
|
+
"title": "On Disconnect",
|
|
2740
|
+
"description": "The disconnect mode to use. Must be one of 'cancel' or 'continue'.",
|
|
2741
|
+
"default": "cancel"
|
|
2742
|
+
},
|
|
2743
|
+
"multitask_strategy": {
|
|
2744
|
+
"type": "string",
|
|
2745
|
+
"enum": [
|
|
2746
|
+
"reject",
|
|
2747
|
+
"rollback",
|
|
2748
|
+
"interrupt",
|
|
2749
|
+
"enqueue"
|
|
2750
|
+
],
|
|
2751
|
+
"title": "Multitask Strategy",
|
|
2752
|
+
"description": "Multitask strategy to use. Must be one of 'reject', 'interrupt', 'rollback', or 'enqueue'.",
|
|
2753
|
+
"default": "reject"
|
|
2754
|
+
},
|
|
2755
|
+
"after_seconds": {
|
|
2756
|
+
"type": "integer",
|
|
2757
|
+
"title": "After Seconds",
|
|
2758
|
+
"description": "The number of seconds to wait before starting the run. Use to schedule future runs."
|
|
2759
|
+
}
|
|
2760
|
+
},
|
|
2761
|
+
"type": "object",
|
|
2762
|
+
"required": [],
|
|
2763
|
+
"title": "RunCreateStateful",
|
|
2764
|
+
"description": "Payload for creating a run."
|
|
2765
|
+
},
|
|
2766
|
+
"StreamingMode": {
|
|
2767
|
+
"type": "string",
|
|
2768
|
+
"enum": [
|
|
2769
|
+
"values",
|
|
2770
|
+
"custom"
|
|
2771
|
+
]
|
|
2772
|
+
},
|
|
2773
|
+
"RunStatus": {
|
|
2774
|
+
"type": "string",
|
|
2775
|
+
"enum": [
|
|
2776
|
+
"pending",
|
|
2777
|
+
"error",
|
|
2778
|
+
"success",
|
|
2779
|
+
"timeout",
|
|
2780
|
+
"interrupted"
|
|
2781
|
+
]
|
|
2782
|
+
},
|
|
2783
|
+
"ThreadStatus": {
|
|
2784
|
+
"type": "string",
|
|
2785
|
+
"enum": [
|
|
2786
|
+
"idle",
|
|
2787
|
+
"busy",
|
|
2788
|
+
"interrupted",
|
|
2789
|
+
"error"
|
|
2790
|
+
]
|
|
2791
|
+
},
|
|
2792
|
+
"RunSearchRequest": {
|
|
2793
|
+
"properties": {
|
|
2794
|
+
"agent_id": {
|
|
2795
|
+
"type": "string",
|
|
2796
|
+
"format": "uuid",
|
|
2797
|
+
"title": "Agent Id",
|
|
2798
|
+
"description": "Matches all the Runs associated with the specified Agent ID."
|
|
2799
|
+
},
|
|
2800
|
+
"status": {
|
|
2801
|
+
"$ref": "#/components/schemas/RunStatus",
|
|
2802
|
+
"title": "Status",
|
|
2803
|
+
"description": "Matches all the Runs associated with the specified status. One of 'pending', 'error', 'success', 'timeout', 'interrupted'."
|
|
2804
|
+
},
|
|
2805
|
+
"metadata": {
|
|
2806
|
+
"type": "object",
|
|
2807
|
+
"title": "Metadata Filter",
|
|
2808
|
+
"description": "Matches all threads for which metadata has keys and values equal to those specified in this object."
|
|
2809
|
+
},
|
|
2810
|
+
"limit": {
|
|
2811
|
+
"type": "integer",
|
|
2812
|
+
"title": "Limit",
|
|
2813
|
+
"description": "Maximum number to return.",
|
|
2814
|
+
"default": 10,
|
|
2815
|
+
"minimum": 1,
|
|
2816
|
+
"maximum": 1000
|
|
2817
|
+
},
|
|
2818
|
+
"offset": {
|
|
2819
|
+
"type": "integer",
|
|
2820
|
+
"title": "Offset",
|
|
2821
|
+
"description": "Offset to start from.",
|
|
2822
|
+
"default": 0,
|
|
2823
|
+
"minimum": 0
|
|
2824
|
+
}
|
|
2825
|
+
},
|
|
2826
|
+
"type": "object",
|
|
2827
|
+
"title": "Run Search Request",
|
|
2828
|
+
"description": "Payload for listing runs."
|
|
2829
|
+
},
|
|
2830
|
+
"RunOutput": {
|
|
2831
|
+
"title": "Run Output",
|
|
2832
|
+
"description": "Output of a Run. Can be the final result or an interrupt.",
|
|
2833
|
+
"oneOf": [
|
|
2834
|
+
{
|
|
2835
|
+
"$ref": "#/components/schemas/RunResult"
|
|
2836
|
+
},
|
|
2837
|
+
{
|
|
2838
|
+
"$ref": "#/components/schemas/RunInterrupt"
|
|
2839
|
+
},
|
|
2840
|
+
{
|
|
2841
|
+
"$ref": "#/components/schemas/RunError"
|
|
2842
|
+
}
|
|
2843
|
+
],
|
|
2844
|
+
"discriminator": {
|
|
2845
|
+
"propertyName": "type",
|
|
2846
|
+
"mapping": {
|
|
2847
|
+
"result": "#/components/schemas/RunResult",
|
|
2848
|
+
"interrupt": "#/components/schemas/RunInterrupt",
|
|
2849
|
+
"error": "#/components/schemas/RunError"
|
|
2850
|
+
}
|
|
2851
|
+
}
|
|
2852
|
+
},
|
|
2853
|
+
"RunResult": {
|
|
2854
|
+
"title": "Run Result",
|
|
2855
|
+
"description": "Final result of a Run.",
|
|
2856
|
+
"type": "object",
|
|
2857
|
+
"properties": {
|
|
2858
|
+
"type": {
|
|
2859
|
+
"title": "Output Type",
|
|
2860
|
+
"type": "string",
|
|
2861
|
+
"enum": [
|
|
2862
|
+
"result"
|
|
2863
|
+
]
|
|
2864
|
+
},
|
|
2865
|
+
"values": {
|
|
2866
|
+
"$ref": "#/components/schemas/OutputSchema"
|
|
2867
|
+
},
|
|
2868
|
+
"messages": {
|
|
2869
|
+
"type": "array",
|
|
2870
|
+
"items": {
|
|
2871
|
+
"$ref": "#/components/schemas/Message"
|
|
2872
|
+
},
|
|
2873
|
+
"title": "Messages",
|
|
2874
|
+
"description": "The messages returned by the run."
|
|
2875
|
+
}
|
|
2876
|
+
},
|
|
2877
|
+
"required": [
|
|
2878
|
+
"type"
|
|
2879
|
+
]
|
|
2880
|
+
},
|
|
2881
|
+
"ValueRunResultUpdate": {
|
|
2882
|
+
"title": "Value Run Result Update",
|
|
2883
|
+
"description": "Partial result provided as value through streaming.",
|
|
2884
|
+
"type": "object",
|
|
2885
|
+
"properties": {
|
|
2886
|
+
"type": {
|
|
2887
|
+
"title": "Streaming Output Type",
|
|
2888
|
+
"type": "string",
|
|
2889
|
+
"enum": [
|
|
2890
|
+
"values"
|
|
2891
|
+
]
|
|
2892
|
+
},
|
|
2893
|
+
"run_id": {
|
|
2894
|
+
"type": "string",
|
|
2895
|
+
"format": "uuid",
|
|
2896
|
+
"title": "Run Id",
|
|
2897
|
+
"description": "The ID of the run."
|
|
2898
|
+
},
|
|
2899
|
+
"status": {
|
|
2900
|
+
"title": "Run Status",
|
|
2901
|
+
"description": "Status of the Run when this result was generated. This is particularly useful when this data structure is used for streaming results. As the server can indicate an interrupt or an error condition while streaming the result.",
|
|
2902
|
+
"$ref": "#/components/schemas/RunStatus"
|
|
2903
|
+
},
|
|
2904
|
+
"values": {
|
|
2905
|
+
"$ref": "#/components/schemas/OutputSchema"
|
|
2906
|
+
},
|
|
2907
|
+
"messages": {
|
|
2908
|
+
"type": "array",
|
|
2909
|
+
"items": {
|
|
2910
|
+
"$ref": "#/components/schemas/Message"
|
|
2911
|
+
},
|
|
2912
|
+
"title": "Messages",
|
|
2913
|
+
"description": "Stream of messages returned by the run."
|
|
2914
|
+
}
|
|
2915
|
+
},
|
|
2916
|
+
"required": [
|
|
2917
|
+
"type",
|
|
2918
|
+
"run_id",
|
|
2919
|
+
"status",
|
|
2920
|
+
"values"
|
|
2921
|
+
]
|
|
2922
|
+
},
|
|
2923
|
+
"RunOutputStream": {
|
|
2924
|
+
"type": "object",
|
|
2925
|
+
"title": "Run Output Stream Event",
|
|
2926
|
+
"description": "Server-sent event containing one agent output event. Actual event type is carried inside the data.",
|
|
2927
|
+
"properties": {
|
|
2928
|
+
"id": {
|
|
2929
|
+
"type": "string",
|
|
2930
|
+
"description": "Unique identifier of the event",
|
|
2931
|
+
"title": "Event ID"
|
|
2932
|
+
},
|
|
2933
|
+
"event": {
|
|
2934
|
+
"type": "string",
|
|
2935
|
+
"enum": [
|
|
2936
|
+
"agent_event"
|
|
2937
|
+
],
|
|
2938
|
+
"description": "Event type. This is the constant string `agent_event` to be compatible with SSE spec. The actual type differentiation is done in the event itself."
|
|
2939
|
+
},
|
|
2940
|
+
"data": {
|
|
2941
|
+
"title": "Stream Event Payload",
|
|
2942
|
+
"description": "A serialized JSON data structure carried in the SSE event data field. The event can carry either a full `ValueRunResultUpdate`, if streaming mode is `values` or an `CustomRunResultUpdate` if streaming mode is `custom`",
|
|
2943
|
+
"oneOf": [
|
|
2944
|
+
{
|
|
2945
|
+
"$ref": "#/components/schemas/ValueRunResultUpdate"
|
|
2946
|
+
},
|
|
2947
|
+
{
|
|
2948
|
+
"$ref": "#/components/schemas/CustomRunResultUpdate"
|
|
2949
|
+
},
|
|
2950
|
+
{
|
|
2951
|
+
"$ref": "#/components/schemas/ValueRunInterruptUpdate"
|
|
2952
|
+
},
|
|
2953
|
+
{
|
|
2954
|
+
"$ref": "#/components/schemas/ValueRunErrorUpdate"
|
|
2955
|
+
}
|
|
2956
|
+
],
|
|
2957
|
+
"discriminator": {
|
|
2958
|
+
"propertyName": "type",
|
|
2959
|
+
"mapping": {
|
|
2960
|
+
"values": "#/components/schemas/ValueRunResultUpdate",
|
|
2961
|
+
"custom": "#/components/schemas/CustomRunResultUpdate",
|
|
2962
|
+
"interrupt": "#/components/schemas/ValueRunInterruptUpdate",
|
|
2963
|
+
"error": "#/components/schemas/ValueRunErrorUpdate"
|
|
2964
|
+
}
|
|
2965
|
+
}
|
|
2966
|
+
}
|
|
2967
|
+
},
|
|
2968
|
+
"required": [
|
|
2969
|
+
"id",
|
|
2970
|
+
"event",
|
|
2971
|
+
"data"
|
|
2972
|
+
]
|
|
2973
|
+
},
|
|
2974
|
+
"CustomRunResultUpdate": {
|
|
2975
|
+
"title": "Custom Run Result Update",
|
|
2976
|
+
"description": "Object holding a custom defined update of the agent result during streaming.",
|
|
2977
|
+
"type": "object",
|
|
2978
|
+
"properties": {
|
|
2979
|
+
"type": {
|
|
2980
|
+
"title": "Streaming Output Type",
|
|
2981
|
+
"type": "string",
|
|
2982
|
+
"enum": [
|
|
2983
|
+
"custom"
|
|
2984
|
+
]
|
|
2985
|
+
},
|
|
2986
|
+
"run_id": {
|
|
2987
|
+
"type": "string",
|
|
2988
|
+
"format": "uuid",
|
|
2989
|
+
"title": "Run Id",
|
|
2990
|
+
"description": "The ID of the run."
|
|
2991
|
+
},
|
|
2992
|
+
"status": {
|
|
2993
|
+
"title": "Run Status",
|
|
2994
|
+
"description": "Status of the Run when this result was generated",
|
|
2995
|
+
"$ref": "#/components/schemas/RunStatus"
|
|
2996
|
+
},
|
|
2997
|
+
"update": {
|
|
2998
|
+
"$ref": "#/components/schemas/StreamUpdateSchema"
|
|
2999
|
+
}
|
|
3000
|
+
},
|
|
3001
|
+
"required": [
|
|
3002
|
+
"type",
|
|
3003
|
+
"status",
|
|
3004
|
+
"update"
|
|
3005
|
+
]
|
|
3006
|
+
},
|
|
3007
|
+
"ValueRunErrorUpdate": {
|
|
3008
|
+
"title": "Value Run Error Update",
|
|
3009
|
+
"description": "Partial result provided as value through streaming.",
|
|
3010
|
+
"type": "object",
|
|
3011
|
+
"allOf": [
|
|
3012
|
+
{
|
|
3013
|
+
"$ref": "#/components/schemas/RunError"
|
|
3014
|
+
},
|
|
3015
|
+
{
|
|
3016
|
+
"type": "object",
|
|
3017
|
+
"properties": {
|
|
3018
|
+
"status": {
|
|
3019
|
+
"title": "Run Status",
|
|
3020
|
+
"description": "Status of the Run when this result was generated. This is particularly useful when this data structure is used for streaming results. As the server can indicate an interrupt or an error condition while streaming the result.",
|
|
3021
|
+
"$ref": "#/components/schemas/RunStatus"
|
|
3022
|
+
}
|
|
3023
|
+
},
|
|
3024
|
+
"required": [
|
|
3025
|
+
"status"
|
|
3026
|
+
]
|
|
3027
|
+
}
|
|
3028
|
+
]
|
|
3029
|
+
},
|
|
3030
|
+
"RunError": {
|
|
3031
|
+
"title": "Run Error",
|
|
3032
|
+
"description": "Run terminated with an error",
|
|
3033
|
+
"type": "object",
|
|
3034
|
+
"properties": {
|
|
3035
|
+
"type": {
|
|
3036
|
+
"title": "Output Type",
|
|
3037
|
+
"type": "string",
|
|
3038
|
+
"enum": [
|
|
3039
|
+
"error"
|
|
3040
|
+
]
|
|
3041
|
+
},
|
|
3042
|
+
"run_id": {
|
|
3043
|
+
"type": "string",
|
|
3044
|
+
"format": "uuid",
|
|
3045
|
+
"title": "Run Id",
|
|
3046
|
+
"description": "The ID of the run."
|
|
3047
|
+
},
|
|
3048
|
+
"errcode": {
|
|
3049
|
+
"type": "integer",
|
|
3050
|
+
"title": "Error Code",
|
|
3051
|
+
"description": "code of the error"
|
|
3052
|
+
},
|
|
3053
|
+
"description": {
|
|
3054
|
+
"type": "string",
|
|
3055
|
+
"title": "Error Description",
|
|
3056
|
+
"description": "description of the error"
|
|
3057
|
+
}
|
|
3058
|
+
},
|
|
3059
|
+
"required": [
|
|
3060
|
+
"type",
|
|
3061
|
+
"run_id",
|
|
3062
|
+
"errcode",
|
|
3063
|
+
"description"
|
|
3064
|
+
]
|
|
3065
|
+
},
|
|
3066
|
+
"ValueRunInterruptUpdate": {
|
|
3067
|
+
"title": "Value Run Interrupt Update",
|
|
3068
|
+
"description": "Partial result provided as value through streaming.",
|
|
3069
|
+
"type": "object",
|
|
3070
|
+
"allOf": [
|
|
3071
|
+
{
|
|
3072
|
+
"$ref": "#/components/schemas/RunInterrupt"
|
|
3073
|
+
},
|
|
3074
|
+
{
|
|
3075
|
+
"type": "object",
|
|
3076
|
+
"properties": {
|
|
3077
|
+
"run_id": {
|
|
3078
|
+
"type": "string",
|
|
3079
|
+
"format": "uuid",
|
|
3080
|
+
"title": "Run Id",
|
|
3081
|
+
"description": "The ID of the run."
|
|
3082
|
+
},
|
|
3083
|
+
"status": {
|
|
3084
|
+
"title": "Run Status",
|
|
3085
|
+
"description": "Status of the Run when this result was generated. This is particularly useful when this data structure is used for streaming results. As the server can indicate an interrupt or an error condition while streaming the result.",
|
|
3086
|
+
"$ref": "#/components/schemas/RunStatus"
|
|
3087
|
+
}
|
|
3088
|
+
},
|
|
3089
|
+
"required": [
|
|
3090
|
+
"run_id",
|
|
3091
|
+
"status"
|
|
3092
|
+
]
|
|
3093
|
+
}
|
|
3094
|
+
]
|
|
3095
|
+
},
|
|
3096
|
+
"RunInterrupt": {
|
|
3097
|
+
"title": "Run Interrupt",
|
|
3098
|
+
"description": "Interrupt occurred during a Run",
|
|
3099
|
+
"type": "object",
|
|
3100
|
+
"properties": {
|
|
3101
|
+
"type": {
|
|
3102
|
+
"title": "Output Type",
|
|
3103
|
+
"type": "string",
|
|
3104
|
+
"enum": [
|
|
3105
|
+
"interrupt"
|
|
3106
|
+
]
|
|
3107
|
+
},
|
|
3108
|
+
"interrupt": {
|
|
3109
|
+
"$ref": "#/components/schemas/InterruptPayloadSchema"
|
|
3110
|
+
}
|
|
3111
|
+
},
|
|
3112
|
+
"required": [
|
|
3113
|
+
"type",
|
|
3114
|
+
"interrupt"
|
|
3115
|
+
]
|
|
3116
|
+
},
|
|
3117
|
+
"InputSchema": {
|
|
3118
|
+
"title": "Input Schema",
|
|
3119
|
+
"description": "The input of the agent. The schema is described in agent ACP descriptor under 'spec.input'.",
|
|
3120
|
+
"oneOf": [
|
|
3121
|
+
{
|
|
3122
|
+
"type": "object",
|
|
3123
|
+
"description": "This object contains an instance of an OpenAPI schema object, formatted as per the OpenAPI specs: https://spec.openapis.org/oas/v3.1.1.html#schema-object"
|
|
3124
|
+
},
|
|
3125
|
+
{
|
|
3126
|
+
"type": "string",
|
|
3127
|
+
"description": "String input to the agent."
|
|
3128
|
+
},
|
|
3129
|
+
{
|
|
3130
|
+
"type": "integer",
|
|
3131
|
+
"description": "Integer input to the agent."
|
|
3132
|
+
},
|
|
3133
|
+
{
|
|
3134
|
+
"type":"number",
|
|
3135
|
+
"description": "Number input to the agent."
|
|
3136
|
+
},
|
|
3137
|
+
{
|
|
3138
|
+
"type": "boolean",
|
|
3139
|
+
"description": "Boolean input to the agent."
|
|
3140
|
+
},
|
|
3141
|
+
{
|
|
3142
|
+
"type": "array",
|
|
3143
|
+
"description": "Array input to the agent.",
|
|
3144
|
+
"items": {}
|
|
3145
|
+
}
|
|
3146
|
+
]
|
|
3147
|
+
},
|
|
3148
|
+
"OutputSchema": {
|
|
3149
|
+
"title": "Output Schema",
|
|
3150
|
+
"description": "The output of the agent. The schema is described in agent ACP descriptor under 'spec.output'.",
|
|
3151
|
+
"oneOf": [
|
|
3152
|
+
{
|
|
3153
|
+
"type": "object",
|
|
3154
|
+
"description": "This object contains an instance of an OpenAPI schema object, formatted as per the OpenAPI specs: https://spec.openapis.org/oas/v3.1.1.html#schema-object"
|
|
3155
|
+
},
|
|
3156
|
+
{
|
|
3157
|
+
"type": "string",
|
|
3158
|
+
"description": "String output to the agent."
|
|
3159
|
+
},
|
|
3160
|
+
{
|
|
3161
|
+
"type": "integer",
|
|
3162
|
+
"description": "Integer output to the agent."
|
|
3163
|
+
},
|
|
3164
|
+
{
|
|
3165
|
+
"type":"number",
|
|
3166
|
+
"description": "Number output to the agent."
|
|
3167
|
+
},
|
|
3168
|
+
{
|
|
3169
|
+
"type": "boolean",
|
|
3170
|
+
"description": "Boolean output to the agent."
|
|
3171
|
+
},
|
|
3172
|
+
{
|
|
3173
|
+
"type": "array",
|
|
3174
|
+
"description": "Array input to the agent.",
|
|
3175
|
+
"items": {}
|
|
3176
|
+
}
|
|
3177
|
+
]
|
|
3178
|
+
},
|
|
3179
|
+
"ConfigSchema": {
|
|
3180
|
+
"title": "Config",
|
|
3181
|
+
"description": "The configuration for this agent. The schema is described in agent ACP descriptor under 'spec.config'. If missing, default values are used.",
|
|
3182
|
+
"oneOf": [
|
|
3183
|
+
{
|
|
3184
|
+
"type": "object",
|
|
3185
|
+
"description": "This object contains an instance of an OpenAPI schema object, formatted as per the OpenAPI specs: https://spec.openapis.org/oas/v3.1.1.html#schema-object"
|
|
3186
|
+
},
|
|
3187
|
+
{
|
|
3188
|
+
"type": "string",
|
|
3189
|
+
"description": "String config to the agent."
|
|
3190
|
+
},
|
|
3191
|
+
{
|
|
3192
|
+
"type": "integer",
|
|
3193
|
+
"description": "Integer config to the agent."
|
|
3194
|
+
},
|
|
3195
|
+
{
|
|
3196
|
+
"type":"number",
|
|
3197
|
+
"description": "Number config to the agent."
|
|
3198
|
+
},
|
|
3199
|
+
{
|
|
3200
|
+
"type": "boolean",
|
|
3201
|
+
"description": "Boolean config to the agent."
|
|
3202
|
+
},
|
|
3203
|
+
{
|
|
3204
|
+
"type": "array",
|
|
3205
|
+
"description": "Array input to the agent.",
|
|
3206
|
+
"items": {}
|
|
3207
|
+
}
|
|
3208
|
+
]
|
|
3209
|
+
},
|
|
3210
|
+
"ThreadStateSchema": {
|
|
3211
|
+
"title": "Thread State Schema",
|
|
3212
|
+
"description": "The thread state. The schema is described in agent ACP descriptor under 'spec.thread_state'.",
|
|
3213
|
+
"oneOf": [
|
|
3214
|
+
{
|
|
3215
|
+
"type": "object",
|
|
3216
|
+
"description": "This object contains an instance of an OpenAPI schema object, formatted as per the OpenAPI specs: https://spec.openapis.org/oas/v3.1.1.html#schema-object"
|
|
3217
|
+
},
|
|
3218
|
+
{
|
|
3219
|
+
"type": "string",
|
|
3220
|
+
"description": "String thread state to the agent."
|
|
3221
|
+
},
|
|
3222
|
+
{
|
|
3223
|
+
"type": "integer",
|
|
3224
|
+
"description": "Integer thread state to the agent."
|
|
3225
|
+
},
|
|
3226
|
+
{
|
|
3227
|
+
"type":"number",
|
|
3228
|
+
"description": "Number thread state to the agent."
|
|
3229
|
+
},
|
|
3230
|
+
{
|
|
3231
|
+
"type": "boolean",
|
|
3232
|
+
"description": "Boolean thread state to the agent."
|
|
3233
|
+
},
|
|
3234
|
+
{
|
|
3235
|
+
"type": "array",
|
|
3236
|
+
"description": "Array input to the agent.",
|
|
3237
|
+
"items": {}
|
|
3238
|
+
}
|
|
3239
|
+
]
|
|
3240
|
+
},
|
|
3241
|
+
"StreamUpdateSchema": {
|
|
3242
|
+
"type": "object",
|
|
3243
|
+
"title": "Stream Update Schema",
|
|
3244
|
+
"description": "An update in the SSE event streaming where streaming mode is set to custom. The schema is described in agent ACP descriptor under 'spec.custom_streaming_update'."
|
|
3245
|
+
},
|
|
3246
|
+
"InterruptPayloadSchema": {
|
|
3247
|
+
"title": "Interrupt Payload",
|
|
3248
|
+
"description": "This schema describes the interrupt payload. Actual schema describes a polimorphic object, which means a schema structured with `oneOf` and `discriminator`. The discriminator is the `interrupt_type`, while the schemas will be the ones defined in the agent spec under `interrupts`/`interrupt_payload` For example: oneOf:\n - $ref: '#/components/schemas/ApprovalInterruptPayload'\n - $ref: '#/components/schemas/QuestionInterruptPayload'\ndiscriminator:\n propertyName: interruput_type\n mapping:\n approval: '#/components/schemas/ApprovalInterruptPayload'\n question: '#/components/schemas/QuestionInterruptPayload'",
|
|
3249
|
+
"oneOf": [
|
|
3250
|
+
{
|
|
3251
|
+
"type": "object",
|
|
3252
|
+
"description": "This object contains an instance of an OpenAPI schema object, formatted as per the OpenAPI specs: https://spec.openapis.org/oas/v3.1.1.html#schema-object"
|
|
3253
|
+
},
|
|
3254
|
+
{
|
|
3255
|
+
"type": "string",
|
|
3256
|
+
"description": "String interrupt to the agent."
|
|
3257
|
+
},
|
|
3258
|
+
{
|
|
3259
|
+
"type": "integer",
|
|
3260
|
+
"description": "Integer interrupt to the agent."
|
|
3261
|
+
},
|
|
3262
|
+
{
|
|
3263
|
+
"type":"number",
|
|
3264
|
+
"description": "Number interrupt to the agent."
|
|
3265
|
+
},
|
|
3266
|
+
{
|
|
3267
|
+
"type": "boolean",
|
|
3268
|
+
"description": "Boolean interrupt to the agent."
|
|
3269
|
+
},
|
|
3270
|
+
{
|
|
3271
|
+
"type": "array",
|
|
3272
|
+
"description": "Array input to the agent.",
|
|
3273
|
+
"items": {}
|
|
3274
|
+
}
|
|
3275
|
+
]
|
|
3276
|
+
},
|
|
3277
|
+
"ResumePayloadSchema": {
|
|
3278
|
+
"title": "Resume Payload Schema",
|
|
3279
|
+
"description": "This schema describes the resume payload after an interrupt. Actual schema describes a polimorphic object, which means a schema structured with `oneOf` and `discriminator`. The discriminator is the `interrupt_type`, while the schemas will be those defined in the agent spec under `interrupts`/`resume_payload` For example: oneOf:\n - $ref: '#/components/schemas/ApprovalResumePayload'\n - $ref: '#/components/schemas/QuestionResumePayload'\ndiscriminator:\n propertyName: interrupt_type\n mapping:\n approval: '#/components/schemas/ApprovalResumePayload'\n question: '#/components/schemas/QuestionResumePayload'",
|
|
3280
|
+
"oneOf": [
|
|
3281
|
+
{
|
|
3282
|
+
"type": "object",
|
|
3283
|
+
"description": "This object contains an instance of an OpenAPI schema object, formatted as per the OpenAPI specs: https://spec.openapis.org/oas/v3.1.1.html#schema-object"
|
|
3284
|
+
},
|
|
3285
|
+
{
|
|
3286
|
+
"type": "string",
|
|
3287
|
+
"description": "String resume to the agent."
|
|
3288
|
+
},
|
|
3289
|
+
{
|
|
3290
|
+
"type": "integer",
|
|
3291
|
+
"description": "Integer resume to the agent."
|
|
3292
|
+
},
|
|
3293
|
+
{
|
|
3294
|
+
"type":"number",
|
|
3295
|
+
"description": "Number resume to the agent."
|
|
3296
|
+
},
|
|
3297
|
+
{
|
|
3298
|
+
"type": "boolean",
|
|
3299
|
+
"description": "Boolean resume to the agent."
|
|
3300
|
+
},
|
|
3301
|
+
{
|
|
3302
|
+
"type": "array",
|
|
3303
|
+
"description": "Array input to the agent.",
|
|
3304
|
+
"items": {}
|
|
3305
|
+
}
|
|
3306
|
+
]
|
|
3307
|
+
}
|
|
3308
|
+
}
|
|
3309
|
+
}
|
|
3310
|
+
}
|