{"openapi":"3.1.0","info":{"title":"Sandy Bot Agent API","description":"Natural language to SQL conversion bot with streaming responses","version":"1.0.0"},"paths":{"/insights/v2/threads":{"post":{"tags":["insights"],"summary":"Create a new v2 conversation thread","operationId":"create_thread_insights_v2_threads_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateThreadResponse"}}}}}},"get":{"tags":["insights"],"summary":"List recent v2 threads","operationId":"list_threads_insights_v2_threads_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":10,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Offset"}},{"name":"archived","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Archived"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListThreadsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/insights/v2/threads/{thread_id}/stream":{"post":{"tags":["insights"],"summary":"Stream a v2 conversation turn","operationId":"stream_turn_insights_v2_threads__thread_id__stream_post","parameters":[{"name":"thread_id","in":"path","required":true,"schema":{"type":"string","title":"Thread Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StreamRequest"}}}},"responses":{"200":{"description":"SSE frames: `event: <name>` plus optional `data: <json>`. The `end` event has no data payload.","content":{"text/event-stream":{"itemSchema":{"type":"object","properties":{"data":{"type":"string"},"event":{"type":"string"},"id":{"type":"string"},"retry":{"type":"integer","minimum":0}}},"schema":{"$ref":"#/components/schemas/InsightsSseStoredPayload"},"description":"SSE frames: `event: <name>` plus optional `data: <json>`. The `end` event has no data payload."}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["insights"],"summary":"Reattach to a running v2 stream (SSE resume via Last-Event-ID)","operationId":"reattach_stream_insights_v2_threads__thread_id__stream_get","parameters":[{"name":"thread_id","in":"path","required":true,"schema":{"type":"string","title":"Thread Id"}},{"name":"Last-Event-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last-Event-Id"}}],"responses":{"200":{"description":"SSE frames: `event: <name>` plus optional `data: <json>`. The `end` event has no data payload.","content":{"text/event-stream":{"itemSchema":{"type":"object","properties":{"data":{"type":"string"},"event":{"type":"string"},"id":{"type":"string"},"retry":{"type":"integer","minimum":0}}},"schema":{"$ref":"#/components/schemas/InsightsSseStoredPayload"},"description":"SSE frames: `event: <name>` plus optional `data: <json>`. The `end` event has no data payload."}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/insights/v2/threads/{thread_id}/resume":{"post":{"tags":["insights"],"summary":"Resume a paused HITL graph","operationId":"resume_thread_insights_v2_threads__thread_id__resume_post","parameters":[{"name":"thread_id","in":"path","required":true,"schema":{"type":"string","title":"Thread Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResumeThreadRequest"}}}},"responses":{"200":{"description":"SSE frames: `event: <name>` plus optional `data: <json>`. The `end` event has no data payload.","content":{"text/event-stream":{"itemSchema":{"type":"object","properties":{"data":{"type":"string"},"event":{"type":"string"},"id":{"type":"string"},"retry":{"type":"integer","minimum":0}}},"schema":{"$ref":"#/components/schemas/InsightsSseStoredPayload"},"description":"SSE frames: `event: <name>` plus optional `data: <json>`. The `end` event has no data payload."}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/insights/v2/threads/{thread_id}/cancel":{"post":{"tags":["insights"],"summary":"Cancel an active run","operationId":"cancel_thread_insights_v2_threads__thread_id__cancel_post","parameters":[{"name":"thread_id","in":"path","required":true,"schema":{"type":"string","title":"Thread Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CancelThreadRunRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CancelThreadResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/insights/v2/threads/{thread_id}/history":{"get":{"tags":["insights"],"summary":"Get v2 conversation history","operationId":"get_history_insights_v2_threads__thread_id__history_get","parameters":[{"name":"thread_id","in":"path","required":true,"schema":{"type":"string","title":"Thread Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HistoryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/insights/v2/threads/{thread_id}":{"patch":{"tags":["insights"],"summary":"Update v2 thread metadata (title and/or archive state)","operationId":"patch_thread_insights_v2_threads__thread_id__patch","parameters":[{"name":"thread_id","in":"path","required":true,"schema":{"type":"string","title":"Thread Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchThreadRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchThreadResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["insights"],"summary":"Permanently delete a v2 conversation thread","operationId":"delete_thread_insights_v2_threads__thread_id__delete","parameters":[{"name":"thread_id","in":"path","required":true,"schema":{"type":"string","title":"Thread Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AckResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/insights/v2/threads/{thread_id}/fork":{"post":{"tags":["insights"],"summary":"Fork a thread at a message","operationId":"fork_thread_endpoint_insights_v2_threads__thread_id__fork_post","parameters":[{"name":"thread_id","in":"path","required":true,"schema":{"type":"string","title":"Thread Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForkThreadRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ThreadIdResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/insights/v2/feedback":{"post":{"tags":["insights"],"summary":"Submit thumbs-down feedback","operationId":"submit_feedback_insights_v2_feedback_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeedbackRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AckResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/insights/v2/feedback/stats":{"get":{"tags":["insights"],"summary":"Feedback usage stats","operationId":"feedback_stats_insights_v2_feedback_stats_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeedbackStatsResponse"}}}}}}},"/insights/v2/report-issue":{"post":{"tags":["insights"],"summary":"Report an issue with an AI message","operationId":"report_issue_insights_v2_report_issue_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportIssueRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AckResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/insights/v2/report-issues":{"get":{"tags":["insights"],"summary":"List submitted issue reports","operationId":"list_issue_reports_insights_v2_report_issues_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IssueReportListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/.well-known/oauth-protected-resource/mcp":{"get":{"summary":"Mcp Protected Resource Metadata","operationId":"mcp_protected_resource_metadata__well_known_oauth_protected_resource_mcp_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Mcp Protected Resource Metadata  Well Known Oauth Protected Resource Mcp Get"}}}}}}},"/.well-known/oauth-authorization-server/mcp":{"get":{"summary":"Mcp Authorization Server Metadata","operationId":"mcp_authorization_server_metadata__well_known_oauth_authorization_server_mcp_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Mcp Authorization Server Metadata  Well Known Oauth Authorization Server Mcp Get"}}}}}}},"/health":{"get":{"summary":"Health Check","description":"Health check endpoint.","operationId":"health_check_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthResponse"}}}}}}},"/":{"get":{"summary":"Root","description":"Root endpoint with API information.","operationId":"root__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RootInfoResponse"}}}}}}}},"components":{"schemas":{"AckResponse":{"properties":{"status":{"$ref":"#/components/schemas/AckStatus","default":"received"},"reportId":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Reportid"}},"type":"object","title":"AckResponse"},"AckStatus":{"type":"string","enum":["received"],"title":"AckStatus"},"CancelThreadResponse":{"properties":{"threadId":{"type":"string","title":"Threadid"},"runId":{"type":"string","format":"uuid","title":"Runid"},"cancelled":{"type":"boolean","title":"Cancelled"},"localCancelled":{"type":"boolean","title":"Localcancelled"}},"type":"object","required":["threadId","runId","cancelled","localCancelled"],"title":"CancelThreadResponse"},"CancelThreadRunRequest":{"properties":{"runId":{"type":"string","format":"uuid","title":"Runid"}},"type":"object","required":["runId"],"title":"CancelThreadRunRequest"},"CitationSourceDict":{"properties":{"index":{"type":"integer","title":"Index"},"title":{"type":"string","title":"Title"},"url":{"type":"string","title":"Url"},"domain":{"type":"string","title":"Domain"},"snippet":{"type":"string","title":"Snippet"}},"additionalProperties":false,"type":"object","required":["index","title","url","domain","snippet"],"title":"CitationSourceDict"},"CreateThreadResponse":{"properties":{"threadId":{"type":"string","title":"Threadid"},"createdAt":{"type":"string","format":"date-time","title":"Createdat"}},"type":"object","required":["threadId","createdAt"],"title":"CreateThreadResponse"},"FeedbackRequest":{"properties":{"threadId":{"type":"string","title":"Threadid"},"prompt":{"type":"string","title":"Prompt"}},"type":"object","required":["threadId","prompt"],"title":"FeedbackRequest"},"FeedbackStatsResponse":{"properties":{"uniqueUsers":{"type":"integer","title":"Uniqueusers"},"uniqueThreads":{"type":"integer","title":"Uniquethreads"},"anonymousFeedbackCount":{"type":"integer","title":"Anonymousfeedbackcount"},"latestFeedbackAt":{"type":"string","format":"date-time","title":"Latestfeedbackat"},"activeUsers7D":{"type":"integer","title":"Activeusers7D"},"activeUsers30D":{"type":"integer","title":"Activeusers30D"},"users":{"items":{"$ref":"#/components/schemas/FeedbackUserUsageResponse"},"type":"array","title":"Users"}},"type":"object","required":["uniqueUsers","uniqueThreads","anonymousFeedbackCount","activeUsers7D","activeUsers30D","users"],"title":"FeedbackStatsResponse"},"FeedbackUserUsageResponse":{"properties":{"authServiceUuid":{"type":"string","format":"uuid","title":"Authserviceuuid"},"threadCount":{"type":"integer","title":"Threadcount"},"firstUsedAt":{"type":"string","format":"date-time","title":"Firstusedat"},"lastUsedAt":{"type":"string","format":"date-time","title":"Lastusedat"}},"type":"object","required":["authServiceUuid","threadCount","firstUsedAt","lastUsedAt"],"title":"FeedbackUserUsageResponse"},"ForkThreadRequest":{"properties":{"messageId":{"type":"string","title":"Messageid"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"maxLength":255,"title":"Title"}},"type":"object","required":["messageId"],"title":"ForkThreadRequest"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"HealthResponse":{"properties":{"status":{"type":"string","title":"Status"},"service":{"type":"string","title":"Service"}},"type":"object","required":["status","service"],"title":"HealthResponse"},"HistoryResponse":{"properties":{"threadId":{"type":"string","title":"Threadid"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"messages":{"items":{"$ref":"#/components/schemas/InsightsWireMessage"},"type":"array","title":"Messages"},"isIncomplete":{"type":"boolean","title":"Isincomplete"},"runStatus":{"$ref":"#/components/schemas/HistoryStatus"},"latestRunId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Latestrunid"},"pendingHumanQuestions":{"items":{"$ref":"#/components/schemas/HumanQuestionWirePayload"},"type":"array","title":"Pendinghumanquestions"},"ownerAuthServiceUuid":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Ownerauthserviceuuid"},"isReadOnly":{"type":"boolean","title":"Isreadonly","default":false},"isArchived":{"type":"boolean","title":"Isarchived","default":false},"forkedFromThreadId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Forkedfromthreadid"},"forkParentTitle":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Forkparenttitle"}},"type":"object","required":["threadId","messages","isIncomplete","runStatus"],"title":"HistoryResponse"},"HistoryStatus":{"type":"string","enum":["waiting_for_human","running","cancelled","failed","complete","interrupted"],"title":"HistoryStatus"},"HumanAnswerResponse":{"properties":{"selectedIndex":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Selectedindex"},"text":{"type":"string","title":"Text","default":""}},"additionalProperties":false,"type":"object","title":"HumanAnswerResponse","description":"One user's answer to a single ``HumanQuestionRequest`` (index and/or free text)."},"HumanQuestionWirePayload":{"properties":{"question":{"title":"Question","type":"string"},"context":{"default":"","title":"Context","type":"string"},"agentName":{"title":"Agentname","type":"string"},"presentation":{"title":"Presentation","type":"string"},"options":{"items":{"type":"string"},"title":"Options","type":"array"},"allowCustomResponse":{"default":true,"title":"Allowcustomresponse","type":"boolean"}},"required":["question","agentName","presentation"],"type":"object"},"InsightsMessageMetadata":{"properties":{"langgraphNode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Langgraphnode"},"langgraphStep":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Langgraphstep"},"timestamp":{"type":"string","format":"date-time","title":"Timestamp"},"createdAt":{"type":"string","format":"date-time","title":"Createdat"},"eventTimestamp":{"type":"string","format":"date-time","title":"Eventtimestamp"},"insightsOrigin":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Insightsorigin"},"transcriptError":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Transcripterror"},"hitlQuestion":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Hitlquestion"},"hitlContext":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Hitlcontext"},"citationSources":{"anyOf":[{"items":{"$ref":"#/components/schemas/CitationSourceDict"},"type":"array"},{"type":"null"}],"title":"Citationsources"}},"additionalProperties":false,"type":"object","title":"InsightsMessageMetadata","description":"Wire subset of ``MessageMetadataFields`` (rejects unknown keys on history/SSE)."},"InsightsWireMessage":{"additionalProperties":true,"properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Id"},"type":{"enum":["human","ai","aichunk","data","surface","humanchunk","systemchunk"],"title":"Type","type":"string"},"content":{"title":"Content","type":"string"},"sqlQuery":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Sqlquery"},"relatedMessageId":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Relatedmessageid"},"metadata":{"anyOf":[{"$ref":"#/components/schemas/InsightsMessageMetadata"},{"type":"null"}],"default":null}},"required":["type","content"],"type":"object"},"IssueReportListResponse":{"properties":{"reports":{"items":{"$ref":"#/components/schemas/IssueReportRecord"},"type":"array","title":"Reports"}},"type":"object","required":["reports"],"title":"IssueReportListResponse"},"IssueReportRecord":{"properties":{"id":{"type":"integer","title":"Id"},"threadId":{"type":"string","title":"Threadid"},"messageId":{"type":"string","title":"Messageid"},"authServiceUuid":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Authserviceuuid"},"issueType":{"$ref":"#/components/schemas/IssueType"},"description":{"type":"string","title":"Description"},"createdAt":{"type":"string","format":"date-time","title":"Createdat"}},"type":"object","required":["id","threadId","messageId","authServiceUuid","issueType","description","createdAt"],"title":"IssueReportRecord"},"IssueType":{"type":"string","enum":["incorrect-response","incomplete-response","incorrect-sql","performance-issue","other"],"title":"IssueType"},"ListThreadsResponse":{"properties":{"threads":{"items":{"$ref":"#/components/schemas/ThreadListItem"},"type":"array","title":"Threads"},"offset":{"type":"integer","title":"Offset"},"limit":{"type":"integer","title":"Limit"},"hasMore":{"type":"boolean","title":"Hasmore"}},"type":"object","required":["threads","offset","limit","hasMore"],"title":"ListThreadsResponse"},"PatchThreadRequest":{"properties":{"title":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Title"},"archived":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Archived"}},"type":"object","title":"PatchThreadRequest"},"PatchThreadResponse":{"properties":{"threadId":{"type":"string","title":"Threadid"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"isArchived":{"type":"boolean","title":"Isarchived","default":false}},"type":"object","required":["threadId"],"title":"PatchThreadResponse"},"ReportIssueRequest":{"properties":{"threadId":{"type":"string","title":"Threadid"},"messageId":{"type":"string","title":"Messageid"},"issueType":{"$ref":"#/components/schemas/IssueType"},"description":{"type":"string","maxLength":2000,"title":"Description"}},"type":"object","required":["threadId","messageId","issueType","description"],"title":"ReportIssueRequest"},"ResumeThreadRequest":{"properties":{"responses":{"items":{"$ref":"#/components/schemas/HumanAnswerResponse"},"type":"array","minItems":1,"title":"Responses"},"webSearchEnabled":{"type":"boolean","title":"Websearchenabled","default":false},"hitlEnabled":{"type":"boolean","title":"Hitlenabled","default":true},"maxResearchLoops":{"type":"integer","title":"Maxresearchloops","default":6}},"type":"object","required":["responses"],"title":"ResumeThreadRequest"},"RootInfoResponse":{"properties":{"name":{"type":"string","title":"Name"},"version":{"type":"string","title":"Version"},"description":{"type":"string","title":"Description"},"endpoints":{"additionalProperties":{"type":"string"},"type":"object","title":"Endpoints"}},"type":"object","required":["name","version","description","endpoints"],"title":"RootInfoResponse"},"StreamRequest":{"properties":{"text":{"type":"string","title":"Text"},"recursionLimit":{"type":"integer","title":"Recursionlimit","default":400},"webSearchEnabled":{"type":"boolean","title":"Websearchenabled","default":false},"hitlEnabled":{"type":"boolean","title":"Hitlenabled","default":true},"maxResearchLoops":{"type":"integer","title":"Maxresearchloops","default":6}},"type":"object","required":["text"],"title":"StreamRequest"},"ThreadExtraData":{"properties":{"forkedFromThreadId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Forkedfromthreadid"},"forkedFromMessageId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Forkedfrommessageid"}},"type":"object","title":"ThreadExtraData"},"ThreadIdResponse":{"properties":{"threadId":{"type":"string","title":"Threadid"}},"type":"object","required":["threadId"],"title":"ThreadIdResponse"},"ThreadListItem":{"properties":{"threadId":{"type":"string","title":"Threadid"},"createdAt":{"type":"string","format":"date-time","title":"Createdat"},"updatedAt":{"type":"string","format":"date-time","title":"Updatedat"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"isArchived":{"type":"boolean","title":"Isarchived","default":false},"extraData":{"anyOf":[{"$ref":"#/components/schemas/ThreadExtraData"},{"type":"null"}]},"forkParentTitle":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Forkparenttitle"}},"type":"object","required":["threadId","createdAt","updatedAt"],"title":"ThreadListItem"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"SseRunStartedData":{"properties":{"threadId":{"title":"Threadid","type":"string"},"runId":{"title":"Runid","type":"string"}},"required":["threadId","runId"],"type":"object"},"SseErrorData":{"properties":{"message":{"title":"Message","type":"string"}},"required":["message"],"type":"object"},"RagUserQueryArguments":{"description":"RAG collection tools (``get_relevant_tables``, ``get_business_info``, etc.).","properties":{"userQuery":{"title":"Userquery","type":"string"}},"required":["userQuery"],"title":"RagUserQueryArguments","type":"object"},"SqlRunArguments":{"properties":{"sql":{"title":"Sql","type":"string"}},"required":["sql"],"title":"SqlRunArguments","type":"object"},"TableNameArguments":{"description":"Table-scoped RAG tools (``get_relevant_columns``, ``get_table_rules``).","properties":{"tableName":{"title":"Tablename","type":"string"}},"required":["tableName"],"title":"TableNameArguments","type":"object"},"ToolDisplayTextArguments":{"properties":{"kind":{"const":"text","title":"Kind","type":"string"},"text":{"title":"Text","type":"string"}},"required":["kind","text"],"title":"ToolDisplayTextArguments","type":"object"},"ToolPassthroughArguments":{"additionalProperties":true,"description":"Arbitrary tool kwargs when no dedicated wire schema exists (e.g. EDGAR tools).","properties":{},"title":"ToolPassthroughArguments","type":"object"},"ToolSseEmptyOutput":{"properties":{"kind":{"const":"empty","title":"Kind","type":"string"}},"required":["kind"],"title":"ToolSseEmptyOutput","type":"object"},"ToolSseErrorOutput":{"properties":{"kind":{"const":"error","title":"Kind","type":"string"},"message":{"title":"Message","type":"string"}},"required":["kind","message"],"title":"ToolSseErrorOutput","type":"object"},"ToolSseJsonOutput":{"properties":{"kind":{"const":"json","title":"Kind","type":"string"},"value":{"anyOf":[{"additionalProperties":true,"type":"object"},{"items":{},"type":"array"},{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"type":"null"}],"title":"Value"}},"required":["kind","value"],"title":"ToolSseJsonOutput","type":"object"},"ToolSseTextOutput":{"properties":{"kind":{"const":"text","title":"Kind","type":"string"},"text":{"title":"Text","type":"string"}},"required":["kind","text"],"title":"ToolSseTextOutput","type":"object"},"WebSearchArguments":{"description":"``web_search`` subgraph tool.","properties":{"query":{"title":"Query","type":"string"}},"required":["query"],"title":"WebSearchArguments","type":"object"},"SseToolTrackerData":{"additionalProperties":true,"properties":{"id":{"title":"Id","type":"string"},"tool":{"title":"Tool","type":"string"},"label":{"title":"Label","type":"string"},"agent":{"title":"Agent","type":"string"},"sequence":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Sequence"},"parentRunId":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Parentrunid"},"logicalStepKey":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Logicalstepkey"},"langgraphNode":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Langgraphnode"},"arguments":{"anyOf":[{"$ref":"#/components/schemas/SqlRunArguments"},{"$ref":"#/components/schemas/RagUserQueryArguments"},{"$ref":"#/components/schemas/TableNameArguments"},{"$ref":"#/components/schemas/WebSearchArguments"},{"$ref":"#/components/schemas/ToolDisplayTextArguments"},{"$ref":"#/components/schemas/ToolPassthroughArguments"},{"type":"null"}],"default":null,"title":"Arguments"},"durationMs":{"anyOf":[{"type":"number"},{"type":"null"}],"default":null,"title":"Durationms"},"failed":{"default":false,"title":"Failed","type":"boolean"},"output":{"anyOf":[{"discriminator":{"mapping":{"empty":"#/components/schemas/ToolSseEmptyOutput","error":"#/components/schemas/ToolSseErrorOutput","json":"#/components/schemas/ToolSseJsonOutput","text":"#/components/schemas/ToolSseTextOutput"},"propertyName":"kind"},"oneOf":[{"$ref":"#/components/schemas/ToolSseEmptyOutput"},{"$ref":"#/components/schemas/ToolSseTextOutput"},{"$ref":"#/components/schemas/ToolSseJsonOutput"},{"$ref":"#/components/schemas/ToolSseErrorOutput"}]},{"type":"null"}],"default":null,"title":"Output"}},"required":["id","tool","label","agent"],"type":"object"},"LlmBatchMessage":{"additionalProperties":true,"properties":{"parts":{"items":{"discriminator":{"mapping":{"block":"#/components/schemas/LlmBlockPart","text":"#/components/schemas/LlmTextPart"},"propertyName":"kind"},"oneOf":[{"$ref":"#/components/schemas/LlmTextPart"},{"$ref":"#/components/schemas/LlmBlockPart"}]},"title":"Parts","type":"array"}},"title":"LlmBatchMessage","type":"object"},"LlmBlockPart":{"description":"Non-text LangChain content block (e.g. tool_use) in LLM input display.","properties":{"kind":{"const":"block","default":"block","title":"Kind","type":"string"},"type":{"title":"Type","type":"string"},"data":{"title":"Data"}},"required":["type","data"],"title":"LlmBlockPart","type":"object"},"LlmInputBatch":{"additionalProperties":true,"properties":{"messages":{"items":{"$ref":"#/components/schemas/LlmBatchMessage"},"title":"Messages","type":"array"}},"title":"LlmInputBatch","type":"object"},"LlmInputBatchesDisplay":{"description":"Structured chat-model input from ``build_chat_model_input_display``.","properties":{"batches":{"items":{"$ref":"#/components/schemas/LlmInputBatch"},"title":"Batches","type":"array"}},"title":"LlmInputBatchesDisplay","type":"object"},"LlmOutputBlockWire":{"additionalProperties":true,"description":"Non-text assistant content block on ``llm_end`` output display.","properties":{"type":{"title":"Type","type":"string"},"data":{"default":null,"title":"Data"}},"required":["type"],"title":"LlmOutputBlockWire","type":"object"},"LlmOutputStructuredDisplay":{"additionalProperties":true,"description":"Structured assistant output from ``build_llm_output_display``.","properties":{"prose":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Prose"},"toolCalls":{"items":{"$ref":"#/components/schemas/LlmOutputToolCallWire"},"title":"Toolcalls","type":"array"},"blocks":{"items":{"$ref":"#/components/schemas/LlmOutputBlockWire"},"title":"Blocks","type":"array"}},"title":"LlmOutputStructuredDisplay","type":"object"},"LlmOutputToolCallWire":{"additionalProperties":true,"description":"Normalized LangChain tool call on ``llm_end`` output display (not ``ToolCallRecord``).","properties":{"name":{"title":"Name","type":"string"},"id":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Id"},"arguments":{"default":null,"title":"Arguments"}},"required":["name"],"title":"LlmOutputToolCallWire","type":"object"},"LlmTextPart":{"description":"Plain-text segment in a batched LLM input message.","properties":{"kind":{"const":"text","default":"text","title":"Kind","type":"string"},"text":{"title":"Text","type":"string"}},"required":["text"],"title":"LlmTextPart","type":"object"},"SseLlmTrackerData":{"additionalProperties":true,"properties":{"id":{"title":"Id","type":"string"},"model":{"title":"Model","type":"string"},"label":{"title":"Label","type":"string"},"agent":{"title":"Agent","type":"string"},"sequence":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Sequence"},"parentRunId":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Parentrunid"},"logicalStepKey":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Logicalstepkey"},"langgraphNode":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Langgraphnode"},"durationMs":{"anyOf":[{"type":"number"},{"type":"null"}],"default":null,"title":"Durationms"},"inputTokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Inputtokens"},"outputTokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Outputtokens"},"cacheReadTokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Cachereadtokens"},"cacheCreationTokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Cachecreationtokens"},"failed":{"default":false,"title":"Failed","type":"boolean"},"input":{"anyOf":[{"$ref":"#/components/schemas/LlmInputBatchesDisplay"},{"$ref":"#/components/schemas/LlmOutputStructuredDisplay"},{"$ref":"#/components/schemas/ToolDisplayTextArguments"},{"$ref":"#/components/schemas/ToolSseTextOutput"},{"$ref":"#/components/schemas/ToolSseErrorOutput"},{"type":"string"},{"type":"null"}],"default":null,"title":"Input"},"output":{"anyOf":[{"$ref":"#/components/schemas/LlmInputBatchesDisplay"},{"$ref":"#/components/schemas/LlmOutputStructuredDisplay"},{"$ref":"#/components/schemas/ToolDisplayTextArguments"},{"$ref":"#/components/schemas/ToolSseTextOutput"},{"$ref":"#/components/schemas/ToolSseErrorOutput"},{"type":"string"},{"type":"null"}],"default":null,"title":"Output"}},"required":["id","model","label","agent"],"type":"object"},"HumanQuestionBatchWirePayload":{"additionalProperties":false,"properties":{"requests":{"items":{"$ref":"#/components/schemas/HumanQuestionWirePayload"},"minItems":1,"title":"Requests","type":"array"}},"required":["requests"],"type":"object"},"InsightsSseStoredEnd":{"properties":{"event":{"const":"end","default":"end","title":"Event","type":"string"}},"title":"InsightsSseStoredEnd","type":"object"},"InsightsSseStoredError":{"properties":{"event":{"const":"error","default":"error","title":"Event","type":"string"},"data":{"$ref":"#/components/schemas/SseErrorData"}},"required":["data"],"title":"InsightsSseStoredError","type":"object"},"InsightsSseStoredHumanQuestionRequired":{"properties":{"event":{"const":"human_question_required","default":"human_question_required","title":"Event","type":"string"},"data":{"$ref":"#/components/schemas/HumanQuestionBatchWirePayload"}},"required":["data"],"title":"InsightsSseStoredHumanQuestionRequired","type":"object"},"InsightsSseStoredLlmEnd":{"properties":{"event":{"const":"llm_end","default":"llm_end","title":"Event","type":"string"},"data":{"$ref":"#/components/schemas/SseLlmTrackerData"}},"required":["data"],"title":"InsightsSseStoredLlmEnd","type":"object"},"InsightsSseStoredLlmStart":{"properties":{"event":{"const":"llm_start","default":"llm_start","title":"Event","type":"string"},"data":{"$ref":"#/components/schemas/SseLlmTrackerData"}},"required":["data"],"title":"InsightsSseStoredLlmStart","type":"object"},"InsightsSseStoredMessage":{"properties":{"event":{"const":"message","default":"message","title":"Event","type":"string"},"data":{"$ref":"#/components/schemas/InsightsWireMessage"}},"required":["data"],"title":"InsightsSseStoredMessage","type":"object"},"InsightsSseStoredRunStarted":{"properties":{"event":{"const":"run_started","default":"run_started","title":"Event","type":"string"},"data":{"$ref":"#/components/schemas/SseRunStartedData"}},"required":["data"],"title":"InsightsSseStoredRunStarted","type":"object"},"InsightsSseStoredToolEnd":{"properties":{"event":{"const":"tool_end","default":"tool_end","title":"Event","type":"string"},"data":{"$ref":"#/components/schemas/SseToolTrackerData"}},"required":["data"],"title":"InsightsSseStoredToolEnd","type":"object"},"InsightsSseStoredToolStart":{"properties":{"event":{"const":"tool_start","default":"tool_start","title":"Event","type":"string"},"data":{"$ref":"#/components/schemas/SseToolTrackerData"}},"required":["data"],"title":"InsightsSseStoredToolStart","type":"object"},"InsightsSseStoredPayload":{"discriminator":{"mapping":{"end":"#/components/schemas/InsightsSseStoredEnd","error":"#/components/schemas/InsightsSseStoredError","human_question_required":"#/components/schemas/InsightsSseStoredHumanQuestionRequired","llm_end":"#/components/schemas/InsightsSseStoredLlmEnd","llm_start":"#/components/schemas/InsightsSseStoredLlmStart","message":"#/components/schemas/InsightsSseStoredMessage","run_started":"#/components/schemas/InsightsSseStoredRunStarted","tool_end":"#/components/schemas/InsightsSseStoredToolEnd","tool_start":"#/components/schemas/InsightsSseStoredToolStart"},"propertyName":"event"},"oneOf":[{"$ref":"#/components/schemas/InsightsSseStoredRunStarted"},{"$ref":"#/components/schemas/InsightsSseStoredMessage"},{"$ref":"#/components/schemas/InsightsSseStoredEnd"},{"$ref":"#/components/schemas/InsightsSseStoredError"},{"$ref":"#/components/schemas/InsightsSseStoredHumanQuestionRequired"},{"$ref":"#/components/schemas/InsightsSseStoredToolStart"},{"$ref":"#/components/schemas/InsightsSseStoredToolEnd"},{"$ref":"#/components/schemas/InsightsSseStoredLlmStart"},{"$ref":"#/components/schemas/InsightsSseStoredLlmEnd"}]}}}}