{"openapi":"3.1.0","info":{"title":"Multi-Agent AG-UI Server","description":"AG-UI server with 13 agents and 0 teams available (on-demand creation)","version":"2.0.0"},"paths":{"/agents":{"get":{"summary":"List Agents","description":"List all available agents and teams filtered by user visibility.\n\nTeams are returned as agents with entity_type='team'.","operationId":"list_agents_agents_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentListResponse"}}}}}}},"/agents/{agent_name}":{"get":{"summary":"Get Agent Details","description":"Get detailed information about a specific agent (checks visibility).","operationId":"get_agent_details_agents__agent_name__get","parameters":[{"name":"agent_name","in":"path","required":true,"schema":{"type":"string","title":"Agent Name"}},{"name":"tools","in":"query","required":false,"schema":{"type":"boolean","description":"Include tools field in the response","default":false,"title":"Tools"},"description":"Include tools field in the response"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentInfo"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agents/user_feedback":{"post":{"summary":"Evaluate Agent","operationId":"evaluate_agent_agents_user_feedback_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserFeedbackRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agents/issues":{"post":{"summary":"Report Agent Feedback","description":"Record a customer \"bad answer\" report as a Phabricator feedback task.\n\nSibling of ``/agents/user_feedback``; delegates to ``AgentFeedbackReporter``.","operationId":"report_agent_feedback_agents_issues_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentFeedbackRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentFeedbackResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/execute":{"post":{"summary":"Execute Endpoint","description":"Execute agent logic via HTTP (non-streaming).","operationId":"execute_endpoint_execute_post","parameters":[{"name":"agent","in":"query","required":true,"schema":{"type":"string","description":"Agent name to execute","title":"Agent"},"description":"Agent name to execute"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExecuteRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExecuteResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agui":{"post":{"summary":"Agui Endpoint","description":"AG-UI endpoint with support for both agents and teams.\n\nTeams are treated as special agents - use the same ?agent= parameter.","operationId":"agui_endpoint_agui_post","parameters":[{"name":"agent","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Agent or team name to use","title":"Agent"},"description":"Agent or team name to use"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunAgentInput"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/sessions/{session_id}/stop":{"post":{"summary":"Stop Session Stream","description":"Stop an active streaming session.","operationId":"stop_session_stream_sessions__session_id__stop_post","parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/sessions/{session_id}/widget-state":{"put":{"summary":"Set Widget State","description":"Set widget state for a session.","operationId":"set_widget_state_sessions__session_id__widget_state_put","parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id"}},{"name":"agent","in":"query","required":true,"schema":{"type":"string","description":"Agent name","title":"Agent"},"description":"Agent name"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WidgetStateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WidgetStateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/sessions/{session_id}/widget-state/{widget_id}":{"get":{"summary":"Get Widget State","description":"Get widget state for a session.","operationId":"get_widget_state_sessions__session_id__widget_state__widget_id__get","parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id"}},{"name":"widget_id","in":"path","required":true,"schema":{"type":"string","title":"Widget Id"}},{"name":"agent","in":"query","required":true,"schema":{"type":"string","description":"Agent name","title":"Agent"},"description":"Agent name"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WidgetStateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/":{"get":{"summary":"Root","operationId":"root__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/sessions":{"get":{"tags":["sessions"],"summary":"List Sessions","description":"List user's sessions.\n\nReturns session summaries sorted by updated_at descending.\nIncludes both agent and team sessions from unified storage.","operationId":"list_sessions_api_sessions_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"description":"Maximum sessions to return","default":50,"title":"Limit"},"description":"Maximum sessions to return"},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Number of sessions to skip","default":0,"title":"Offset"},"description":"Number of sessions to skip"},{"name":"session_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by session type: 'agent', 'team', or None for both","title":"Session Type"},"description":"Filter by session type: 'agent', 'team', or None for both"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/sessions/{session_id}":{"get":{"tags":["sessions"],"summary":"Get Session","description":"Get a session with all its messages.\n\nMessages are extracted from runs and flattened into a single list.\nEach message includes run_id and run_index for retry/edit operations.","operationId":"get_session_api_sessions__session_id__get","parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionData"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["sessions"],"summary":"Update Session","description":"Update session metadata.\n\nCan update:\n- title: Session display name\n- metadata: Additional key-value pairs (merged with existing)","operationId":"update_session_api_sessions__session_id__patch","parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateSessionRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionData"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["sessions"],"summary":"Delete Session","description":"Delete a session.\n\nThis permanently removes the session and all its messages.","operationId":"delete_session_api_sessions__session_id__delete","parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteSessionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/sessions/{session_id}/stats":{"get":{"tags":["sessions"],"summary":"Get Agui Sessions Stats","operationId":"get_agui_sessions_stats_api_sessions__session_id__stats_get","parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AGUISessionStatsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/events":{"get":{"tags":["events"],"summary":"Stream Events","operationId":"stream_events_api_events_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/oauth/device/complete":{"post":{"tags":["oauth"],"summary":"Complete Device Auth","description":"Complete device authorization with tokens.\n\nCalled by frontend after user completes OAuth in browser.\nStores encrypted tokens and emits OAUTH_COMPLETED event.\n\nRequires authentication to ensure only the user who initiated\nthe device flow can complete it.","operationId":"complete_device_auth_api_oauth_device_complete_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeviceCompleteRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeviceCompleteResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/oauth/device/deny":{"post":{"tags":["oauth"],"summary":"Deny Device Auth","description":"Deny device authorization.\n\nCalled by frontend when user denies OAuth authorization.\nEmits OAUTH_COMPLETED event with authorized=False.\n\nRequires authentication to ensure only the user who initiated\nthe device flow can deny it.","operationId":"deny_device_auth_api_oauth_device_deny_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeviceDenyRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeviceDenyResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/oauth/token/clear":{"post":{"tags":["oauth"],"summary":"Clear Tokens","description":"Clear cached OAuth tokens for the current user.\n\nCalled by CLI or frontend to clear all or specific server tokens.\nThis forces re-authorization on next access.","operationId":"clear_tokens_api_oauth_token_clear_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenClearRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenClearResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/health":{"get":{"summary":"Health Check","description":"Health check endpoint.","operationId":"health_check_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/info":{"get":{"summary":"Info","description":"Service info endpoint.","operationId":"info_info_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}}},"components":{"schemas":{"AGUISessionStatsResponse":{"properties":{"stats":{"additionalProperties":true,"type":"object","title":"Stats","description":"Session statistics"}},"type":"object","required":["stats"],"title":"AGUISessionStatsResponse","description":"Response for session statistics."},"ActionType":{"type":"string","enum":["llm_response","frontend_action","backend_action"],"title":"ActionType","description":"How a slash command is dispatched."},"ActivityMessage":{"properties":{"id":{"type":"string","title":"Id"},"role":{"type":"string","const":"activity","title":"Role","default":"activity"},"activityType":{"type":"string","title":"Activitytype"},"content":{"additionalProperties":true,"type":"object","title":"Content"}},"additionalProperties":true,"type":"object","required":["id","activityType","content"],"title":"ActivityMessage","description":"An activity progress message emitted between chat messages."},"AgentFeedbackRequest":{"properties":{"session_id":{"type":"string","maxLength":200,"minLength":1,"title":"Session Id"},"run_id":{"type":"string","maxLength":200,"minLength":1,"title":"Run Id"},"categories":{"items":{"type":"string"},"type":"array","maxItems":20,"title":"Categories"},"comment":{"type":"string","maxLength":5000,"title":"Comment","default":""},"handoff_message":{"type":"string","maxLength":5000,"title":"Handoff Message","default":""}},"type":"object","required":["session_id","run_id"],"title":"AgentFeedbackRequest","description":"Customer report that an agent's answer was unsatisfactory, or that the\ncustomer gave up on the agent and asked for a human.\n\n``run_id``, not a chat message id: it is the AG-UI ``RunStartedEvent.run_id``,\nwhich is also the Langfuse trace id for that run once its hyphens are stripped\n(see ``AgentFeedbackReporter``'s ``_trace_id``) — the same derivation\n``fastapi_servers/agui/app.py`` already uses for its own trace context. The\nserver records ``session_id``/``run_id`` as given and derives the trace link\ndirectly from ``run_id``, with no Langfuse lookup of any kind.\n\n``handoff_message`` set means this is a human-handoff report: the\ncustomer's opening message to the human agent, with ``categories``/\n``comment`` left unset. Left unset, this is an unsatisfactory-answer\nreport using ``categories``/``comment`` instead. The two shapes never mix."},"AgentFeedbackResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["success"],"title":"AgentFeedbackResponse","description":"Result of recording a customer feedback (creating the Phabricator task)."},"AgentInfo":{"properties":{"name":{"type":"string","title":"Name","description":"Agent or team name"},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name","description":"Display name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Description"},"entity_type":{"type":"string","title":"Entity Type","description":"Entity type: 'agent' or 'team'","default":"agent"},"team_members":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Team Members","description":"List of member agent/team names (only for teams)"},"backend":{"anyOf":[{"$ref":"#/components/schemas/BackendConfig"},{"type":"null"}],"description":"Backend configuration including tools and MCP servers"},"frontend":{"anyOf":[{"$ref":"#/components/schemas/FrontendConfigData"},{"type":"null"}],"description":"Frontend dependencies including tools and MCP servers"},"handoff":{"anyOf":[{"$ref":"#/components/schemas/HandOffConfig"},{"type":"null"}],"description":"Handoff configuration"},"generative_ui":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Generative Ui","description":"Whether this entity supports generative UI features"},"agent_type":{"type":"string","title":"Agent Type","description":"Source type: 'markdown' or 'python'","default":"python"},"icon":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Icon","description":"Icon identifier or URL"},"slash_commands":{"items":{"$ref":"#/components/schemas/SlashCommandInfo"},"type":"array","title":"Slash Commands","description":"List of slash commands supported by this entity with full metadata"},"group":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Group","description":"Group information including organization and team names"},"num_history_runs":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Num History Runs","description":"Number of historical runs to include in the messages"},"model_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model Id","description":"Model ID used"},"is_workmate":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Workmate","description":"Whether this agent is a workmate instance"}},"type":"object","required":["name"],"title":"AgentInfo","description":"Basic information about an agent or team."},"AgentListResponse":{"properties":{"agents":{"items":{"$ref":"#/components/schemas/AgentInfo"},"type":"array","title":"Agents","description":"List of available agents"},"total":{"type":"integer","title":"Total","description":"Total number of agents"}},"type":"object","required":["agents","total"],"title":"AgentListResponse","description":"Response for listing all available agents."},"AssistantMessage":{"properties":{"id":{"type":"string","title":"Id"},"role":{"type":"string","const":"assistant","title":"Role","default":"assistant"},"content":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"toolCalls":{"anyOf":[{"items":{"$ref":"#/components/schemas/ToolCall"},"type":"array"},{"type":"null"}],"title":"Toolcalls"}},"additionalProperties":true,"type":"object","required":["id"],"title":"AssistantMessage","description":"An assistant message."},"BackendConfig":{"properties":{"tools":{"items":{"$ref":"#/components/schemas/ToolConfig"},"type":"array","title":"Tools"},"mcp_tools":{"items":{"$ref":"#/components/schemas/MCPToolConfig"},"type":"array","title":"Mcp Tools"}},"type":"object","title":"BackendConfig","description":"Backend configuration for API responses.\n\nInherits full parsing/validation from core BackendConfig.\nOverrides serialization so tools appear as name strings in JSON."},"BinaryInputContent":{"properties":{"type":{"type":"string","const":"binary","title":"Type","default":"binary"},"mimeType":{"type":"string","title":"Mimetype"},"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"data":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Data"},"filename":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filename"}},"additionalProperties":true,"type":"object","required":["mimeType"],"title":"BinaryInputContent","description":"A binary payload reference in a multimodal user message."},"Context":{"properties":{"description":{"type":"string","title":"Description"},"value":{"type":"string","title":"Value"}},"additionalProperties":true,"type":"object","required":["description","value"],"title":"Context","description":"Additional context for the agent."},"DeleteSessionResponse":{"properties":{"success":{"type":"boolean","title":"Success","description":"Whether the deletion was successful"},"session_id":{"type":"string","title":"Session Id","description":"ID of the deleted session"}},"type":"object","required":["success","session_id"],"title":"DeleteSessionResponse","description":"Response for session deletion."},"DeveloperMessage":{"properties":{"id":{"type":"string","title":"Id"},"role":{"type":"string","const":"developer","title":"Role","default":"developer"},"content":{"type":"string","title":"Content"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},"additionalProperties":true,"type":"object","required":["id","content"],"title":"DeveloperMessage","description":"A developer message."},"DeviceCompleteRequest":{"properties":{"device_code":{"type":"string","title":"Device Code","description":"Device code from initial request"},"access_token":{"type":"string","title":"Access Token","description":"OAuth access token from provider"},"refresh_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Refresh Token","description":"OAuth refresh token from provider"},"expires_in":{"type":"integer","title":"Expires In","description":"Access token expiry in seconds"},"refresh_token_expires_in":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Refresh Token Expires In","description":"Refresh token expiry in seconds"},"scopes":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Scopes","description":"Scopes that were granted (may differ from requested)"}},"type":"object","required":["device_code","access_token","expires_in"],"title":"DeviceCompleteRequest","description":"Request from frontend to complete device flow with tokens."},"DeviceCompleteResponse":{"properties":{"status":{"type":"string","title":"Status","description":"Result: 'ok', 'invalid_code', 'expired'"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message","description":"Additional message"}},"type":"object","required":["status"],"title":"DeviceCompleteResponse","description":"Response after completing device flow."},"DeviceDenyRequest":{"properties":{"device_code":{"type":"string","title":"Device Code","description":"Device code to deny"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason","description":"Reason for denial"}},"type":"object","required":["device_code"],"title":"DeviceDenyRequest","description":"Request from frontend to deny device flow authorization."},"DeviceDenyResponse":{"properties":{"status":{"type":"string","title":"Status","description":"Result: 'ok', 'invalid_code', 'expired'"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message","description":"Additional message"}},"type":"object","required":["status"],"title":"DeviceDenyResponse","description":"Response after denying device flow."},"ExecuteRequest":{"properties":{"message":{"type":"string","title":"Message","description":"Message to send to the agent"},"user_memory":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Memory","description":"Optional user-specific information to inject into context"},"session_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session Id","description":"Optional session ID for maintaining conversation context"}},"type":"object","required":["message"],"title":"ExecuteRequest","description":"Request for executing agent logic via HTTP."},"ExecuteResponse":{"properties":{"success":{"type":"boolean","title":"Success","description":"Whether the execution was successful"},"result":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Result","description":"The agent's response data"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error","description":"Error message if execution failed"}},"type":"object","required":["success"],"title":"ExecuteResponse","description":"Response from executing agent logic."},"FrontendConfigData":{"properties":{"mcp_tools":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Mcp Tools","description":"Whether MCP tools set is enabled"},"tools":{"items":{"type":"string"},"type":"array","title":"Tools"},"mcp_servers":{"items":{"$ref":"#/components/schemas/FrontendMcpServerConfig"},"type":"array","title":"Mcp Servers"},"plugins":{"items":{"$ref":"#/components/schemas/PluginServerConfig"},"type":"array","title":"Plugins"}},"type":"object","title":"FrontendConfigData","description":"Frontend configuration for agents and skills."},"FrontendMcpServerConfig":{"properties":{"name":{"type":"string","title":"Name"},"server_id":{"type":"string","title":"Server Id"},"required":{"type":"boolean","title":"Required","default":true},"tools":{"items":{"type":"string"},"type":"array","title":"Tools"}},"type":"object","required":["name","server_id"],"title":"FrontendMcpServerConfig","description":"MCP server reference for the frontend."},"FunctionCall":{"properties":{"name":{"type":"string","title":"Name"},"arguments":{"type":"string","title":"Arguments"}},"additionalProperties":true,"type":"object","required":["name","arguments"],"title":"FunctionCall","description":"Name and arguments of a function call."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"HandOffConfig":{"properties":{"enabled":{"type":"boolean","title":"Enabled","description":"Whether handoff is enabled","default":false},"targets":{"items":{"type":"string"},"type":"array","title":"Targets","description":"List of handoff targets"}},"type":"object","title":"HandOffConfig"},"InputMode":{"type":"string","enum":["no_input","optional_input","required_input"],"title":"InputMode","description":"Whether the command accepts free-text input after the command itself."},"MCPToolConfig":{"properties":{"name":{"type":"string","title":"Name","default":"unnamed"},"transport":{"type":"string","title":"Transport","default":"stdio"},"command":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Command"},"args":{"items":{"type":"string"},"type":"array","title":"Args"},"env":{"additionalProperties":{"type":"string"},"type":"object","title":"Env"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"headers":{"additionalProperties":{"type":"string"},"type":"object","title":"Headers"},"timeout":{"type":"number","title":"Timeout","default":30.0},"sse_read_timeout":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Sse Read Timeout"},"terminate_on_close":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Terminate On Close"},"include_tools":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Include Tools"},"exclude_tools":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Exclude Tools"},"oauth_required":{"type":"boolean","title":"Oauth Required","default":false},"oauth_scopes":{"items":{"type":"string"},"type":"array","title":"Oauth Scopes"}},"type":"object","title":"MCPToolConfig","description":"Unified MCP tool/server configuration for backend."},"PluginServerConfig":{"properties":{"type":{"type":"string","title":"Type"},"name":{"type":"string","title":"Name"},"url":{"type":"string","title":"Url"},"timeout":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Timeout"},"headers":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Headers"},"include_tools":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Include Tools"},"exclude_tools":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Exclude Tools"}},"type":"object","required":["type","name","url"],"title":"PluginServerConfig","description":"Frontend plugin (MCP server providing UI components)."},"RunAgentInput":{"properties":{"threadId":{"type":"string","title":"Threadid"},"runId":{"type":"string","title":"Runid"},"parentRunId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parentrunid"},"state":{"title":"State"},"messages":{"items":{"oneOf":[{"$ref":"#/components/schemas/DeveloperMessage"},{"$ref":"#/components/schemas/SystemMessage"},{"$ref":"#/components/schemas/AssistantMessage"},{"$ref":"#/components/schemas/UserMessage"},{"$ref":"#/components/schemas/ToolMessage"},{"$ref":"#/components/schemas/ActivityMessage"}],"discriminator":{"propertyName":"role","mapping":{"activity":"#/components/schemas/ActivityMessage","assistant":"#/components/schemas/AssistantMessage","developer":"#/components/schemas/DeveloperMessage","system":"#/components/schemas/SystemMessage","tool":"#/components/schemas/ToolMessage","user":"#/components/schemas/UserMessage"}}},"type":"array","title":"Messages"},"tools":{"items":{"$ref":"#/components/schemas/Tool"},"type":"array","title":"Tools"},"context":{"items":{"$ref":"#/components/schemas/Context"},"type":"array","title":"Context"},"forwardedProps":{"title":"Forwardedprops"}},"additionalProperties":true,"type":"object","required":["threadId","runId","state","messages","tools","context","forwardedProps"],"title":"RunAgentInput","description":"Input for running an agent."},"RunMetadata":{"properties":{"feedback":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Feedback","description":"User feedback for the run"},"stream_error":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Stream Error","description":"Stream error for the run"}},"type":"object","title":"RunMetadata","description":"Metadata for a run."},"SessionData":{"properties":{"id":{"type":"string","title":"Id","description":"Session ID (= thread_id)"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title","description":"Session title/name"},"agent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Id","description":"Agent identifier"},"team_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Team Id","description":"Team identifier (for team sessions)"},"session_type":{"type":"string","title":"Session Type","description":"Session type: 'agent' or 'team'","default":"agent"},"messages":{"items":{"$ref":"#/components/schemas/SessionMessage"},"type":"array","title":"Messages","description":"All messages in the session"},"run_metadatas":{"additionalProperties":{"$ref":"#/components/schemas/RunMetadata"},"type":"object","title":"Run Metadatas","description":"Metadata for all runs in the session"},"created_at":{"type":"integer","title":"Created At","description":"Unix timestamp of session creation"},"updated_at":{"type":"integer","title":"Updated At","description":"Unix timestamp of last update"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata","description":"Additional session metadata"}},"type":"object","required":["id","created_at","updated_at"],"title":"SessionData","description":"Full session data including all messages."},"SessionListResponse":{"properties":{"sessions":{"items":{"$ref":"#/components/schemas/SessionSummary"},"type":"array","title":"Sessions","description":"List of session summaries"},"total":{"type":"integer","title":"Total","description":"Total number of sessions matching the query"},"limit":{"type":"integer","title":"Limit","description":"Requested limit"},"offset":{"type":"integer","title":"Offset","description":"Requested offset"}},"type":"object","required":["sessions","total","limit","offset"],"title":"SessionListResponse","description":"Response for listing sessions."},"SessionMessage":{"properties":{"id":{"type":"string","title":"Id","description":"Unique message ID"},"role":{"type":"string","title":"Role","description":"Message role: 'user', 'assistant', or 'tool'"},"content":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content","description":"Message content"},"tool_calls":{"anyOf":[{"items":{"$ref":"#/components/schemas/SessionToolCall"},"type":"array"},{"type":"null"}],"title":"Tool Calls","description":"Tool calls made in this message"},"tool_call_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tool Call Id","description":"Tool call ID if this is a tool result message"},"run_id":{"type":"string","title":"Run Id","description":"ID of the run this message belongs to"},"run_index":{"type":"integer","title":"Run Index","description":"Index of the run in the session"},"created_at":{"type":"integer","title":"Created At","description":"Unix timestamp of message creation"},"agent_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Name","description":"Name of the agent that produced this message"},"session_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session Id","description":"ID of the workmate_agent_sessions row this message belongs to (e.g. `<ctx>:<agent>::task::<task>`). Only populated by routes that return messages flattened across multiple sessions, such as `/workmate/history_messages`."},"context_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Context Id","description":"Leading context UUID for the task session, i.e. the logical conversation / thread identifier. Derived from session_id."},"task_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Task Id","description":"A2A task ID for the run that produced this message. Populated from run metadata (a2a_task_id) for workmate task sessions. Required by the frontend to resume a paused HITL run after a page refresh."},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata","description":"Additional message metadata"}},"type":"object","required":["id","role","run_id","run_index","created_at"],"title":"SessionMessage","description":"A message within a session, extracted from Agno runs."},"SessionSummary":{"properties":{"id":{"type":"string","title":"Id","description":"Session ID (= thread_id)"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title","description":"Session title/name"},"agent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Id","description":"Agent identifier"},"team_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Team Id","description":"Team identifier (for team sessions)"},"session_type":{"type":"string","title":"Session Type","description":"Session type: 'agent' or 'team'","default":"agent"},"message_count":{"type":"integer","title":"Message Count","description":"Number of messages in session","default":0},"last_message_preview":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Message Preview","description":"Preview of the last message (truncated)"},"first_message_preview":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"First Message Preview","description":"First user message of the conversation, cleaned of A2A turn wrappers and truncated. Populated by the Workmate session list so clients can label untitled conversations; None on surfaces that do not compute it."},"channel":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Channel","description":"Originating channel captured from the X-Cobo-Channel header on the first turn (e.g. cortex-app, cortex-cli, cron). None when the session predates channel tagging or was created without the header."},"created_at":{"type":"integer","title":"Created At","description":"Unix timestamp of session creation"},"updated_at":{"type":"integer","title":"Updated At","description":"Unix timestamp of last update"}},"type":"object","required":["id","created_at","updated_at"],"title":"SessionSummary","description":"Summary information about a session for list views."},"SessionToolCall":{"additionalProperties":true,"type":"object"},"SlashCommandInfo":{"properties":{"command_id":{"type":"string","title":"Command Id","description":"Identifier derived from the filename stem."},"name":{"type":"string","title":"Name","description":"Full command name as shown to users, e.g. /about."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"One-line description for autocomplete."},"roles":{"items":{"type":"string"},"type":"array","title":"Roles","description":"Roles allowed to see/run this command. Empty means all roles."},"action_type":{"$ref":"#/components/schemas/ActionType","description":"Dispatch strategy for this command.","default":"llm_response"},"action_config":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Action Config","description":"Static action payload for frontend-type commands (e.g. {type: open_url, url: '...'})."},"input_mode":{"$ref":"#/components/schemas/InputMode","description":"Whether free-text input is accepted after the command.","default":"no_input"},"input_placeholder":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Input Placeholder","description":"Hint text shown in the input box when input is enabled."},"category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category","description":"Optional UI category used to group command suggestions."},"priority":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Priority","description":"Optional UI sort priority within a command category."},"icon":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Icon","description":"Optional UI icon identifier for command suggestions."},"aliases":{"items":{"type":"string"},"type":"array","title":"Aliases","description":"Alternative command names or search tokens for this command."},"argument_hint":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Argument Hint","description":"Short syntax hint for the free-text argument."},"examples":{"items":{"type":"string"},"type":"array","title":"Examples","description":"Example invocations shown in command discovery UI."},"group":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Group","description":"Parent command id for nested command suggestions."},"hidden":{"type":"boolean","title":"Hidden","description":"Whether the command is hidden from top-level command suggestions.","default":false}},"type":"object","required":["command_id","name"],"title":"SlashCommandInfo","description":"Full definition of a slash command (parsed from its .md frontmatter)."},"StreamErrorExtraUserMessage":{"properties":{"id":{"type":"string","title":"Id","description":"Unique message ID"},"content":{"type":"string","title":"Content","description":"Message content"},"agent_name":{"type":"string","title":"Agent Name","description":"Name of the agent that produced this message"}},"type":"object","required":["id","content","agent_name"],"title":"StreamErrorExtraUserMessage","description":"Extra user message for a stream error."},"SystemMessage":{"properties":{"id":{"type":"string","title":"Id"},"role":{"type":"string","const":"system","title":"Role","default":"system"},"content":{"type":"string","title":"Content"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},"additionalProperties":true,"type":"object","required":["id","content"],"title":"SystemMessage","description":"A system message."},"TextInputContent":{"properties":{"type":{"type":"string","const":"text","title":"Type","default":"text"},"text":{"type":"string","title":"Text"}},"additionalProperties":true,"type":"object","required":["text"],"title":"TextInputContent","description":"A text fragment in a multimodal user message."},"TokenClearRequest":{"properties":{"server_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Server Url","description":"Specific MCP server URL to clear tokens for (None = all)"}},"type":"object","title":"TokenClearRequest","description":"Request to clear cached OAuth tokens."},"TokenClearResponse":{"properties":{"cleared_count":{"type":"integer","title":"Cleared Count","description":"Number of tokens cleared"},"servers":{"items":{"type":"string"},"type":"array","title":"Servers","description":"List of server URLs that were cleared"}},"type":"object","required":["cleared_count","servers"],"title":"TokenClearResponse","description":"Response after clearing cached tokens."},"Tool":{"properties":{"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"parameters":{"title":"Parameters"}},"additionalProperties":true,"type":"object","required":["name","description","parameters"],"title":"Tool","description":"A tool definition."},"ToolCall":{"properties":{"id":{"type":"string","title":"Id"},"type":{"type":"string","const":"function","title":"Type","default":"function"},"function":{"$ref":"#/components/schemas/FunctionCall"}},"additionalProperties":true,"type":"object","required":["id","function"],"title":"ToolCall","description":"A tool call, modelled after OpenAI tool calls."},"ToolConfig":{"properties":{"name":{"type":"string","title":"Name"},"init_kwargs":{"additionalProperties":true,"type":"object","title":"Init Kwargs"},"methods":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Methods"},"workloads":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Workloads"}},"type":"object","required":["name"],"title":"ToolConfig","description":"Tool configuration for backend/PTC execution."},"ToolMessage":{"properties":{"id":{"type":"string","title":"Id"},"role":{"type":"string","const":"tool","title":"Role","default":"tool"},"content":{"type":"string","title":"Content"},"toolCallId":{"type":"string","title":"Toolcallid"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"additionalProperties":true,"type":"object","required":["id","content","toolCallId"],"title":"ToolMessage","description":"A tool result message."},"UpdateRunMetadataRequest":{"properties":{"run_id":{"type":"string","title":"Run Id","description":"ID of the run to update"},"previous_run_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Previous Run Id","description":"ID of the previous run"},"feedback":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Feedback","description":"User feedback for the run"},"stream_error":{"anyOf":[{"$ref":"#/components/schemas/UpdateRunStreamError"},{"type":"null"}],"description":"Stream error for the run"}},"type":"object","required":["run_id"],"title":"UpdateRunMetadataRequest","description":"Request to update metadata for a specific run."},"UpdateRunStreamError":{"properties":{"error_message":{"type":"string","title":"Error Message","description":"Error message for the stream error"},"user_message":{"anyOf":[{"$ref":"#/components/schemas/StreamErrorExtraUserMessage"},{"type":"null"}],"description":"User message for the stream error"},"created_at":{"type":"integer","title":"Created At"}},"type":"object","required":["error_message"],"title":"UpdateRunStreamError","description":"stream error for a specific run."},"UpdateSessionRequest":{"properties":{"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title","description":"New session title"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata","description":"Metadata fields to update (merged with existing)"},"run_metadata":{"anyOf":[{"$ref":"#/components/schemas/UpdateRunMetadataRequest"},{"type":"null"}],"description":"Metadata fields to update for a specific run"}},"type":"object","title":"UpdateSessionRequest","description":"Request to update session metadata."},"UserFeedbackRequest":{"properties":{"session_id":{"type":"string","title":"Session Id"},"score":{"type":"number","title":"Score"},"trace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trace Id"},"comment":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Comment","default":""}},"type":"object","required":["session_id","score"],"title":"UserFeedbackRequest"},"UserMessage":{"properties":{"id":{"type":"string","title":"Id"},"role":{"type":"string","const":"user","title":"Role","default":"user"},"content":{"anyOf":[{"type":"string"},{"items":{"oneOf":[{"$ref":"#/components/schemas/TextInputContent"},{"$ref":"#/components/schemas/BinaryInputContent"}],"discriminator":{"propertyName":"type","mapping":{"binary":"#/components/schemas/BinaryInputContent","text":"#/components/schemas/TextInputContent"}}},"type":"array"}],"title":"Content"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},"additionalProperties":true,"type":"object","required":["id","content"],"title":"UserMessage","description":"A user message supporting text or multimodal content."},"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"},"WidgetStateRequest":{"properties":{"widget_id":{"type":"string","title":"Widget Id","description":"Unique identifier for the widget"},"state":{"additionalProperties":true,"type":"object","title":"State","description":"Widget state data (max ~4KB)"}},"type":"object","required":["widget_id","state"],"title":"WidgetStateRequest","description":"Request for updating widget state."},"WidgetStateResponse":{"properties":{"success":{"type":"boolean","title":"Success","description":"Whether the operation was successful"},"widget_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Widget Id","description":"Widget ID"},"state":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"State","description":"Widget state data"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error","description":"Error message if operation failed"}},"type":"object","required":["success"],"title":"WidgetStateResponse","description":"Response for widget state operations."}}}}