langgraph-api 0.4.1__py3-none-any.whl → 0.7.3__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (135) hide show
  1. langgraph_api/__init__.py +1 -1
  2. langgraph_api/api/__init__.py +111 -51
  3. langgraph_api/api/a2a.py +1610 -0
  4. langgraph_api/api/assistants.py +212 -89
  5. langgraph_api/api/mcp.py +3 -3
  6. langgraph_api/api/meta.py +52 -28
  7. langgraph_api/api/openapi.py +27 -17
  8. langgraph_api/api/profile.py +108 -0
  9. langgraph_api/api/runs.py +342 -195
  10. langgraph_api/api/store.py +19 -2
  11. langgraph_api/api/threads.py +209 -27
  12. langgraph_api/asgi_transport.py +14 -9
  13. langgraph_api/asyncio.py +14 -4
  14. langgraph_api/auth/custom.py +52 -37
  15. langgraph_api/auth/langsmith/backend.py +4 -3
  16. langgraph_api/auth/langsmith/client.py +13 -8
  17. langgraph_api/cli.py +230 -133
  18. langgraph_api/command.py +5 -3
  19. langgraph_api/config/__init__.py +532 -0
  20. langgraph_api/config/_parse.py +58 -0
  21. langgraph_api/config/schemas.py +431 -0
  22. langgraph_api/cron_scheduler.py +17 -1
  23. langgraph_api/encryption/__init__.py +15 -0
  24. langgraph_api/encryption/aes_json.py +158 -0
  25. langgraph_api/encryption/context.py +35 -0
  26. langgraph_api/encryption/custom.py +280 -0
  27. langgraph_api/encryption/middleware.py +632 -0
  28. langgraph_api/encryption/shared.py +63 -0
  29. langgraph_api/errors.py +12 -1
  30. langgraph_api/executor_entrypoint.py +11 -6
  31. langgraph_api/feature_flags.py +29 -0
  32. langgraph_api/graph.py +176 -76
  33. langgraph_api/grpc/client.py +313 -0
  34. langgraph_api/grpc/config_conversion.py +231 -0
  35. langgraph_api/grpc/generated/__init__.py +29 -0
  36. langgraph_api/grpc/generated/checkpointer_pb2.py +63 -0
  37. langgraph_api/grpc/generated/checkpointer_pb2.pyi +99 -0
  38. langgraph_api/grpc/generated/checkpointer_pb2_grpc.py +329 -0
  39. langgraph_api/grpc/generated/core_api_pb2.py +216 -0
  40. langgraph_api/grpc/generated/core_api_pb2.pyi +905 -0
  41. langgraph_api/grpc/generated/core_api_pb2_grpc.py +1621 -0
  42. langgraph_api/grpc/generated/engine_common_pb2.py +219 -0
  43. langgraph_api/grpc/generated/engine_common_pb2.pyi +722 -0
  44. langgraph_api/grpc/generated/engine_common_pb2_grpc.py +24 -0
  45. langgraph_api/grpc/generated/enum_cancel_run_action_pb2.py +37 -0
  46. langgraph_api/grpc/generated/enum_cancel_run_action_pb2.pyi +12 -0
  47. langgraph_api/grpc/generated/enum_cancel_run_action_pb2_grpc.py +24 -0
  48. langgraph_api/grpc/generated/enum_control_signal_pb2.py +37 -0
  49. langgraph_api/grpc/generated/enum_control_signal_pb2.pyi +16 -0
  50. langgraph_api/grpc/generated/enum_control_signal_pb2_grpc.py +24 -0
  51. langgraph_api/grpc/generated/enum_durability_pb2.py +37 -0
  52. langgraph_api/grpc/generated/enum_durability_pb2.pyi +16 -0
  53. langgraph_api/grpc/generated/enum_durability_pb2_grpc.py +24 -0
  54. langgraph_api/grpc/generated/enum_multitask_strategy_pb2.py +37 -0
  55. langgraph_api/grpc/generated/enum_multitask_strategy_pb2.pyi +16 -0
  56. langgraph_api/grpc/generated/enum_multitask_strategy_pb2_grpc.py +24 -0
  57. langgraph_api/grpc/generated/enum_run_status_pb2.py +37 -0
  58. langgraph_api/grpc/generated/enum_run_status_pb2.pyi +22 -0
  59. langgraph_api/grpc/generated/enum_run_status_pb2_grpc.py +24 -0
  60. langgraph_api/grpc/generated/enum_stream_mode_pb2.py +37 -0
  61. langgraph_api/grpc/generated/enum_stream_mode_pb2.pyi +28 -0
  62. langgraph_api/grpc/generated/enum_stream_mode_pb2_grpc.py +24 -0
  63. langgraph_api/grpc/generated/enum_thread_status_pb2.py +37 -0
  64. langgraph_api/grpc/generated/enum_thread_status_pb2.pyi +16 -0
  65. langgraph_api/grpc/generated/enum_thread_status_pb2_grpc.py +24 -0
  66. langgraph_api/grpc/generated/enum_thread_stream_mode_pb2.py +37 -0
  67. langgraph_api/grpc/generated/enum_thread_stream_mode_pb2.pyi +16 -0
  68. langgraph_api/grpc/generated/enum_thread_stream_mode_pb2_grpc.py +24 -0
  69. langgraph_api/grpc/generated/errors_pb2.py +39 -0
  70. langgraph_api/grpc/generated/errors_pb2.pyi +21 -0
  71. langgraph_api/grpc/generated/errors_pb2_grpc.py +24 -0
  72. langgraph_api/grpc/ops/__init__.py +370 -0
  73. langgraph_api/grpc/ops/assistants.py +424 -0
  74. langgraph_api/grpc/ops/runs.py +792 -0
  75. langgraph_api/grpc/ops/threads.py +1013 -0
  76. langgraph_api/http.py +16 -5
  77. langgraph_api/http_metrics.py +15 -35
  78. langgraph_api/http_metrics_utils.py +38 -0
  79. langgraph_api/js/build.mts +1 -1
  80. langgraph_api/js/client.http.mts +13 -7
  81. langgraph_api/js/client.mts +2 -5
  82. langgraph_api/js/package.json +29 -28
  83. langgraph_api/js/remote.py +56 -30
  84. langgraph_api/js/src/graph.mts +20 -0
  85. langgraph_api/js/sse.py +2 -2
  86. langgraph_api/js/ui.py +1 -1
  87. langgraph_api/js/yarn.lock +1204 -1006
  88. langgraph_api/logging.py +29 -2
  89. langgraph_api/metadata.py +99 -28
  90. langgraph_api/middleware/http_logger.py +7 -2
  91. langgraph_api/middleware/private_network.py +7 -7
  92. langgraph_api/models/run.py +54 -93
  93. langgraph_api/otel_context.py +205 -0
  94. langgraph_api/patch.py +5 -3
  95. langgraph_api/queue_entrypoint.py +154 -65
  96. langgraph_api/route.py +47 -5
  97. langgraph_api/schema.py +88 -10
  98. langgraph_api/self_hosted_logs.py +124 -0
  99. langgraph_api/self_hosted_metrics.py +450 -0
  100. langgraph_api/serde.py +79 -37
  101. langgraph_api/server.py +138 -60
  102. langgraph_api/state.py +4 -3
  103. langgraph_api/store.py +25 -16
  104. langgraph_api/stream.py +80 -29
  105. langgraph_api/thread_ttl.py +31 -13
  106. langgraph_api/timing/__init__.py +25 -0
  107. langgraph_api/timing/profiler.py +200 -0
  108. langgraph_api/timing/timer.py +318 -0
  109. langgraph_api/utils/__init__.py +53 -8
  110. langgraph_api/utils/cache.py +47 -10
  111. langgraph_api/utils/config.py +2 -1
  112. langgraph_api/utils/errors.py +77 -0
  113. langgraph_api/utils/future.py +10 -6
  114. langgraph_api/utils/headers.py +76 -2
  115. langgraph_api/utils/retriable_client.py +74 -0
  116. langgraph_api/utils/stream_codec.py +315 -0
  117. langgraph_api/utils/uuids.py +29 -62
  118. langgraph_api/validation.py +9 -0
  119. langgraph_api/webhook.py +120 -6
  120. langgraph_api/worker.py +55 -24
  121. {langgraph_api-0.4.1.dist-info → langgraph_api-0.7.3.dist-info}/METADATA +16 -8
  122. langgraph_api-0.7.3.dist-info/RECORD +168 -0
  123. {langgraph_api-0.4.1.dist-info → langgraph_api-0.7.3.dist-info}/WHEEL +1 -1
  124. langgraph_runtime/__init__.py +1 -0
  125. langgraph_runtime/routes.py +11 -0
  126. logging.json +1 -3
  127. openapi.json +839 -478
  128. langgraph_api/config.py +0 -387
  129. langgraph_api/js/isolate-0x130008000-46649-46649-v8.log +0 -4430
  130. langgraph_api/js/isolate-0x138008000-44681-44681-v8.log +0 -4430
  131. langgraph_api/js/package-lock.json +0 -3308
  132. langgraph_api-0.4.1.dist-info/RECORD +0 -107
  133. /langgraph_api/{utils.py → grpc/__init__.py} +0 -0
  134. {langgraph_api-0.4.1.dist-info → langgraph_api-0.7.3.dist-info}/entry_points.txt +0 -0
  135. {langgraph_api-0.4.1.dist-info → langgraph_api-0.7.3.dist-info}/licenses/LICENSE +0 -0
openapi.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "openapi": "3.1.0",
3
3
  "info": {
4
- "title": "LangGraph Platform",
4
+ "title": "LangSmith Deployment",
5
5
  "version": "0.1.0"
6
6
  },
7
7
  "tags": [
@@ -29,6 +29,10 @@
29
29
  "name": "Store",
30
30
  "description": "Store is an API for managing persistent key-value store (long-term memory) that is available from any thread."
31
31
  },
