From c1bf678ed16aca00d5b26f450b9aab1b309e429e Mon Sep 17 00:00:00 2001 From: William FH <13333726+hinthornw@users.noreply.github.com> Date: Thu, 8 May 2025 09:14:18 -0700 Subject: [PATCH] Update openapi spec (#4599) Incorporate new arguments added to the API, including the `/mcp` paths --- docs/docs/cloud/reference/api/openapi.json | 544 +++++++++------------ 1 file changed, 229 insertions(+), 315 deletions(-) diff --git a/docs/docs/cloud/reference/api/openapi.json b/docs/docs/cloud/reference/api/openapi.json index 6c4b8ab34..f66968732 100644 --- a/docs/docs/cloud/reference/api/openapi.json +++ b/docs/docs/cloud/reference/api/openapi.json @@ -33,9 +33,7 @@ "paths": { "/assistants": { "post": { - "tags": [ - "Assistants" - ], + "tags": ["Assistants"], "summary": "Create Assistant", "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.", "operationId": "create_assistant_assistants_post", @@ -95,9 +93,7 @@ }, "/assistants/search": { "post": { - "tags": [ - "Assistants" - ], + "tags": ["Assistants"], "summary": "Search Assistants", "description": "Search for assistants.\n\nThis endpoint also functions as the endpoint to list all assistants.", "operationId": "search_assistants_assistants_search_post", @@ -151,9 +147,7 @@ }, "/assistants/{assistant_id}": { "get": { - "tags": [ - "Assistants" - ], + "tags": ["Assistants"], "summary": "Get Assistant", "description": "Get an assistant by ID.", "operationId": "get_assistant_assistants__assistant_id__get", @@ -195,9 +189,7 @@ } }, "delete": { - "tags": [ - "Assistants" - ], + "tags": ["Assistants"], "summary": "Delete Assistant", "description": "Delete an assistant by ID.\n\nAll versions of the assistant will be deleted as well.", "operationId": "delete_assistant_assistants__assistant_id__delete", @@ -247,9 +239,7 @@ } }, "patch": { - "tags": [ - "Assistants" - ], + "tags": ["Assistants"], "summary": "Patch Assistant", "description": "Update an assistant.", "operationId": "patch_assistant_assistants__assistant_id__patch", @@ -313,9 +303,7 @@ }, "/assistants/{assistant_id}/graph": { "get": { - "tags": [ - "Assistants" - ], + "tags": ["Assistants"], "summary": "Get Assistant Graph", "description": "Get an assistant by ID.", "operationId": "get_assistant_graph_assistants__assistant_id__graph_get", @@ -404,9 +392,7 @@ }, "/assistants/{assistant_id}/subgraphs": { "get": { - "tags": [ - "Assistants" - ], + "tags": ["Assistants"], "summary": "Get Assistant Subgraphs", "description": "Get an assistant's subgraphs.", "operationId": "get_assistant_subgraphs_assistants__assistant_id__subgraphs_get", @@ -470,9 +456,7 @@ }, "/assistants/{assistant_id}/subgraphs/{namespace}": { "get": { - "tags": [ - "Assistants" - ], + "tags": ["Assistants"], "summary": "Get Assistant Subgraphs by Namespace", "description": "Get an assistant's subgraphs filtered by namespace.", "operationId": "get_assistant_subgraphs_assistants__assistant_id__subgraphs__namespace__get", @@ -536,9 +520,7 @@ }, "/assistants/{assistant_id}/schemas": { "get": { - "tags": [ - "Assistants" - ], + "tags": ["Assistants"], "summary": "Get Assistant Schemas", "description": "Get an assistant by ID.", "operationId": "get_assistant_schemas_assistants__assistant_id__schemas_get", @@ -592,9 +574,7 @@ }, "/assistants/{assistant_id}/versions": { "post": { - "tags": [ - "Assistants" - ], + "tags": ["Assistants"], "summary": "Get Assistant Versions", "description": "Get all versions of an assistant.", "operationId": "get_assistant_versions_assistants__assistant_id__versions_get", @@ -642,9 +622,7 @@ }, "/assistants/{assistant_id}/latest": { "post": { - "tags": [ - "Assistants" - ], + "tags": ["Assistants"], "summary": "Set Latest Assistant Version", "description": "Set the latest version for an assistant.", "operationId": "set_latest_assistant_version_assistants__assistant_id__versions_post", @@ -709,9 +687,7 @@ }, "/threads": { "post": { - "tags": [ - "Threads" - ], + "tags": ["Threads"], "summary": "Create Thread", "description": "Create a thread.", "operationId": "create_thread_threads_post", @@ -761,9 +737,7 @@ }, "/threads/search": { "post": { - "tags": [ - "Threads" - ], + "tags": ["Threads"], "summary": "Search Threads", "description": "Search for threads.\n\nThis endpoint also functions as the endpoint to list all threads.", "operationId": "search_threads_threads_search_post", @@ -807,9 +781,7 @@ }, "/threads/state/bulk": { "post": { - "tags": [ - "Threads" - ], + "tags": ["Threads"], "summary": "Bulk Update Thread State", "description": "Create a new thread from a batch of state updates.", "operationId": "bulk_update_thread_state_post", @@ -859,9 +831,7 @@ }, "/threads/{thread_id}/state": { "get": { - "tags": [ - "Threads" - ], + "tags": ["Threads"], "summary": "Get Thread State", "description": "Get state for a thread.\n\nThe latest state of the thread (i.e. latest checkpoint) is returned.", "operationId": "get_latest_thread_state_threads__thread_id__state_get", @@ -903,9 +873,7 @@ } }, "post": { - "tags": [ - "Threads" - ], + "tags": ["Threads"], "summary": "Update Thread State", "description": "Add state to a thread.", "operationId": "update_thread_state_threads__thread_id__state_post", @@ -959,9 +927,7 @@ }, "/threads/{thread_id}/state/checkpoint": { "post": { - "tags": [ - "Threads" - ], + "tags": ["Threads"], "summary": "Get Thread State At Checkpoint", "description": "Get state for a thread at a specific checkpoint.", "operationId": "post_thread_state_at_checkpoint_threads__thread_id__state__checkpoint_id__get", @@ -1001,9 +967,7 @@ }, "/threads/{thread_id}/history": { "get": { - "tags": [ - "Threads" - ], + "tags": ["Threads"], "summary": "Get Thread History", "description": "Get all past states for a thread.", "operationId": "get_thread_history_threads__thread_id__history_get", @@ -1068,9 +1032,7 @@ } }, "post": { - "tags": [ - "Threads" - ], + "tags": ["Threads"], "summary": "Get Thread History Post", "description": "Get all past states for a thread.", "operationId": "get_thread_history_post_threads__thread_id__history_post", @@ -1128,9 +1090,7 @@ }, "/threads/{thread_id}/copy": { "post": { - "tags": [ - "Threads" - ], + "tags": ["Threads"], "summary": "Copy Thread", "description": "Create a new thread with a copy of the state and checkpoints from an existing thread.", "operationId": "copy_thread_post_threads__thread_id__copy_post", @@ -1184,9 +1144,7 @@ }, "/threads/{thread_id}": { "get": { - "tags": [ - "Threads" - ], + "tags": ["Threads"], "summary": "Get Thread", "description": "Get a thread by ID.", "operationId": "get_thread_threads__thread_id__get", @@ -1238,9 +1196,7 @@ } }, "delete": { - "tags": [ - "Threads" - ], + "tags": ["Threads"], "summary": "Delete Thread", "description": "Delete a thread by ID.", "operationId": "delete_thread_threads__thread_id__delete", @@ -1290,9 +1246,7 @@ } }, "patch": { - "tags": [ - "Threads" - ], + "tags": ["Threads"], "summary": "Patch Thread", "description": "Update a thread.", "operationId": "patch_thread_threads__thread_id__patch", @@ -1356,9 +1310,7 @@ }, "/threads/{thread_id}/runs": { "get": { - "tags": [ - "Thread Runs" - ], + "tags": ["Thread Runs"], "summary": "List Runs", "description": "List runs for a thread.", "operationId": "list_runs_http_threads__thread_id__runs_get", @@ -1399,13 +1351,7 @@ "required": false, "schema": { "type": "string", - "enum": [ - "pending", - "error", - "success", - "timeout", - "interrupted" - ] + "enum": ["pending", "error", "success", "timeout", "interrupted"] }, "name": "status", "in": "query" @@ -1448,9 +1394,7 @@ } }, "post": { - "tags": [ - "Thread Runs" - ], + "tags": ["Thread Runs"], "summary": "Create Background Run", "description": "Create a run in existing thread, return the run ID immediately. Don't wait for the final run output.", "operationId": "create_run_threads__thread_id__runs_post", @@ -1524,9 +1468,7 @@ }, "/threads/{thread_id}/runs/crons": { "post": { - "tags": [ - "Crons (Plus tier)" - ], + "tags": ["Crons (Plus tier)"], "summary": "Create Thread Cron", "description": "Create a cron to schedule runs on a thread.", "operationId": "create_thread_cron_threads__thread_id__runs_crons_post", @@ -1590,9 +1532,7 @@ }, "/threads/{thread_id}/runs/stream": { "post": { - "tags": [ - "Thread Runs" - ], + "tags": ["Thread Runs"], "summary": "Create Run, Stream Output", "description": "Create a run in existing thread. Stream the output.", "operationId": "stream_run_threads__thread_id__runs_stream_post", @@ -1667,9 +1607,7 @@ }, "/threads/{thread_id}/runs/wait": { "post": { - "tags": [ - "Thread Runs" - ], + "tags": ["Thread Runs"], "summary": "Create Run, Wait for Output", "description": "Create a run in existing thread. Wait for the final output and then return it.", "operationId": "wait_run_threads__thread_id__runs_wait_post", @@ -1741,9 +1679,7 @@ }, "/threads/{thread_id}/runs/{run_id}": { "get": { - "tags": [ - "Thread Runs" - ], + "tags": ["Thread Runs"], "summary": "Get Run", "description": "Get a run by ID.", "operationId": "get_run_http_threads__thread_id__runs__run_id__get", @@ -1807,9 +1743,7 @@ } }, "delete": { - "tags": [ - "Thread Runs" - ], + "tags": ["Thread Runs"], "summary": "Delete Run", "description": "Delete a run by ID.", "operationId": "delete_run_threads__thread_id__runs__run_id__delete", @@ -1873,9 +1807,7 @@ }, "/threads/{thread_id}/runs/{run_id}/join": { "get": { - "tags": [ - "Thread Runs" - ], + "tags": ["Thread Runs"], "summary": "Join Run", "description": "Wait for a run to finish.", "operationId": "join_run_http_threads__thread_id__runs__run_id__join_get", @@ -1950,9 +1882,7 @@ }, "/threads/{thread_id}/runs/{run_id}/stream": { "get": { - "tags": [ - "Thread Runs" - ], + "tags": ["Thread Runs"], "summary": "Join Run Stream", "description": "Join a run stream. This endpoint streams output in real-time from a run similar to the /threads/__THREAD_ID__/runs/stream endpoint. Only output produced after this endpoint is called will be streamed.", "operationId": "stream_run_http_threads__thread_id__runs__run_id__join_get", @@ -2019,9 +1949,7 @@ }, "/threads/{thread_id}/runs/{run_id}/cancel": { "post": { - "tags": [ - "Thread Runs" - ], + "tags": ["Thread Runs"], "summary": "Cancel Run", "operationId": "cancel_run_http_threads__thread_id__runs__run_id__cancel_post", "parameters": [ @@ -2064,10 +1992,7 @@ "required": false, "schema": { "type": "string", - "enum": [ - "interrupt", - "rollback" - ], + "enum": ["interrupt", "rollback"], "title": "Action", "default": "interrupt" }, @@ -2109,9 +2034,7 @@ }, "/runs/crons": { "post": { - "tags": [ - "Crons (Plus tier)" - ], + "tags": ["Crons (Plus tier)"], "summary": "Create Cron", "description": "Create a cron to schedule runs on new threads.", "operationId": "create_cron_runs_crons_post", @@ -2161,9 +2084,7 @@ }, "/runs/crons/search": { "post": { - "tags": [ - "Crons (Plus tier)" - ], + "tags": ["Crons (Plus tier)"], "summary": "Search Crons", "description": "Search all active crons", "operationId": "search_crons_runs_crons_post", @@ -2207,9 +2128,7 @@ }, "/runs/stream": { "post": { - "tags": [ - "Stateless Runs" - ], + "tags": ["Stateless Runs"], "summary": "Create Run, Stream Output", "description": "Create a run in a new thread, stream the output.", "operationId": "stream_run_stateless_runs_stream_post", @@ -2270,9 +2189,7 @@ }, "/runs/cancel": { "post": { - "tags": [ - "Thread Runs" - ], + "tags": ["Thread Runs"], "summary": "Cancel Runs", "description": "Cancel one or more runs. Can cancel runs by thread ID and run IDs, or by status filter.", "operationId": "cancel_runs_post", @@ -2282,10 +2199,7 @@ "required": false, "schema": { "type": "string", - "enum": [ - "interrupt", - "rollback" - ], + "enum": ["interrupt", "rollback"], "title": "Action", "default": "interrupt" }, @@ -2332,9 +2246,7 @@ }, "/runs/wait": { "post": { - "tags": [ - "Stateless Runs" - ], + "tags": ["Stateless Runs"], "summary": "Create Run, Wait for Output", "description": "Create a run in a new thread. Wait for the final output and then return it.", "operationId": "wait_run_stateless_runs_wait_post", @@ -2392,9 +2304,7 @@ }, "/runs": { "post": { - "tags": [ - "Stateless Runs" - ], + "tags": ["Stateless Runs"], "summary": "Create Background Run", "description": "Create a run in a new thread, return the run ID immediately. Don't wait for the final run output.", "operationId": "run_stateless_runs_post", @@ -2452,9 +2362,7 @@ }, "/runs/batch": { "post": { - "tags": [ - "Stateless Runs" - ], + "tags": ["Stateless Runs"], "summary": "Create Run Batch", "description": "Create a batch of runs in new threads, return immediately.", "operationId": "run_batch_stateless_runs_post", @@ -2512,9 +2420,7 @@ }, "/runs/crons/{cron_id}": { "delete": { - "tags": [ - "Crons (Plus tier)" - ], + "tags": ["Crons (Plus tier)"], "summary": "Delete Cron", "description": "Delete a cron by ID.", "operationId": "delete_cron_runs_crons__cron_id__delete", @@ -2564,9 +2470,7 @@ }, "/store/items": { "put": { - "tags": [ - "Store" - ], + "tags": ["Store"], "summary": "Store or update an item.", "operationId": "put_item", "requestBody": { @@ -2596,9 +2500,7 @@ } }, "delete": { - "tags": [ - "Store" - ], + "tags": ["Store"], "summary": "Delete an item.", "operationId": "delete_item", "requestBody": { @@ -2628,9 +2530,7 @@ } }, "get": { - "tags": [ - "Store" - ], + "tags": ["Store"], "summary": "Retrieve a single item.", "operationId": "get_item", "parameters": [ @@ -2690,9 +2590,7 @@ }, "/store/items/search": { "post": { - "tags": [ - "Store" - ], + "tags": ["Store"], "summary": "Search for items within a namespace prefix.", "operationId": "search_items", "requestBody": { @@ -2731,9 +2629,7 @@ }, "/store/namespaces": { "post": { - "tags": [ - "Store" - ], + "tags": ["Store"], "summary": "List namespaces with optional match conditions.", "operationId": "list_namespaces", "requestBody": { @@ -2769,6 +2665,88 @@ } } } + }, + "/mcp/": { + "get": { + "operationId": "get_mcp", + "summary": "MCP Get", + "description": "Implemented according to the Streamable HTTP Transport specification.", + "responses": { + "405": { + "description": "GET method not allowed; streaming not supported." + } + }, + "tags": ["MCP"] + }, + "post": { + "operationId": "post_mcp", + "summary": "MCP Post", + "description": "Implemented according to the Streamable HTTP Transport specification.\nSends a JSON-RPC 2.0 message to the server.\n\n- **Request**: Provide an object with `jsonrpc`, `id`, `method`, and optional `params`.\n- **Response**: Returns a JSON-RPC response or acknowledgment.\n\n**Notes:**\n- Stateless: Sessions are not persisted across requests.\n", + "parameters": [ + { + "name": "Accept", + "in": "header", + "required": true, + "schema": { + "type": "string", + "enum": ["application/json, text/event-stream"] + }, + "description": "Accept header must include both 'application/json' and 'text/event-stream' media types." + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { "type": "object" }, + "description": "A JSON-RPC 2.0 request, notification, or response object.", + "example": { + "jsonrpc": "2.0", + "id": "1", + "method": "initialize", + "params": { + "clientInfo": { + "name": "test_client", + "version": "1.0.0" + }, + "protocolVersion": "2024-11-05", + "capabilities": {} + } + } + } + } + }, + "responses": { + "200": { + "description": "Successful JSON-RPC response.", + "content": { + "application/json": { "schema": { "type": "object" } } + } + }, + "202": { + "description": "Notification or response accepted; no content body." + }, + "400": { + "description": "Bad request: invalid JSON or message format, or unacceptable Accept header." + }, + "405": { + "description": "HTTP method not allowed." + }, + "500": { + "description": "Internal server error or unexpected failure." + } + }, + "tags": ["MCP"] + }, + "delete": { + "operationId": "delete_mcp", + "summary": "Terminate Session", + "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", + "responses": { + "404": {} + }, + "tags": ["MCP"] + } } }, "components": { @@ -2834,6 +2812,11 @@ "type": "string", "title": "Assistant Name", "description": "The name of the assistant" + }, + "description": { + "type": ["string", "null"], + "title": "Assistant Description", + "description": "The description of the assistant" } }, "type": "object", @@ -2872,10 +2855,7 @@ }, "if_exists": { "type": "string", - "enum": [ - "raise", - "do_nothing" - ], + "enum": ["raise", "do_nothing"], "title": "If Exists", "description": "How to handle duplicate creation. Must be either 'raise' (raise error if duplicate), or 'do_nothing' (return existing assistant).", "default": "raise" @@ -2884,12 +2864,15 @@ "type": "string", "title": "Name", "description": "The name of the assistant. Defaults to 'Untitled'." + }, + "description": { + "type": ["string", "null"], + "title": "Description", + "description": "The description of the assistant. Defaults to null." } }, "type": "object", - "required": [ - "graph_id" - ], + "required": ["graph_id"], "title": "AssistantCreate", "description": "Payload for creating an assistant." }, @@ -2914,6 +2897,11 @@ "type": "string", "title": "Name", "description": "The new name for the assistant. If not provided, assistant will keep its current name." + }, + "description": { + "type": "string", + "title": "Description", + "description": "The new description for the assistant. If not provided, assistant will keep its current description." } }, "type": "object", @@ -3084,9 +3072,7 @@ "anyOf": [ { "type": "string", - "enum": [ - "*" - ] + "enum": ["*"] }, { "items": { @@ -3102,9 +3088,7 @@ "anyOf": [ { "type": "string", - "enum": [ - "*" - ] + "enum": ["*"] }, { "items": { @@ -3118,22 +3102,14 @@ }, "multitask_strategy": { "type": "string", - "enum": [ - "reject", - "rollback", - "interrupt", - "enqueue" - ], + "enum": ["reject", "rollback", "interrupt", "enqueue"], "title": "Multitask Strategy", "description": "Multitask strategy to use. Must be one of 'reject', 'interrupt', 'rollback', or 'enqueue'.", "default": "reject" } }, "type": "object", - "required": [ - "assistant_id", - "schedule" - ], + "required": ["assistant_id", "schedule"], "title": "CronCreate", "description": "Payload for creating a cron job." }, @@ -3201,11 +3177,7 @@ } }, "type": "object", - "required": [ - "graph_id", - "state_schema", - "config_schema" - ], + "required": ["graph_id", "state_schema", "config_schema"], "title": "GraphSchema", "description": "Defines the structure and properties of a graph." }, @@ -3284,13 +3256,7 @@ }, "status": { "type": "string", - "enum": [ - "pending", - "error", - "success", - "timeout", - "interrupted" - ], + "enum": ["pending", "error", "success", "timeout", "interrupted"], "title": "Status", "description": "The status of the run. One of 'pending', 'error', 'success', 'timeout', 'interrupted'." }, @@ -3305,12 +3271,7 @@ }, "multitask_strategy": { "type": "string", - "enum": [ - "reject", - "rollback", - "interrupt", - "enqueue" - ], + "enum": ["reject", "rollback", "interrupt", "enqueue"], "title": "Multitask Strategy", "description": "Strategy to handle concurrent runs on the same thread." } @@ -3340,15 +3301,12 @@ "description": "The node to send the message to." }, "input": { - "type": "object", + "type": ["object", "array", "number", "string", "boolean", "null"], "title": "Message", "description": "The message to send." } }, - "required": [ - "node", - "input" - ] + "required": ["node", "input"] }, "Command": { "type": "object", @@ -3356,23 +3314,12 @@ "description": "The command to run.", "properties": { "update": { - "type": [ - "object", - "array", - "null" - ], + "type": ["object", "array", "null"], "title": "Update", "description": "An update to the state." }, "resume": { - "type": [ - "object", - "array", - "number", - "string", - "boolean", - "null" - ], + "type": ["object", "array", "number", "string", "boolean", "null"], "title": "Resume", "description": "A value to pass to an interrupted node." }, @@ -3502,9 +3449,7 @@ "anyOf": [ { "type": "string", - "enum": [ - "*" - ] + "enum": ["*"] }, { "items": { @@ -3520,9 +3465,7 @@ "anyOf": [ { "type": "string", - "enum": [ - "*" - ] + "enum": ["*"] }, { "items": { @@ -3566,9 +3509,7 @@ ], "title": "Stream Mode", "description": "The stream mode(s) to use.", - "default": [ - "values" - ] + "default": ["values"] }, "stream_subgraphs": { "type": "boolean", @@ -3578,10 +3519,7 @@ }, "on_disconnect": { "type": "string", - "enum": [ - "cancel", - "continue" - ], + "enum": ["cancel", "continue"], "title": "On Disconnect", "description": "The disconnect mode to use. Must be one of 'cancel' or 'continue'.", "default": "cancel" @@ -3596,22 +3534,14 @@ }, "multitask_strategy": { "type": "string", - "enum": [ - "reject", - "rollback", - "interrupt", - "enqueue" - ], + "enum": ["reject", "rollback", "interrupt", "enqueue"], "title": "Multitask Strategy", "description": "Multitask strategy to use. Must be one of 'reject', 'interrupt', 'rollback', or 'enqueue'.", "default": "reject" }, "if_not_exists": { "type": "string", - "enum": [ - "create", - "reject" - ], + "enum": ["create", "reject"], "title": "If Not Exists", "description": "How to handle missing thread. Must be either 'reject' (raise error if missing), or 'create' (create new thread).", "default": "reject" @@ -3620,12 +3550,16 @@ "type": "integer", "title": "After Seconds", "description": "The number of seconds to wait before starting the run. Use to schedule future runs." + }, + "checkpoint_during": { + "type": "boolean", + "title": "Checkpoint During", + "description": "Whether to checkpoint during the run.", + "default": false } }, "type": "object", - "required": [ - "assistant_id" - ], + "required": ["assistant_id"], "title": "RunCreateStateful", "description": "Payload for creating a run." }, @@ -3729,9 +3663,7 @@ "anyOf": [ { "type": "string", - "enum": [ - "*" - ] + "enum": ["*"] }, { "items": { @@ -3747,9 +3679,7 @@ "anyOf": [ { "type": "string", - "enum": [ - "*" - ] + "enum": ["*"] }, { "items": { @@ -3793,9 +3723,7 @@ ], "title": "Stream Mode", "description": "The stream mode(s) to use.", - "default": [ - "values" - ] + "default": ["values"] }, "feedback_keys": { "items": { @@ -3813,20 +3741,14 @@ }, "on_completion": { "type": "string", - "enum": [ - "delete", - "keep" - ], + "enum": ["delete", "keep"], "title": "On Completion", "description": "Whether to delete or keep the thread created for a stateless run. Must be one of 'delete' or 'keep'.", "default": "delete" }, "on_disconnect": { "type": "string", - "enum": [ - "cancel", - "continue" - ], + "enum": ["cancel", "continue"], "title": "On Disconnect", "description": "The disconnect mode to use. Must be one of 'cancel' or 'continue'.", "default": "cancel" @@ -3835,12 +3757,16 @@ "type": "integer", "title": "After Seconds", "description": "The number of seconds to wait before starting the run. Use to schedule future runs." + }, + "checkpoint_during": { + "type": "boolean", + "title": "Checkpoint During", + "description": "Whether to checkpoint during the run.", + "default": false } }, "type": "object", - "required": [ - "assistant_id" - ], + "required": ["assistant_id"], "title": "RunCreateStateless", "description": "Payload for creating a run." }, @@ -3870,6 +3796,24 @@ "description": "The number of results to skip.", "default": 0, "minimum": 0 + }, + "sort_by": { + "type": "string", + "enum": [ + "assistant_id", + "created_at", + "updated_at", + "name", + "graph_id" + ], + "title": "Sort By", + "description": "The field to sort by." + }, + "sort_order": { + "type": "string", + "enum": ["asc", "desc"], + "title": "Sort Order", + "description": "The order to sort by." } }, "type": "object", @@ -3917,12 +3861,7 @@ }, "status": { "type": "string", - "enum": [ - "idle", - "busy", - "interrupted", - "error" - ], + "enum": ["idle", "busy", "interrupted", "error"], "title": "Status", "description": "Thread status to filter on." }, @@ -3940,6 +3879,18 @@ "description": "Offset to start from.", "default": 0, "minimum": 0 + }, + "sort_by": { + "type": "string", + "enum": ["thread_id", "status", "created_at", "updated_at"], + "title": "Sort By", + "description": "Sort by field." + }, + "sort_order": { + "type": "string", + "enum": ["asc", "desc"], + "title": "Sort Order", + "description": "Sort order." } }, "type": "object", @@ -3973,12 +3924,7 @@ }, "status": { "type": "string", - "enum": [ - "idle", - "busy", - "interrupted", - "error" - ], + "enum": ["idle", "busy", "interrupted", "error"], "title": "Status", "description": "The status of the thread." }, @@ -4013,10 +3959,7 @@ }, "if_exists": { "type": "string", - "enum": [ - "raise", - "do_nothing" - ], + "enum": ["raise", "do_nothing"], "title": "If Exists", "description": "How to handle duplicate creation. Must be either 'raise' (raise error if duplicate), or 'do_nothing' (return existing thread).", "default": "raise" @@ -4045,7 +3988,9 @@ "properties": { "updates": { "type": "array", - "items": { "$ref": "#/components/schemas/ThreadSuperstepUpdate" } + "items": { + "$ref": "#/components/schemas/ThreadSuperstepUpdate" + } } }, "required": ["updates"] @@ -4081,9 +4026,7 @@ "description": "Include subgraph states." } }, - "required": [ - "checkpoint" - ], + "required": ["checkpoint"], "type": "object", "title": "ThreadStateCheckpointRequest", "description": "Payload for getting the state of a thread at a checkpoint." @@ -4139,10 +4082,7 @@ "$ref": "#/components/schemas/ThreadState" } }, - "required": [ - "id", - "name" - ] + "required": ["id", "name"] }, "type": "array", "title": "Tasks" @@ -4165,13 +4105,7 @@ } }, "type": "object", - "required": [ - "values", - "next", - "checkpoint", - "metadata", - "created_at" - ], + "required": ["values", "next", "checkpoint", "metadata", "created_at"], "title": "ThreadState" }, "ThreadStateSearch": { @@ -4311,11 +4245,7 @@ }, "StorePutRequest": { "type": "object", - "required": [ - "namespace", - "key", - "value" - ], + "required": ["namespace", "key", "value"], "properties": { "namespace": { "type": "array", @@ -4341,9 +4271,7 @@ }, "StoreDeleteRequest": { "type": "object", - "required": [ - "key" - ], + "required": ["key"], "properties": { "namespace": { "type": "array", @@ -4366,10 +4294,7 @@ "type": "object", "properties": { "namespace_prefix": { - "type": [ - "array", - "null" - ], + "type": ["array", "null"], "items": { "type": "string" }, @@ -4377,10 +4302,7 @@ "description": "List of strings representing the namespace prefix." }, "filter": { - "type": [ - "object", - "null" - ], + "type": ["object", "null"], "additionalProperties": true, "title": "Filter", "description": "Optional dictionary of key-value pairs to filter results." @@ -4441,13 +4363,7 @@ }, "Item": { "type": "object", - "required": [ - "namespace", - "key", - "value", - "created_at", - "updated_at" - ], + "required": ["namespace", "key", "value", "created_at", "updated_at"], "properties": { "namespace": { "type": "array", @@ -4515,9 +4431,7 @@ }, "SearchItemsResponse": { "type": "object", - "required": [ - "items" - ], + "required": ["items"], "properties": { "items": { "type": "array",