32
+ {
33
+ "name": "A2A",
34
+ "description": "Agent-to-Agent Protocol related endpoints for exposing assistants as A2A-compliant agents."
35
+ },
32
36
  {
33
37
  "name": "MCP",
34
38
  "description": "Model Context Protocol related endpoints for exposing an agent as an MCP server."
@@ -41,9 +45,7 @@
41
45
  "paths": {
42
46
  "/assistants": {
43
47
  "post": {
44
- "tags": [
45
- "Assistants"
46
- ],
48
+ "tags": ["Assistants"],
47
49
  "summary": "Create Assistant",
48
50
  "description": "Create an assistant.\n\nAn initial version of the assistant will be created and the assistant is set to that version. To change versions, use the `POST /assistants/{assistant_id}/latest` endpoint.",
49
51
  "operationId": "create_assistant_assistants_post",
@@ -103,9 +105,7 @@
103
105
  },
104
106
  "/assistants/search": {
105
107
  "post": {
106
- "tags": [
107
- "Assistants"
108
- ],
108
+ "tags": ["Assistants"],
109
109
  "summary": "Search Assistants",
110
110
  "description": "Search for assistants.\n\nThis endpoint also functions as the endpoint to list all assistants.",
111
111
  "operationId": "search_assistants_assistants_search_post",
@@ -159,9 +159,7 @@
159
159
  },
160
160
  "/assistants/count": {
161
161
  "post": {
162
- "tags": [
163
- "Assistants"
164
- ],
162
+ "tags": ["Assistants"],
165
163
  "summary": "Count Assistants",
166
164
  "description": "Get the count of assistants matching the specified criteria.",
167
165
  "operationId": "count_assistants_assistants_count_post",
@@ -212,9 +210,7 @@
212
210
  },
213
211
  "/assistants/{assistant_id}": {
214
212
  "get": {
215
- "tags": [
216
- "Assistants"
217
- ],
213
+ "tags": ["Assistants"],
218
214
  "summary": "Get Assistant",
219
215
  "description": "Get an assistant by ID.",
220
216
  "operationId": "get_assistant_assistants__assistant_id__get",
@@ -256,9 +252,7 @@
256
252
  }
257
253
  },
258
254
  "delete": {
259
- "tags": [
260
- "Assistants"
261
- ],
255
+ "tags": ["Assistants"],
262
256
  "summary": "Delete Assistant",
263
257
  "description": "Delete an assistant by ID.\n\nAll versions of the assistant will be deleted as well.",
264
258
  "operationId": "delete_assistant_assistants__assistant_id__delete",
@@ -274,6 +268,17 @@
274
268
  },
275
269
  "name": "assistant_id",
276
270
  "in": "path"
271
+ },
272
+ {
273
+ "description": "If true, delete all threads with metadata.assistant_id matching this assistant, along with runs and checkpoints belonging to those threads. Auth filters are applied, so threads not visible to the user will not be deleted.",
274
+ "required": false,
275
+ "schema": {
276
+ "type": "boolean",
277
+ "default": false,
278
+ "title": "Delete Threads"
279
+ },
280
+ "name": "delete_threads",
281
+ "in": "query"
277
282
  }
278
283
  ],
279
284
  "responses": {
@@ -308,9 +313,7 @@
308
313
  }
309
314
  },
310
315
  "patch": {
311
- "tags": [
312
- "Assistants"
313
- ],
316
+ "tags": ["Assistants"],
314
317
  "summary": "Patch Assistant",
315
318
  "description": "Update an assistant.",
316
319
  "operationId": "patch_assistant_assistants__assistant_id__patch",
@@ -374,9 +377,7 @@
374
377
  },
375
378
  "/assistants/{assistant_id}/graph": {
376
379
  "get": {
377
- "tags": [
378
- "Assistants"
379
- ],
380
+ "tags": ["Assistants"],
380
381
  "summary": "Get Assistant Graph",
381
382
  "description": "Get an assistant by ID.",
382
383
  "operationId": "get_assistant_graph_assistants__assistant_id__graph_get",
@@ -465,9 +466,7 @@
465
466
  },
466
467
  "/assistants/{assistant_id}/subgraphs": {
467
468
  "get": {
468
- "tags": [
469
- "Assistants"
470
- ],
469
+ "tags": ["Assistants"],
471
470
  "summary": "Get Assistant Subgraphs",
472
471
  "description": "Get an assistant's subgraphs.",
473
472
  "operationId": "get_assistant_subgraphs_assistants__assistant_id__subgraphs_get",
@@ -531,9 +530,7 @@
531
530
  },
532
531
  "/assistants/{assistant_id}/subgraphs/{namespace}": {
533
532
  "get": {
534
- "tags": [
535
- "Assistants"
536
- ],
533
+ "tags": ["Assistants"],
537
534
  "summary": "Get Assistant Subgraphs by Namespace",
538
535
  "description": "Get an assistant's subgraphs filtered by namespace.",
539
536
  "operationId": "get_assistant_subgraphs_assistants__assistant_id__subgraphs__namespace__get",
@@ -597,9 +594,7 @@
597
594
  },
598
595
  "/assistants/{assistant_id}/schemas": {
599
596
  "get": {
600
- "tags": [
601
- "Assistants"
602
- ],
597
+ "tags": ["Assistants"],
603
598
  "summary": "Get Assistant Schemas",
604
599
  "description": "Get an assistant by ID.",
605
600
  "operationId": "get_assistant_schemas_assistants__assistant_id__schemas_get",
@@ -653,9 +648,7 @@
653
648
  },
654
649
  "/assistants/{assistant_id}/versions": {
655
650
  "post": {
656
- "tags": [
657
- "Assistants"
658
- ],
651
+ "tags": ["Assistants"],
659
652
  "summary": "Get Assistant Versions",
660
653
  "description": "Get all versions of an assistant.",
661
654
  "operationId": "get_assistant_versions_assistants__assistant_id__versions_get",
@@ -703,9 +696,7 @@
703
696
  },
704
697
  "/assistants/{assistant_id}/latest": {
705
698
  "post": {
706
- "tags": [
707
- "Assistants"
708
- ],
699
+ "tags": ["Assistants"],
709
700
  "summary": "Set Latest Assistant Version",
710
701
  "description": "Set the latest version for an assistant.",
711
702
  "operationId": "set_latest_assistant_version_assistants__assistant_id__versions_post",
@@ -770,9 +761,7 @@
770
761
  },
771
762
  "/threads": {
772
763
  "post": {
773
- "tags": [
774
- "Threads"
775
- ],
764
+ "tags": ["Threads"],
776
765
  "summary": "Create Thread",
777
766
  "description": "Create a thread.",
778
767
  "operationId": "create_thread_threads_post",
@@ -822,9 +811,7 @@
822
811
  },
823
812
  "/threads/search": {
824
813
  "post": {
825
- "tags": [
826
- "Threads"
827
- ],
814
+ "tags": ["Threads"],
828
815
  "summary": "Search Threads",
829
816
  "description": "Search for threads.\n\nThis endpoint also functions as the endpoint to list all threads.",
830
817
  "operationId": "search_threads_threads_search_post",
@@ -868,9 +855,7 @@
868
855
  },
869
856
  "/threads/count": {
870
857
  "post": {
871
- "tags": [
872
- "Threads"
873
- ],
858
+ "tags": ["Threads"],
874
859
  "summary": "Count Threads",
875
860
  "description": "Get the count of threads matching the specified criteria.",
876
861
  "operationId": "count_threads_threads_count_post",
@@ -919,11 +904,49 @@
919
904
  }
920
905
  }
921
906
  },
907
+ "/threads/prune": {
908
+ "post": {
909
+ "tags": ["Threads"],
910
+ "summary": "Prune Threads",
911
+ "description": "Prune threads by ID. The 'delete' strategy removes threads entirely. The 'keep_latest' strategy prunes old checkpoints but keeps threads and their latest state (requires FF_USE_CORE_API=true).",
912
+ "operationId": "prune_threads_threads_prune_post",
913
+ "requestBody": {
914
+ "content": {
915
+ "application/json": {
916
+ "schema": {
917
+ "$ref": "#/components/schemas/ThreadPruneRequest"
918
+ }
919
+ }
920
+ },
921
+ "required": true
922
+ },
923
+ "responses": {
924
+ "200": {
925
+ "description": "Success",
926
+ "content": {
927
+ "application/json": {
928
+ "schema": {
929
+ "$ref": "#/components/schemas/ThreadPruneResponse"
930
+ }
931
+ }
932
+ }
933
+ },
934
+ "422": {
935
+ "description": "Validation Error",
936
+ "content": {
937
+ "application/json": {
938
+ "schema": {
939
+ "$ref": "#/components/schemas/ErrorResponse"
940
+ }
941
+ }
942
+ }
943
+ }
944
+ }
945
+ }
946
+ },
922
947
  "/threads/{thread_id}/state": {
923
948
  "get": {
924
- "tags": [
925
- "Threads"
926
- ],
949
+ "tags": ["Threads"],
927
950
  "summary": "Get Thread State",
928
951
  "description": "Get state for a thread.\n\nThe latest state of the thread (i.e. latest checkpoint) is returned.",
929
952
  "operationId": "get_latest_thread_state_threads__thread_id__state_get",
@@ -976,9 +999,7 @@
976
999
  }
977
1000
  },
978
1001
  "post": {
979
- "tags": [
980
- "Threads"
981
- ],
1002
+ "tags": ["Threads"],
982
1003
  "summary": "Update Thread State",
983
1004
  "description": "Add state to a thread.",
984
1005
  "operationId": "update_thread_state_threads__thread_id__state_post",
@@ -1032,9 +1053,7 @@
1032
1053
  },
1033
1054
  "/threads/{thread_id}/state/{checkpoint_id}": {
1034
1055
  "get": {
1035
- "tags": [
1036
- "Threads"
1037
- ],
1056
+ "tags": ["Threads"],
1038
1057
  "summary": "Get Thread State At Checkpoint",
1039
1058
  "description": "Get state for a thread at a specific checkpoint.",
1040
1059
  "operationId": "get_thread_state_at_checkpoint_threads__thread_id__state__checkpoint_id__get",
@@ -1101,9 +1120,7 @@
1101
1120
  },
1102
1121
  "/threads/{thread_id}/state/checkpoint": {
1103
1122
  "post": {
1104
- "tags": [
1105
- "Threads"
1106
- ],
1123
+ "tags": ["Threads"],
1107
1124
  "summary": "Get Thread State At Checkpoint",
1108
1125
  "description": "Get state for a thread at a specific checkpoint.",
1109
1126
  "operationId": "post_thread_state_at_checkpoint_threads__thread_id__state__checkpoint_id__get",
@@ -1167,9 +1184,7 @@
1167
1184
  },
1168
1185
  "/threads/{thread_id}/history": {
1169
1186
  "get": {
1170
- "tags": [
1171
- "Threads"
1172
- ],
1187
+ "tags": ["Threads"],
1173
1188
  "summary": "Get Thread History",
1174
1189
  "description": "Get all past states for a thread.",
1175
1190
  "operationId": "get_thread_history_threads__thread_id__history_get",
@@ -1234,9 +1249,7 @@
1234
1249
  }
1235
1250
  },
1236
1251
  "post": {
1237
- "tags": [
1238
- "Threads"
1239
- ],
1252
+ "tags": ["Threads"],
1240
1253
  "summary": "Get Thread History Post",
1241
1254
  "description": "Get all past states for a thread.",
1242
1255
  "operationId": "get_thread_history_post_threads__thread_id__history_post",
@@ -1294,9 +1307,7 @@
1294
1307
  },
1295
1308
  "/threads/{thread_id}/copy": {
1296
1309
  "post": {
1297
- "tags": [
1298
- "Threads"
1299
- ],
1310
+ "tags": ["Threads"],
1300
1311
  "summary": "Copy Thread",
1301
1312
  "description": "Create a new thread with a copy of the state and checkpoints from an existing thread.",
1302
1313
  "operationId": "copy_thread_post_threads__thread_id__copy_post",
@@ -1350,9 +1361,7 @@
1350
1361
  },
1351
1362
  "/threads/{thread_id}": {
1352
1363
  "get": {
1353
- "tags": [
1354
- "Threads"
1355
- ],
1364
+ "tags": ["Threads"],
1356
1365
  "summary": "Get Thread",
1357
1366
  "description": "Get a thread by ID.",
1358
1367
  "operationId": "get_thread_threads__thread_id__get",
@@ -1368,6 +1377,17 @@
1368
1377
  },
1369
1378
  "name": "thread_id",
1370
1379
  "in": "path"
1380
+ },
1381
+ {
1382
+ "description": "Comma-separated list of additional fields to include. Supported values: ttl",
1383
+ "required": false,
1384
+ "schema": {
1385
+ "type": "string",
1386
+ "title": "Include",
1387
+ "description": "Comma-separated list of additional fields to include."
1388
+ },
1389
+ "name": "include",
1390
+ "in": "query"
1371
1391
  }
1372
1392
  ],
1373
1393
  "responses": {
@@ -1404,9 +1424,7 @@
1404
1424
  }
1405
1425
  },
1406
1426
  "delete": {
1407
- "tags": [
1408
- "Threads"
1409
- ],
1427
+ "tags": ["Threads"],
1410
1428
  "summary": "Delete Thread",
1411
1429
  "description": "Delete a thread by ID.",
1412
1430
  "operationId": "delete_thread_threads__thread_id__delete",
@@ -1456,9 +1474,7 @@
1456
1474
  }
1457
1475
  },
1458
1476
  "patch": {
1459
- "tags": [
1460
- "Threads"
1461
- ],
1477
+ "tags": ["Threads"],
1462
1478
  "summary": "Patch Thread",
1463
1479
  "description": "Update a thread.",
1464
1480
  "operationId": "patch_thread_threads__thread_id__patch",
@@ -1522,9 +1538,7 @@
1522
1538
  },
1523
1539
  "/threads/{thread_id}/stream": {
1524
1540
  "get": {
1525
- "tags": [
1526
- "Threads"
1527
- ],
1541
+ "tags": ["Threads"],
1528
1542
  "summary": "Join Thread Stream",
1529
1543
  "description": "This endpoint streams output in real-time from a thread. The stream will include the output of each run executed sequentially on the thread and will remain open indefinitely. It is the responsibility of the calling client to close the connection.",
1530
1544
  "operationId": "join_thread_stream_threads__thread_id__stream_get",
@@ -1550,6 +1564,29 @@
1550
1564
  },
1551
1565
  "name": "Last-Event-ID",
1552
1566
  "in": "header"
1567
+ },
1568
+ {
1569
+ "required": false,
1570
+ "schema": {
1571
+ "anyOf": [
1572
+ {
1573
+ "type": "string",
1574
+ "enum": ["lifecycle", "run_modes", "state_update"]
1575
+ },
1576
+ {
1577
+ "type": "array",
1578
+ "items": {
1579
+ "type": "string",
1580
+ "enum": ["lifecycle", "run_modes", "state_update"]
1581
+ }
1582
+ }
1583
+ ],
1584
+ "default": ["run_modes"],
1585
+ "title": "Stream Modes",
1586
+ "description": "Stream modes to control which events are returned. 'lifecycle' returns only run start/end events, 'run_modes' returns all run events (default behavior), 'state_update' returns only state update events."
1587
+ },
1588
+ "name": "stream_modes",
1589
+ "in": "query"
1553
1590
  }
1554
1591
  ],
1555
1592
  "responses": {
@@ -1589,9 +1626,7 @@
1589
1626
  },
1590
1627
  "/threads/{thread_id}/runs": {
1591
1628
  "get": {
1592
- "tags": [
1593
- "Thread Runs"
1594
- ],
1629
+ "tags": ["Thread Runs"],
1595
1630
  "summary": "List Runs",
1596
1631
  "description": "List runs for a thread.",
1597
1632
  "operationId": "list_runs_http_threads__thread_id__runs_get",
@@ -1632,13 +1667,7 @@
1632
1667
  "required": false,
1633
1668
  "schema": {
1634
1669
  "type": "string",
1635
- "enum": [
1636
- "pending",
1637
- "error",
1638
- "success",
1639
- "timeout",
1640
- "interrupted"
1641
- ]
1670
+ "enum": ["pending", "error", "success", "timeout", "interrupted"]
1642
1671
  },
1643
1672
  "name": "status",
1644
1673
  "in": "query"
@@ -1705,9 +1734,7 @@
1705
1734
  }
1706
1735
  },
1707
1736
  "post": {
1708
- "tags": [
1709
- "Thread Runs"
1710
- ],
1737
+ "tags": ["Thread Runs"],
1711
1738
  "summary": "Create Background Run",
1712
1739
  "description": "Create a run in existing thread, return the run ID immediately. Don't wait for the final run output.",
1713
1740
  "operationId": "create_run_threads__thread_id__runs_post",
@@ -1789,9 +1816,7 @@
1789
1816
  },
1790
1817
  "/threads/{thread_id}/runs/crons": {
1791
1818
  "post": {
1792
- "tags": [
1793
- "Crons (Plus tier)"
1794
- ],
1819
+ "tags": ["Crons (Plus tier)"],
1795
1820
  "summary": "Create Thread Cron",
1796
1821
  "description": "Create a cron to schedule runs on a thread.",
1797
1822
  "operationId": "create_thread_cron_threads__thread_id__runs_crons_post",
@@ -1813,7 +1838,7 @@
1813
1838
  "content": {
1814
1839
  "application/json": {
1815
1840
  "schema": {
1816
- "$ref": "#/components/schemas/CronCreate"
1841
+ "$ref": "#/components/schemas/ThreadCronCreate"
1817
1842
  }
1818
1843
  }
1819
1844
  },
@@ -1855,9 +1880,7 @@
1855
1880
  },
1856
1881
  "/threads/{thread_id}/runs/stream": {
1857
1882
  "post": {
1858
- "tags": [
1859
- "Thread Runs"
1860
- ],
1883
+ "tags": ["Thread Runs"],
1861
1884
  "summary": "Create Run, Stream Output",
1862
1885
  "description": "Create a run in existing thread. Stream the output.",
1863
1886
  "operationId": "stream_run_threads__thread_id__runs_stream_post",
@@ -1940,9 +1963,7 @@
1940
1963
  },
1941
1964
  "/threads/{thread_id}/runs/wait": {
1942
1965
  "post": {
1943
- "tags": [
1944
- "Thread Runs"
1945
- ],
1966
+ "tags": ["Thread Runs"],
1946
1967
  "summary": "Create Run, Wait for Output",
1947
1968
  "description": "Create a run in existing thread. Wait for the final output and then return it.",
1948
1969
  "operationId": "wait_run_threads__thread_id__runs_wait_post",
@@ -2022,9 +2043,7 @@
2022
2043
  },
2023
2044
  "/threads/{thread_id}/runs/{run_id}": {
2024
2045
  "get": {
2025
- "tags": [
2026
- "Thread Runs"
2027
- ],
2046
+ "tags": ["Thread Runs"],
2028
2047
  "summary": "Get Run",
2029
2048
  "description": "Get a run by ID.",
2030
2049
  "operationId": "get_run_http_threads__thread_id__runs__run_id__get",
@@ -2088,9 +2107,7 @@
2088
2107
  }
2089
2108
  },
2090
2109
  "delete": {
2091
- "tags": [
2092
- "Thread Runs"
2093
- ],
2110
+ "tags": ["Thread Runs"],
2094
2111
  "summary": "Delete Run",
2095
2112
  "description": "Delete a run by ID.",
2096
2113
  "operationId": "delete_run_threads__thread_id__runs__run_id__delete",
@@ -2154,9 +2171,7 @@
2154
2171
  },
2155
2172
  "/threads/{thread_id}/runs/{run_id}/join": {
2156
2173
  "get": {
2157
- "tags": [
2158
- "Thread Runs"
2159
- ],
2174
+ "tags": ["Thread Runs"],
2160
2175
  "summary": "Join Run",
2161
2176
  "description": "Wait for a run to finish.",
2162
2177
  "operationId": "join_run_http_threads__thread_id__runs__run_id__join_get",
@@ -2231,9 +2246,7 @@
2231
2246
  },
2232
2247
  "/threads/{thread_id}/runs/{run_id}/stream": {
2233
2248
  "get": {
2234
- "tags": [
2235
- "Thread Runs"
2236
- ],
2249
+ "tags": ["Thread Runs"],
2237
2250
  "summary": "Join Run Stream",
2238
2251
  "description": "Join a run stream. This endpoint streams output in real-time from a run similar to the /threads/__THREAD_ID__/runs/stream endpoint. If the run has been created with `stream_resumable=true`, the stream can be resumed from the last seen event ID.",
2239
2252
  "operationId": "stream_run_http_threads__thread_id__runs__run_id__join_get",
@@ -2331,9 +2344,7 @@
2331
2344
  },
2332
2345
  "/threads/{thread_id}/runs/{run_id}/cancel": {
2333
2346
  "post": {
2334
- "tags": [
2335
- "Thread Runs"
2336
- ],
2347
+ "tags": ["Thread Runs"],
2337
2348
  "summary": "Cancel Run",
2338
2349
  "operationId": "cancel_run_http_threads__thread_id__runs__run_id__cancel_post",
2339
2350
  "parameters": [
@@ -2376,10 +2387,7 @@
2376
2387
  "required": false,
2377
2388
  "schema": {
2378
2389
  "type": "string",
2379
- "enum": [
2380
- "interrupt",
2381
- "rollback"
2382
- ],
2390
+ "enum": ["interrupt", "rollback"],
2383
2391
  "title": "Action",
2384
2392
  "default": "interrupt"
2385
2393
  },
@@ -2421,9 +2429,7 @@
2421
2429
  },
2422
2430
  "/runs/crons": {
2423
2431
  "post": {
2424
- "tags": [
2425
- "Crons (Plus tier)"
2426
- ],
2432
+ "tags": ["Crons (Plus tier)"],
2427
2433
  "summary": "Create Cron",
2428
2434
  "description": "Create a cron to schedule runs on new threads.",
2429
2435
  "operationId": "create_cron_runs_crons_post",
@@ -2473,9 +2479,7 @@
2473
2479
  },
2474
2480
  "/runs/crons/search": {
2475
2481
  "post": {
2476
- "tags": [
2477
- "Crons (Plus tier)"
2478
- ],
2482
+ "tags": ["Crons (Plus tier)"],
2479
2483
  "summary": "Search Crons",
2480
2484
  "description": "Search all active crons",
2481
2485
  "operationId": "search_crons_runs_crons_post",
@@ -2519,9 +2523,7 @@
2519
2523
  },
2520
2524
  "/runs/crons/count": {
2521
2525
  "post": {
2522
- "tags": [
2523
- "Crons (Plus tier)"
2524
- ],
2526
+ "tags": ["Crons (Plus tier)"],
2525
2527
  "summary": "Count Crons",
2526
2528
  "description": "Get the count of crons matching the specified criteria.",
2527
2529
  "operationId": "count_crons_runs_crons_count_post",
@@ -2572,11 +2574,9 @@
2572
2574
  },
2573
2575
  "/runs/stream": {
2574
2576
  "post": {
2575
- "tags": [
2576
- "Stateless Runs"
2577
- ],
2577
+ "tags": ["Stateless Runs"],
2578
2578
  "summary": "Create Run, Stream Output",
2579
- "description": "Create a run in a new thread, stream the output.",
2579
+ "description": "Create a run and stream the output.",
2580
2580
  "operationId": "stream_run_stateless_runs_stream_post",
2581
2581
  "requestBody": {
2582
2582
  "content": {
@@ -2643,9 +2643,7 @@
2643
2643
  },
2644
2644
  "/runs/cancel": {
2645
2645
  "post": {
2646
- "tags": [
2647
- "Thread Runs"
2648
- ],
2646
+ "tags": ["Thread Runs"],
2649
2647
  "summary": "Cancel Runs",
2650
2648
  "description": "Cancel one or more runs. Can cancel runs by thread ID and run IDs, or by status filter.",
2651
2649
  "operationId": "cancel_runs_post",
@@ -2655,10 +2653,7 @@
2655
2653
  "required": false,
2656
2654
  "schema": {
2657
2655
  "type": "string",
2658
- "enum": [
2659
- "interrupt",
2660
- "rollback"
2661
- ],
2656
+ "enum": ["interrupt", "rollback"],
2662
2657
  "title": "Action",
2663
2658
  "default": "interrupt"
2664
2659
  },
@@ -2705,11 +2700,9 @@
2705
2700
  },
2706
2701
  "/runs/wait": {
2707
2702
  "post": {
2708
- "tags": [
2709
- "Stateless Runs"
2710
- ],
2703
+ "tags": ["Stateless Runs"],
2711
2704
  "summary": "Create Run, Wait for Output",
2712
- "description": "Create a run in a new thread. Wait for the final output and then return it.",
2705
+ "description": "Create a run, wait for the final output and then return it.",
2713
2706
  "operationId": "wait_run_stateless_runs_wait_post",
2714
2707
  "requestBody": {
2715
2708
  "content": {
@@ -2773,11 +2766,9 @@
2773
2766
  },
2774
2767
  "/runs": {
2775
2768
  "post": {
2776
- "tags": [
2777
- "Stateless Runs"
2778
- ],
2769
+ "tags": ["Stateless Runs"],
2779
2770
  "summary": "Create Background Run",
2780
- "description": "Create a run in a new thread, return the run ID immediately. Don't wait for the final run output.",
2771
+ "description": "Create a run and return the run ID immediately. Don't wait for the final run output.",
2781
2772
  "operationId": "run_stateless_runs_post",
2782
2773
  "requestBody": {
2783
2774
  "content": {
@@ -2841,11 +2832,9 @@
2841
2832
  },
2842
2833
  "/runs/batch": {
2843
2834
  "post": {
2844
- "tags": [
2845
- "Stateless Runs"
2846
- ],
2835
+ "tags": ["Stateless Runs"],
2847
2836
  "summary": "Create Run Batch",
2848
- "description": "Create a batch of runs in new threads, return immediately.",
2837
+ "description": "Create a batch of runs and return immediately.",
2849
2838
  "operationId": "run_batch_stateless_runs_post",
2850
2839
  "requestBody": {
2851
2840
  "content": {
@@ -2901,9 +2890,7 @@
2901
2890
  },
2902
2891
  "/runs/crons/{cron_id}": {
2903
2892
  "delete": {
2904
- "tags": [
2905
- "Crons (Plus tier)"
2906
- ],
2893
+ "tags": ["Crons (Plus tier)"],
2907
2894
  "summary": "Delete Cron",
2908
2895
  "description": "Delete a cron by ID.",
2909
2896
  "operationId": "delete_cron_runs_crons__cron_id__delete",
@@ -2953,9 +2940,7 @@
2953
2940
  },
2954
2941
  "/store/items": {
2955
2942
  "put": {
2956
- "tags": [
2957
- "Store"
2958
- ],
2943
+ "tags": ["Store"],
2959
2944
  "summary": "Store or update an item.",
2960
2945
  "operationId": "put_item",
2961
2946
  "requestBody": {
@@ -2985,9 +2970,7 @@
2985
2970
  }
2986
2971
  },
2987
2972
  "delete": {
2988
- "tags": [
2989
- "Store"
2990
- ],
2973
+ "tags": ["Store"],
2991
2974
  "summary": "Delete an item.",
2992
2975
  "operationId": "delete_item",
2993
2976
  "requestBody": {
@@ -3017,9 +3000,7 @@
3017
3000
  }
3018
3001
  },
3019
3002
  "get": {
3020
- "tags": [
3021
- "Store"
3022
- ],
3003
+ "tags": ["Store"],
3023
3004
  "summary": "Retrieve a single item.",
3024
3005
  "operationId": "get_item",
3025
3006
  "parameters": [
@@ -3079,9 +3060,7 @@
3079
3060
  },
3080
3061
  "/store/items/search": {
3081
3062
  "post": {
3082
- "tags": [
3083
- "Store"
3084
- ],
3063
+ "tags": ["Store"],
3085
3064
  "summary": "Search for items within a namespace prefix.",
3086
3065
  "operationId": "search_items",
3087
3066
  "requestBody": {
@@ -3120,9 +3099,7 @@
3120
3099
  },
3121
3100
  "/store/namespaces": {
3122
3101
  "post": {
3123
- "tags": [
3124
- "Store"
3125
- ],
3102
+ "tags": ["Store"],
3126
3103
  "summary": "List namespaces with optional match conditions.",
3127
3104
  "operationId": "list_namespaces",
3128
3105
  "requestBody": {
@@ -3159,6 +3136,351 @@
3159
3136
  }
3160
3137
  }
3161
3138
  },
3139
+ "/a2a/{assistant_id}": {
3140
+ "post": {
3141
+ "operationId": "post_a2a",
3142
+ "summary": "A2A JSON-RPC",
3143
+ "description": "Communicate with an assistant using the Agent-to-Agent (A2A) Protocol over JSON-RPC 2.0.\nThis endpoint accepts a JSON-RPC envelope and dispatches based on `method`.\n\n**Supported Methods:**\n- `message/send`: Send a message and wait for the final Task result.\n- `message/stream`: Send a message and receive Server-Sent Events (SSE) JSON-RPC responses.\n- `tasks/get`: Fetch the current state of a Task by ID.\n- `tasks/cancel`: Request cancellation (currently not supported; returns an error).\n\n**LangGraph Mapping:**\n- `message.contextId` maps to LangGraph `thread_id`.\n\n**Notes:**\n- Only `text` and `data` parts are supported; `file` parts are not.\n- If `message.contextId` is omitted, a new context is created.\n- Text parts require the assistant input schema to include a `messages` field.\n",
3144
+ "parameters": [
3145
+ {
3146
+ "name": "assistant_id",
3147
+ "in": "path",
3148
+ "required": true,
3149
+ "schema": {
3150
+ "type": "string",
3151
+ "format": "uuid"
3152
+ },
3153
+ "description": "The ID of the assistant to communicate with"
3154
+ },
3155
+ {
3156
+ "name": "Accept",
3157
+ "in": "header",
3158
+ "required": true,
3159
+ "schema": {
3160
+ "type": "string"
3161
+ },
3162
+ "description": "For `message/stream`, must include `text/event-stream`. For all other methods, use `application/json`."
3163
+ }
3164
+ ],
3165
+ "requestBody": {
3166
+ "required": true,
3167
+ "content": {
3168
+ "application/json": {
3169
+ "schema": {
3170
+ "type": "object",
3171
+ "properties": {
3172
+ "jsonrpc": {
3173
+ "type": "string",
3174
+ "enum": ["2.0"],
3175
+ "description": "JSON-RPC version"
3176
+ },
3177
+ "id": {
3178
+ "type": "string",
3179
+ "description": "Request identifier"
3180
+ },
3181
+ "method": {
3182
+ "type": "string",
3183
+ "enum": [
3184
+ "message/send",
3185
+ "message/stream",
3186
+ "tasks/get",
3187
+ "tasks/cancel"
3188
+ ],
3189
+ "description": "The method to invoke"
3190
+ },
3191
+ "params": {
3192
+ "type": "object",
3193
+ "description": "Method parameters; shape depends on the method.",
3194
+ "oneOf": [
3195
+ {
3196
+ "title": "Message Send/Stream Parameters",
3197
+ "type": "object",
3198
+ "properties": {
3199
+ "message": {
3200
+ "type": "object",
3201
+ "properties": {
3202
+ "role": {
3203
+ "type": "string",
3204
+ "enum": ["user", "agent"],
3205
+ "description": "A2A role for the message sender."
3206
+ },
3207
+ "parts": {
3208
+ "type": "array",
3209
+ "items": {
3210
+ "oneOf": [
3211
+ {
3212
+ "title": "Text Part",
3213
+ "type": "object",
3214
+ "properties": {
3215
+ "kind": {
3216
+ "type": "string",
3217
+ "enum": ["text"]
3218
+ },
3219
+ "text": {
3220
+ "type": "string",
3221
+ "description": "Text content."
3222
+ }
3223
+ },
3224
+ "required": ["kind", "text"]
3225
+ },
3226
+ {
3227
+ "title": "Data Part",
3228
+ "type": "object",
3229
+ "properties": {
3230
+ "kind": {
3231
+ "type": "string",
3232
+ "enum": ["data"]
3233
+ },
3234
+ "data": {
3235
+ "type": "object",
3236
+ "description": "Structured JSON merged into the assistant input."
3237
+ }
3238
+ },
3239
+ "required": ["kind", "data"]
3240
+ }
3241
+ ]
3242
+ },
3243
+ "description": "Message parts (text/data only)."
3244
+ },
3245
+ "messageId": {
3246
+ "type": "string",
3247
+ "description": "Client-generated message identifier."
3248
+ },
3249
+ "contextId": {
3250
+ "type": "string",
3251
+ "description": "Conversation context ID; maps to LangGraph thread_id."
3252
+ },
3253
+ "taskId": {
3254
+ "type": "string",
3255
+ "description": "Optional task ID. Currently ignored by this implementation."
3256
+ }
3257
+ },
3258
+ "required": ["role", "parts", "messageId"]
3259
+ }
3260
+ },
3261
+ "required": ["message"]
3262
+ },
3263
+ {
3264
+ "title": "Task Get Parameters",
3265
+ "type": "object",
3266
+ "properties": {
3267
+ "id": {
3268
+ "type": "string",
3269
+ "description": "Task (run) identifier to retrieve."
3270
+ },
3271
+ "contextId": {
3272
+ "type": "string",
3273
+ "description": "Context identifier (thread_id) for the task."
3274
+ },
3275
+ "historyLength": {
3276
+ "type": "integer",
3277
+ "minimum": 0,
3278
+ "maximum": 10,
3279
+ "description": "Maximum number of history messages to include."
3280
+ }
3281
+ },
3282
+ "required": ["id", "contextId"]
3283
+ },
3284
+ {
3285
+ "title": "Task Cancel Parameters",
3286
+ "type": "object",
3287
+ "properties": {
3288
+ "id": {
3289
+ "type": "string",
3290
+ "description": "Task (run) identifier to cancel."
3291
+ },
3292
+ "contextId": {
3293
+ "type": "string",
3294
+ "description": "Context identifier (thread_id) for the task."
3295
+ }
3296
+ },
3297
+ "required": ["id", "contextId"]
3298
+ }
3299
+ ]
3300
+ }
3301
+ },
3302
+ "required": ["jsonrpc", "id", "method"]
3303
+ },
3304
+ "examples": {
3305
+ "message_send": {
3306
+ "summary": "Send a message (synchronous)",
3307
+ "value": {
3308
+ "jsonrpc": "2.0",
3309
+ "id": "1",
3310
+ "method": "message/send",
3311
+ "params": {
3312
+ "message": {
3313
+ "role": "user",
3314
+ "parts": [
3315
+ {
3316
+ "kind": "text",
3317
+ "text": "Hello from A2A"
3318
+ },
3319
+ {
3320
+ "kind": "data",
3321
+ "data": {
3322
+ "locale": "en-US"
3323
+ }
3324
+ }
3325
+ ],
3326
+ "messageId": "msg-1",
3327
+ "contextId": "f5bd2a40-74b6-4f7a-b649-ea3f09890003"
3328
+ }
3329
+ }
3330
+ }
3331
+ },
3332
+ "message_stream": {
3333
+ "summary": "Send a message (streaming)",
3334
+ "value": {
3335
+ "jsonrpc": "2.0",
3336
+ "id": "2",
3337
+ "method": "message/stream",
3338
+ "params": {
3339
+ "message": {
3340
+ "role": "user",
3341
+ "parts": [
3342
+ {
3343
+ "kind": "text",
3344
+ "text": "Stream this response"
3345
+ }
3346
+ ],
3347
+ "messageId": "msg-2",
3348
+ "contextId": "f5bd2a40-74b6-4f7a-b649-ea3f09890003"
3349
+ }
3350
+ }
3351
+ }
3352
+ },
3353
+ "tasks_get": {
3354
+ "summary": "Get a task",
3355
+ "value": {
3356
+ "jsonrpc": "2.0",
3357
+ "id": "3",
3358
+ "method": "tasks/get",
3359
+ "params": {
3360
+ "id": "run-uuid",
3361
+ "contextId": "f5bd2a40-74b6-4f7a-b649-ea3f09890003",
3362
+ "historyLength": 10
3363
+ }
3364
+ }
3365
+ },
3366
+ "tasks_cancel": {
3367
+ "summary": "Cancel a task (currently unsupported)",
3368
+ "value": {
3369
+ "jsonrpc": "2.0",
3370
+ "id": "4",
3371
+ "method": "tasks/cancel",
3372
+ "params": {
3373
+ "id": "run-uuid",
3374
+ "contextId": "f5bd2a40-74b6-4f7a-b649-ea3f09890003"
3375
+ }
3376
+ }
3377
+ }
3378
+ }
3379
+ }
3380
+ }
3381
+ },
3382
+ "responses": {
3383
+ "200": {
3384
+ "description": "JSON-RPC response for non-streaming methods. For `message/stream`, the response is an SSE stream of JSON-RPC envelopes.",
3385
+ "content": {
3386
+ "application/json": {
3387
+ "schema": {
3388
+ "type": "object",
3389
+ "properties": {
3390
+ "jsonrpc": {
3391
+ "type": "string",
3392
+ "enum": ["2.0"]
3393
+ },
3394
+ "id": {
3395
+ "type": "string"
3396
+ },
3397
+ "result": {
3398
+ "type": "object",
3399
+ "description": "Success result containing task information or task details"
3400
+ },
3401
+ "error": {
3402
+ "type": "object",
3403
+ "properties": {
3404
+ "code": {
3405
+ "type": "integer"
3406
+ },
3407
+ "message": {
3408
+ "type": "string"
3409
+ }
3410
+ },
3411
+ "description": "Error information if request failed"
3412
+ }
3413
+ },
3414
+ "required": ["jsonrpc", "id"]
3415
+ },
3416
+ "examples": {
3417
+ "task_result": {
3418
+ "summary": "Task result (message/send)",
3419
+ "value": {
3420
+ "jsonrpc": "2.0",
3421
+ "id": "1",
3422
+ "result": {
3423
+ "kind": "task",
3424
+ "id": "run-uuid",
3425
+ "contextId": "f5bd2a40-74b6-4f7a-b649-ea3f09890003",
3426
+ "status": {
3427
+ "state": "completed"
3428
+ },
3429
+ "artifacts": [
3430
+ {
3431
+ "artifactId": "artifact-uuid",
3432
+ "name": "Assistant Response",
3433
+ "parts": [
3434
+ {
3435
+ "kind": "text",
3436
+ "text": "Hello back"
3437
+ }
3438
+ ]
3439
+ }
3440
+ ]
3441
+ }
3442
+ }
3443
+ },
3444
+ "error_result": {
3445
+ "summary": "Error response",
3446
+ "value": {
3447
+ "jsonrpc": "2.0",
3448
+ "id": "1",
3449
+ "error": {
3450
+ "code": -32602,
3451
+ "message": "Invalid request: Missing required parameter: contextId"
3452
+ }
3453
+ }
3454
+ }
3455
+ }
3456
+ },
3457
+ "text/event-stream": {
3458
+ "schema": {
3459
+ "type": "string",
3460
+ "description": "SSE stream of JSON-RPC response objects."
3461
+ },
3462
+ "examples": {
3463
+ "stream_event": {
3464
+ "summary": "SSE data chunk (JSON-RPC)",
3465
+ "value": "data: {\"jsonrpc\":\"2.0\",\"id\":\"2\",\"result\":{\"kind\":\"status-update\",\"taskId\":\"run-uuid\",\"contextId\":\"f5bd2a40-74b6-4f7a-b649-ea3f09890003\",\"status\":{\"state\":\"working\"},\"final\":false}}\n\n"
3466
+ }
3467
+ }
3468
+ }
3469
+ }
3470
+ },
3471
+ "400": {
3472
+ "description": "Bad Request (invalid JSON-RPC, invalid params, or missing Accept header)."
3473
+ },
3474
+ "404": {
3475
+ "description": "Assistant not found"
3476
+ },
3477
+ "500": {
3478
+ "description": "Internal server error"
3479
+ }
3480
+ },
3481
+ "tags": ["A2A"]
3482
+ }
3483
+ },
3162
3484
  "/mcp/": {
3163
3485
  "post": {
3164
3486
  "operationId": "post_mcp",
@@ -3171,9 +3493,7 @@
3171
3493
  "required": true,
3172
3494
  "schema": {
3173
3495
  "type": "string",
3174
- "enum": [
3175
- "application/json, text/event-stream"
3176
- ]
3496
+ "enum": ["application/json, text/event-stream"]
3177
3497
  },
3178
3498
  "description": "Accept header must include both 'application/json' and 'text/event-stream' media types."
3179
3499
  }
@@ -3183,9 +3503,9 @@
3183
3503
  "content": {
3184
3504
  "application/json": {
3185
3505
  "schema": {
3186
- "type": "object"
3506
+ "type": "object",
3507
+ "description": "A JSON-RPC 2.0 request, notification, or response object."
3187
3508
  },
3188
- "description": "A JSON-RPC 2.0 request, notification, or response object.",
3189
3509
  "example": {
3190
3510
  "jsonrpc": "2.0",
3191
3511
  "id": "1",
@@ -3226,9 +3546,7 @@
3226
3546
  "description": "Internal server error or unexpected failure."
3227
3547
  }
3228
3548
  },
3229
- "tags": [
3230
- "MCP"
3231
- ]
3549
+ "tags": ["MCP"]
3232
3550
  },
3233
3551
  "get": {
3234
3552
  "operationId": "get_mcp",
@@ -3239,27 +3557,23 @@
3239
3557
  "description": "GET method not allowed; streaming not supported."
3240
3558
  }
3241
3559
  },
3242
- "tags": [
3243
- "MCP"
3244
- ]
3560
+ "tags": ["MCP"]
3245
3561
  },
3246
3562
  "delete": {
3247
3563
  "operationId": "delete_mcp",
3248
3564
  "summary": "Terminate Session",
3249
3565
  "description": "Implemented according to the Streamable HTTP Transport specification.\nTerminate an MCP session. The server implementation is stateless, so this is a no-op.\n\n",
3250
3566
  "responses": {
3251
- "404": {}
3567
+ "404": {
3568
+ "description": "Session not found"
3569
+ }
3252
3570
  },
3253
- "tags": [
3254
- "MCP"
3255
- ]
3571
+ "tags": ["MCP"]
3256
3572
  }
3257
3573
  },
3258
3574
  "/info": {
3259
3575
  "get": {
3260
- "tags": [
3261
- "System"
3262
- ],
3576
+ "tags": ["System"],
3263
3577
  "summary": "Server Information",
3264
3578
  "description": "Get server version information, feature flags, and metadata.",
3265
3579
  "operationId": "server_info_info_get",
@@ -3292,7 +3606,12 @@
3292
3606
  "description": "Server deployment metadata"
3293
3607
  }
3294
3608
  },
3295
- "required": ["version", "langgraph_py_version", "flags", "metadata"],
3609
+ "required": [
3610
+ "version",
3611
+ "langgraph_py_version",
3612
+ "flags",
3613
+ "metadata"
3614
+ ],
3296
3615
  "title": "ServerInfo"
3297
3616
  }
3298
3617
  }
@@ -3303,9 +3622,7 @@
3303
3622
  },
3304
3623
  "/metrics": {
3305
3624
  "get": {
3306
- "tags": [
3307
- "System"
3308
- ],
3625
+ "tags": ["System"],
3309
3626
  "summary": "System Metrics",
3310
3627
  "description": "Get system metrics in Prometheus or JSON format for monitoring and observability.",
3311
3628
  "operationId": "system_metrics_metrics_get",
@@ -3348,9 +3665,7 @@
3348
3665
  },
3349
3666
  "/ok": {
3350
3667
  "get": {
3351
- "tags": [
3352
- "System"
3353
- ],
3668
+ "tags": ["System"],
3354
3669
  "summary": "Health Check",
3355
3670
  "description": "Check the health status of the server. Optionally check database connectivity.",
3356
3671
  "operationId": "health_check_ok_get",
@@ -3473,10 +3788,7 @@
3473
3788
  "description": "The name of the assistant"
3474
3789
  },
3475
3790
  "description": {
3476
- "type": [
3477
- "string",
3478
- "null"
3479
- ],
3791
+ "type": ["string", "null"],
3480
3792
  "title": "Assistant Description",
3481
3793
  "description": "The description of the assistant"
3482
3794
  }
@@ -3522,10 +3834,7 @@
3522
3834
  },
3523
3835
  "if_exists": {
3524
3836
  "type": "string",
3525
- "enum": [
3526
- "raise",
3527
- "do_nothing"
3528
- ],
3837
+ "enum": ["raise", "do_nothing"],
3529
3838
  "title": "If Exists",
3530
3839
  "description": "How to handle duplicate creation. Must be either 'raise' (raise error if duplicate), or 'do_nothing' (return existing assistant).",
3531
3840
  "default": "raise"
@@ -3536,18 +3845,13 @@
3536
3845
  "description": "The name of the assistant. Defaults to 'Untitled'."
3537
3846
  },
3538
3847
  "description": {
3539
- "type": [
3540
- "string",
3541
- "null"
3542
- ],
3848
+ "type": ["string", "null"],
3543
3849
  "title": "Description",
3544
3850
  "description": "The description of the assistant. Defaults to null."
3545
3851
  }
3546
3852
  },
3547
3853
  "type": "object",
3548
- "required": [
3549
- "graph_id"
3550
- ],
3854
+ "required": ["graph_id"],
3551
3855
  "title": "AssistantCreate",
3552
3856
  "description": "Payload for creating an assistant."
3553
3857
  },
@@ -3785,9 +4089,7 @@
3785
4089
  "anyOf": [
3786
4090
  {
3787
4091
  "type": "string",
3788
- "enum": [
3789
- "*"
3790
- ]
4092
+ "enum": ["*"]
3791
4093
  },
3792
4094
  {
3793
4095
  "items": {
@@ -3803,9 +4105,7 @@
3803
4105
  "anyOf": [
3804
4106
  {
3805
4107
  "type": "string",
3806
- "enum": [
3807
- "*"
3808
- ]
4108
+ "enum": ["*"]
3809
4109
  },
3810
4110
  {
3811
4111
  "items": {
@@ -3817,26 +4117,19 @@
3817
4117
  "title": "Interrupt After",
3818
4118
  "description": "Nodes to interrupt immediately after they get executed."
3819
4119
  },
3820
- "multitask_strategy": {
4120
+ "on_run_completed": {
3821
4121
  "type": "string",
3822
- "enum": [
3823
- "reject",
3824
- "rollback",
3825
- "interrupt",
3826
- "enqueue"
3827
- ],
3828
- "title": "Multitask Strategy",
3829
- "description": "Multitask strategy to use. Must be one of 'reject', 'interrupt', 'rollback', or 'enqueue'.",
3830
- "default": "enqueue"
4122
+ "enum": ["delete", "keep"],
4123
+ "default": "delete",
4124
+ "title": "On Run Completed",
4125
+ "description": "What to do with the thread after the run completes. 'delete' removes the thread after execution. 'keep' creates a new thread for each execution but does not clean them up."
3831
4126
  }
3832
4127
  },
3833
4128
  "type": "object",
3834
- "required": [
3835
- "assistant_id",
3836
- "schedule"
3837
- ],
4129
+ "required": ["assistant_id", "schedule"],
4130
+ "additionalProperties": true,
3838
4131
  "title": "CronCreate",
3839
- "description": "Payload for creating a cron job."
4132
+ "description": "Payload for creating a stateless cron job (creates a new thread for each execution)."
3840
4133
  },
3841
4134
  "CronSearch": {
3842
4135
  "properties": {
@@ -3872,7 +4165,15 @@
3872
4165
  "title": "Sort By",
3873
4166
  "description": "The field to sort by.",
3874
4167
  "default": "created_at",
3875
- "enum": ["cron_id", "assistant_id", "thread_id", "next_run_date", "end_time", "created_at", "updated_at"]
4168
+ "enum": [
4169
+ "cron_id",
4170
+ "assistant_id",
4171
+ "thread_id",
4172
+ "next_run_date",
4173
+ "end_time",
4174
+ "created_at",
4175
+ "updated_at"
4176
+ ]
3876
4177
  },
3877
4178
  "sort_order": {
3878
4179
  "type": "string",
@@ -3889,6 +4190,7 @@
3889
4190
  "cron_id",
3890
4191
  "assistant_id",
3891
4192
  "thread_id",
4193
+ "on_run_completed",
3892
4194
  "end_time",
3893
4195
  "schedule",
3894
4196
  "created_at",
@@ -3896,8 +4198,7 @@
3896
4198
  "user_id",
3897
4199
  "payload",
3898
4200
  "next_run_date",
3899
- "metadata",
3900
- "now"
4201
+ "metadata"
3901
4202
  ]
3902
4203
  },
3903
4204
  "title": "Select",
@@ -3962,10 +4263,7 @@
3962
4263
  }
3963
4264
  },
3964
4265
  "type": "object",
3965
- "required": [
3966
- "graph_id",
3967
- "state_schema"
3968
- ],
4266
+ "required": ["graph_id", "state_schema"],
3969
4267
  "title": "GraphSchema",
3970
4268
  "description": "Defines the structure and properties of a graph."
3971
4269
  },
@@ -3998,11 +4296,7 @@
3998
4296
  }
3999
4297
  },
4000
4298
  "type": "object",
4001
- "required": [
4002
- "input_schema",
4003
- "output_schema",
4004
- "state_schema"
4005
- ],
4299
+ "required": ["input_schema", "output_schema", "state_schema"],
4006
4300
  "title": "GraphSchemaNoId",
4007
4301
  "description": "Defines the structure and properties of a graph without an ID."
4008
4302
  },
@@ -4070,12 +4364,7 @@
4070
4364
  },
4071
4365
  "multitask_strategy": {
4072
4366
  "type": "string",
4073
- "enum": [
4074
- "reject",
4075
- "rollback",
4076
- "interrupt",
4077
- "enqueue"
4078
- ],
4367
+ "enum": ["reject", "rollback", "interrupt", "enqueue"],
4079
4368
  "title": "Multitask Strategy",
4080
4369
  "description": "Strategy to handle concurrent runs on the same thread."
4081
4370
  }
@@ -4105,22 +4394,12 @@
4105
4394
  "description": "The node to send the message to."
4106
4395
  },
4107
4396
  "input": {
4108
- "type": [
4109
- "object",
4110
- "array",
4111
- "number",
4112
- "string",
4113
- "boolean",
4114
- "null"
4115
- ],
4397
+ "type": ["object", "array", "number", "string", "boolean", "null"],
4116
4398
  "title": "Message",
4117
4399
  "description": "The message to send."
4118
4400
  }
4119
4401
  },
4120
- "required": [
4121
- "node",
4122
- "input"
4123
- ]
4402
+ "required": ["node", "input"]
4124
4403
  },
4125
4404
  "Command": {
4126
4405
  "type": "object",
@@ -4128,23 +4407,12 @@
4128
4407
  "description": "The command to run.",
4129
4408
  "properties": {
4130
4409
  "update": {
4131
- "type": [
4132
- "object",
4133
- "array",
4134
- "null"
4135
- ],
4410
+ "type": ["object", "array", "null"],
4136
4411
  "title": "Update",
4137
4412
  "description": "An update to the state."
4138
4413
  },
4139
4414
  "resume": {
4140
- "type": [
4141
- "object",
4142
- "array",
4143
- "number",
4144
- "string",
4145
- "boolean",
4146
- "null"
4147
- ],
4415
+ "type": ["object", "array", "number", "string", "boolean", "null"],
4148
4416
  "title": "Resume",
4149
4417
  "description": "A value to pass to an interrupted node."
4150
4418
  },
@@ -4279,9 +4547,7 @@
4279
4547
  "anyOf": [
4280
4548
  {
4281
4549
  "type": "string",
4282
- "enum": [
4283
- "*"
4284
- ]
4550
+ "enum": ["*"]
4285
4551
  },
4286
4552
  {
4287
4553
  "items": {
@@ -4297,9 +4563,7 @@
4297
4563
  "anyOf": [
4298
4564
  {
4299
4565
  "type": "string",
4300
- "enum": [
4301
- "*"
4302
- ]
4566
+ "enum": ["*"]
4303
4567
  },
4304
4568
  {
4305
4569
  "items": {
@@ -4347,9 +4611,7 @@
4347
4611
  ],
4348
4612
  "title": "Stream Mode",
4349
4613
  "description": "The stream mode(s) to use.",
4350
- "default": [
4351
- "values"
4352
- ]
4614
+ "default": ["values"]
4353
4615
  },
4354
4616
  "stream_subgraphs": {
4355
4617
  "type": "boolean",
@@ -4365,13 +4627,10 @@
4365
4627
  },
4366
4628
  "on_disconnect": {
4367
4629
  "type": "string",
4368
- "enum": [
4369
- "cancel",
4370
- "continue"
4371
- ],
4630
+ "enum": ["cancel", "continue"],
4372
4631
  "title": "On Disconnect",
4373
4632
  "description": "The disconnect mode to use. Must be one of 'cancel' or 'continue'.",
4374
- "default": "cancel"
4633
+ "default": "continue"
4375
4634
  },
4376
4635
  "feedback_keys": {
4377
4636
  "items": {
@@ -4383,22 +4642,14 @@
4383
4642
  },
4384
4643
  "multitask_strategy": {
4385
4644
  "type": "string",
4386
- "enum": [
4387
- "reject",
4388
- "rollback",
4389
- "interrupt",
4390
- "enqueue"
4391
- ],
4645
+ "enum": ["reject", "rollback", "interrupt", "enqueue"],
4392
4646
  "title": "Multitask Strategy",
4393
4647
  "description": "Multitask strategy to use. Must be one of 'reject', 'interrupt', 'rollback', or 'enqueue'.",
4394
4648
  "default": "enqueue"
4395
4649
  },
4396
4650
  "if_not_exists": {
4397
4651
  "type": "string",
4398
- "enum": [
4399
- "create",
4400
- "reject"
4401
- ],
4652
+ "enum": ["create", "reject"],
4402
4653
  "title": "If Not Exists",
4403
4654
  "description": "How to handle missing thread. Must be either 'reject' (raise error if missing), or 'create' (create new thread).",
4404
4655
  "default": "reject"
@@ -4413,12 +4664,17 @@
4413
4664
  "title": "Checkpoint During",
4414
4665
  "description": "Whether to checkpoint during the run.",
4415
4666
  "default": false
4667
+ },
4668
+ "durability": {
4669
+ "type": "string",
4670
+ "enum": ["sync", "async", "exit"],
4671
+ "title": "Durability",
4672
+ "description": "Durability level for the run. Must be one of 'sync', 'async', or 'exit'.",
4673
+ "default": "async"
4416
4674
  }
4417
4675
  },
4418
4676
  "type": "object",
4419
- "required": [
4420
- "assistant_id"
4421
- ],
4677
+ "required": ["assistant_id"],
4422
4678
  "title": "RunCreateStateful",
4423
4679
  "description": "Payload for creating a run."
4424
4680
  },
@@ -4523,42 +4779,6 @@
4523
4779
  "title": "Webhook",
4524
4780
  "description": "Webhook to call after LangGraph API call is done."
4525
4781
  },
4526
- "interrupt_before": {
4527
- "anyOf": [
4528
- {
4529
- "type": "string",
4530
- "enum": [
4531
- "*"
4532
- ]
4533
- },
4534
- {
4535
- "items": {
4536
- "type": "string"
4537
- },
4538
- "type": "array"
4539
- }
4540
- ],
4541
- "title": "Interrupt Before",
4542
- "description": "Nodes to interrupt immediately before they get executed."
4543
- },
4544
- "interrupt_after": {
4545
- "anyOf": [
4546
- {
4547
- "type": "string",
4548
- "enum": [
4549
- "*"
4550
- ]
4551
- },
4552
- {
4553
- "items": {
4554
- "type": "string"
4555
- },
4556
- "type": "array"
4557
- }
4558
- ],
4559
- "title": "Interrupt After",
4560
- "description": "Nodes to interrupt immediately after they get executed."
4561
- },
4562
4782
  "stream_mode": {
4563
4783
  "anyOf": [
4564
4784
  {
@@ -4595,9 +4815,7 @@
4595
4815
  ],
4596
4816
  "title": "Stream Mode",
4597
4817
  "description": "The stream mode(s) to use.",
4598
- "default": [
4599
- "values"
4600
- ]
4818
+ "default": ["values"]
4601
4819
  },
4602
4820
  "feedback_keys": {
4603
4821
  "items": {
@@ -4621,23 +4839,17 @@
4621
4839
  },
4622
4840
  "on_completion": {
4623
4841
  "type": "string",
4624
- "enum": [
4625
- "delete",
4626
- "keep"
4627
- ],
4842
+ "enum": ["delete", "keep"],
4628
4843
  "title": "On Completion",
4629
4844
  "description": "Whether to delete or keep the thread created for a stateless run. Must be one of 'delete' or 'keep'.",
4630
4845
  "default": "delete"
4631
4846
  },
4632
4847
  "on_disconnect": {
4633
4848
  "type": "string",
4634
- "enum": [
4635
- "cancel",
4636
- "continue"
4637
- ],
4849
+ "enum": ["cancel", "continue"],
4638
4850
  "title": "On Disconnect",
4639
4851
  "description": "The disconnect mode to use. Must be one of 'cancel' or 'continue'.",
4640
- "default": "cancel"
4852
+ "default": "continue"
4641
4853
  },
4642
4854
  "after_seconds": {
4643
4855
  "type": "number",
@@ -4649,12 +4861,17 @@
4649
4861
  "title": "Checkpoint During",
4650
4862
  "description": "Whether to checkpoint during the run.",
4651
4863
  "default": false
4864
+ },
4865
+ "durability": {
4866
+ "type": "string",
4867
+ "enum": ["sync", "async", "exit"],
4868
+ "title": "Durability",
4869
+ "description": "Durability level for the run. Must be one of 'sync', 'async', or 'exit'.",
4870
+ "default": "async"
4652
4871
  }
4653
4872
  },
4654
4873
  "type": "object",
4655
- "required": [
4656
- "assistant_id"
4657
- ],
4874
+ "required": ["assistant_id"],
4658
4875
  "title": "RunCreateStateless",
4659
4876
  "description": "Payload for creating a run."
4660
4877
  },
@@ -4670,6 +4887,11 @@
4670
4887
  "title": "Graph Id",
4671
4888
  "description": "The ID of the graph to filter by. The graph ID is normally set in your langgraph.json configuration."
4672
4889
  },
4890
+ "name": {
4891
+ "type": "string",
4892
+ "title": "Name",
4893
+ "description": "Name of the assistant to filter by. The filtering logic will match (case insensitive) assistants where 'name' is a substring of the assistant name."
4894
+ },
4673
4895
  "limit": {
4674
4896
  "type": "integer",
4675
4897
  "title": "Limit",
@@ -4699,10 +4921,7 @@
4699
4921
  },
4700
4922
  "sort_order": {
4701
4923
  "type": "string",
4702
- "enum": [
4703
- "asc",
4704
- "desc"
4705
- ],
4924
+ "enum": ["asc", "desc"],
4706
4925
  "title": "Sort Order",
4707
4926
  "description": "The order to sort by."
4708
4927
  },
@@ -4712,7 +4931,7 @@
4712
4931
  "type": "string",
4713
4932
  "enum": [
4714
4933
  "assistant_id",
4715
- "graph_id",
4934
+ "graph_id",
4716
4935
  "name",
4717
4936
  "description",
4718
4937
  "config",
@@ -4742,6 +4961,11 @@
4742
4961
  "type": "string",
4743
4962
  "title": "Graph Id",
4744
4963
  "description": "The ID of the graph to filter by. The graph ID is normally set in your langgraph.json configuration."
4964
+ },
4965
+ "name": {
4966
+ "type": "string",
4967
+ "title": "Name",
4968
+ "description": "Name of the assistant to filter by. The filtering logic will match (case insensitive) assistants where 'name' is a substring of the assistant name."
4745
4969
  }
4746
4970
  },
4747
4971
  "type": "object",
@@ -4777,6 +5001,15 @@
4777
5001
  },
4778
5002
  "ThreadSearchRequest": {
4779
5003
  "properties": {
5004
+ "ids": {
5005
+ "type": "array",
5006
+ "items": {
5007
+ "type": "string",
5008
+ "format": "uuid"
5009
+ },
5010
+ "title": "Ids",
5011
+ "description": "List of thread IDs to include. Others are excluded."
5012
+ },
4780
5013
  "metadata": {
4781
5014
  "type": "object",
4782
5015
  "title": "Metadata",
@@ -4789,12 +5022,7 @@
4789
5022
  },
4790
5023
  "status": {
4791
5024
  "type": "string",
4792
- "enum": [
4793
- "idle",
4794
- "busy",
4795
- "interrupted",
4796
- "error"
4797
- ],
5025
+ "enum": ["idle", "busy", "interrupted", "error"],
4798
5026
  "title": "Status",
4799
5027
  "description": "Thread status to filter on."
4800
5028
  },
@@ -4815,21 +5043,13 @@
4815
5043
  },
4816
5044
  "sort_by": {
4817
5045
  "type": "string",
4818
- "enum": [
4819
- "thread_id",
4820
- "status",
4821
- "created_at",
4822
- "updated_at"
4823
- ],
5046
+ "enum": ["thread_id", "status", "created_at", "updated_at"],
4824
5047
  "title": "Sort By",
4825
5048
  "description": "Sort by field."
4826
5049
  },
4827
5050
  "sort_order": {
4828
5051
  "type": "string",
4829
- "enum": [
4830
- "asc",
4831
- "desc"
4832
- ],
5052
+ "enum": ["asc", "desc"],
4833
5053
  "title": "Sort Order",
4834
5054
  "description": "Sort order."
4835
5055
  },
@@ -4843,7 +5063,6 @@
4843
5063
  "updated_at",
4844
5064
  "metadata",
4845
5065
  "config",
4846
- "context",
4847
5066
  "status",
4848
5067
  "values",
4849
5068
  "interrupts"
@@ -4871,12 +5090,7 @@
4871
5090
  },
4872
5091
  "status": {
4873
5092
  "type": "string",
4874
- "enum": [
4875
- "idle",
4876
- "busy",
4877
- "interrupted",
4878
- "error"
4879
- ],
5093
+ "enum": ["idle", "busy", "interrupted", "error"],
4880
5094
  "title": "Status",
4881
5095
  "description": "Thread status to filter on."
4882
5096
  }
@@ -4917,12 +5131,7 @@
4917
5131
  },
4918
5132
  "status": {
4919
5133
  "type": "string",
4920
- "enum": [
4921
- "idle",
4922
- "busy",
4923
- "interrupted",
4924
- "error"
4925
- ],
5134
+ "enum": ["idle", "busy", "interrupted", "error"],
4926
5135
  "title": "Status",
4927
5136
  "description": "The status of the thread."
4928
5137
  },
@@ -4935,6 +5144,27 @@
4935
5144
  "type": "object",
4936
5145
  "title": "Interrupts",
4937
5146
  "description": "The current interrupts of the thread."
5147
+ },
5148
+ "ttl": {
5149
+ "type": "object",
5150
+ "title": "TTL Info",
5151
+ "description": "TTL information if set for this thread. Only present when ?include=ttl is passed.",
5152
+ "properties": {
5153
+ "strategy": {
5154
+ "type": "string",
5155
+ "enum": ["delete", "keep_latest"],
5156
+ "description": "The TTL strategy."
5157
+ },
5158
+ "ttl_minutes": {
5159
+ "type": "number",
5160
+ "description": "The TTL in minutes."
5161
+ },
5162
+ "expires_at": {
5163
+ "type": "string",
5164
+ "format": "date-time",
5165
+ "description": "When the thread will expire."
5166
+ }
5167
+ }
4938
5168
  }
4939
5169
  },
4940
5170
  "type": "object",
@@ -4962,10 +5192,7 @@
4962
5192
  },
4963
5193
  "if_exists": {
4964
5194
  "type": "string",
4965
- "enum": [
4966
- "raise",
4967
- "do_nothing"
4968
- ],
5195
+ "enum": ["raise", "do_nothing"],
4969
5196
  "title": "If Exists",
4970
5197
  "description": "How to handle duplicate creation. Must be either 'raise' (raise error if duplicate), or 'do_nothing' (return existing thread).",
4971
5198
  "default": "raise"
@@ -4977,10 +5204,8 @@
4977
5204
  "properties": {
4978
5205
  "strategy": {
4979
5206
  "type": "string",
4980
- "enum": [
4981
- "delete"
4982
- ],
4983
- "description": "The TTL strategy. 'delete' removes the entire thread.",
5207
+ "enum": ["delete", "keep_latest"],
5208
+ "description": "The TTL strategy. 'delete' removes the entire thread. 'keep_latest' prunes old checkpoints but keeps the thread and its latest state (requires FF_USE_CORE_API=true).",
4984
5209
  "default": "delete"
4985
5210
  },
4986
5211
  "ttl": {
@@ -5001,9 +5226,7 @@
5001
5226
  }
5002
5227
  }
5003
5228
  },
5004
- "required": [
5005
- "updates"
5006
- ]
5229
+ "required": ["updates"]
5007
5230
  }
5008
5231
  }
5009
5232
  },
@@ -5017,11 +5240,65 @@
5017
5240
  "type": "object",
5018
5241
  "title": "Metadata",
5019
5242
  "description": "Metadata to merge with existing thread metadata."
5243
+ },
5244
+ "ttl": {
5245
+ "type": "object",
5246
+ "title": "TTL",
5247
+ "description": "The time-to-live for the thread.",
5248
+ "properties": {
5249
+ "strategy": {
5250
+ "type": "string",
5251
+ "enum": ["delete", "keep_latest"],
5252
+ "description": "The TTL strategy. 'delete' removes the entire thread. 'keep_latest' prunes old checkpoints but keeps the thread and its latest state (requires FF_USE_CORE_API=true).",
5253
+ "default": "delete"
5254
+ },
5255
+ "ttl": {
5256
+ "type": "number",
5257
+ "description": "The time-to-live in minutes from now until thread should be swept."
5258
+ }
5259
+ }
5020
5260
  }
5021
5261
  },
5022
5262
  "type": "object",
5023
5263
  "title": "ThreadPatch",
5024
- "description": "Payload for creating a thread."
5264
+ "description": "Payload for updating a thread."
5265
+ },
5266
+ "ThreadPruneRequest": {
5267
+ "properties": {
5268
+ "thread_ids": {
5269
+ "type": "array",
5270
+ "items": {
5271
+ "type": "string",
5272
+ "format": "uuid"
5273
+ },
5274
+ "title": "Thread IDs",
5275
+ "description": "List of thread IDs to prune."
5276
+ },
5277
+ "strategy": {
5278
+ "type": "string",
5279
+ "enum": ["delete", "keep_latest"],
5280
+ "title": "Strategy",
5281
+ "description": "The prune strategy. 'delete' removes threads entirely. 'keep_latest' prunes old checkpoints but keeps threads and their latest state (requires FF_USE_CORE_API=true).",
5282
+ "default": "delete"
5283
+ }
5284
+ },
5285
+ "required": ["thread_ids"],
5286
+ "type": "object",
5287
+ "title": "ThreadPruneRequest",
5288
+ "description": "Payload for pruning threads."
5289
+ },
5290
+ "ThreadPruneResponse": {
5291
+ "properties": {
5292
+ "pruned_count": {
5293
+ "type": "integer",
5294
+ "title": "Pruned Count",
5295
+ "description": "Number of threads successfully pruned."
5296
+ }
5297
+ },
5298
+ "required": ["pruned_count"],
5299
+ "type": "object",
5300
+ "title": "ThreadPruneResponse",
5301
+ "description": "Response from pruning threads."
5025
5302
  },
5026
5303
  "ThreadStateCheckpointRequest": {
5027
5304
  "properties": {
@@ -5036,9 +5313,7 @@
5036
5313
  "description": "Include subgraph states."
5037
5314
  }
5038
5315
  },
5039
- "required": [
5040
- "checkpoint"
5041
- ],
5316
+ "required": ["checkpoint"],
5042
5317
  "type": "object",
5043
5318
  "title": "ThreadStateCheckpointRequest",
5044
5319
  "description": "Payload for getting the state of a thread at a checkpoint."
@@ -5096,10 +5371,7 @@
5096
5371
  "$ref": "#/components/schemas/ThreadState"
5097
5372
  }
5098
5373
  },
5099
- "required": [
5100
- "id",
5101
- "name"
5102
- ]
5374
+ "required": ["id", "name"]
5103
5375
  },
5104
5376
  "type": "array",
5105
5377
  "title": "Tasks"
@@ -5128,13 +5400,7 @@
5128
5400
  }
5129
5401
  },
5130
5402
  "type": "object",
5131
- "required": [
5132
- "values",
5133
- "next",
5134
- "checkpoint",
5135
- "metadata",
5136
- "created_at"
5137
- ],
5403
+ "required": ["values", "next", "checkpoint", "metadata", "created_at"],
5138
5404
  "title": "ThreadState"
5139
5405
  },
5140
5406
  "ThreadStateSearch": {
@@ -5233,9 +5499,7 @@
5233
5499
  "description": "Update the state as if this node had just executed."
5234
5500
  }
5235
5501
  },
5236
- "required": [
5237
- "as_node"
5238
- ],
5502
+ "required": ["as_node"],
5239
5503
  "type": "object"
5240
5504
  },
5241
5505
  "ThreadStateUpdateResponse": {
@@ -5274,11 +5538,7 @@
5274
5538
  },
5275
5539
  "StorePutRequest": {
5276
5540
  "type": "object",
5277
- "required": [
5278
- "namespace",
5279
- "key",
5280
- "value"
5281
- ],
5541
+ "required": ["namespace", "key", "value"],
5282
5542
  "properties": {
5283
5543
  "namespace": {
5284
5544
  "type": "array",
@@ -5304,9 +5564,7 @@
5304
5564
  },
5305
5565
  "StoreDeleteRequest": {
5306
5566
  "type": "object",
5307
- "required": [
5308
- "key"
5309
- ],
5567
+ "required": ["key"],
5310
5568
  "properties": {
5311
5569
  "namespace": {
5312
5570
  "type": "array",
@@ -5329,10 +5587,7 @@
5329
5587
  "type": "object",
5330
5588
  "properties": {
5331
5589
  "namespace_prefix": {
5332
- "type": [
5333
- "array",
5334
- "null"
5335
- ],
5590
+ "type": ["array", "null"],
5336
5591
  "items": {
5337
5592
  "type": "string"
5338
5593
  },
@@ -5340,10 +5595,7 @@
5340
5595
  "description": "List of strings representing the namespace prefix."
5341
5596
  },
5342
5597
  "filter": {
5343
- "type": [
5344
- "object",
5345
- "null"
5346
- ],
5598
+ "type": ["object", "null"],
5347
5599
  "additionalProperties": true,
5348
5600
  "title": "Filter",
5349
5601
  "description": "Optional dictionary of key-value pairs to filter results."
@@ -5361,10 +5613,7 @@
5361
5613
  "description": "Number of items to skip before returning results (default is 0)."
5362
5614
  },
5363
5615
  "query": {
5364
- "type": [
5365
- "string",
5366
- "null"
5367
- ],
5616
+ "type": ["string", "null"],
5368
5617
  "title": "Query",
5369
5618
  "description": "Query string for semantic/vector search."
5370
5619
  }
@@ -5412,13 +5661,7 @@
5412
5661
  },
5413
5662
  "Item": {
5414
5663
  "type": "object",
5415
- "required": [
5416
- "namespace",
5417
- "key",
5418
- "value",
5419
- "created_at",
5420
- "updated_at"
5421
- ],
5664
+ "required": ["namespace", "key", "value", "created_at", "updated_at"],
5422
5665
  "properties": {
5423
5666
  "namespace": {
5424
5667
  "type": "array",
@@ -5455,11 +5698,7 @@
5455
5698
  "properties": {
5456
5699
  "status": {
5457
5700
  "type": "string",
5458
- "enum": [
5459
- "pending",
5460
- "running",
5461
- "all"
5462
- ],
5701
+ "enum": ["pending", "running", "all"],
5463
5702
  "title": "Status",
5464
5703
  "description": "Filter runs by status to cancel. Must be one of 'pending', 'running', or 'all'."
5465
5704
  },
@@ -5481,23 +5720,16 @@
5481
5720
  },
5482
5721
  "oneOf": [
5483
5722
  {
5484
- "required": [
5485
- "status"
5486
- ]
5723
+ "required": ["status"]
5487
5724
  },
5488
5725
  {
5489
- "required": [
5490
- "thread_id",
5491
- "run_ids"
5492
- ]
5726
+ "required": ["thread_id", "run_ids"]
5493
5727
  }
5494
5728
  ]
5495
5729
  },
5496
5730
  "SearchItemsResponse": {
5497
5731
  "type": "object",
5498
- "required": [
5499
- "items"
5500
- ],
5732
+ "required": ["items"],
5501
5733
  "properties": {
5502
5734
  "items": {
5503
5735
  "type": "array",
@@ -5517,9 +5749,156 @@
5517
5749
  }
5518
5750
  },
5519
5751
  "ErrorResponse": {
5520
- "type": "string",
5752
+ "type": "object",
5753
+ "required": ["detail"],
5754
+ "properties": {
5755
+ "detail": {
5756
+ "type": "string",
5757
+ "description": "Human-readable error message"
5758
+ }
5759
+ },
5521
5760
  "title": "ErrorResponse",
5522
- "description": "Error message returned from the server"
5761
+ "description": "Error response returned from the server"
5762
+ },
5763
+ "ThreadCronCreate": {
5764
+ "properties": {
5765
+ "schedule": {
5766
+ "type": "string",
5767
+ "title": "Schedule",
5768
+ "description": "The cron schedule to execute this job on."
5769
+ },
5770
+ "end_time": {
5771
+ "type": "string",
5772
+ "format": "date-time",
5773
+ "title": "End Time",
5774
+ "description": "The end date to stop running the cron."
5775
+ },
5776
+ "assistant_id": {
5777
+ "anyOf": [
5778
+ {
5779
+ "type": "string",
5780
+ "format": "uuid",
5781
+ "title": "Assistant Id"
5782
+ },
5783
+ {
5784
+ "type": "string",
5785
+ "title": "Graph Id"
5786
+ }
5787
+ ],
5788
+ "description": "The assistant ID or graph name to run. If using graph name, will default to the assistant automatically created from that graph by the server."
5789
+ },
5790
+ "input": {
5791
+ "anyOf": [
5792
+ {
5793
+ "items": {
5794
+ "type": "object"
5795
+ },
5796
+ "type": "array"
5797
+ },
5798
+ {
5799
+ "type": "object"
5800
+ }
5801
+ ],
5802
+ "title": "Input",
5803
+ "description": "The input to the graph."
5804
+ },
5805
+ "metadata": {
5806
+ "type": "object",
5807
+ "title": "Metadata",
5808
+ "description": "Metadata to assign to the cron job runs."
5809
+ },
5810
+ "config": {
5811
+ "properties": {
5812
+ "tags": {
5813
+ "items": {
5814
+ "type": "string"
5815
+ },
5816
+ "type": "array",
5817
+ "title": "Tags"
5818
+ },
5819
+ "recursion_limit": {
5820
+ "type": "integer",
5821
+ "title": "Recursion Limit"
5822
+ },
5823
+ "configurable": {
5824
+ "type": "object",
5825
+ "title": "Configurable"
5826
+ }
5827
+ },
5828
+ "type": "object",
5829
+ "title": "Config",
5830
+ "description": "The configuration for the assistant."
5831
+ },
5832
+ "context": {
5833
+ "type": "object",
5834
+ "title": "Context",
5835
+ "description": "Static context added to the assistant."
5836
+ },
5837
+ "webhook": {
5838
+ "type": "string",
5839
+ "maxLength": 65536,
5840
+ "minLength": 1,
5841
+ "format": "uri-reference",
5842
+ "title": "Webhook",
5843
+ "description": "Webhook to call after LangGraph API call is done."
5844
+ },
5845
+ "interrupt_before": {
5846
+ "anyOf": [
5847
+ {
5848
+ "type": "string",
5849
+ "enum": ["*"]
5850
+ },
5851
+ {
5852
+ "items": {
5853
+ "type": "string"
5854
+ },
5855
+ "type": "array"
5856
+ }
5857
+ ],
5858
+ "title": "Interrupt Before",
5859
+ "description": "Nodes to interrupt immediately before they get executed."
5860
+ },
5861
+ "interrupt_after": {
5862
+ "anyOf": [
5863
+ {
5864
+ "type": "string",
5865
+ "enum": ["*"]
5866
+ },
5867
+ {
5868
+ "items": {
5869
+ "type": "string"
5870
+ },
5871
+ "type": "array"
5872
+ }
5873
+ ],
5874
+ "title": "Interrupt After",
5875
+ "description": "Nodes to interrupt immediately after they get executed."
5876
+ },
5877
+ "multitask_strategy": {
5878
+ "type": "string",
5879
+ "enum": ["reject", "rollback", "interrupt", "enqueue"],
5880
+ "title": "Multitask Strategy",
5881
+ "description": "Multitask strategy to use. Must be one of 'reject', 'interrupt', 'rollback', or 'enqueue'.",
5882
+ "default": "enqueue"
5883
+ }
5884
+ },
5885
+ "type": "object",
5886
+ "required": ["assistant_id", "schedule"],
5887
+ "title": "ThreadCronCreate",
5888
+ "description": "Payload for creating a thread-specific cron job (runs on the same thread)."
5889
+ },
5890
+ "Interrupt": {
5891
+ "type": "object",
5892
+ "properties": {
5893
+ "id": {
5894
+ "type": ["string", "null"]
5895
+ },
5896
+ "value": {
5897
+ "type": "object"
5898
+ }
5899
+ },
5900
+ "title": "Interrupt",
5901
+ "required": ["value"]
5523
5902
  }
5524
5903
  },
5525
5904
  "responses": {
@@ -5570,24 +5949,6 @@
5570
5949
  }
5571
5950
  }
5572
5951
  }
5573
- },
5574
- "Interrupt": {
5575
- "type": "object",
5576
- "properties": {
5577
- "id": {
5578
- "type": [
5579
- "string",
5580
- "null"
5581
- ]
5582
- },
5583
- "value": {
5584
- "type": "object"
5585
- }
5586
- },
5587
- "title": "Interrupt",
5588
- "required": [
5589
- "value"
5590
- ]
5591
5952
  }
5592
5953
  }
5593
5954
  }