diff --git a/README.md b/README.md
index 142fa2611..6edbbc87d 100644
--- a/README.md
+++ b/README.md
@@ -37,7 +37,7 @@ git push
1. In your local `agno` repo, run the `AgentOS` cookbook containing all supported interfaces, using the latest version of Agno.
```bash
- python cookbook/06_agent_os/all_interfaces.py
+ python cookbook/05_agent_os/all_interfaces.py
```
2. Download the latest API reference files:
diff --git a/docs.json b/docs.json
index 0dcbffd98..642fd65da 100644
--- a/docs.json
+++ b/docs.json
@@ -3552,6 +3552,7 @@
"reference-api/schema/knowledge/get-content-status",
"reference-api/schema/knowledge/search-knowledge",
"reference-api/schema/knowledge/upload-content",
+ "reference-api/schema/knowledge/upload-remote-content",
"reference-api/schema/knowledge/update-content",
"reference-api/schema/knowledge/delete-all-content",
"reference-api/schema/knowledge/delete-content-by-id"
diff --git a/reference-api/openapi.json b/reference-api/openapi.json
index 040b7acb4..1add78859 100644
--- a/reference-api/openapi.json
+++ b/reference-api/openapi.json
@@ -1 +1 @@
-{"openapi":"3.1.0","info":{"title":"Agno AgentOS","description":"An agent operating system.","version":"1.0.0"},"paths":{"/":{"get":{"tags":["Home"],"summary":"API Information","description":"Get basic information about this AgentOS API instance, including:\n\n- API metadata and version\n- Available capabilities overview\n- Links to key endpoints and documentation","operationId":"get_api_info","responses":{"200":{"description":"API information retrieved successfully","content":{"application/json":{"schema":{},"examples":{"home":{"summary":"Example home response","value":{"name":"AgentOS API","description":"AI Agent Operating System API","id":"demo-os","version":"1.0.0"}}}}}}}}},"/health":{"get":{"tags":["Health"],"summary":"Health Check","description":"Check the health status of the AgentOS API. Returns a simple status indicator.","operationId":"health_check","responses":{"200":{"description":"API is healthy and operational","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthResponse"},"example":{"status":"ok","instantiated_at":"1766137017.573815"}}}}}}},"/config":{"get":{"tags":["Core"],"summary":"Get OS Configuration","description":"Retrieve the complete configuration of the AgentOS instance, including:\n\n- Available models and databases\n- Registered agents, teams, and workflows\n- Chat, session, memory, knowledge, and evaluation configurations\n- Available interfaces and their routes","operationId":"get_config","responses":{"200":{"description":"OS configuration retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConfigResponse"},"example":{"id":"demo","description":"Example AgentOS configuration","available_models":[],"databases":["9c884dc4-9066-448c-9074-ef49ec7eb73c"],"session":{"dbs":[{"db_id":"9c884dc4-9066-448c-9074-ef49ec7eb73c","domain_config":{"display_name":"Sessions"}}]},"metrics":{"dbs":[{"db_id":"9c884dc4-9066-448c-9074-ef49ec7eb73c","domain_config":{"display_name":"Metrics"}}]},"memory":{"dbs":[{"db_id":"9c884dc4-9066-448c-9074-ef49ec7eb73c","domain_config":{"display_name":"Memory"}}]},"knowledge":{"dbs":[{"db_id":"9c884dc4-9066-448c-9074-ef49ec7eb73c","domain_config":{"display_name":"Knowledge"}}]},"evals":{"dbs":[{"db_id":"9c884dc4-9066-448c-9074-ef49ec7eb73c","domain_config":{"display_name":"Evals"}}]},"agents":[{"id":"main-agent","name":"Main Agent","db_id":"9c884dc4-9066-448c-9074-ef49ec7eb73c"}],"teams":[],"workflows":[],"interfaces":[]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthenticatedResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/models":{"get":{"tags":["Core"],"summary":"Get Available Models","description":"Retrieve a list of all unique models currently used by agents and teams in this OS instance. This includes the model ID and provider information for each model.","operationId":"get_models","responses":{"200":{"description":"List of models retrieved successfully","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/Model"},"type":"array","title":"Response Get Models"},"example":[{"id":"gpt-4","provider":"openai"},{"id":"claude-3-sonnet","provider":"anthropic"}]}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthenticatedResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/agents/{agent_id}/runs":{"post":{"tags":["Agents"],"summary":"Create Agent Run","description":"Execute an agent with a message and optional media files. Supports both streaming and non-streaming responses.\n\n**Features:**\n- Text message input with optional session management\n- Multi-media support: images (PNG, JPEG, WebP), audio (WAV, MP3), video (MP4, WebM, etc.)\n- Document processing: PDF, CSV, DOCX, TXT, JSON\n- Real-time streaming responses with Server-Sent Events (SSE)\n- User and session context preservation\n\n**Streaming Response:**\nWhen `stream=true`, returns SSE events with `event` and `data` fields.","operationId":"create_agent_run","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","title":"Agent Id"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_create_agent_run"}}}},"responses":{"200":{"description":"Agent run executed successfully","content":{"application/json":{"schema":{}},"text/event-stream":{"examples":{"event_stream":{"summary":"Example event stream response","value":"event: RunStarted\ndata: {\"content\": \"Hello!\", \"run_id\": \"123...\"}\n\n"}}}}},"400":{"description":"Invalid request or unsupported file type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthenticatedResponse"}}}},"404":{"description":"Agent not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/agents/{agent_id}/runs/{run_id}/cancel":{"post":{"tags":["Agents"],"summary":"Cancel Agent Run","description":"Cancel a currently executing agent run. This will attempt to stop the agent's execution gracefully.\n\n**Note:** Cancellation may not be immediate for all operations.","operationId":"cancel_agent_run","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","title":"Agent Id"}},{"name":"run_id","in":"path","required":true,"schema":{"type":"string","title":"Run Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthenticatedResponse"}}}},"404":{"description":"Agent not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"500":{"description":"Failed to cancel run","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/agents/{agent_id}/runs/{run_id}/continue":{"post":{"tags":["Agents"],"summary":"Continue Agent Run","description":"Continue a paused or incomplete agent run with updated tool results.\n\n**Use Cases:**\n- Resume execution after tool approval/rejection\n- Provide manual tool execution results\n\n**Tools Parameter:**\nJSON string containing array of tool execution objects with results.","operationId":"continue_agent_run","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","title":"Agent Id"}},{"name":"run_id","in":"path","required":true,"schema":{"type":"string","title":"Run Id"}}],"requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_continue_agent_run"}}}},"responses":{"200":{"description":"Agent run continued successfully","content":{"application/json":{"schema":{}},"text/event-stream":{"example":"event: RunContent\ndata: {\"created_at\": 1757348314, \"run_id\": \"123...\"}\n\n"}}},"400":{"description":"Invalid JSON in tools field or invalid tool structure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthenticatedResponse"}}}},"404":{"description":"Agent not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/agents":{"get":{"tags":["Agents"],"summary":"List All Agents","description":"Retrieve a comprehensive list of all agents configured in this OS instance.\n\n**Returns:**\n- Agent metadata (ID, name, description)\n- Model configuration and capabilities\n- Available tools and their configurations\n- Session, knowledge, memory, and reasoning settings\n- Only meaningful (non-default) configurations are included","operationId":"get_agents","responses":{"200":{"description":"List of agents retrieved successfully","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/AgentResponse"},"type":"array","title":"Response Get Agents"},"example":[{"id":"main-agent","name":"Main Agent","db_id":"c6bf0644-feb8-4930-a305-380dae5ad6aa","model":{"name":"OpenAIChat","model":"gpt-4o","provider":"OpenAI"},"sessions":{"session_table":"agno_sessions"},"knowledge":{"knowledge_table":"main_knowledge"},"system_message":{"markdown":true,"add_datetime_to_context":true}}]}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthenticatedResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/agents/{agent_id}":{"get":{"tags":["Agents"],"summary":"Get Agent Details","description":"Retrieve detailed configuration and capabilities of a specific agent.\n\n**Returns comprehensive agent information including:**\n- Model configuration and provider details\n- Complete tool inventory and configurations\n- Session management settings\n- Knowledge base and memory configurations\n- Reasoning capabilities and settings\n- System prompts and response formatting options","operationId":"get_agent","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","title":"Agent Id"}}],"responses":{"200":{"description":"Agent details retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentResponse"},"example":{"id":"main-agent","name":"Main Agent","db_id":"9e064c70-6821-4840-a333-ce6230908a70","model":{"name":"OpenAIChat","model":"gpt-4o","provider":"OpenAI"},"sessions":{"session_table":"agno_sessions"},"knowledge":{"knowledge_table":"main_knowledge"},"system_message":{"markdown":true,"add_datetime_to_context":true}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthenticatedResponse"}}}},"404":{"description":"Agent not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/teams/{team_id}/runs":{"post":{"tags":["Teams"],"summary":"Create Team Run","description":"Execute a team collaboration with multiple agents working together on a task.\n\n**Features:**\n- Text message input with optional session management\n- Multi-media support: images (PNG, JPEG, WebP), audio (WAV, MP3), video (MP4, WebM, etc.)\n- Document processing: PDF, CSV, DOCX, TXT, JSON\n- Real-time streaming responses with Server-Sent Events (SSE)\n- User and session context preservation\n\n**Streaming Response:**\nWhen `stream=true`, returns SSE events with `event` and `data` fields.","operationId":"create_team_run","security":[{"HTTPBearer":[]}],"parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","title":"Team Id"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_create_team_run"}}}},"responses":{"200":{"description":"Team run executed successfully","content":{"application/json":{"schema":{}},"text/event-stream":{"example":"event: RunStarted\ndata: {\"content\": \"Hello!\", \"run_id\": \"123...\"}\n\n"}}},"400":{"description":"Invalid request or unsupported file type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthenticatedResponse"}}}},"404":{"description":"Team not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/teams/{team_id}/runs/{run_id}/cancel":{"post":{"tags":["Teams"],"summary":"Cancel Team Run","description":"Cancel a currently executing team run. This will attempt to stop the team's execution gracefully.\n\n**Note:** Cancellation may not be immediate for all operations.","operationId":"cancel_team_run","security":[{"HTTPBearer":[]}],"parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","title":"Team Id"}},{"name":"run_id","in":"path","required":true,"schema":{"type":"string","title":"Run Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthenticatedResponse"}}}},"404":{"description":"Team not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"500":{"description":"Failed to cancel team run","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/teams":{"get":{"tags":["Teams"],"summary":"List All Teams","description":"Retrieve a comprehensive list of all teams configured in this OS instance.\n\n**Returns team information including:**\n- Team metadata (ID, name, description, execution mode)\n- Model configuration for team coordination\n- Team member roster with roles and capabilities\n- Knowledge sharing and memory configurations","operationId":"get_teams","responses":{"200":{"description":"List of teams retrieved successfully","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/TeamResponse"},"type":"array","title":"Response Get Teams"},"example":[{"team_id":"basic-team","name":"Basic Team","mode":"coordinate","model":{"name":"OpenAIChat","model":"gpt-4o","provider":"OpenAI"},"tools":[{"name":"transfer_task_to_member","description":"Use this function to transfer a task to the selected team member.\nYou must provide a clear and concise description of the task the member should achieve AND the expected output.","parameters":{"type":"object","properties":{"member_id":{"type":"string","description":"(str) The ID of the member to transfer the task to. Use only the ID of the member, not the ID of the team followed by the ID of the member."},"task_description":{"type":"string","description":"(str) A clear and concise description of the task the member should achieve."},"expected_output":{"type":"string","description":"(str) The expected output from the member (optional)."}},"additionalProperties":false,"required":["member_id","task_description"]}}],"members":[{"agent_id":"basic-agent","name":"Basic Agent","model":{"name":"OpenAIChat","model":"gpt-4o","provider":"OpenAI gpt-4o"},"memory":{"app_name":"Memory","model":{"name":"OpenAIChat","model":"gpt-4o","provider":"OpenAI"}},"session_table":"agno_sessions","memory_table":"agno_memories"}],"enable_agentic_context":false,"memory":{"app_name":"agno_memories","app_url":"/memory/1","model":{"name":"OpenAIChat","model":"gpt-4o","provider":"OpenAI"}},"async_mode":false,"session_table":"agno_sessions","memory_table":"agno_memories"}]}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthenticatedResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/teams/{team_id}":{"get":{"tags":["Teams"],"summary":"Get Team Details","description":"Retrieve detailed configuration and member information for a specific team.","operationId":"get_team","security":[{"HTTPBearer":[]}],"parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","title":"Team Id"}}],"responses":{"200":{"description":"Team details retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamResponse"},"example":{"team_id":"basic-team","name":"Basic Team","mode":"coordinate","model":{"name":"OpenAIChat","model":"gpt-4o","provider":"OpenAI"},"tools":[{"name":"transfer_task_to_member","description":"Use this function to transfer a task to the selected team member.\nYou must provide a clear and concise description of the task the member should achieve AND the expected output.","parameters":{"type":"object","properties":{"member_id":{"type":"string","description":"(str) The ID of the member to transfer the task to. Use only the ID of the member, not the ID of the team followed by the ID of the member."},"task_description":{"type":"string","description":"(str) A clear and concise description of the task the member should achieve."},"expected_output":{"type":"string","description":"(str) The expected output from the member (optional)."}},"additionalProperties":false,"required":["member_id","task_description"]}}],"members":[{"agent_id":"basic-agent","name":"Basic Agent","model":{"name":"OpenAIChat","model":"gpt-4o","provider":"OpenAI gpt-4o"},"memory":{"app_name":"Memory","model":{"name":"OpenAIChat","model":"gpt-4o","provider":"OpenAI"}},"session_table":"agno_sessions","memory_table":"agno_memories"}],"enable_agentic_context":false,"memory":{"app_name":"Memory","model":{"name":"OpenAIChat","model":"gpt-4o","provider":"OpenAI"}},"async_mode":false,"session_table":"agno_sessions","memory_table":"agno_memories"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthenticatedResponse"}}}},"404":{"description":"Team not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/workflows":{"get":{"tags":["Workflows"],"summary":"List All Workflows","description":"Retrieve a comprehensive list of all workflows configured in this OS instance.\n\n**Return Information:**\n- Workflow metadata (ID, name, description)\n- Input schema requirements\n- Step sequence and execution flow\n- Associated agents and teams","operationId":"get_workflows","responses":{"200":{"description":"List of workflows retrieved successfully","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/WorkflowSummaryResponse"},"type":"array","title":"Response Get Workflows"},"example":[{"id":"content-creation-workflow","name":"Content Creation Workflow","description":"Automated content creation from blog posts to social media","db_id":"123"}]}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthenticatedResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/workflows/{workflow_id}":{"get":{"tags":["Workflows"],"summary":"Get Workflow Details","description":"Retrieve detailed configuration and step information for a specific workflow.","operationId":"get_workflow","security":[{"HTTPBearer":[]}],"parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","title":"Workflow Id"}}],"responses":{"200":{"description":"Workflow details retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowResponse"},"example":{"id":"content-creation-workflow","name":"Content Creation Workflow","description":"Automated content creation from blog posts to social media","db_id":"123"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthenticatedResponse"}}}},"404":{"description":"Workflow not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/workflows/{workflow_id}/runs":{"post":{"tags":["Workflows"],"summary":"Execute Workflow","description":"Execute a workflow with the provided input data. Workflows can run in streaming or batch mode.\n\n**Execution Modes:**\n- **Streaming (`stream=true`)**: Real-time step-by-step execution updates via SSE\n- **Non-Streaming (`stream=false`)**: Complete workflow execution with final result\n\n**Workflow Execution Process:**\n1. Input validation against workflow schema\n2. Sequential or parallel step execution based on workflow design\n3. Data flow between steps with transformation\n4. Error handling and automatic retries where configured\n5. Final result compilation and response\n\n**Session Management:**\nWorkflows support session continuity for stateful execution across multiple runs.","operationId":"create_workflow_run","security":[{"HTTPBearer":[]}],"parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","title":"Workflow Id"}}],"requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_create_workflow_run"}}}},"responses":{"200":{"description":"Workflow executed successfully","content":{"application/json":{"schema":{}},"text/event-stream":{"example":"event: RunStarted\ndata: {\"content\": \"Hello!\", \"run_id\": \"123...\"}\n\n"}}},"400":{"description":"Invalid input data or workflow configuration","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthenticatedResponse"}}}},"404":{"description":"Workflow not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"500":{"description":"Workflow execution error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/workflows/{workflow_id}/runs/{run_id}/cancel":{"post":{"tags":["Workflows"],"summary":"Cancel Workflow Run","description":"Cancel a currently executing workflow run, stopping all active steps and cleanup.\n**Note:** Complex workflows with multiple parallel steps may take time to fully cancel.","operationId":"cancel_workflow_run","security":[{"HTTPBearer":[]}],"parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","title":"Workflow Id"}},{"name":"run_id","in":"path","required":true,"schema":{"type":"string","title":"Run Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthenticatedResponse"}}}},"404":{"description":"Workflow or run not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"500":{"description":"Failed to cancel workflow run","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/slack/events":{"post":{"tags":["Slack"],"summary":"Slack Events","description":"Process incoming Slack events","operationId":"slack_events_agent","responses":{"200":{"description":"Event processed successfully","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/SlackChallengeResponse"},{"$ref":"#/components/schemas/SlackEventResponse"}],"title":"Response Slack Events Agent"}}}},"400":{"description":"Missing Slack headers"},"403":{"description":"Invalid Slack signature"}}}},"/whatsapp/status":{"get":{"tags":["Whatsapp"],"summary":"Status","operationId":"status_whatsapp_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/whatsapp/webhook":{"get":{"tags":["Whatsapp"],"summary":"Verify Webhook","description":"Handle WhatsApp webhook verification","operationId":"verify_webhook_whatsapp_webhook_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"post":{"tags":["Whatsapp"],"summary":"Webhook","description":"Handle incoming WhatsApp messages","operationId":"webhook_whatsapp_webhook_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/agui":{"post":{"tags":["AGUI"],"summary":"Run Agent","operationId":"run_agent_agui_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunAgentInput"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/status":{"get":{"tags":["AGUI"],"summary":"Get Status","operationId":"get_status_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/a2a/agents/{id}/.well-known/agent-card.json":{"get":{"tags":["A2A"],"summary":"Get Agent Card","operationId":"get_agent_card_a2a_agents__id___well_known_agent_card_json_get","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","title":"Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/a2a/agents/{id}/v1/message:send":{"post":{"tags":["A2A"],"summary":"Run Message Agent","description":"Send a message to an Agno Agent (non-streaming). The Agent is identified via the path parameter '{id}'. Optional: Pass user ID via X-User-ID header (recommended) or 'userId' in params.message.metadata.","operationId":"run_message_agent","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","title":"Id"}}],"responses":{"200":{"description":"Message sent successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendMessageSuccessResponse"},"example":{"jsonrpc":"2.0","id":"request-123","result":{"task":{"id":"task-456","context_id":"context-789","status":"completed","history":[{"message_id":"msg-1","role":"agent","parts":[{"kind":"text","text":"Response from agent"}]}]}}}}}},"400":{"description":"Invalid request"},"404":{"description":"Agent not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/a2a/agents/{id}/v1/message:stream":{"post":{"tags":["A2A"],"summary":"Stream Message Agent","description":"Stream a message to an Agno Agent (streaming). The Agent is identified via the path parameter '{id}'. Optional: Pass user ID via X-User-ID header (recommended) or 'userId' in params.message.metadata. Returns real-time updates as newline-delimited JSON (NDJSON).","operationId":"stream_message_agent","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","title":"Id"}}],"responses":{"200":{"description":"Streaming response with task updates","content":{"application/json":{"schema":{}},"text/event-stream":{"example":"event: TaskStatusUpdateEvent\ndata: {\"jsonrpc\":\"2.0\",\"id\":\"request-123\",\"result\":{\"taskId\":\"task-456\",\"status\":\"working\"}}\n\nevent: Message\ndata: {\"jsonrpc\":\"2.0\",\"id\":\"request-123\",\"result\":{\"messageId\":\"msg-1\",\"role\":\"agent\",\"parts\":[{\"kind\":\"text\",\"text\":\"Response\"}]}}\n\n"}}},"400":{"description":"Invalid request"},"404":{"description":"Agent not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/a2a/teams/{id}/.well-known/agent-card.json":{"get":{"tags":["A2A"],"summary":"Get Team Card","operationId":"get_team_card_a2a_teams__id___well_known_agent_card_json_get","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","title":"Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/a2a/teams/{id}/v1/message:send":{"post":{"tags":["A2A"],"summary":"Run Message Team","description":"Send a message to an Agno Team (non-streaming). The Team is identified via the path parameter '{id}'. Optional: Pass user ID via X-User-ID header (recommended) or 'userId' in params.message.metadata.","operationId":"run_message_team","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","title":"Id"}}],"responses":{"200":{"description":"Message sent successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendMessageSuccessResponse"},"example":{"jsonrpc":"2.0","id":"request-123","result":{"task":{"id":"task-456","context_id":"context-789","status":"completed","history":[{"message_id":"msg-1","role":"agent","parts":[{"kind":"text","text":"Response from agent"}]}]}}}}}},"400":{"description":"Invalid request"},"404":{"description":"Team not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/a2a/teams/{id}/v1/message:stream":{"post":{"tags":["A2A"],"summary":"Stream Message Team","description":"Stream a message to an Agno Team (streaming). The Team is identified via the path parameter '{id}'. Optional: Pass user ID via X-User-ID header (recommended) or 'userId' in params.message.metadata. Returns real-time updates as newline-delimited JSON (NDJSON).","operationId":"stream_message_team","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","title":"Id"}}],"responses":{"200":{"description":"Streaming response with task updates","content":{"application/json":{"schema":{}},"text/event-stream":{"example":"event: TaskStatusUpdateEvent\ndata: {\"jsonrpc\":\"2.0\",\"id\":\"request-123\",\"result\":{\"taskId\":\"task-456\",\"status\":\"working\"}}\n\nevent: Message\ndata: {\"jsonrpc\":\"2.0\",\"id\":\"request-123\",\"result\":{\"messageId\":\"msg-1\",\"role\":\"agent\",\"parts\":[{\"kind\":\"text\",\"text\":\"Response\"}]}}\n\n"}}},"400":{"description":"Invalid request"},"404":{"description":"Team not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/a2a/workflows/{id}/.well-known/agent-card.json":{"get":{"tags":["A2A"],"summary":"Get Workflow Card","operationId":"get_workflow_card_a2a_workflows__id___well_known_agent_card_json_get","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","title":"Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/a2a/workflows/{id}/v1/message:send":{"post":{"tags":["A2A"],"summary":"Run Message Workflow","description":"Send a message to an Agno Workflow (non-streaming). The Workflow is identified via the path parameter '{id}'. Optional: Pass user ID via X-User-ID header (recommended) or 'userId' in params.message.metadata.","operationId":"run_message_workflow","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","title":"Id"}}],"responses":{"200":{"description":"Message sent successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendMessageSuccessResponse"},"example":{"jsonrpc":"2.0","id":"request-123","result":{"task":{"id":"task-456","context_id":"context-789","status":"completed","history":[{"message_id":"msg-1","role":"agent","parts":[{"kind":"text","text":"Response from agent"}]}]}}}}}},"400":{"description":"Invalid request"},"404":{"description":"Workflow not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/a2a/workflows/{id}/v1/message:stream":{"post":{"tags":["A2A"],"summary":"Stream Message Workflow","description":"Stream a message to an Agno Workflow (streaming). The Workflow is identified via the path parameter '{id}'. Optional: Pass user ID via X-User-ID header (recommended) or 'userId' in params.message.metadata. Returns real-time updates as newline-delimited JSON (NDJSON).","operationId":"stream_message_workflow","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","title":"Id"}}],"responses":{"200":{"description":"Streaming response with task updates","content":{"application/json":{"schema":{}},"text/event-stream":{"example":"event: TaskStatusUpdateEvent\ndata: {\"jsonrpc\":\"2.0\",\"id\":\"request-123\",\"result\":{\"taskId\":\"task-456\",\"status\":\"working\"}}\n\nevent: Message\ndata: {\"jsonrpc\":\"2.0\",\"id\":\"request-123\",\"result\":{\"messageId\":\"msg-1\",\"role\":\"agent\",\"parts\":[{\"kind\":\"text\",\"text\":\"Response\"}]}}\n\n"}}},"400":{"description":"Invalid request"},"404":{"description":"Workflow not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/a2a/message/send":{"post":{"tags":["A2A"],"summary":"Send Message","description":"[DEPRECATED] Send a message to an Agno Agent, Team, or Workflow. The Agent, Team or Workflow is identified via the 'agentId' field in params.message or X-Agent-ID header. Optional: Pass user ID via X-User-ID header (recommended) or 'userId' in params.message.metadata.","operationId":"send_message","responses":{"200":{"description":"Message sent successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendMessageSuccessResponse"},"example":{"jsonrpc":"2.0","id":"request-123","result":{"task":{"id":"task-456","context_id":"context-789","status":"completed","history":[{"message_id":"msg-1","role":"agent","parts":[{"kind":"text","text":"Response from agent"}]}]}}}}}},"400":{"description":"Invalid request or unsupported method"},"404":{"description":"Agent, Team, or Workflow not found"}}}},"/a2a/message/stream":{"post":{"tags":["A2A"],"summary":"Stream Message","description":"[DEPRECATED] Stream a message to an Agno Agent, Team, or Workflow. The Agent, Team or Workflow is identified via the 'agentId' field in params.message or X-Agent-ID header. Optional: Pass user ID via X-User-ID header (recommended) or 'userId' in params.message.metadata. Returns real-time updates as newline-delimited JSON (NDJSON).","operationId":"stream_message","responses":{"200":{"description":"Streaming response with task updates","content":{"application/json":{"schema":{}},"text/event-stream":{"example":"event: TaskStatusUpdateEvent\ndata: {\"jsonrpc\":\"2.0\",\"id\":\"request-123\",\"result\":{\"taskId\":\"task-456\",\"status\":\"working\"}}\n\nevent: Message\ndata: {\"jsonrpc\":\"2.0\",\"id\":\"request-123\",\"result\":{\"messageId\":\"msg-1\",\"role\":\"agent\",\"parts\":[{\"kind\":\"text\",\"text\":\"Response\"}]}}\n\n"}}},"400":{"description":"Invalid request or unsupported method"},"404":{"description":"Agent, Team, or Workflow not found"}}}},"/sessions":{"get":{"tags":["Sessions"],"summary":"List Sessions","description":"Retrieve paginated list of sessions with filtering and sorting options. Supports filtering by session type (agent, team, workflow), component, user, and name. Sessions represent conversation histories and execution contexts.","operationId":"get_sessions","security":[{"HTTPBearer":[]}],"parameters":[{"name":"type","in":"query","required":false,"schema":{"$ref":"#/components/schemas/SessionType","description":"Type of sessions to retrieve (agent, team, or workflow)","default":"agent"},"description":"Type of sessions to retrieve (agent, team, or workflow)"},{"name":"component_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter sessions by component ID (agent/team/workflow ID)","title":"Component Id"},"description":"Filter sessions by component ID (agent/team/workflow ID)"},{"name":"user_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter sessions by user ID","title":"User Id"},"description":"Filter sessions by user ID"},{"name":"session_name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter sessions by name (partial match)","title":"Session Name"},"description":"Filter sessions by name (partial match)"},{"name":"limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Number of sessions to return per page","default":20,"title":"Limit"},"description":"Number of sessions to return per page"},{"name":"page","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Page number for pagination","default":1,"title":"Page"},"description":"Page number for pagination"},{"name":"sort_by","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Field to sort sessions by","default":"created_at","title":"Sort By"},"description":"Field to sort sessions by"},{"name":"sort_order","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/SortOrder"},{"type":"null"}],"description":"Sort order (asc or desc)","default":"desc","title":"Sort Order"},"description":"Sort order (asc or desc)"},{"name":"db_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Database ID to query sessions from","title":"Db Id"},"description":"Database ID to query sessions from"},{"name":"table","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The database table to use","title":"Table"},"description":"The database table to use"}],"responses":{"200":{"description":"Sessions retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResponse_SessionSchema_"},"example":{"session_example":{"summary":"Example session response","value":{"data":[{"session_id":"6f6cfbfd-9643-479a-ae47-b8f32eb4d710","session_name":"What tools do you have?","session_state":{},"created_at":"2025-09-05T16:02:09Z","updated_at":"2025-09-05T16:02:09Z"}]}}}}}},"400":{"description":"Invalid session type or filter parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthenticatedResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponse"}}}},"422":{"description":"Validation error in query parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}},"post":{"tags":["Sessions"],"summary":"Create New Session","description":"Create a new empty session with optional configuration. Useful for pre-creating sessions with specific session_state, metadata, or other properties before running any agent/team/workflow interactions. The session can later be used by providing its session_id in run requests.","operationId":"create_session","security":[{"HTTPBearer":[]}],"parameters":[{"name":"type","in":"query","required":false,"schema":{"$ref":"#/components/schemas/SessionType","description":"Type of session to create (agent, team, or workflow)","default":"agent"},"description":"Type of session to create (agent, team, or workflow)"},{"name":"db_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Database ID to create session in","title":"Db Id"},"description":"Database ID to create session in"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSessionRequest","description":"Session configuration data","default":{}}}}},"responses":{"201":{"description":"Session created successfully","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/AgentSessionDetailSchema"},{"$ref":"#/components/schemas/TeamSessionDetailSchema"},{"$ref":"#/components/schemas/WorkflowSessionDetailSchema"}],"title":"Response Create Session"},"examples":{"agent_session_example":{"summary":"Example created agent session","value":{"user_id":"user-123","agent_session_id":"new-session-id","session_id":"new-session-id","session_name":"New Session","session_state":{"key":"value"},"metadata":{"key":"value"},"agent_id":"agent-1","created_at":"2025-10-21T12:00:00Z","updated_at":"2025-10-21T12:00:00Z"}}}}}},"400":{"description":"Invalid request parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthenticatedResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponse"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"500":{"description":"Failed to create session","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}},"delete":{"tags":["Sessions"],"summary":"Delete Multiple Sessions","description":"Delete multiple sessions by their IDs in a single operation. This action cannot be undone and will permanently remove all specified sessions and their runs.","operationId":"delete_sessions","security":[{"HTTPBearer":[]}],"parameters":[{"name":"type","in":"query","required":false,"schema":{"$ref":"#/components/schemas/SessionType","description":"Default session type filter","default":"agent"},"description":"Default session type filter"},{"name":"db_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Database ID to use for deletion","title":"Db Id"},"description":"Database ID to use for deletion"},{"name":"table","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Table to use for deletion","title":"Table"},"description":"Table to use for deletion"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteSessionRequest"}}}},"responses":{"204":{"description":"Sessions deleted successfully"},"400":{"description":"Invalid request - session IDs and types length mismatch","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthenticatedResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"500":{"description":"Failed to delete sessions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/sessions/{session_id}":{"get":{"tags":["Sessions"],"summary":"Get Session by ID","description":"Retrieve detailed information about a specific session including metadata, configuration, and run history. Response schema varies based on session type (agent, team, or workflow).","operationId":"get_session_by_id","security":[{"HTTPBearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","description":"Session ID to retrieve","title":"Session Id"},"description":"Session ID to retrieve"},{"name":"type","in":"query","required":false,"schema":{"$ref":"#/components/schemas/SessionType","description":"Session type (agent, team, or workflow)","default":"agent"},"description":"Session type (agent, team, or workflow)"},{"name":"user_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"User ID to query session from","title":"User Id"},"description":"User ID to query session from"},{"name":"db_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Database ID to query session from","title":"Db Id"},"description":"Database ID to query session from"},{"name":"table","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Table to query session from","title":"Table"},"description":"Table to query session from"}],"responses":{"200":{"description":"Session details retrieved successfully","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/AgentSessionDetailSchema"},{"$ref":"#/components/schemas/TeamSessionDetailSchema"},{"$ref":"#/components/schemas/WorkflowSessionDetailSchema"}],"title":"Response Get Session By Id"},"examples":{"agent_session_example":{"summary":"Example agent session response","value":{"user_id":"123","agent_session_id":"6f6cfbfd-9643-479a-ae47-b8f32eb4d710","session_id":"6f6cfbfd-9643-479a-ae47-b8f32eb4d710","session_name":"What tools do you have?","session_summary":{"summary":"The user and assistant engaged in a conversation about the tools the agent has available.","updated_at":"2025-09-05T18:02:12.269392"},"session_state":{},"agent_id":"basic-agent","total_tokens":160,"agent_data":{"name":"Basic Agent","agent_id":"basic-agent","model":{"provider":"OpenAI","name":"OpenAIChat","id":"gpt-4o"}},"metrics":{"input_tokens":134,"output_tokens":26,"total_tokens":160,"audio_input_tokens":0,"audio_output_tokens":0,"audio_total_tokens":0,"cache_read_tokens":0,"cache_write_tokens":0,"reasoning_tokens":0},"chat_history":[{"content":"\n- Use markdown to format your answers.\n- The current time is 2025-09-05 18:02:09.171627.\n\n\nYou have access to memories from previous interactions with the user that you can use:\n\n\n- User really likes Digimon and Japan.\n- User really likes Japan.\n- User likes coffee.\n\n\nNote: this information is from previous interactions and may be updated in this conversation. You should always prefer information from this conversation over the past memories.","from_history":false,"stop_after_tool_call":false,"role":"system","created_at":1757088129},{"content":"What tools do you have?","from_history":false,"stop_after_tool_call":false,"role":"user","created_at":1757088129},{"content":"I don't have access to external tools or the internet. However, I can assist you with a wide range of topics by providing information, answering questions, and offering suggestions based on the knowledge I've been trained on. If there's anything specific you need help with, feel free to ask!","from_history":false,"stop_after_tool_call":false,"role":"assistant","metrics":{"input_tokens":134,"output_tokens":26,"total_tokens":160},"created_at":1757088129}],"created_at":"2025-09-05T16:02:09Z","updated_at":"2025-09-05T16:02:09Z"}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthenticatedResponse"}}}},"404":{"description":"Session not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponse"}}}},"422":{"description":"Invalid session type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}},"delete":{"tags":["Sessions"],"summary":"Delete Session","description":"Permanently delete a specific session and all its associated runs. This action cannot be undone and will remove all conversation history.","operationId":"delete_session","security":[{"HTTPBearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","description":"Session ID to delete","title":"Session Id"},"description":"Session ID to delete"},{"name":"db_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Database ID to use for deletion","title":"Db Id"},"description":"Database ID to use for deletion"},{"name":"table","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Table to use for deletion","title":"Table"},"description":"Table to use for deletion"}],"responses":{"204":{"description":"Successful Response"},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthenticatedResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"500":{"description":"Failed to delete session","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}},"patch":{"tags":["Sessions"],"summary":"Update Session","description":"Update session properties such as session_name, session_state, metadata, or summary. Use this endpoint to modify the session name, update state, add metadata, or update the session summary.","operationId":"update_session","security":[{"HTTPBearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","description":"Session ID to update","title":"Session Id"},"description":"Session ID to update"},{"name":"type","in":"query","required":false,"schema":{"$ref":"#/components/schemas/SessionType","description":"Session type (agent, team, or workflow)","default":"agent"},"description":"Session type (agent, team, or workflow)"},{"name":"user_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"User ID","title":"User Id"},"description":"User ID"},{"name":"db_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Database ID to use for update operation","title":"Db Id"},"description":"Database ID to use for update operation"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateSessionRequest","description":"Session update data"}}}},"responses":{"200":{"description":"Session updated successfully","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/AgentSessionDetailSchema"},{"$ref":"#/components/schemas/TeamSessionDetailSchema"},{"$ref":"#/components/schemas/WorkflowSessionDetailSchema"}],"title":"Response Update Session"},"examples":{"update_summary":{"summary":"Update session summary","value":{"summary":{"summary":"The user discussed project planning with the agent.","updated_at":"2025-10-21T14:30:00Z"}}},"update_metadata":{"summary":"Update session metadata","value":{"metadata":{"tags":["planning","project"],"priority":"high"}}},"update_session_name":{"summary":"Update session name","value":{"session_name":"Updated Session Name"}},"update_session_state":{"summary":"Update session state","value":{"session_state":{"step":"completed","context":"Project planning finished","progress":100}}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthenticatedResponse"}}}},"404":{"description":"Session not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponse"}}}},"422":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"500":{"description":"Failed to update session","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/sessions/{session_id}/runs":{"get":{"tags":["Sessions"],"summary":"Get Session Runs","description":"Retrieve all runs (executions) for a specific session with optional timestamp filtering. Runs represent individual interactions or executions within a session. Response schema varies based on session type.","operationId":"get_session_runs","security":[{"HTTPBearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","description":"Session ID to get runs from","title":"Session Id"},"description":"Session ID to get runs from"},{"name":"type","in":"query","required":false,"schema":{"$ref":"#/components/schemas/SessionType","description":"Session type (agent, team, or workflow)","default":"agent"},"description":"Session type (agent, team, or workflow)"},{"name":"user_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"User ID to query runs from","title":"User Id"},"description":"User ID to query runs from"},{"name":"created_after","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Filter runs created after this Unix timestamp (epoch time in seconds)","title":"Created After"},"description":"Filter runs created after this Unix timestamp (epoch time in seconds)"},{"name":"created_before","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Filter runs created before this Unix timestamp (epoch time in seconds)","title":"Created Before"},"description":"Filter runs created before this Unix timestamp (epoch time in seconds)"},{"name":"db_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Database ID to query runs from","title":"Db Id"},"description":"Database ID to query runs from"},{"name":"table","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Table to query runs from","title":"Table"},"description":"Table to query runs from"}],"responses":{"200":{"description":"Session runs retrieved successfully","content":{"application/json":{"schema":{"type":"array","items":{"anyOf":[{"$ref":"#/components/schemas/RunSchema"},{"$ref":"#/components/schemas/TeamRunSchema"},{"$ref":"#/components/schemas/WorkflowRunSchema"}]},"title":"Response Get Session Runs"},"examples":{"completed_run":{"summary":"Example completed run","value":{"run_id":"fcdf50f0-7c32-4593-b2ef-68a558774340","parent_run_id":"80056af0-c7a5-4d69-b6a2-c3eba9f040e0","agent_id":"basic-agent","user_id":"","run_input":"Which tools do you have access to?","content":"I don't have access to external tools or the internet. However, I can assist you with a wide range of topics by providing information, answering questions, and offering suggestions based on the knowledge I've been trained on. If there's anything specific you need help with, feel free to ask!","run_response_format":"text","reasoning_content":"","metrics":{"input_tokens":82,"output_tokens":56,"total_tokens":138,"time_to_first_token":0.047505500027909875,"duration":4.840060166025069},"messages":[{"content":"\n- Use markdown to format your answers.\n- The current time is 2025-09-08 17:52:10.101003.\n\n\nYou have the capability to retain memories from previous interactions with the user, but have not had any interactions with the user yet.","from_history":false,"stop_after_tool_call":false,"role":"system","created_at":1757346730},{"content":"Which tools do you have access to?","from_history":false,"stop_after_tool_call":false,"role":"user","created_at":1757346730},{"content":"I don't have access to external tools or the internet. However, I can assist you with a wide range of topics by providing information, answering questions, and offering suggestions based on the knowledge I've been trained on. If there's anything specific you need help with, feel free to ask!","from_history":false,"stop_after_tool_call":false,"role":"assistant","metrics":{"input_tokens":82,"output_tokens":56,"total_tokens":138},"created_at":1757346730}],"events":[{"created_at":1757346730,"event":"RunStarted","agent_id":"basic-agent","agent_name":"Basic Agent","run_id":"fcdf50f0-7c32-4593-b2ef-68a558774340","session_id":"80056af0-c7a5-4d69-b6a2-c3eba9f040e0","model":"gpt-4o","model_provider":"OpenAI"},{"created_at":1757346733,"event":"MemoryUpdateStarted","agent_id":"basic-agent","agent_name":"Basic Agent","run_id":"fcdf50f0-7c32-4593-b2ef-68a558774340","session_id":"80056af0-c7a5-4d69-b6a2-c3eba9f040e0"},{"created_at":1757346734,"event":"MemoryUpdateCompleted","agent_id":"basic-agent","agent_name":"Basic Agent","run_id":"fcdf50f0-7c32-4593-b2ef-68a558774340","session_id":"80056af0-c7a5-4d69-b6a2-c3eba9f040e0"},{"created_at":1757346734,"event":"RunCompleted","agent_id":"basic-agent","agent_name":"Basic Agent","run_id":"fcdf50f0-7c32-4593-b2ef-68a558774340","session_id":"80056af0-c7a5-4d69-b6a2-c3eba9f040e0","content":"I don't have access to external tools or the internet. However, I can assist you with a wide range of topics by providing information, answering questions, and offering suggestions based on the knowledge I've been trained on. If there's anything specific you need help with, feel free to ask!","content_type":"str","metrics":{"input_tokens":82,"output_tokens":56,"total_tokens":138,"time_to_first_token":0.047505500027909875,"duration":4.840060166025069}}],"created_at":"2025-09-08T15:52:10Z"}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthenticatedResponse"}}}},"404":{"description":"Session not found or has no runs","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponse"}}}},"422":{"description":"Invalid session type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/sessions/{session_id}/runs/{run_id}":{"get":{"tags":["Sessions"],"summary":"Get Run by ID","description":"Retrieve a specific run by its ID from a session. Response schema varies based on the run type (agent run, team run, or workflow run).","operationId":"get_session_run","security":[{"HTTPBearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","description":"Session ID to get run from","title":"Session Id"},"description":"Session ID to get run from"},{"name":"run_id","in":"path","required":true,"schema":{"type":"string","description":"Run ID to retrieve","title":"Run Id"},"description":"Run ID to retrieve"},{"name":"type","in":"query","required":false,"schema":{"$ref":"#/components/schemas/SessionType","description":"Session type (agent, team, or workflow)","default":"agent"},"description":"Session type (agent, team, or workflow)"},{"name":"user_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"User ID to query run from","title":"User Id"},"description":"User ID to query run from"},{"name":"db_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Database ID to query run from","title":"Db Id"},"description":"Database ID to query run from"}],"responses":{"200":{"description":"Run retrieved successfully","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/RunSchema"},{"$ref":"#/components/schemas/TeamRunSchema"},{"$ref":"#/components/schemas/WorkflowRunSchema"}],"title":"Response Get Session Run"},"examples":{"agent_run":{"summary":"Example agent run","value":{"run_id":"fcdf50f0-7c32-4593-b2ef-68a558774340","parent_run_id":"80056af0-c7a5-4d69-b6a2-c3eba9f040e0","agent_id":"basic-agent","user_id":"user_123","run_input":"Which tools do you have access to?","content":"I don't have access to external tools.","created_at":1728499200}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthenticatedResponse"}}}},"404":{"description":"Session or run not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponse"}}}},"422":{"description":"Invalid session type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/sessions/{session_id}/rename":{"post":{"tags":["Sessions"],"summary":"Rename Session","description":"Update the name of an existing session. Useful for organizing and categorizing sessions with meaningful names for better identification and management.","operationId":"rename_session","security":[{"HTTPBearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","description":"Session ID to rename","title":"Session Id"},"description":"Session ID to rename"},{"name":"type","in":"query","required":false,"schema":{"$ref":"#/components/schemas/SessionType","description":"Session type (agent, team, or workflow)","default":"agent"},"description":"Session type (agent, team, or workflow)"},{"name":"db_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Database ID to use for rename operation","title":"Db Id"},"description":"Database ID to use for rename operation"},{"name":"table","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Table to use for rename operation","title":"Table"},"description":"Table to use for rename operation"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_rename_session"}}}},"responses":{"200":{"description":"Session renamed successfully","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/AgentSessionDetailSchema"},{"$ref":"#/components/schemas/TeamSessionDetailSchema"},{"$ref":"#/components/schemas/WorkflowSessionDetailSchema"}],"title":"Response Rename Session"},"examples":{"agent_session_example":{"summary":"Example agent session response","value":{"user_id":"123","agent_session_id":"6f6cfbfd-9643-479a-ae47-b8f32eb4d710","session_id":"6f6cfbfd-9643-479a-ae47-b8f32eb4d710","session_name":"What tools do you have?","session_summary":{"summary":"The user and assistant engaged in a conversation about the tools the agent has available.","updated_at":"2025-09-05T18:02:12.269392"},"session_state":{},"agent_id":"basic-agent","total_tokens":160,"agent_data":{"name":"Basic Agent","agent_id":"basic-agent","model":{"provider":"OpenAI","name":"OpenAIChat","id":"gpt-4o"}},"metrics":{"input_tokens":134,"output_tokens":26,"total_tokens":160,"audio_input_tokens":0,"audio_output_tokens":0,"audio_total_tokens":0,"cache_read_tokens":0,"cache_write_tokens":0,"reasoning_tokens":0},"chat_history":[{"content":"\n- Use markdown to format your answers.\n- The current time is 2025-09-05 18:02:09.171627.\n\n\nYou have access to memories from previous interactions with the user that you can use:\n\n\n- User really likes Digimon and Japan.\n- User really likes Japan.\n- User likes coffee.\n\n\nNote: this information is from previous interactions and may be updated in this conversation. You should always prefer information from this conversation over the past memories.","from_history":false,"stop_after_tool_call":false,"role":"system","created_at":1757088129},{"content":"What tools do you have?","from_history":false,"stop_after_tool_call":false,"role":"user","created_at":1757088129},{"content":"I don't have access to external tools or the internet. However, I can assist you with a wide range of topics by providing information, answering questions, and offering suggestions based on the knowledge I've been trained on. If there's anything specific you need help with, feel free to ask!","from_history":false,"stop_after_tool_call":false,"role":"assistant","metrics":{"input_tokens":134,"output_tokens":26,"total_tokens":160},"created_at":1757088129}],"created_at":"2025-09-05T16:02:09Z","updated_at":"2025-09-05T16:02:09Z"}}}}}},"400":{"description":"Invalid session name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthenticatedResponse"}}}},"404":{"description":"Session not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponse"}}}},"422":{"description":"Invalid session type or validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/memories":{"post":{"tags":["Memory"],"summary":"Create Memory","description":"Create a new user memory with content and associated topics. Memories are used to store contextual information for users across conversations.","operationId":"create_memory","security":[{"HTTPBearer":[]}],"parameters":[{"name":"db_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Database ID to use for memory storage","title":"Db Id"},"description":"Database ID to use for memory storage"},{"name":"table","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Table to use for memory storage","title":"Table"},"description":"Table to use for memory storage"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserMemoryCreateSchema"}}}},"responses":{"200":{"description":"Memory created successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserMemorySchema"},"example":{"memory_id":"mem-123","memory":"User prefers technical explanations with code examples","topics":["preferences","communication_style","technical"],"user_id":"user-456","created_at":"2024-01-15T10:30:00Z","updated_at":"2024-01-15T10:30:00Z"}}}},"400":{"description":"Invalid request data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthenticatedResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponse"}}}},"422":{"description":"Validation error in payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"500":{"description":"Failed to create memory","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}},"delete":{"tags":["Memory"],"summary":"Delete Multiple Memories","description":"Delete multiple user memories by their IDs in a single operation. This action cannot be undone and all specified memories will be permanently removed.","operationId":"delete_memories","security":[{"HTTPBearer":[]}],"parameters":[{"name":"db_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Database ID to use for deletion","title":"Db Id"},"description":"Database ID to use for deletion"},{"name":"table","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Table to use for deletion","title":"Table"},"description":"Table to use for deletion"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteMemoriesRequest"}}}},"responses":{"204":{"description":"Memories deleted successfully"},"400":{"description":"Invalid request - empty memory_ids list","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthenticatedResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"500":{"description":"Failed to delete memories","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}},"get":{"tags":["Memory"],"summary":"List Memories","description":"Retrieve paginated list of user memories with filtering and search capabilities. Filter by user, agent, team, topics, or search within memory content.","operationId":"get_memories","security":[{"HTTPBearer":[]}],"parameters":[{"name":"user_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter memories by user ID","title":"User Id"},"description":"Filter memories by user ID"},{"name":"agent_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter memories by agent ID","title":"Agent Id"},"description":"Filter memories by agent ID"},{"name":"team_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter memories by team ID","title":"Team Id"},"description":"Filter memories by team ID"},{"name":"search_content","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Fuzzy search within memory content","title":"Search Content"},"description":"Fuzzy search within memory content"},{"name":"limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Number of memories to return per page","default":20,"title":"Limit"},"description":"Number of memories to return per page"},{"name":"page","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Page number for pagination","default":1,"title":"Page"},"description":"Page number for pagination"},{"name":"sort_by","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Field to sort memories by","default":"updated_at","title":"Sort By"},"description":"Field to sort memories by"},{"name":"sort_order","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/SortOrder"},{"type":"null"}],"description":"Sort order (asc or desc)","default":"desc","title":"Sort Order"},"description":"Sort order (asc or desc)"},{"name":"db_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Database ID to query memories from","title":"Db Id"},"description":"Database ID to query memories from"},{"name":"table","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The database table to use","title":"Table"},"description":"The database table to use"},{"name":"topics","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Comma-separated list of topics to filter by","examples":["preferences,technical,communication_style"],"title":"Topics"},"description":"Comma-separated list of topics to filter by"}],"responses":{"200":{"description":"Memories retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResponse_UserMemorySchema_"},"example":{"data":[{"memory_id":"f9361a69-2997-40c7-ae4e-a5861d434047","memory":"User likes coffee.","topics":["preferences"],"user_id":"123","updated_at":"2025-09-01T07:53:17Z"}]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthenticatedResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/memories/{memory_id}":{"delete":{"tags":["Memory"],"summary":"Delete Memory","description":"Permanently delete a specific user memory. This action cannot be undone.","operationId":"delete_memory","security":[{"HTTPBearer":[]}],"parameters":[{"name":"memory_id","in":"path","required":true,"schema":{"type":"string","description":"Memory ID to delete","title":"Memory Id"},"description":"Memory ID to delete"},{"name":"user_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"User ID to delete memory for","title":"User Id"},"description":"User ID to delete memory for"},{"name":"db_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Database ID to use for deletion","title":"Db Id"},"description":"Database ID to use for deletion"},{"name":"table","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Table to use for deletion","title":"Table"},"description":"Table to use for deletion"}],"responses":{"204":{"description":"Memory deleted successfully"},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthenticatedResponse"}}}},"404":{"description":"Memory not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"500":{"description":"Failed to delete memory","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}},"get":{"tags":["Memory"],"summary":"Get Memory by ID","description":"Retrieve detailed information about a specific user memory by its ID.","operationId":"get_memory","security":[{"HTTPBearer":[]}],"parameters":[{"name":"memory_id","in":"path","required":true,"schema":{"type":"string","description":"Memory ID to retrieve","title":"Memory Id"},"description":"Memory ID to retrieve"},{"name":"user_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"User ID to query memory for","title":"User Id"},"description":"User ID to query memory for"},{"name":"db_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Database ID to query memory from","title":"Db Id"},"description":"Database ID to query memory from"},{"name":"table","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Table to query memory from","title":"Table"},"description":"Table to query memory from"}],"responses":{"200":{"description":"Memory retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserMemorySchema"},"example":{"memory_id":"f9361a69-2997-40c7-ae4e-a5861d434047","memory":"User likes coffee.","topics":["preferences"],"user_id":"123","updated_at":"2025-09-01T07:53:17Z"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthenticatedResponse"}}}},"404":{"description":"Memory not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}},"patch":{"tags":["Memory"],"summary":"Update Memory","description":"Update an existing user memory's content and topics. Replaces the entire memory content and topic list with the provided values.","operationId":"update_memory","security":[{"HTTPBearer":[]}],"parameters":[{"name":"memory_id","in":"path","required":true,"schema":{"type":"string","description":"Memory ID to update","title":"Memory Id"},"description":"Memory ID to update"},{"name":"db_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Database ID to use for update","title":"Db Id"},"description":"Database ID to use for update"},{"name":"table","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Table to use for update","title":"Table"},"description":"Table to use for update"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserMemoryCreateSchema"}}}},"responses":{"200":{"description":"Memory updated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserMemorySchema"},"example":{"memory_id":"f9361a69-2997-40c7-ae4e-a5861d434047","memory":"User likes coffee.","topics":["preferences"],"user_id":"123","updated_at":"2025-09-01T07:53:17Z"}}}},"400":{"description":"Invalid request data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthenticatedResponse"}}}},"404":{"description":"Memory not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponse"}}}},"422":{"description":"Validation error in payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"500":{"description":"Failed to update memory","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/memory_topics":{"get":{"tags":["Memory"],"summary":"Get Memory Topics","description":"Retrieve all unique topics associated with memories in the system. Useful for filtering and categorizing memories by topic.","operationId":"get_memory_topics","security":[{"HTTPBearer":[]}],"parameters":[{"name":"db_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Database ID to query topics from","title":"Db Id"},"description":"Database ID to query topics from"},{"name":"table","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Table to query topics from","title":"Table"},"description":"Table to query topics from"}],"responses":{"200":{"description":"Memory topics retrieved successfully","content":{"application/json":{"schema":{"type":"array","items":{"type":"string"},"title":"Response Get Memory Topics"},"example":["preferences","communication_style","technical","industry","compliance","code_examples","requirements","healthcare","finance"]}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthenticatedResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/user_memory_stats":{"get":{"tags":["Memory"],"summary":"Get User Memory Statistics","description":"Retrieve paginated statistics about memory usage by user. Provides insights into user engagement and memory distribution across users.","operationId":"get_user_memory_stats","security":[{"HTTPBearer":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Number of user statistics to return per page","default":20,"title":"Limit"},"description":"Number of user statistics to return per page"},{"name":"page","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Page number for pagination","default":1,"title":"Page"},"description":"Page number for pagination"},{"name":"db_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Database ID to query statistics from","title":"Db Id"},"description":"Database ID to query statistics from"},{"name":"table","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Table to query statistics from","title":"Table"},"description":"Table to query statistics from"}],"responses":{"200":{"description":"User memory statistics retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResponse_UserStatsSchema_"},"example":{"data":[{"user_id":"123","total_memories":3,"last_memory_updated_at":"2025-09-01T07:53:17Z"}]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthenticatedResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"500":{"description":"Failed to retrieve user statistics","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/optimize-memories":{"post":{"tags":["Memory"],"summary":"Optimize User Memories","description":"Optimize all memories for a given user using the default summarize strategy. This operation combines all memories into a single comprehensive summary, achieving maximum token reduction while preserving all key information. To use a custom model, specify the model parameter in 'provider:model_id' format (e.g., 'openai:gpt-4o-mini', 'anthropic:claude-3-5-sonnet-20241022'). If not specified, uses MemoryManager's default model (gpt-4o). Set apply=false to preview optimization results without saving to database.","operationId":"optimize_memories","security":[{"HTTPBearer":[]}],"parameters":[{"name":"db_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Database ID to use for optimization","title":"Db Id"},"description":"Database ID to use for optimization"},{"name":"table","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Table to use for optimization","title":"Table"},"description":"Table to use for optimization"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OptimizeMemoriesRequest"}}}},"responses":{"200":{"description":"Memories optimized successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OptimizeMemoriesResponse"},"example":{"memories":[{"memory_id":"f9361a69-2997-40c7-ae4e-a5861d434047","memory":"User has a 3-year-old golden retriever named Max who loves fetch and walks. Lives in San Francisco's Mission district, works as a product manager in tech. Enjoys hiking Bay Area trails, trying new restaurants (especially Japanese, Thai, Mexican), and learning piano for 1.5 years.","topics":["pets","location","work","hobbies","food_preferences"],"user_id":"user2","updated_at":"2025-11-18T10:30:00Z"}],"memories_before":4,"memories_after":1,"tokens_before":450,"tokens_after":180,"tokens_saved":270,"reduction_percentage":60.0}}}},"400":{"description":"Bad request - User ID is required or invalid model string format","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthenticatedResponse"}}}},"404":{"description":"No memories found for user","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"500":{"description":"Failed to optimize memories","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/eval-runs":{"get":{"tags":["Evals"],"summary":"List Evaluation Runs","description":"Retrieve paginated evaluation runs with filtering and sorting options. Filter by agent, team, workflow, model, or evaluation type.","operationId":"get_eval_runs","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Agent ID","title":"Agent Id"},"description":"Agent ID"},{"name":"team_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Team ID","title":"Team Id"},"description":"Team ID"},{"name":"workflow_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Workflow ID","title":"Workflow Id"},"description":"Workflow ID"},{"name":"model_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Model ID","title":"Model Id"},"description":"Model ID"},{"name":"type","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/EvalFilterType"},{"type":"null"}],"description":"Filter type","title":"Type"},"description":"Filter type"},{"name":"limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Number of eval runs to return","default":20,"title":"Limit"},"description":"Number of eval runs to return"},{"name":"page","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"sort_by","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Field to sort by","default":"created_at","title":"Sort By"},"description":"Field to sort by"},{"name":"sort_order","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/SortOrder"},{"type":"null"}],"description":"Sort order (asc or desc)","default":"desc","title":"Sort Order"},"description":"Sort order (asc or desc)"},{"name":"db_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The ID of the database to use","title":"Db Id"},"description":"The ID of the database to use"},{"name":"table","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The database table to use","title":"Table"},"description":"The database table to use"},{"name":"eval_types","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Comma-separated eval types (accuracy,agent_as_judge,performance,reliability)","examples":["accuracy,agent_as_judge,performance,reliability"],"title":"Eval Types"},"description":"Comma-separated eval types (accuracy,agent_as_judge,performance,reliability)"}],"responses":{"200":{"description":"Evaluation runs retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResponse_EvalSchema_"},"example":{"data":[{"id":"a03fa2f4-900d-482d-afe0-470d4cd8d1f4","agent_id":"basic-agent","model_id":"gpt-4o","model_provider":"OpenAI","name":"Test ","eval_type":"reliability","eval_data":{"eval_status":"PASSED","failed_tool_calls":[],"passed_tool_calls":["multiply"]},"eval_input":{"expected_tool_calls":["multiply"]},"created_at":"2025-08-27T15:41:59Z","updated_at":"2025-08-27T15:41:59Z"}]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthenticatedResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}},"delete":{"tags":["Evals"],"summary":"Delete Evaluation Runs","description":"Delete multiple evaluation runs by their IDs. This action cannot be undone.","operationId":"delete_eval_runs","security":[{"HTTPBearer":[]}],"parameters":[{"name":"db_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Database ID to use for deletion","title":"Db Id"},"description":"Database ID to use for deletion"},{"name":"table","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Table to use for deletion","title":"Table"},"description":"Table to use for deletion"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteEvalRunsRequest"}}}},"responses":{"204":{"description":"Successful Response"},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthenticatedResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"500":{"description":"Failed to delete evaluation runs","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}},"post":{"tags":["Evals"],"summary":"Execute Evaluation","description":"Run evaluation tests on agents or teams. Supports accuracy, agent-as-judge, performance, and reliability evaluations. Requires either agent_id or team_id, but not both.","operationId":"run_eval","security":[{"HTTPBearer":[]}],"parameters":[{"name":"db_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Database ID to use for evaluation","title":"Db Id"},"description":"Database ID to use for evaluation"},{"name":"table","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Table to use for evaluation","title":"Table"},"description":"Table to use for evaluation"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvalRunInput"}}}},"responses":{"200":{"description":"Evaluation executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvalSchema"},"example":{"id":"f2b2d72f-e9e2-4f0e-8810-0a7e1ff58614","agent_id":"basic-agent","model_id":"gpt-4o","model_provider":"OpenAI","eval_type":"reliability","eval_data":{"eval_status":"PASSED","failed_tool_calls":[],"passed_tool_calls":["multiply"]},"created_at":"2025-08-27T15:41:59Z","updated_at":"2025-08-27T15:41:59Z"}}}},"400":{"description":"Invalid request - provide either agent_id or team_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthenticatedResponse"}}}},"404":{"description":"Agent or team not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/eval-runs/{eval_run_id}":{"get":{"tags":["Evals"],"summary":"Get Evaluation Run","description":"Retrieve detailed results and metrics for a specific evaluation run.","operationId":"get_eval_run","security":[{"HTTPBearer":[]}],"parameters":[{"name":"eval_run_id","in":"path","required":true,"schema":{"type":"string","title":"Eval Run Id"}},{"name":"db_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The ID of the database to use","title":"Db Id"},"description":"The ID of the database to use"},{"name":"table","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Table to query eval run from","title":"Table"},"description":"Table to query eval run from"}],"responses":{"200":{"description":"Evaluation run details retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvalSchema"},"example":{"id":"a03fa2f4-900d-482d-afe0-470d4cd8d1f4","agent_id":"basic-agent","model_id":"gpt-4o","model_provider":"OpenAI","name":"Test ","eval_type":"reliability","eval_data":{"eval_status":"PASSED","failed_tool_calls":[],"passed_tool_calls":["multiply"]},"eval_input":{"expected_tool_calls":["multiply"]},"created_at":"2025-08-27T15:41:59Z","updated_at":"2025-08-27T15:41:59Z"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthenticatedResponse"}}}},"404":{"description":"Evaluation run not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}},"patch":{"tags":["Evals"],"summary":"Update Evaluation Run","description":"Update the name or other properties of an existing evaluation run.","operationId":"update_eval_run","security":[{"HTTPBearer":[]}],"parameters":[{"name":"eval_run_id","in":"path","required":true,"schema":{"type":"string","title":"Eval Run Id"}},{"name":"db_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The ID of the database to use","title":"Db Id"},"description":"The ID of the database to use"},{"name":"table","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Table to use for rename operation","title":"Table"},"description":"Table to use for rename operation"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateEvalRunRequest"}}}},"responses":{"200":{"description":"Evaluation run updated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvalSchema"},"example":{"id":"a03fa2f4-900d-482d-afe0-470d4cd8d1f4","agent_id":"basic-agent","model_id":"gpt-4o","model_provider":"OpenAI","name":"Test ","eval_type":"reliability","eval_data":{"eval_status":"PASSED","failed_tool_calls":[],"passed_tool_calls":["multiply"]},"eval_input":{"expected_tool_calls":["multiply"]},"created_at":"2025-08-27T15:41:59Z","updated_at":"2025-08-27T15:41:59Z"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthenticatedResponse"}}}},"404":{"description":"Evaluation run not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"500":{"description":"Failed to update evaluation run","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/metrics":{"get":{"tags":["Metrics"],"summary":"Get AgentOS Metrics","description":"Retrieve AgentOS metrics and analytics data for a specified date range. If no date range is specified, returns all available metrics.","operationId":"get_metrics","security":[{"HTTPBearer":[]}],"parameters":[{"name":"starting_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"Starting date for metrics range (YYYY-MM-DD format)","title":"Starting Date"},"description":"Starting date for metrics range (YYYY-MM-DD format)"},{"name":"ending_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"Ending date for metrics range (YYYY-MM-DD format)","title":"Ending Date"},"description":"Ending date for metrics range (YYYY-MM-DD format)"},{"name":"db_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Database ID to query metrics from","title":"Db Id"},"description":"Database ID to query metrics from"},{"name":"table","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The database table to use","title":"Table"},"description":"The database table to use"}],"responses":{"200":{"description":"Metrics retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MetricsResponse"},"example":{"metrics":[{"id":"7bf39658-a00a-484c-8a28-67fd8a9ddb2a","agent_runs_count":5,"agent_sessions_count":5,"team_runs_count":0,"team_sessions_count":0,"workflow_runs_count":0,"workflow_sessions_count":0,"users_count":1,"token_metrics":{"input_tokens":448,"output_tokens":148,"total_tokens":596,"audio_tokens":0,"input_audio_tokens":0,"output_audio_tokens":0,"cached_tokens":0,"cache_write_tokens":0,"reasoning_tokens":0},"model_metrics":[{"model_id":"gpt-4o","model_provider":"OpenAI","count":5}],"date":"2025-07-31T00:00:00","created_at":1753993132,"updated_at":1753993741}]}}}},"400":{"description":"Invalid date range parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthenticatedResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"500":{"description":"Failed to retrieve metrics","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/metrics/refresh":{"post":{"tags":["Metrics"],"summary":"Refresh Metrics","description":"Manually trigger recalculation of system metrics from raw data. This operation analyzes system activity logs and regenerates aggregated metrics. Useful for ensuring metrics are up-to-date or after system maintenance.","operationId":"refresh_metrics","security":[{"HTTPBearer":[]}],"parameters":[{"name":"db_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Database ID to use for metrics calculation","title":"Db Id"},"description":"Database ID to use for metrics calculation"},{"name":"table","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Table to use for metrics calculation","title":"Table"},"description":"Table to use for metrics calculation"}],"responses":{"200":{"description":"Metrics refreshed successfully","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DayAggregatedMetrics"},"title":"Response Refresh Metrics"},"example":[{"id":"e77c9531-818b-47a5-99cd-59fed61e5403","agent_runs_count":2,"agent_sessions_count":2,"team_runs_count":0,"team_sessions_count":0,"workflow_runs_count":0,"workflow_sessions_count":0,"users_count":1,"token_metrics":{"input_tokens":256,"output_tokens":441,"total_tokens":697,"audio_total_tokens":0,"audio_input_tokens":0,"audio_output_tokens":0,"cache_read_tokens":0,"cache_write_tokens":0,"reasoning_tokens":0},"model_metrics":[{"model_id":"gpt-4o","model_provider":"OpenAI","count":2}],"date":"2025-08-12T00:00:00","created_at":1755016907,"updated_at":1755016907}]}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthenticatedResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"500":{"description":"Failed to refresh metrics","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/knowledge/content":{"post":{"tags":["Knowledge"],"summary":"Upload Content","description":"Upload content to the knowledge base. Supports file uploads, text content, or URLs. Content is processed asynchronously in the background. Supports custom readers and chunking strategies.","operationId":"upload_content","security":[{"HTTPBearer":[]}],"parameters":[{"name":"db_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Database ID to use for content storage","title":"Db Id"},"description":"Database ID to use for content storage"}],"requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_content"}}}},"responses":{"202":{"description":"Content upload accepted for processing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContentResponseSchema"},"example":{"id":"content-123","name":"example-document.pdf","description":"Sample document for processing","metadata":{"category":"documentation","priority":"high"},"status":"processing"}}}},"400":{"description":"Invalid request - malformed metadata or missing content","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthenticatedResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponse"}}}},"422":{"description":"Validation error in form data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}},"get":{"tags":["Knowledge"],"summary":"List Content","description":"Retrieve paginated list of all content in the knowledge base with filtering and sorting options. Filter by status, content type, or metadata properties.","operationId":"get_content","security":[{"HTTPBearer":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Number of content entries to return","default":20,"title":"Limit"},"description":"Number of content entries to return"},{"name":"page","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"sort_by","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Field to sort by","default":"created_at","title":"Sort By"},"description":"Field to sort by"},{"name":"sort_order","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/SortOrder"},{"type":"null"}],"description":"Sort order (asc or desc)","default":"desc","title":"Sort Order"},"description":"Sort order (asc or desc)"},{"name":"db_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The ID of the database to use","title":"Db Id"},"description":"The ID of the database to use"}],"responses":{"200":{"description":"Content list retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResponse_ContentResponseSchema_"},"example":{"data":[{"id":"3c2fc685-d451-4d47-b0c0-b9a544c672b7","name":"example.pdf","description":"","type":"application/pdf","size":"251261","metadata":{},"access_count":1,"status":"completed","status_message":"","created_at":"2025-09-08T15:22:53Z","updated_at":"2025-09-08T15:22:54Z"}],"meta":{"page":1,"limit":20,"total_pages":1,"total_count":2}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthenticatedResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}},"delete":{"tags":["Knowledge"],"summary":"Delete All Content","description":"Permanently remove all content from the knowledge base. This is a destructive operation that cannot be undone. Use with extreme caution.","operationId":"delete_all_content","security":[{"HTTPBearer":[]}],"parameters":[{"name":"db_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The ID of the database to use","title":"Db Id"},"description":"The ID of the database to use"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthenticatedResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"500":{"description":"Failed to delete all content","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/knowledge/content/{content_id}":{"patch":{"tags":["Knowledge"],"summary":"Update Content","description":"Update content properties such as name, description, metadata, or processing configuration. Allows modification of existing content without re-uploading.","operationId":"update_content","security":[{"HTTPBearer":[]}],"parameters":[{"name":"content_id","in":"path","required":true,"schema":{"type":"string","description":"Content ID","title":"Content Id"},"description":"Content ID"},{"name":"db_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The ID of the database to use","title":"Db Id"},"description":"The ID of the database to use"}],"requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_update_content"}}}},"responses":{"200":{"description":"Content updated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContentResponseSchema"},"example":{"id":"3c2fc685-d451-4d47-b0c0-b9a544c672b7","name":"example.pdf","description":"","type":"application/pdf","size":"251261","metadata":{},"access_count":1,"status":"completed","status_message":"","created_at":"2025-09-08T15:22:53Z","updated_at":"2025-09-08T15:22:54Z"}}}},"400":{"description":"Invalid request - malformed metadata or invalid reader_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthenticatedResponse"}}}},"404":{"description":"Content not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}},"get":{"tags":["Knowledge"],"summary":"Get Content by ID","description":"Retrieve detailed information about a specific content item including processing status and metadata.","operationId":"get_content_by_id","security":[{"HTTPBearer":[]}],"parameters":[{"name":"content_id","in":"path","required":true,"schema":{"type":"string","title":"Content Id"}},{"name":"db_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The ID of the database to use","title":"Db Id"},"description":"The ID of the database to use"}],"responses":{"200":{"description":"Content details retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContentResponseSchema"},"example":{"id":"3c2fc685-d451-4d47-b0c0-b9a544c672b7","name":"example.pdf","description":"","type":"application/pdf","size":"251261","metadata":{},"access_count":1,"status":"completed","status_message":"","created_at":"2025-09-08T15:22:53Z","updated_at":"2025-09-08T15:22:54Z"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthenticatedResponse"}}}},"404":{"description":"Content not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}},"delete":{"tags":["Knowledge"],"summary":"Delete Content by ID","description":"Permanently remove a specific content item from the knowledge base. This action cannot be undone.","operationId":"delete_content_by_id","security":[{"HTTPBearer":[]}],"parameters":[{"name":"content_id","in":"path","required":true,"schema":{"type":"string","title":"Content Id"}},{"name":"db_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The ID of the database to use","title":"Db Id"},"description":"The ID of the database to use"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContentResponseSchema"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthenticatedResponse"}}}},"404":{"description":"Content not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"500":{"description":"Failed to delete content","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/knowledge/content/{content_id}/status":{"get":{"tags":["Knowledge"],"summary":"Get Content Status","description":"Retrieve the current processing status of a content item. Useful for monitoring asynchronous content processing progress and identifying any processing errors.","operationId":"get_content_status","security":[{"HTTPBearer":[]}],"parameters":[{"name":"content_id","in":"path","required":true,"schema":{"type":"string","title":"Content Id"}},{"name":"db_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The ID of the database to use","title":"Db Id"},"description":"The ID of the database to use"}],"responses":{"200":{"description":"Content status retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContentStatusResponse"},"examples":{"completed":{"summary":"Example completed content status","value":{"status":"completed","status_message":""}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthenticatedResponse"}}}},"404":{"description":"Content not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/knowledge/search":{"post":{"tags":["Knowledge"],"summary":"Search Knowledge","description":"Search the knowledge base for relevant documents using query, filters and search type.","operationId":"search_knowledge","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VectorSearchRequestSchema"}}},"required":true},"responses":{"200":{"description":"Search results retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResponse_VectorSearchResult_"},"example":{"data":[{"id":"doc_123","content":"Jordan Mitchell - Software Engineer with skills in JavaScript, React, Python","name":"cv_1","meta_data":{"page":1,"chunk":1},"usage":{"total_tokens":14},"reranking_score":0.95,"content_id":"content_456"}],"meta":{"page":1,"limit":20,"total_pages":2,"total_count":35}}}}},"400":{"description":"Invalid search parameters"},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthenticatedResponse"}}}},"404":{"description":"No documents found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/knowledge/config":{"get":{"tags":["Knowledge"],"summary":"Get Config","description":"Retrieve available readers, chunkers, and configuration options for content processing. This endpoint provides metadata about supported file types, processing strategies, and filters.","operationId":"get_knowledge_config","security":[{"HTTPBearer":[]}],"parameters":[{"name":"db_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The ID of the database to use","title":"Db Id"},"description":"The ID of the database to use"}],"responses":{"200":{"description":"Knowledge configuration retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConfigResponseSchema"},"example":{"readers":{"website":{"id":"website","name":"WebsiteReader","description":"Reads website files","chunkers":["AgenticChunker","DocumentChunker","RecursiveChunker","SemanticChunker","FixedSizeChunker"]},"firecrawl":{"id":"firecrawl","name":"FirecrawlReader","description":"Reads firecrawl files","chunkers":["SemanticChunker","FixedSizeChunker","AgenticChunker","DocumentChunker","RecursiveChunker"]},"youtube":{"id":"youtube","name":"YoutubeReader","description":"Reads youtube files","chunkers":["RecursiveChunker","AgenticChunker","DocumentChunker","SemanticChunker","FixedSizeChunker"]},"web_search":{"id":"web_search","name":"WebSearchReader","description":"Reads web_search files","chunkers":["AgenticChunker","DocumentChunker","RecursiveChunker","SemanticChunker","FixedSizeChunker"]},"arxiv":{"id":"arxiv","name":"ArxivReader","description":"Reads arxiv files","chunkers":["FixedSizeChunker","AgenticChunker","DocumentChunker","RecursiveChunker","SemanticChunker"]},"csv":{"id":"csv","name":"CsvReader","description":"Reads csv files","chunkers":["RowChunker","FixedSizeChunker","AgenticChunker","DocumentChunker","RecursiveChunker"]},"docx":{"id":"docx","name":"DocxReader","description":"Reads docx files","chunkers":["DocumentChunker","FixedSizeChunker","SemanticChunker","AgenticChunker","RecursiveChunker"]},"gcs":{"id":"gcs","name":"GcsReader","description":"Reads gcs files","chunkers":["FixedSizeChunker","AgenticChunker","DocumentChunker","RecursiveChunker","SemanticChunker"]},"json":{"id":"json","name":"JsonReader","description":"Reads json files","chunkers":["FixedSizeChunker","AgenticChunker","DocumentChunker","RecursiveChunker","SemanticChunker"]},"markdown":{"id":"markdown","name":"MarkdownReader","description":"Reads markdown files","chunkers":["MarkdownChunker","DocumentChunker","AgenticChunker","RecursiveChunker","SemanticChunker","FixedSizeChunker"]},"pdf":{"id":"pdf","name":"PdfReader","description":"Reads pdf files","chunkers":["DocumentChunker","FixedSizeChunker","AgenticChunker","SemanticChunker","RecursiveChunker"]},"text":{"id":"text","name":"TextReader","description":"Reads text files","chunkers":["FixedSizeChunker","AgenticChunker","DocumentChunker","RecursiveChunker","SemanticChunker"]}},"readersForType":{"url":["url","website","firecrawl","youtube","web_search","gcs"],"youtube":["youtube"],"text":["web_search"],"topic":["arxiv"],"file":["csv","gcs"],".csv":["csv"],".xlsx":["csv"],".xls":["csv"],".docx":["docx"],".doc":["docx"],".json":["json"],".md":["markdown"],".pdf":["pdf"],".txt":["text"]},"chunkers":{"AgenticChunker":{"key":"AgenticChunker","name":"AgenticChunker","description":"Chunking strategy that uses an LLM to determine natural breakpoints in the text","metadata":{"chunk_size":5000}},"DocumentChunker":{"key":"DocumentChunker","name":"DocumentChunker","description":"A chunking strategy that splits text based on document structure like paragraphs and sections","metadata":{"chunk_size":5000,"chunk_overlap":0}},"FixedSizeChunker":{"key":"FixedSizeChunker","name":"FixedSizeChunker","description":"Chunking strategy that splits text into fixed-size chunks with optional overlap","metadata":{"chunk_size":5000,"chunk_overlap":0}},"MarkdownChunker":{"key":"MarkdownChunker","name":"MarkdownChunker","description":"A chunking strategy that splits markdown based on structure like headers, paragraphs and sections","metadata":{"chunk_size":5000,"chunk_overlap":0}},"RecursiveChunker":{"key":"RecursiveChunker","name":"RecursiveChunker","description":"Chunking strategy that recursively splits text into chunks by finding natural break points","metadata":{"chunk_size":5000,"chunk_overlap":0}},"RowChunker":{"key":"RowChunker","name":"RowChunker","description":"RowChunking chunking strategy","metadata":{}},"SemanticChunker":{"key":"SemanticChunker","name":"SemanticChunker","description":"Chunking strategy that splits text into semantic chunks using chonkie","metadata":{"chunk_size":5000}}},"vector_dbs":[{"id":"vector_db_1","name":"Vector DB 1","description":"Vector DB 1 description","search_types":["vector","keyword","hybrid"]}],"filters":["filter_tag_1","filter_tag2"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthenticatedResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/traces":{"get":{"tags":["Traces","Traces"],"summary":"List Traces","description":"Retrieve a paginated list of execution traces with optional filtering.\n\n**Traces provide observability into:**\n- Agent execution flows\n- Model invocations and token usage\n- Tool calls and their results\n- Errors and performance bottlenecks\n\n**Filtering Options:**\n- By run, session, user, or agent ID\n- By status (OK, ERROR)\n- By time range\n\n**Pagination:**\n- Use `page` (1-indexed) and `limit` parameters\n- Response includes pagination metadata (total_pages, total_count, etc.)\n\n**Response Format:**\nReturns summary information for each trace. Use GET `/traces/{trace_id}` for detailed hierarchy.","operationId":"get_traces","security":[{"HTTPBearer":[]}],"parameters":[{"name":"run_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by run ID","title":"Run Id"},"description":"Filter by run ID"},{"name":"session_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by session ID","title":"Session Id"},"description":"Filter by session ID"},{"name":"user_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by user ID","title":"User Id"},"description":"Filter by user ID"},{"name":"agent_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by agent ID","title":"Agent Id"},"description":"Filter by agent ID"},{"name":"team_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by team ID","title":"Team Id"},"description":"Filter by team ID"},{"name":"workflow_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by workflow ID","title":"Workflow Id"},"description":"Filter by workflow ID"},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by status (OK, ERROR)","title":"Status"},"description":"Filter by status (OK, ERROR)"},{"name":"start_time","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter traces starting after this time (ISO 8601 format with timezone, e.g., '2025-11-19T10:00:00Z' or '2025-11-19T15:30:00+05:30'). Times are converted to UTC for comparison.","title":"Start Time"},"description":"Filter traces starting after this time (ISO 8601 format with timezone, e.g., '2025-11-19T10:00:00Z' or '2025-11-19T15:30:00+05:30'). Times are converted to UTC for comparison."},{"name":"end_time","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter traces ending before this time (ISO 8601 format with timezone, e.g., '2025-11-19T11:00:00Z' or '2025-11-19T16:30:00+05:30'). Times are converted to UTC for comparison.","title":"End Time"},"description":"Filter traces ending before this time (ISO 8601 format with timezone, e.g., '2025-11-19T11:00:00Z' or '2025-11-19T16:30:00+05:30'). Times are converted to UTC for comparison."},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number (1-indexed)","default":1,"title":"Page"},"description":"Page number (1-indexed)"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Number of traces per page","default":20,"title":"Limit"},"description":"Number of traces per page"},{"name":"db_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Database ID to query traces from","title":"Db Id"},"description":"Database ID to query traces from"}],"responses":{"200":{"description":"List of traces retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResponse_TraceSummary_"},"example":{"data":[{"trace_id":"a1b2c3d4","name":"Stock_Price_Agent.run","status":"OK","duration":"1.2s","start_time":"2025-11-19T10:30:00.000000+00:00","total_spans":4,"error_count":0,"input":"What is the stock price of NVDA?","run_id":"run123","session_id":"session456","user_id":"user789","agent_id":"agent_stock","created_at":"2025-11-19T10:30:00+00:00"}],"meta":{"page":1,"limit":20,"total_pages":5,"total_count":95}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthenticatedResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/traces/{trace_id}":{"get":{"tags":["Traces","Traces"],"summary":"Get Trace or Span Detail","description":"Retrieve detailed trace information with hierarchical span tree, or a specific span within the trace.\n\n**Without span_id parameter:**\nReturns the full trace with hierarchical span tree:\n- Trace metadata (ID, status, duration, context)\n- Hierarchical tree of all spans\n- Each span includes timing, status, and type-specific metadata\n\n**With span_id parameter:**\nReturns details for a specific span within the trace:\n- Span metadata (ID, name, type, timing)\n- Status and error information\n- Type-specific attributes (model, tokens, tool params, etc.)\n\n**Span Hierarchy (full trace):**\nThe `tree` field contains root spans, each with potential `children`.\nThis recursive structure represents the execution flow:\n```\nAgent.run (root)\n ├─ LLM.invoke\n ├─ Tool.execute\n │ └─ LLM.invoke (nested)\n └─ LLM.invoke\n```\n\n**Span Types:**\n- `AGENT`: Agent execution with input/output\n- `LLM`: Model invocations with tokens and prompts\n- `TOOL`: Tool calls with parameters and results","operationId":"get_trace","security":[{"HTTPBearer":[]}],"parameters":[{"name":"trace_id","in":"path","required":true,"schema":{"type":"string","title":"Trace Id"}},{"name":"span_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional: Span ID to retrieve specific span","title":"Span Id"},"description":"Optional: Span ID to retrieve specific span"},{"name":"run_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional: Run ID to retrieve trace for","title":"Run Id"},"description":"Optional: Run ID to retrieve trace for"},{"name":"db_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Database ID to query trace from","title":"Db Id"},"description":"Database ID to query trace from"}],"responses":{"200":{"description":"Trace or span detail retrieved successfully","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/TraceDetail"},{"$ref":"#/components/schemas/TraceNode"}],"title":"Response Get Trace"},"examples":{"full_trace":{"summary":"Full trace with hierarchy (no span_id)","value":{"trace_id":"a1b2c3d4","name":"Stock_Price_Agent.run","status":"OK","duration":"1.2s","start_time":"2025-11-19T10:30:00.000000+00:00","end_time":"2025-11-19T10:30:01.200000+00:00","total_spans":4,"error_count":0,"input":"What is Tesla stock price?","output":"The current price of Tesla (TSLA) is $245.67.","run_id":"run123","session_id":"session456","user_id":"user789","agent_id":"stock_agent","created_at":"2025-11-19T10:30:00+00:00","tree":[{"id":"span1","name":"Stock_Price_Agent.run","type":"AGENT","duration":"1.2s","status":"OK","spans":[]}]}},"single_span":{"summary":"Single span detail (with span_id)","value":{"id":"span2","name":"gpt-4o-mini.invoke","type":"LLM","duration":"800ms","status":"OK","metadata":{"model":"gpt-4o-mini","input_tokens":120}}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthenticatedResponse"}}}},"404":{"description":"Trace or span not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/trace_session_stats":{"get":{"tags":["Traces","Traces"],"summary":"Get Trace Statistics by Session","description":"Retrieve aggregated trace statistics grouped by session ID with pagination.\n\n**Provides insights into:**\n- Total traces per session\n- First and last trace timestamps per session\n- Associated user and agent information\n\n**Filtering Options:**\n- By user ID\n- By agent ID\n\n**Use Cases:**\n- Monitor session-level activity\n- Track conversation flows\n- Identify high-activity sessions\n- Analyze user engagement patterns","operationId":"get_trace_stats","security":[{"HTTPBearer":[]}],"parameters":[{"name":"user_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by user ID","title":"User Id"},"description":"Filter by user ID"},{"name":"agent_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by agent ID","title":"Agent Id"},"description":"Filter by agent ID"},{"name":"team_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by team ID","title":"Team Id"},"description":"Filter by team ID"},{"name":"workflow_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by workflow ID","title":"Workflow Id"},"description":"Filter by workflow ID"},{"name":"start_time","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter sessions with traces created after this time (ISO 8601 format with timezone, e.g., '2025-11-19T10:00:00Z' or '2025-11-19T15:30:00+05:30'). Times are converted to UTC for comparison.","title":"Start Time"},"description":"Filter sessions with traces created after this time (ISO 8601 format with timezone, e.g., '2025-11-19T10:00:00Z' or '2025-11-19T15:30:00+05:30'). Times are converted to UTC for comparison."},{"name":"end_time","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter sessions with traces created before this time (ISO 8601 format with timezone, e.g., '2025-11-19T11:00:00Z' or '2025-11-19T16:30:00+05:30'). Times are converted to UTC for comparison.","title":"End Time"},"description":"Filter sessions with traces created before this time (ISO 8601 format with timezone, e.g., '2025-11-19T11:00:00Z' or '2025-11-19T16:30:00+05:30'). Times are converted to UTC for comparison."},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number (1-indexed)","default":1,"title":"Page"},"description":"Page number (1-indexed)"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Number of sessions per page","default":20,"title":"Limit"},"description":"Number of sessions per page"},{"name":"db_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Database ID to query statistics from","title":"Db Id"},"description":"Database ID to query statistics from"}],"responses":{"200":{"description":"Trace statistics retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResponse_TraceSessionStats_"},"example":{"data":[{"session_id":"37029bc6-1794-4ba8-a629-1efedc53dcad","user_id":"kaustubh@agno.com","agent_id":"hackernews-agent","total_traces":5,"first_trace_at":"2025-11-19T10:15:16+00:00","last_trace_at":"2025-11-19T10:21:30+00:00"}],"meta":{"page":1,"limit":20,"total_pages":3,"total_count":45}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthenticatedResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"500":{"description":"Failed to retrieve statistics","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/databases/all/migrate":{"post":{"tags":["Database"],"summary":"Migrate All Databases","description":"Migrate all database schemas to the given target version. If a target version is not provided, all databases will be migrated to the latest version.","operationId":"migrate_all_databases","security":[{"HTTPBearer":[]}],"parameters":[{"name":"target_version","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The target version to migrate tables to","title":"Target Version"},"description":"The target version to migrate tables to"}],"responses":{"200":{"description":"All databases migrated successfully","content":{"application/json":{"schema":{},"example":{"message":"All databases migrated successfully to version 3.0.0"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthenticatedResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"500":{"description":"Failed to migrate databases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/databases/{db_id}/migrate":{"post":{"tags":["Database"],"summary":"Migrate Database","description":"Migrate the given database schema to the given target version. If a target version is not provided, the database will be migrated to the latest version.","operationId":"migrate_database","security":[{"HTTPBearer":[]}],"parameters":[{"name":"db_id","in":"path","required":true,"schema":{"type":"string","title":"Db Id"}},{"name":"target_version","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The target version to migrate tables to","title":"Target Version"},"description":"The target version to migrate tables to"}],"responses":{"200":{"description":"Database migrated successfully","content":{"application/json":{"schema":{},"example":{"message":"Database migrated successfully to version 3.0.0"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthenticatedResponse"}}}},"404":{"description":"Database not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"500":{"description":"Failed to migrate database","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}}},"components":{"schemas":{"AgentResponse":{"properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"db_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Db Id"},"model":{"anyOf":[{"$ref":"#/components/schemas/ModelResponse"},{"type":"null"}]},"tools":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Tools"},"sessions":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Sessions"},"knowledge":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Knowledge"},"memory":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Memory"},"reasoning":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Reasoning"},"default_tools":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Default Tools"},"system_message":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"System Message"},"extra_messages":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Extra Messages"},"response_settings":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Response Settings"},"introduction":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Introduction"},"streaming":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Streaming"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata"},"input_schema":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Input Schema"}},"type":"object","title":"AgentResponse"},"AgentSessionDetailSchema":{"properties":{"user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id","description":"User ID associated with the session"},"agent_session_id":{"type":"string","title":"Agent Session Id","description":"Unique agent session identifier"},"session_id":{"type":"string","title":"Session Id","description":"Session identifier"},"session_name":{"type":"string","title":"Session Name","description":"Human-readable session name"},"session_summary":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Session Summary","description":"Summary of session interactions"},"session_state":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Session State","description":"Current state of the session"},"agent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Id","description":"Agent ID used in this session"},"total_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Tokens","description":"Total tokens used in this session"},"agent_data":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Agent Data","description":"Agent-specific data"},"metrics":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metrics","description":"Session metrics"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata","description":"Additional metadata"},"chat_history":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Chat History","description":"Complete chat history"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At","description":"Session creation timestamp"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At","description":"Last update timestamp"}},"type":"object","required":["agent_session_id","session_id","session_name"],"title":"AgentSessionDetailSchema"},"AgentSummaryResponse":{"properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id","description":"Unique identifier for the agent"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Name of the agent"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Description of the agent"},"db_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Db Id","description":"Database identifier"}},"type":"object","title":"AgentSummaryResponse"},"Artifact":{"properties":{"artifactId":{"type":"string","title":"Artifactid"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"extensions":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Extensions"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"parts":{"items":{"$ref":"#/components/schemas/Part"},"type":"array","title":"Parts"}},"type":"object","required":["artifactId","parts"],"title":"Artifact","description":"Represents a file, data structure, or other resource generated by an agent during a task."},"AssistantMessage":{"properties":{"id":{"type":"string","title":"Id"},"role":{"type":"string","const":"assistant","title":"Role"},"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":false,"type":"object","required":["id","role"],"title":"AssistantMessage","description":"An assistant message."},"BadRequestResponse":{"properties":{"detail":{"type":"string","title":"Detail","description":"Error detail message"},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Code","description":"Error code for categorization"}},"type":"object","required":["detail"],"title":"BadRequestResponse","example":{"detail":"Bad request","error_code":"BAD_REQUEST"}},"Body_continue_agent_run":{"properties":{"tools":{"type":"string","title":"Tools"},"session_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session Id"},"user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id"},"stream":{"type":"boolean","title":"Stream","default":true}},"type":"object","required":["tools"],"title":"Body_continue_agent_run"},"Body_create_agent_run":{"properties":{"message":{"type":"string","title":"Message"},"stream":{"type":"boolean","title":"Stream","default":false},"session_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session Id"},"user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id"},"files":{"anyOf":[{"items":{"type":"string","format":"binary"},"type":"array"},{"type":"null"}],"title":"Files"}},"type":"object","required":["message"],"title":"Body_create_agent_run"},"Body_create_team_run":{"properties":{"message":{"type":"string","title":"Message"},"stream":{"type":"boolean","title":"Stream","default":true},"monitor":{"type":"boolean","title":"Monitor","default":true},"session_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session Id"},"user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id"},"files":{"anyOf":[{"items":{"type":"string","format":"binary"},"type":"array"},{"type":"null"}],"title":"Files"}},"type":"object","required":["message"],"title":"Body_create_team_run"},"Body_create_workflow_run":{"properties":{"message":{"type":"string","title":"Message"},"stream":{"type":"boolean","title":"Stream","default":true},"session_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session Id"},"user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id"}},"type":"object","required":["message"],"title":"Body_create_workflow_run"},"Body_rename_session":{"properties":{"session_name":{"type":"string","title":"Session Name","description":"New name for the session"}},"type":"object","required":["session_name"],"title":"Body_rename_session"},"Body_update_content":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Content name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Content description"},"metadata":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Metadata","description":"Content metadata as JSON string"},"reader_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reader Id","description":"ID of the reader to use for processing"}},"type":"object","title":"Body_update_content"},"Body_upload_content":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Content name (auto-generated from file/URL if not provided)"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Content description for context"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url","description":"URL to fetch content from (JSON array or single URL string)"},"metadata":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Metadata","description":"JSON metadata object for additional content properties"},"file":{"anyOf":[{"type":"string","format":"binary"},{"type":"null"}],"title":"File","description":"File to upload for processing"},"text_content":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Text Content","description":"Raw text content to process"},"reader_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reader Id","description":"ID of the reader to use for content processing"},"chunker":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Chunker","description":"Chunking strategy to apply during processing"},"chunk_size":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Chunk Size","description":"Chunk size to use for processing"},"chunk_overlap":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Chunk Overlap","description":"Chunk overlap to use for processing"}},"type":"object","title":"Body_upload_content"},"ChatConfig":{"properties":{"quick_prompts":{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object","title":"Quick Prompts"}},"type":"object","required":["quick_prompts"],"title":"ChatConfig","description":"Configuration for the Chat page of the AgentOS"},"ChunkerSchema":{"properties":{"key":{"type":"string","title":"Key"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata"}},"type":"object","required":["key"],"title":"ChunkerSchema"},"ConfigResponse":{"properties":{"os_id":{"type":"string","title":"Os Id","description":"Unique identifier for the OS instance"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Name of the OS instance"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Description of the OS instance"},"available_models":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Available Models","description":"List of available models"},"databases":{"items":{"type":"string"},"type":"array","title":"Databases","description":"List of database IDs"},"chat":{"anyOf":[{"$ref":"#/components/schemas/ChatConfig"},{"type":"null"}],"description":"Chat configuration"},"session":{"anyOf":[{"$ref":"#/components/schemas/SessionConfig"},{"type":"null"}],"description":"Session configuration"},"metrics":{"anyOf":[{"$ref":"#/components/schemas/MetricsConfig"},{"type":"null"}],"description":"Metrics configuration"},"memory":{"anyOf":[{"$ref":"#/components/schemas/MemoryConfig"},{"type":"null"}],"description":"Memory configuration"},"knowledge":{"anyOf":[{"$ref":"#/components/schemas/KnowledgeConfig"},{"type":"null"}],"description":"Knowledge configuration"},"evals":{"anyOf":[{"$ref":"#/components/schemas/EvalsConfig"},{"type":"null"}],"description":"Evaluations configuration"},"traces":{"anyOf":[{"$ref":"#/components/schemas/TracesConfig"},{"type":"null"}],"description":"Traces configuration"},"agents":{"items":{"$ref":"#/components/schemas/AgentSummaryResponse"},"type":"array","title":"Agents","description":"List of registered agents"},"teams":{"items":{"$ref":"#/components/schemas/TeamSummaryResponse"},"type":"array","title":"Teams","description":"List of registered teams"},"workflows":{"items":{"$ref":"#/components/schemas/WorkflowSummaryResponse"},"type":"array","title":"Workflows","description":"List of registered workflows"},"interfaces":{"items":{"$ref":"#/components/schemas/InterfaceResponse"},"type":"array","title":"Interfaces","description":"List of available interfaces"}},"type":"object","required":["os_id","databases","agents","teams","workflows","interfaces"],"title":"ConfigResponse","description":"Response schema for the general config endpoint"},"ConfigResponseSchema":{"properties":{"readers":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/ReaderSchema"},"type":"object"},{"type":"null"}],"title":"Readers","description":"Available content readers"},"readersForType":{"anyOf":[{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"},{"type":"null"}],"title":"Readersfortype","description":"Mapping of content types to reader IDs"},"chunkers":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/ChunkerSchema"},"type":"object"},{"type":"null"}],"title":"Chunkers","description":"Available chunking strategies"},"filters":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Filters","description":"Available filter tags"},"vector_dbs":{"anyOf":[{"items":{"$ref":"#/components/schemas/VectorDbSchema"},"type":"array"},{"type":"null"}],"title":"Vector Dbs","description":"Configured vector databases"}},"type":"object","title":"ConfigResponseSchema"},"ContentResponseSchema":{"properties":{"id":{"type":"string","title":"Id","description":"Unique identifier for the content"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Name of the content"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Description of the content"},"type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Type","description":"MIME type of the content"},"size":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Size","description":"Size of the content in bytes"},"linked_to":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Linked To","description":"ID of related content if linked"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata","description":"Additional metadata as key-value pairs"},"access_count":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Access Count","description":"Number of times content has been accessed"},"status":{"anyOf":[{"$ref":"#/components/schemas/ContentStatus"},{"type":"null"}],"description":"Processing status of the content"},"status_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status Message","description":"Status message or error details"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At","description":"Timestamp when content was created"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At","description":"Timestamp when content was last updated"}},"type":"object","required":["id"],"title":"ContentResponseSchema"},"ContentStatus":{"type":"string","enum":["processing","completed","failed"],"title":"ContentStatus","description":"Enumeration of possible content processing statuses."},"ContentStatusResponse":{"properties":{"status":{"$ref":"#/components/schemas/ContentStatus","description":"Current processing status of the content"},"status_message":{"type":"string","title":"Status Message","description":"Status message or error details","default":""}},"type":"object","required":["status"],"title":"ContentStatusResponse","description":"Response model for content status endpoint."},"Context":{"properties":{"description":{"type":"string","title":"Description"},"value":{"type":"string","title":"Value"}},"additionalProperties":false,"type":"object","required":["description","value"],"title":"Context","description":"Additional context for the agent."},"CreateSessionRequest":{"properties":{"session_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session Id","description":"Optional session ID (generated if not provided)"},"session_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session Name","description":"Name for the session"},"session_state":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Session State","description":"Initial session state"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata","description":"Additional metadata"},"user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id","description":"User ID associated with the session"},"agent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Id","description":"Agent ID if this is an agent session"},"team_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Team Id","description":"Team ID if this is a team session"},"workflow_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workflow Id","description":"Workflow ID if this is a workflow session"}},"type":"object","title":"CreateSessionRequest"},"DataPart":{"properties":{"data":{"additionalProperties":true,"type":"object","title":"Data"},"kind":{"type":"string","const":"data","title":"Kind","default":"data"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata"}},"type":"object","required":["data"],"title":"DataPart","description":"Represents a structured data segment (e.g., JSON) within a message or artifact."},"DatabaseConfig_EvalsDomainConfig_":{"properties":{"db_id":{"type":"string","title":"Db Id"},"domain_config":{"anyOf":[{"$ref":"#/components/schemas/EvalsDomainConfig"},{"type":"null"}]},"tables":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Tables"}},"type":"object","required":["db_id"],"title":"DatabaseConfig[EvalsDomainConfig]"},"DatabaseConfig_KnowledgeDomainConfig_":{"properties":{"db_id":{"type":"string","title":"Db Id"},"domain_config":{"anyOf":[{"$ref":"#/components/schemas/KnowledgeDomainConfig"},{"type":"null"}]},"tables":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Tables"}},"type":"object","required":["db_id"],"title":"DatabaseConfig[KnowledgeDomainConfig]"},"DatabaseConfig_MemoryDomainConfig_":{"properties":{"db_id":{"type":"string","title":"Db Id"},"domain_config":{"anyOf":[{"$ref":"#/components/schemas/MemoryDomainConfig"},{"type":"null"}]},"tables":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Tables"}},"type":"object","required":["db_id"],"title":"DatabaseConfig[MemoryDomainConfig]"},"DatabaseConfig_MetricsDomainConfig_":{"properties":{"db_id":{"type":"string","title":"Db Id"},"domain_config":{"anyOf":[{"$ref":"#/components/schemas/MetricsDomainConfig"},{"type":"null"}]},"tables":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Tables"}},"type":"object","required":["db_id"],"title":"DatabaseConfig[MetricsDomainConfig]"},"DatabaseConfig_SessionDomainConfig_":{"properties":{"db_id":{"type":"string","title":"Db Id"},"domain_config":{"anyOf":[{"$ref":"#/components/schemas/SessionDomainConfig"},{"type":"null"}]},"tables":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Tables"}},"type":"object","required":["db_id"],"title":"DatabaseConfig[SessionDomainConfig]"},"DatabaseConfig_TracesDomainConfig_":{"properties":{"db_id":{"type":"string","title":"Db Id"},"domain_config":{"anyOf":[{"$ref":"#/components/schemas/TracesDomainConfig"},{"type":"null"}]},"tables":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Tables"}},"type":"object","required":["db_id"],"title":"DatabaseConfig[TracesDomainConfig]"},"DayAggregatedMetrics":{"properties":{"id":{"type":"string","title":"Id","description":"Unique identifier for the metrics record"},"agent_runs_count":{"type":"integer","minimum":0.0,"title":"Agent Runs Count","description":"Total number of agent runs"},"agent_sessions_count":{"type":"integer","minimum":0.0,"title":"Agent Sessions Count","description":"Total number of agent sessions"},"team_runs_count":{"type":"integer","minimum":0.0,"title":"Team Runs Count","description":"Total number of team runs"},"team_sessions_count":{"type":"integer","minimum":0.0,"title":"Team Sessions Count","description":"Total number of team sessions"},"workflow_runs_count":{"type":"integer","minimum":0.0,"title":"Workflow Runs Count","description":"Total number of workflow runs"},"workflow_sessions_count":{"type":"integer","minimum":0.0,"title":"Workflow Sessions Count","description":"Total number of workflow sessions"},"users_count":{"type":"integer","minimum":0.0,"title":"Users Count","description":"Total number of unique users"},"token_metrics":{"additionalProperties":true,"type":"object","title":"Token Metrics","description":"Token usage metrics (input, output, cached, etc.)"},"model_metrics":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Model Metrics","description":"Metrics grouped by model (model_id, provider, count)"},"date":{"type":"string","format":"date-time","title":"Date","description":"Date for which these metrics are aggregated"},"created_at":{"type":"integer","minimum":0.0,"title":"Created At","description":"Unix timestamp when metrics were created"},"updated_at":{"type":"integer","minimum":0.0,"title":"Updated At","description":"Unix timestamp when metrics were last updated"}},"type":"object","required":["id","agent_runs_count","agent_sessions_count","team_runs_count","team_sessions_count","workflow_runs_count","workflow_sessions_count","users_count","token_metrics","model_metrics","date","created_at","updated_at"],"title":"DayAggregatedMetrics","description":"Aggregated metrics for a given day"},"DeleteEvalRunsRequest":{"properties":{"eval_run_ids":{"items":{"type":"string"},"type":"array","minItems":1,"title":"Eval Run Ids","description":"List of evaluation run IDs to delete"}},"type":"object","required":["eval_run_ids"],"title":"DeleteEvalRunsRequest"},"DeleteMemoriesRequest":{"properties":{"memory_ids":{"items":{"type":"string"},"type":"array","minItems":1,"title":"Memory Ids","description":"List of memory IDs to delete"},"user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id","description":"User ID to filter memories for deletion"}},"type":"object","required":["memory_ids"],"title":"DeleteMemoriesRequest"},"DeleteSessionRequest":{"properties":{"session_ids":{"items":{"type":"string"},"type":"array","minItems":1,"title":"Session Ids","description":"List of session IDs to delete"},"session_types":{"items":{"$ref":"#/components/schemas/SessionType"},"type":"array","minItems":1,"title":"Session Types","description":"Types of sessions to delete"}},"type":"object","required":["session_ids","session_types"],"title":"DeleteSessionRequest"},"DeveloperMessage":{"properties":{"id":{"type":"string","title":"Id"},"role":{"type":"string","const":"developer","title":"Role"},"content":{"type":"string","title":"Content"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},"additionalProperties":false,"type":"object","required":["id","role","content"],"title":"DeveloperMessage","description":"A developer message."},"EvalFilterType":{"type":"string","enum":["agent","team","workflow"],"title":"EvalFilterType"},"EvalRunInput":{"properties":{"agent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Id","description":"Agent ID to evaluate"},"team_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Team Id","description":"Team ID to evaluate"},"model_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model Id","description":"Model ID to use for evaluation"},"model_provider":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model Provider","description":"Model provider name"},"eval_type":{"$ref":"#/components/schemas/EvalType","description":"Type of evaluation to run (accuracy, performance, or reliability)"},"input":{"type":"string","minLength":1,"title":"Input","description":"Input text/query for the evaluation"},"additional_guidelines":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Additional Guidelines","description":"Additional guidelines for the evaluation"},"additional_context":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Additional Context","description":"Additional context for the evaluation"},"num_iterations":{"type":"integer","maximum":100.0,"minimum":1.0,"title":"Num Iterations","description":"Number of times to run the evaluation","default":1},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Name for this evaluation run"},"expected_output":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Expected Output","description":"Expected output for accuracy evaluation"},"criteria":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Criteria","description":"Evaluation criteria for agent-as-judge evaluation"},"scoring_strategy":{"anyOf":[{"type":"string","enum":["numeric","binary"]},{"type":"null"}],"title":"Scoring Strategy","description":"Scoring strategy: 'numeric' (1-10 with threshold) or 'binary' (PASS/FAIL)","default":"binary"},"threshold":{"anyOf":[{"type":"integer","maximum":10.0,"minimum":1.0},{"type":"null"}],"title":"Threshold","description":"Score threshold for pass/fail (1-10), only used with numeric scoring","default":7},"warmup_runs":{"type":"integer","maximum":10.0,"minimum":0.0,"title":"Warmup Runs","description":"Number of warmup runs before measuring performance","default":0},"expected_tool_calls":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Expected Tool Calls","description":"Expected tool calls for reliability evaluation"}},"type":"object","required":["eval_type","input"],"title":"EvalRunInput"},"EvalSchema":{"properties":{"id":{"type":"string","title":"Id","description":"Unique identifier for the evaluation run"},"agent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Id","description":"Agent ID that was evaluated"},"model_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model Id","description":"Model ID used in evaluation"},"model_provider":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model Provider","description":"Model provider name"},"team_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Team Id","description":"Team ID that was evaluated"},"workflow_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workflow Id","description":"Workflow ID that was evaluated"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Name of the evaluation run"},"evaluated_component_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Evaluated Component Name","description":"Name of the evaluated component"},"eval_type":{"$ref":"#/components/schemas/EvalType","description":"Type of evaluation (accuracy, performance, or reliability)"},"eval_data":{"additionalProperties":true,"type":"object","title":"Eval Data","description":"Evaluation results and metrics"},"eval_input":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Eval Input","description":"Input parameters used for the evaluation"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At","description":"Timestamp when evaluation was created"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At","description":"Timestamp when evaluation was last updated"}},"type":"object","required":["id","eval_type","eval_data"],"title":"EvalSchema"},"EvalType":{"type":"string","enum":["accuracy","agent_as_judge","performance","reliability"],"title":"EvalType"},"EvalsConfig":{"properties":{"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name"},"available_models":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Available Models"},"dbs":{"anyOf":[{"items":{"$ref":"#/components/schemas/DatabaseConfig_EvalsDomainConfig_"},"type":"array"},{"type":"null"}],"title":"Dbs"}},"type":"object","title":"EvalsConfig","description":"Configuration for the Evals domain of the AgentOS"},"EvalsDomainConfig":{"properties":{"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name"},"available_models":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Available Models"}},"type":"object","title":"EvalsDomainConfig","description":"Configuration for the Evals domain of the AgentOS"},"FilePart":{"properties":{"file":{"anyOf":[{"$ref":"#/components/schemas/FileWithBytes"},{"$ref":"#/components/schemas/FileWithUri"}],"title":"File"},"kind":{"type":"string","const":"file","title":"Kind","default":"file"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata"}},"type":"object","required":["file"],"title":"FilePart","description":"Represents a file segment within a message or artifact. The file content can be\nprovided either directly as bytes or as a URI."},"FileWithBytes":{"properties":{"bytes":{"type":"string","title":"Bytes"},"mimeType":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mimetype"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},"type":"object","required":["bytes"],"title":"FileWithBytes","description":"Represents a file with its content provided directly as a base64-encoded string."},"FileWithUri":{"properties":{"mimeType":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mimetype"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"uri":{"type":"string","title":"Uri"}},"type":"object","required":["uri"],"title":"FileWithUri","description":"Represents a file with its content located at a specific URI."},"FunctionCall":{"properties":{"name":{"type":"string","title":"Name"},"arguments":{"type":"string","title":"Arguments"}},"additionalProperties":false,"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"},"HealthResponse":{"properties":{"status":{"type":"string","title":"Status","description":"Health status of the service"},"instantiated_at":{"type":"string","title":"Instantiated At","description":"Unix timestamp when service was instantiated"}},"type":"object","required":["status","instantiated_at"],"title":"HealthResponse","example":{"instantiated_at":"1760169236.778903","status":"ok"}},"InterfaceResponse":{"properties":{"type":{"type":"string","title":"Type","description":"Type of the interface"},"version":{"type":"string","title":"Version","description":"Version of the interface"},"route":{"type":"string","title":"Route","description":"API route path"}},"type":"object","required":["type","version","route"],"title":"InterfaceResponse"},"InternalServerErrorResponse":{"properties":{"detail":{"type":"string","title":"Detail","description":"Error detail message"},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Code","description":"Error code for categorization"}},"type":"object","required":["detail"],"title":"InternalServerErrorResponse","example":{"detail":"Internal server error","error_code":"INTERNAL_SERVER_ERROR"}},"KnowledgeConfig":{"properties":{"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name"},"dbs":{"anyOf":[{"items":{"$ref":"#/components/schemas/DatabaseConfig_KnowledgeDomainConfig_"},"type":"array"},{"type":"null"}],"title":"Dbs"}},"type":"object","title":"KnowledgeConfig","description":"Configuration for the Knowledge domain of the AgentOS"},"KnowledgeDomainConfig":{"properties":{"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name"}},"type":"object","title":"KnowledgeDomainConfig","description":"Configuration for the Knowledge domain of the AgentOS"},"MemoryConfig":{"properties":{"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name"},"dbs":{"anyOf":[{"items":{"$ref":"#/components/schemas/DatabaseConfig_MemoryDomainConfig_"},"type":"array"},{"type":"null"}],"title":"Dbs"}},"type":"object","title":"MemoryConfig","description":"Configuration for the Memory domain of the AgentOS"},"MemoryDomainConfig":{"properties":{"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name"}},"type":"object","title":"MemoryDomainConfig","description":"Configuration for the Memory domain of the AgentOS"},"Message":{"properties":{"contextId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contextid"},"extensions":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Extensions"},"kind":{"type":"string","const":"message","title":"Kind","default":"message"},"messageId":{"type":"string","title":"Messageid"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata"},"parts":{"items":{"$ref":"#/components/schemas/Part"},"type":"array","title":"Parts"},"referenceTaskIds":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Referencetaskids"},"role":{"$ref":"#/components/schemas/Role"},"taskId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Taskid"}},"type":"object","required":["messageId","parts","role"],"title":"Message","description":"Represents a single message in the conversation between a user and an agent."},"Meta":{"properties":{"limit":{"type":"integer","maximum":100.0,"minimum":1.0,"title":"Limit","description":"Number of results per page","default":20},"page":{"type":"integer","minimum":1.0,"title":"Page","description":"Page number","default":1}},"type":"object","title":"Meta","description":"Inline metadata schema for pagination."},"MetricsConfig":{"properties":{"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name"},"dbs":{"anyOf":[{"items":{"$ref":"#/components/schemas/DatabaseConfig_MetricsDomainConfig_"},"type":"array"},{"type":"null"}],"title":"Dbs"}},"type":"object","title":"MetricsConfig","description":"Configuration for the Metrics domain of the AgentOS"},"MetricsDomainConfig":{"properties":{"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name"}},"type":"object","title":"MetricsDomainConfig","description":"Configuration for the Metrics domain of the AgentOS"},"MetricsResponse":{"properties":{"metrics":{"items":{"$ref":"#/components/schemas/DayAggregatedMetrics"},"type":"array","title":"Metrics","description":"List of daily aggregated metrics"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At","description":"Timestamp of the most recent metrics update"}},"type":"object","required":["metrics"],"title":"MetricsResponse"},"Model":{"properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id","description":"Model identifier"},"provider":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provider","description":"Model provider name"}},"type":"object","title":"Model"},"ModelResponse":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Name of the model"},"model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model","description":"Model identifier"},"provider":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provider","description":"Model provider name"}},"type":"object","title":"ModelResponse"},"NotFoundResponse":{"properties":{"detail":{"type":"string","title":"Detail","description":"Error detail message"},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Code","description":"Error code for categorization"}},"type":"object","required":["detail"],"title":"NotFoundResponse","example":{"detail":"Not found","error_code":"NOT_FOUND"}},"OptimizeMemoriesRequest":{"properties":{"user_id":{"type":"string","title":"User Id","description":"User ID to optimize memories for"},"model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model","description":"Model to use for optimization in format 'provider:model_id' (e.g., 'openai:gpt-4o-mini', 'anthropic:claude-3-5-sonnet-20241022', 'google:gemini-2.0-flash-exp'). If not specified, uses MemoryManager's default model (gpt-4o)."},"apply":{"type":"boolean","title":"Apply","description":"If True, apply optimization changes to database. If False, return preview only without saving.","default":true}},"type":"object","required":["user_id"],"title":"OptimizeMemoriesRequest","description":"Schema for memory optimization request"},"OptimizeMemoriesResponse":{"properties":{"memories":{"items":{"$ref":"#/components/schemas/UserMemorySchema"},"type":"array","title":"Memories","description":"List of optimized memory objects"},"memories_before":{"type":"integer","minimum":0.0,"title":"Memories Before","description":"Number of memories before optimization"},"memories_after":{"type":"integer","minimum":0.0,"title":"Memories After","description":"Number of memories after optimization"},"tokens_before":{"type":"integer","minimum":0.0,"title":"Tokens Before","description":"Token count before optimization"},"tokens_after":{"type":"integer","minimum":0.0,"title":"Tokens After","description":"Token count after optimization"},"tokens_saved":{"type":"integer","minimum":0.0,"title":"Tokens Saved","description":"Number of tokens saved through optimization"},"reduction_percentage":{"type":"number","maximum":100.0,"minimum":0.0,"title":"Reduction Percentage","description":"Percentage of token reduction achieved"}},"type":"object","required":["memories","memories_before","memories_after","tokens_before","tokens_after","tokens_saved","reduction_percentage"],"title":"OptimizeMemoriesResponse","description":"Schema for memory optimization response"},"PaginatedResponse_ContentResponseSchema_":{"properties":{"data":{"items":{"$ref":"#/components/schemas/ContentResponseSchema"},"type":"array","title":"Data","description":"List of items for the current page"},"meta":{"$ref":"#/components/schemas/PaginationInfo","description":"Pagination metadata"}},"type":"object","required":["data","meta"],"title":"PaginatedResponse[ContentResponseSchema]"},"PaginatedResponse_EvalSchema_":{"properties":{"data":{"items":{"$ref":"#/components/schemas/EvalSchema"},"type":"array","title":"Data","description":"List of items for the current page"},"meta":{"$ref":"#/components/schemas/PaginationInfo","description":"Pagination metadata"}},"type":"object","required":["data","meta"],"title":"PaginatedResponse[EvalSchema]"},"PaginatedResponse_SessionSchema_":{"properties":{"data":{"items":{"$ref":"#/components/schemas/SessionSchema"},"type":"array","title":"Data","description":"List of items for the current page"},"meta":{"$ref":"#/components/schemas/PaginationInfo","description":"Pagination metadata"}},"type":"object","required":["data","meta"],"title":"PaginatedResponse[SessionSchema]"},"PaginatedResponse_TraceSessionStats_":{"properties":{"data":{"items":{"$ref":"#/components/schemas/TraceSessionStats"},"type":"array","title":"Data","description":"List of items for the current page"},"meta":{"$ref":"#/components/schemas/PaginationInfo","description":"Pagination metadata"}},"type":"object","required":["data","meta"],"title":"PaginatedResponse[TraceSessionStats]"},"PaginatedResponse_TraceSummary_":{"properties":{"data":{"items":{"$ref":"#/components/schemas/TraceSummary"},"type":"array","title":"Data","description":"List of items for the current page"},"meta":{"$ref":"#/components/schemas/PaginationInfo","description":"Pagination metadata"}},"type":"object","required":["data","meta"],"title":"PaginatedResponse[TraceSummary]"},"PaginatedResponse_UserMemorySchema_":{"properties":{"data":{"items":{"$ref":"#/components/schemas/UserMemorySchema"},"type":"array","title":"Data","description":"List of items for the current page"},"meta":{"$ref":"#/components/schemas/PaginationInfo","description":"Pagination metadata"}},"type":"object","required":["data","meta"],"title":"PaginatedResponse[UserMemorySchema]"},"PaginatedResponse_UserStatsSchema_":{"properties":{"data":{"items":{"$ref":"#/components/schemas/UserStatsSchema"},"type":"array","title":"Data","description":"List of items for the current page"},"meta":{"$ref":"#/components/schemas/PaginationInfo","description":"Pagination metadata"}},"type":"object","required":["data","meta"],"title":"PaginatedResponse[UserStatsSchema]"},"PaginatedResponse_VectorSearchResult_":{"properties":{"data":{"items":{"$ref":"#/components/schemas/VectorSearchResult"},"type":"array","title":"Data","description":"List of items for the current page"},"meta":{"$ref":"#/components/schemas/PaginationInfo","description":"Pagination metadata"}},"type":"object","required":["data","meta"],"title":"PaginatedResponse[VectorSearchResult]"},"PaginationInfo":{"properties":{"page":{"type":"integer","minimum":0.0,"title":"Page","description":"Current page number (0-indexed)","default":0},"limit":{"type":"integer","maximum":100.0,"minimum":1.0,"title":"Limit","description":"Number of items per page","default":20},"total_pages":{"type":"integer","minimum":0.0,"title":"Total Pages","description":"Total number of pages","default":0},"total_count":{"type":"integer","minimum":0.0,"title":"Total Count","description":"Total count of items","default":0},"search_time_ms":{"type":"number","minimum":0.0,"title":"Search Time Ms","description":"Search execution time in milliseconds","default":0}},"type":"object","title":"PaginationInfo"},"Part":{"anyOf":[{"$ref":"#/components/schemas/TextPart"},{"$ref":"#/components/schemas/FilePart"},{"$ref":"#/components/schemas/DataPart"}],"title":"Part"},"ReaderSchema":{"properties":{"id":{"type":"string","title":"Id","description":"Unique identifier for the reader"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Name of the reader"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Description of the reader's capabilities"},"chunkers":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Chunkers","description":"List of supported chunking strategies"}},"type":"object","required":["id"],"title":"ReaderSchema"},"Role":{"type":"string","enum":["agent","user"],"title":"Role","description":"Identifies the sender of the message. `user` for the client, `agent` for the service."},"RunAgentInput":{"properties":{"threadId":{"type":"string","title":"Threadid"},"runId":{"type":"string","title":"Runid"},"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"}],"discriminator":{"propertyName":"role","mapping":{"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":false,"type":"object","required":["threadId","runId","state","messages","tools","context","forwardedProps"],"title":"RunAgentInput","description":"Input for running an agent."},"RunSchema":{"properties":{"run_id":{"type":"string","title":"Run Id","description":"Unique identifier for the run"},"parent_run_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Run Id","description":"Parent run ID if this is a nested run"},"agent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Id","description":"Agent ID that executed this run"},"user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id","description":"User ID associated with the run"},"run_input":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Run Input","description":"Input provided to the run"},"content":{"anyOf":[{"type":"string"},{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Content","description":"Output content from the run"},"run_response_format":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Run Response Format","description":"Format of the response (text/json)"},"reasoning_content":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reasoning Content","description":"Reasoning content if reasoning was enabled"},"reasoning_steps":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Reasoning Steps","description":"List of reasoning steps"},"metrics":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metrics","description":"Performance and usage metrics"},"messages":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Messages","description":"Message history for the run"},"tools":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Tools","description":"Tools used in the run"},"events":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Events","description":"Events generated during the run"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At","description":"Run creation timestamp"},"references":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"References","description":"References cited in the run"},"citations":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Citations","description":"Citations from the model (e.g., from Gemini grounding/search)"},"reasoning_messages":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Reasoning Messages","description":"Reasoning process messages"},"session_state":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Session State","description":"Session state at the end of the run"},"images":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Images","description":"Images included in the run"},"videos":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Videos","description":"Videos included in the run"},"audio":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Audio","description":"Audio files included in the run"},"files":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Files","description":"Files included in the run"},"response_audio":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Response Audio","description":"Audio response if generated"},"input_media":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Input Media","description":"Input media attachments"}},"type":"object","required":["run_id"],"title":"RunSchema"},"SendMessageSuccessResponse":{"properties":{"id":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"null"}],"title":"Id"},"jsonrpc":{"type":"string","const":"2.0","title":"Jsonrpc","default":"2.0"},"result":{"anyOf":[{"$ref":"#/components/schemas/Task"},{"$ref":"#/components/schemas/Message"}],"title":"Result"}},"type":"object","required":["result"],"title":"SendMessageSuccessResponse","description":"Represents a successful JSON-RPC response for the `message/send` method."},"SessionConfig":{"properties":{"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name"},"dbs":{"anyOf":[{"items":{"$ref":"#/components/schemas/DatabaseConfig_SessionDomainConfig_"},"type":"array"},{"type":"null"}],"title":"Dbs"}},"type":"object","title":"SessionConfig","description":"Configuration for the Session domain of the AgentOS"},"SessionDomainConfig":{"properties":{"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name"}},"type":"object","title":"SessionDomainConfig","description":"Configuration for the Session domain of the AgentOS"},"SessionSchema":{"properties":{"session_id":{"type":"string","title":"Session Id","description":"Unique identifier for the session"},"session_name":{"type":"string","title":"Session Name","description":"Human-readable name for the session"},"session_state":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Session State","description":"Current state data of the session"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At","description":"Timestamp when session was created"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At","description":"Timestamp when session was last updated"}},"type":"object","required":["session_id","session_name"],"title":"SessionSchema"},"SessionType":{"type":"string","enum":["agent","team","workflow"],"title":"SessionType"},"SlackChallengeResponse":{"properties":{"challenge":{"type":"string","title":"Challenge","description":"Challenge string to echo back to Slack"}},"type":"object","required":["challenge"],"title":"SlackChallengeResponse","description":"Response model for Slack URL verification challenge"},"SlackEventResponse":{"properties":{"status":{"type":"string","title":"Status","description":"Processing status","default":"ok"}},"type":"object","title":"SlackEventResponse","description":"Response model for Slack event processing"},"SortOrder":{"type":"string","enum":["asc","desc"],"title":"SortOrder"},"SystemMessage":{"properties":{"id":{"type":"string","title":"Id"},"role":{"type":"string","const":"system","title":"Role"},"content":{"type":"string","title":"Content"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},"additionalProperties":false,"type":"object","required":["id","role","content"],"title":"SystemMessage","description":"A system message."},"Task":{"properties":{"artifacts":{"anyOf":[{"items":{"$ref":"#/components/schemas/Artifact"},"type":"array"},{"type":"null"}],"title":"Artifacts"},"contextId":{"type":"string","title":"Contextid"},"history":{"anyOf":[{"items":{"$ref":"#/components/schemas/Message"},"type":"array"},{"type":"null"}],"title":"History"},"id":{"type":"string","title":"Id"},"kind":{"type":"string","const":"task","title":"Kind","default":"task"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata"},"status":{"$ref":"#/components/schemas/TaskStatus"}},"type":"object","required":["contextId","id","status"],"title":"Task","description":"Represents a single, stateful operation or conversation between a client and an agent."},"TaskState":{"type":"string","enum":["submitted","working","input-required","completed","canceled","failed","rejected","auth-required","unknown"],"title":"TaskState","description":"Defines the lifecycle states of a Task."},"TaskStatus":{"properties":{"message":{"anyOf":[{"$ref":"#/components/schemas/Message"},{"type":"null"}]},"state":{"$ref":"#/components/schemas/TaskState"},"timestamp":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timestamp","examples":["2023-10-27T10:00:00Z"]}},"type":"object","required":["state"],"title":"TaskStatus","description":"Represents the status of a task at a specific point in time."},"TeamResponse":{"properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"db_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Db Id"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"model":{"anyOf":[{"$ref":"#/components/schemas/ModelResponse"},{"type":"null"}]},"tools":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Tools"},"sessions":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Sessions"},"knowledge":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Knowledge"},"memory":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Memory"},"reasoning":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Reasoning"},"default_tools":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Default Tools"},"system_message":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"System Message"},"response_settings":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Response Settings"},"introduction":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Introduction"},"streaming":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Streaming"},"members":{"anyOf":[{"items":{"anyOf":[{"$ref":"#/components/schemas/AgentResponse"},{"$ref":"#/components/schemas/TeamResponse"}]},"type":"array"},{"type":"null"}],"title":"Members"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata"},"input_schema":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Input Schema"}},"type":"object","title":"TeamResponse"},"TeamRunSchema":{"properties":{"run_id":{"type":"string","title":"Run Id","description":"Unique identifier for the team run"},"parent_run_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Run Id","description":"Parent run ID if this is a nested run"},"team_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Team Id","description":"Team ID that executed this run"},"content":{"anyOf":[{"type":"string"},{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Content","description":"Output content from the team run"},"reasoning_content":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reasoning Content","description":"Reasoning content if reasoning was enabled"},"reasoning_steps":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Reasoning Steps","description":"List of reasoning steps"},"run_input":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Run Input","description":"Input provided to the run"},"run_response_format":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Run Response Format","description":"Format of the response (text/json)"},"metrics":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metrics","description":"Performance and usage metrics"},"tools":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Tools","description":"Tools used in the run"},"messages":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Messages","description":"Message history for the run"},"events":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Events","description":"Events generated during the run"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At","description":"Run creation timestamp"},"references":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"References","description":"References cited in the run"},"citations":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Citations","description":"Citations from the model (e.g., from Gemini grounding/search)"},"reasoning_messages":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Reasoning Messages","description":"Reasoning process messages"},"session_state":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Session State","description":"Session state at the end of the run"},"input_media":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Input Media","description":"Input media attachments"},"images":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Images","description":"Images included in the run"},"videos":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Videos","description":"Videos included in the run"},"audio":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Audio","description":"Audio files included in the run"},"files":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Files","description":"Files included in the run"},"response_audio":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Response Audio","description":"Audio response if generated"}},"type":"object","required":["run_id"],"title":"TeamRunSchema"},"TeamSessionDetailSchema":{"properties":{"session_id":{"type":"string","title":"Session Id","description":"Unique session identifier"},"session_name":{"type":"string","title":"Session Name","description":"Human-readable session name"},"user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id","description":"User ID associated with the session"},"team_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Team Id","description":"Team ID used in this session"},"session_summary":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Session Summary","description":"Summary of team interactions"},"session_state":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Session State","description":"Current state of the session"},"metrics":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metrics","description":"Session metrics"},"team_data":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Team Data","description":"Team-specific data"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata","description":"Additional metadata"},"chat_history":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Chat History","description":"Complete chat history"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At","description":"Session creation timestamp"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At","description":"Last update timestamp"},"total_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Tokens","description":"Total tokens used in this session"}},"type":"object","required":["session_id","session_name"],"title":"TeamSessionDetailSchema"},"TeamSummaryResponse":{"properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id","description":"Unique identifier for the team"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Name of the team"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Description of the team"},"db_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Db Id","description":"Database identifier"}},"type":"object","title":"TeamSummaryResponse"},"TextPart":{"properties":{"kind":{"type":"string","const":"text","title":"Kind","default":"text"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata"},"text":{"type":"string","title":"Text"}},"type":"object","required":["text"],"title":"TextPart","description":"Represents a text segment within a message or artifact."},"Tool":{"properties":{"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"parameters":{"title":"Parameters"}},"additionalProperties":false,"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"},"function":{"$ref":"#/components/schemas/FunctionCall"}},"additionalProperties":false,"type":"object","required":["id","type","function"],"title":"ToolCall","description":"A tool call, modelled after OpenAI tool calls."},"ToolMessage":{"properties":{"id":{"type":"string","title":"Id"},"role":{"type":"string","const":"tool","title":"Role"},"content":{"type":"string","title":"Content"},"toolCallId":{"type":"string","title":"Toolcallid"}},"additionalProperties":false,"type":"object","required":["id","role","content","toolCallId"],"title":"ToolMessage","description":"A tool result message."},"TraceDetail":{"properties":{"trace_id":{"type":"string","title":"Trace Id","description":"Unique trace identifier"},"name":{"type":"string","title":"Name","description":"Trace name (usually root span name)"},"status":{"type":"string","title":"Status","description":"Overall status (OK, ERROR)"},"duration":{"type":"string","title":"Duration","description":"Human-readable total duration"},"start_time":{"type":"string","format":"date-time","title":"Start Time","description":"Trace start time (Pydantic auto-serializes to ISO 8601)"},"end_time":{"type":"string","format":"date-time","title":"End Time","description":"Trace end time (Pydantic auto-serializes to ISO 8601)"},"total_spans":{"type":"integer","title":"Total Spans","description":"Total number of spans in this trace"},"error_count":{"type":"integer","title":"Error Count","description":"Number of spans with errors"},"input":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Input","description":"Input to the agent/workflow"},"output":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Output","description":"Output from the agent/workflow"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error","description":"Error message if status is ERROR"},"run_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Run Id","description":"Associated run ID"},"session_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session Id","description":"Associated session ID"},"user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id","description":"Associated user ID"},"agent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Id","description":"Associated agent ID"},"team_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Team Id","description":"Associated team ID"},"workflow_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workflow Id","description":"Associated workflow ID"},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Time when trace was created (Pydantic auto-serializes to ISO 8601)"},"tree":{"items":{"$ref":"#/components/schemas/TraceNode"},"type":"array","title":"Tree","description":"Hierarchical tree of spans (root nodes)"}},"type":"object","required":["trace_id","name","status","duration","start_time","end_time","total_spans","error_count","created_at","tree"],"title":"TraceDetail","description":"Detailed trace information with hierarchical span tree"},"TraceNode":{"properties":{"id":{"type":"string","title":"Id","description":"Span ID"},"name":{"type":"string","title":"Name","description":"Span name (e.g., 'agent.run', 'llm.invoke')"},"type":{"type":"string","title":"Type","description":"Span kind (AGENT, TEAM, WORKFLOW, LLM, TOOL)"},"duration":{"type":"string","title":"Duration","description":"Human-readable duration (e.g., '123ms', '1.5s')"},"start_time":{"type":"string","format":"date-time","title":"Start Time","description":"Start time (Pydantic auto-serializes to ISO 8601)"},"end_time":{"type":"string","format":"date-time","title":"End Time","description":"End time (Pydantic auto-serializes to ISO 8601)"},"status":{"type":"string","title":"Status","description":"Status code (OK, ERROR)"},"input":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Input","description":"Input to the span"},"output":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Output","description":"Output from the span"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error","description":"Error message if status is ERROR"},"spans":{"anyOf":[{"items":{"$ref":"#/components/schemas/TraceNode"},"type":"array"},{"type":"null"}],"title":"Spans","description":"Child spans in the trace hierarchy"},"step_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Step Type","description":"Workflow step type (Step, Condition, function, Agent, Team)"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata","description":"Additional span attributes and data"},"extra_data":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Extra Data","description":"Flexible field for custom attributes and additional data"}},"type":"object","required":["id","name","type","duration","start_time","end_time","status"],"title":"TraceNode","description":"Recursive node structure for rendering trace hierarchy in the frontend"},"TraceSessionStats":{"properties":{"session_id":{"type":"string","title":"Session Id","description":"Session identifier"},"user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id","description":"User ID associated with the session"},"agent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Id","description":"Agent ID(s) used in the session"},"team_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Team Id","description":"Team ID associated with the session"},"workflow_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workflow Id","description":"Workflow ID associated with the session"},"total_traces":{"type":"integer","title":"Total Traces","description":"Total number of traces in this session"},"first_trace_at":{"type":"string","format":"date-time","title":"First Trace At","description":"Time of first trace (Pydantic auto-serializes to ISO 8601)"},"last_trace_at":{"type":"string","format":"date-time","title":"Last Trace At","description":"Time of last trace (Pydantic auto-serializes to ISO 8601)"}},"type":"object","required":["session_id","total_traces","first_trace_at","last_trace_at"],"title":"TraceSessionStats","description":"Aggregated trace statistics grouped by session"},"TraceSummary":{"properties":{"trace_id":{"type":"string","title":"Trace Id","description":"Unique trace identifier"},"name":{"type":"string","title":"Name","description":"Trace name (usually root span name)"},"status":{"type":"string","title":"Status","description":"Overall status (OK, ERROR, UNSET)"},"duration":{"type":"string","title":"Duration","description":"Human-readable total duration"},"start_time":{"type":"string","format":"date-time","title":"Start Time","description":"Trace start time (Pydantic auto-serializes to ISO 8601)"},"end_time":{"type":"string","format":"date-time","title":"End Time","description":"Trace end time (Pydantic auto-serializes to ISO 8601)"},"total_spans":{"type":"integer","title":"Total Spans","description":"Total number of spans in this trace"},"error_count":{"type":"integer","title":"Error Count","description":"Number of spans with errors"},"input":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Input","description":"Input to the agent"},"run_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Run Id","description":"Associated run ID"},"session_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session Id","description":"Associated session ID"},"user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id","description":"Associated user ID"},"agent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Id","description":"Associated agent ID"},"team_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Team Id","description":"Associated team ID"},"workflow_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workflow Id","description":"Associated workflow ID"},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Time when trace was created (Pydantic auto-serializes to ISO 8601)"}},"type":"object","required":["trace_id","name","status","duration","start_time","end_time","total_spans","error_count","created_at"],"title":"TraceSummary","description":"Summary information for trace list view"},"TracesConfig":{"properties":{"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name"},"dbs":{"anyOf":[{"items":{"$ref":"#/components/schemas/DatabaseConfig_TracesDomainConfig_"},"type":"array"},{"type":"null"}],"title":"Dbs"}},"type":"object","title":"TracesConfig","description":"Configuration for the Traces domain of the AgentOS"},"TracesDomainConfig":{"properties":{"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name"}},"type":"object","title":"TracesDomainConfig","description":"Configuration for the Traces domain of the AgentOS"},"UnauthenticatedResponse":{"properties":{"detail":{"type":"string","title":"Detail","description":"Error detail message"},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Code","description":"Error code for categorization"}},"type":"object","required":["detail"],"title":"UnauthenticatedResponse","example":{"detail":"Unauthenticated access","error_code":"UNAUTHENTICATED"}},"UpdateEvalRunRequest":{"properties":{"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name","description":"New name for the evaluation run"}},"type":"object","required":["name"],"title":"UpdateEvalRunRequest"},"UpdateSessionRequest":{"properties":{"session_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session Name","description":"Updated session name"},"session_state":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Session State","description":"Updated session state"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata","description":"Updated metadata"},"summary":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Summary","description":"Session summary"}},"type":"object","title":"UpdateSessionRequest"},"UserMemoryCreateSchema":{"properties":{"memory":{"type":"string","maxLength":5000,"minLength":1,"title":"Memory","description":"Memory content text"},"user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id","description":"User ID who owns this memory"},"topics":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Topics","description":"Topics or tags to categorize the memory"}},"type":"object","required":["memory"],"title":"UserMemoryCreateSchema","description":"Define the payload expected for creating a new user memory"},"UserMemorySchema":{"properties":{"memory_id":{"type":"string","title":"Memory Id","description":"Unique identifier for the memory"},"memory":{"type":"string","title":"Memory","description":"Memory content text"},"topics":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Topics","description":"Topics or tags associated with the memory"},"agent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Id","description":"Agent ID associated with this memory"},"team_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Team Id","description":"Team ID associated with this memory"},"user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id","description":"User ID who owns this memory"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At","description":"Timestamp when memory was last updated"}},"type":"object","required":["memory_id","memory"],"title":"UserMemorySchema"},"UserMessage":{"properties":{"id":{"type":"string","title":"Id"},"role":{"type":"string","const":"user","title":"Role"},"content":{"type":"string","title":"Content"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},"additionalProperties":false,"type":"object","required":["id","role","content"],"title":"UserMessage","description":"A user message."},"UserStatsSchema":{"properties":{"user_id":{"type":"string","title":"User Id","description":"User ID"},"total_memories":{"type":"integer","minimum":0.0,"title":"Total Memories","description":"Total number of memories for this user"},"last_memory_updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Memory Updated At","description":"Timestamp of the most recent memory update"}},"type":"object","required":["user_id","total_memories"],"title":"UserStatsSchema","description":"Schema for user memory statistics"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"ValidationErrorResponse":{"properties":{"detail":{"type":"string","title":"Detail","description":"Error detail message"},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Code","description":"Error code for categorization"}},"type":"object","required":["detail"],"title":"ValidationErrorResponse","example":{"detail":"Validation error","error_code":"VALIDATION_ERROR"}},"VectorDbSchema":{"properties":{"id":{"type":"string","title":"Id","description":"Unique identifier for the vector database"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Name of the vector database"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Description of the vector database"},"search_types":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Search Types","description":"List of supported search types (vector, keyword, hybrid)"}},"type":"object","required":["id"],"title":"VectorDbSchema"},"VectorSearchRequestSchema":{"properties":{"query":{"type":"string","title":"Query","description":"The search query text"},"db_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Db Id","description":"The content database ID to search in"},"vector_db_ids":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Vector Db Ids","description":"List of vector database IDs to search in"},"search_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search Type","description":"The type of search to perform (vector, keyword, hybrid)"},"max_results":{"anyOf":[{"type":"integer","maximum":1000.0,"minimum":1.0},{"type":"null"}],"title":"Max Results","description":"The maximum number of results to return"},"filters":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Filters","description":"Filters to apply to the search results"},"meta":{"anyOf":[{"$ref":"#/components/schemas/Meta"},{"type":"null"}],"description":"Pagination metadata. Limit and page number to return a subset of results."}},"type":"object","required":["query"],"title":"VectorSearchRequestSchema","description":"Schema for vector search request."},"VectorSearchResult":{"properties":{"id":{"type":"string","title":"Id","description":"Unique identifier for the search result document"},"content":{"type":"string","title":"Content","description":"Content text of the document"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Name of the document"},"meta_data":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Meta Data","description":"Metadata associated with the document"},"usage":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Usage","description":"Usage statistics (e.g., token counts)"},"reranking_score":{"anyOf":[{"type":"number","maximum":1.0,"minimum":0.0},{"type":"null"}],"title":"Reranking Score","description":"Reranking score for relevance"},"content_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content Id","description":"ID of the source content"},"content_origin":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content Origin","description":"Origin URL or source of the content"},"size":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Size","description":"Size of the content in bytes"}},"type":"object","required":["id","content"],"title":"VectorSearchResult","description":"Schema for search result documents."},"WorkflowResponse":{"properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id","description":"Unique identifier for the workflow"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Name of the workflow"},"db_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Db Id","description":"Database identifier"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Description of the workflow"},"input_schema":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Input Schema","description":"Input schema for the workflow"},"steps":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Steps","description":"List of workflow steps"},"agent":{"anyOf":[{"$ref":"#/components/schemas/AgentResponse"},{"type":"null"}],"description":"Agent configuration if used"},"team":{"anyOf":[{"$ref":"#/components/schemas/TeamResponse"},{"type":"null"}],"description":"Team configuration if used"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata","description":"Additional metadata"},"workflow_agent":{"type":"boolean","title":"Workflow Agent","description":"Whether this workflow uses a WorkflowAgent","default":false}},"type":"object","title":"WorkflowResponse"},"WorkflowRunSchema":{"properties":{"run_id":{"type":"string","title":"Run Id","description":"Unique identifier for the workflow run"},"run_input":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Run Input","description":"Input provided to the workflow"},"events":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Events","description":"Events generated during the workflow"},"workflow_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workflow Id","description":"Workflow ID that was executed"},"user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id","description":"User ID associated with the run"},"content":{"anyOf":[{"type":"string"},{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Content","description":"Output content from the workflow"},"content_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content Type","description":"Type of content returned"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status","description":"Status of the workflow run"},"step_results":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Step Results","description":"Results from each workflow step"},"step_executor_runs":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Step Executor Runs","description":"Executor runs for each step"},"metrics":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metrics","description":"Performance and usage metrics"},"created_at":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Created At","description":"Unix timestamp of run creation"},"reasoning_content":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reasoning Content","description":"Reasoning content if reasoning was enabled"},"reasoning_steps":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Reasoning Steps","description":"List of reasoning steps"},"references":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"References","description":"References cited in the workflow"},"citations":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Citations","description":"Citations from the model (e.g., from Gemini grounding/search)"},"reasoning_messages":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Reasoning Messages","description":"Reasoning process messages"},"images":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Images","description":"Images included in the workflow"},"videos":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Videos","description":"Videos included in the workflow"},"audio":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Audio","description":"Audio files included in the workflow"},"files":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Files","description":"Files included in the workflow"},"response_audio":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Response Audio","description":"Audio response if generated"}},"type":"object","required":["run_id"],"title":"WorkflowRunSchema"},"WorkflowSessionDetailSchema":{"properties":{"user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id","description":"User ID associated with the session"},"workflow_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workflow Id","description":"Workflow ID used in this session"},"workflow_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workflow Name","description":"Name of the workflow"},"session_id":{"type":"string","title":"Session Id","description":"Unique session identifier"},"session_name":{"type":"string","title":"Session Name","description":"Human-readable session name"},"session_data":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Session Data","description":"Complete session data"},"session_state":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Session State","description":"Current workflow state"},"workflow_data":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Workflow Data","description":"Workflow-specific data"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata","description":"Additional metadata"},"created_at":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Created At","description":"Unix timestamp of session creation"},"updated_at":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Updated At","description":"Unix timestamp of last update"}},"type":"object","required":["session_id","session_name"],"title":"WorkflowSessionDetailSchema"},"WorkflowSummaryResponse":{"properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id","description":"Unique identifier for the workflow"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Name of the workflow"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Description of the workflow"},"db_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Db Id","description":"Database identifier"}},"type":"object","title":"WorkflowSummaryResponse"}},"securitySchemes":{"HTTPBearer":{"type":"http","scheme":"bearer"}}}}
\ No newline at end of file
+{"openapi":"3.1.0","info":{"title":"Agno AgentOS","description":"An agent operating system.","version":"1.0.0"},"paths":{"/":{"get":{"tags":["Home"],"summary":"API Information","description":"Get basic information about this AgentOS API instance, including:\n\n- API metadata and version\n- Available capabilities overview\n- Links to key endpoints and documentation","operationId":"get_api_info","responses":{"200":{"description":"API information retrieved successfully","content":{"application/json":{"schema":{},"examples":{"home":{"summary":"Example home response","value":{"name":"AgentOS API","description":"AI Agent Operating System API","id":"demo-os","version":"1.0.0"}}}}}}}}},"/health":{"get":{"tags":["Health"],"summary":"Health Check","description":"Check the health status of the AgentOS API. Returns a simple status indicator.","operationId":"health_check","responses":{"200":{"description":"API is healthy and operational","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthResponse"},"example":{"status":"ok","instantiated_at":"2025-06-10T12:00:00Z"}}}}}}},"/config":{"get":{"tags":["Core"],"summary":"Get OS Configuration","description":"Retrieve the complete configuration of the AgentOS instance, including:\n\n- Available models and databases\n- Registered agents, teams, and workflows\n- Chat, session, memory, knowledge, and evaluation configurations\n- Available interfaces and their routes","operationId":"get_config","responses":{"200":{"description":"OS configuration retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConfigResponse"},"example":{"id":"demo","description":"Example AgentOS configuration","available_models":[],"databases":["9c884dc4-9066-448c-9074-ef49ec7eb73c"],"session":{"dbs":[{"db_id":"9c884dc4-9066-448c-9074-ef49ec7eb73c","domain_config":{"display_name":"Sessions"}}]},"metrics":{"dbs":[{"db_id":"9c884dc4-9066-448c-9074-ef49ec7eb73c","domain_config":{"display_name":"Metrics"}}]},"memory":{"dbs":[{"db_id":"9c884dc4-9066-448c-9074-ef49ec7eb73c","domain_config":{"display_name":"Memory"}}]},"knowledge":{"dbs":[{"db_id":"9c884dc4-9066-448c-9074-ef49ec7eb73c","domain_config":{"display_name":"Knowledge"}}]},"evals":{"dbs":[{"db_id":"9c884dc4-9066-448c-9074-ef49ec7eb73c","domain_config":{"display_name":"Evals"}}]},"agents":[{"id":"main-agent","name":"Main Agent","db_id":"9c884dc4-9066-448c-9074-ef49ec7eb73c"}],"teams":[],"workflows":[],"interfaces":[]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthenticatedResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/models":{"get":{"tags":["Core"],"summary":"Get Available Models","description":"Retrieve a list of all unique models currently used by agents and teams in this OS instance. This includes the model ID and provider information for each model.","operationId":"get_models","responses":{"200":{"description":"List of models retrieved successfully","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/Model"},"type":"array","title":"Response Get Models"},"example":[{"id":"gpt-4","provider":"openai"},{"id":"claude-3-sonnet","provider":"anthropic"}]}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthenticatedResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/agents/{agent_id}/runs":{"post":{"tags":["Agents"],"summary":"Create Agent Run","description":"Execute an agent with a message and optional media files. Supports both streaming and non-streaming responses.\n\n**Features:**\n- Text message input with optional session management\n- Multi-media support: images (PNG, JPEG, WebP), audio (WAV, MP3), video (MP4, WebM, etc.)\n- Document processing: PDF, CSV, DOCX, TXT, JSON\n- Real-time streaming responses with Server-Sent Events (SSE)\n- User and session context preservation\n\n**Streaming Response:**\nWhen `stream=true`, returns SSE events with `event` and `data` fields.","operationId":"create_agent_run","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","title":"Agent Id"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_create_agent_run"}}}},"responses":{"200":{"description":"Agent run executed successfully","content":{"application/json":{"schema":{}},"text/event-stream":{"examples":{"event_stream":{"summary":"Example event stream response","value":"event: RunStarted\ndata: {\"content\": \"Hello!\", \"run_id\": \"123...\"}\n\n"}}}}},"400":{"description":"Invalid request or unsupported file type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthenticatedResponse"}}}},"404":{"description":"Agent not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/agents/{agent_id}/runs/{run_id}/cancel":{"post":{"tags":["Agents"],"summary":"Cancel Agent Run","description":"Cancel a currently executing agent run. This will attempt to stop the agent's execution gracefully.\n\n**Note:** Cancellation may not be immediate for all operations.","operationId":"cancel_agent_run","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","title":"Agent Id"}},{"name":"run_id","in":"path","required":true,"schema":{"type":"string","title":"Run Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthenticatedResponse"}}}},"404":{"description":"Agent not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"500":{"description":"Failed to cancel run","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/agents/{agent_id}/runs/{run_id}/continue":{"post":{"tags":["Agents"],"summary":"Continue Agent Run","description":"Continue a paused or incomplete agent run with updated tool results.\n\n**Use Cases:**\n- Resume execution after tool approval/rejection\n- Provide manual tool execution results\n\n**Tools Parameter:**\nJSON string containing array of tool execution objects with results.","operationId":"continue_agent_run","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","title":"Agent Id"}},{"name":"run_id","in":"path","required":true,"schema":{"type":"string","title":"Run Id"}}],"requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_continue_agent_run"}}}},"responses":{"200":{"description":"Agent run continued successfully","content":{"application/json":{"schema":{}},"text/event-stream":{"example":"event: RunContent\ndata: {\"created_at\": 1757348314, \"run_id\": \"123...\"}\n\n"}}},"400":{"description":"Invalid JSON in tools field or invalid tool structure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthenticatedResponse"}}}},"404":{"description":"Agent not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/agents":{"get":{"tags":["Agents"],"summary":"List All Agents","description":"Retrieve a comprehensive list of all agents configured in this OS instance.\n\n**Returns:**\n- Agent metadata (ID, name, description)\n- Model configuration and capabilities\n- Available tools and their configurations\n- Session, knowledge, memory, and reasoning settings\n- Only meaningful (non-default) configurations are included","operationId":"get_agents","responses":{"200":{"description":"List of agents retrieved successfully","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/AgentResponse"},"type":"array","title":"Response Get Agents"},"example":[{"id":"main-agent","name":"Main Agent","db_id":"c6bf0644-feb8-4930-a305-380dae5ad6aa","model":{"name":"OpenAIChat","model":"gpt-4o","provider":"OpenAI"},"sessions":{"session_table":"agno_sessions"},"knowledge":{"knowledge_table":"main_knowledge"},"system_message":{"markdown":true,"add_datetime_to_context":true}}]}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthenticatedResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/agents/{agent_id}":{"get":{"tags":["Agents"],"summary":"Get Agent Details","description":"Retrieve detailed configuration and capabilities of a specific agent.\n\n**Returns comprehensive agent information including:**\n- Model configuration and provider details\n- Complete tool inventory and configurations\n- Session management settings\n- Knowledge base and memory configurations\n- Reasoning capabilities and settings\n- System prompts and response formatting options","operationId":"get_agent","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","title":"Agent Id"}}],"responses":{"200":{"description":"Agent details retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentResponse"},"example":{"id":"main-agent","name":"Main Agent","db_id":"9e064c70-6821-4840-a333-ce6230908a70","model":{"name":"OpenAIChat","model":"gpt-4o","provider":"OpenAI"},"sessions":{"session_table":"agno_sessions"},"knowledge":{"knowledge_table":"main_knowledge"},"system_message":{"markdown":true,"add_datetime_to_context":true}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthenticatedResponse"}}}},"404":{"description":"Agent not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/teams/{team_id}/runs":{"post":{"tags":["Teams"],"summary":"Create Team Run","description":"Execute a team collaboration with multiple agents working together on a task.\n\n**Features:**\n- Text message input with optional session management\n- Multi-media support: images (PNG, JPEG, WebP), audio (WAV, MP3), video (MP4, WebM, etc.)\n- Document processing: PDF, CSV, DOCX, TXT, JSON\n- Real-time streaming responses with Server-Sent Events (SSE)\n- User and session context preservation\n\n**Streaming Response:**\nWhen `stream=true`, returns SSE events with `event` and `data` fields.","operationId":"create_team_run","security":[{"HTTPBearer":[]}],"parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","title":"Team Id"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_create_team_run"}}}},"responses":{"200":{"description":"Team run executed successfully","content":{"application/json":{"schema":{}},"text/event-stream":{"example":"event: RunStarted\ndata: {\"content\": \"Hello!\", \"run_id\": \"123...\"}\n\n"}}},"400":{"description":"Invalid request or unsupported file type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthenticatedResponse"}}}},"404":{"description":"Team not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/teams/{team_id}/runs/{run_id}/cancel":{"post":{"tags":["Teams"],"summary":"Cancel Team Run","description":"Cancel a currently executing team run. This will attempt to stop the team's execution gracefully.\n\n**Note:** Cancellation may not be immediate for all operations.","operationId":"cancel_team_run","security":[{"HTTPBearer":[]}],"parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","title":"Team Id"}},{"name":"run_id","in":"path","required":true,"schema":{"type":"string","title":"Run Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthenticatedResponse"}}}},"404":{"description":"Team not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"500":{"description":"Failed to cancel team run","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/teams":{"get":{"tags":["Teams"],"summary":"List All Teams","description":"Retrieve a comprehensive list of all teams configured in this OS instance.\n\n**Returns team information including:**\n- Team metadata (ID, name, description, execution mode)\n- Model configuration for team coordination\n- Team member roster with roles and capabilities\n- Knowledge sharing and memory configurations","operationId":"get_teams","responses":{"200":{"description":"List of teams retrieved successfully","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/TeamResponse"},"type":"array","title":"Response Get Teams"},"example":[{"team_id":"basic-team","name":"Basic Team","mode":"coordinate","model":{"name":"OpenAIChat","model":"gpt-4o","provider":"OpenAI"},"tools":[{"name":"transfer_task_to_member","description":"Use this function to transfer a task to the selected team member.\nYou must provide a clear and concise description of the task the member should achieve AND the expected output.","parameters":{"type":"object","properties":{"member_id":{"type":"string","description":"(str) The ID of the member to transfer the task to. Use only the ID of the member, not the ID of the team followed by the ID of the member."},"task_description":{"type":"string","description":"(str) A clear and concise description of the task the member should achieve."},"expected_output":{"type":"string","description":"(str) The expected output from the member (optional)."}},"additionalProperties":false,"required":["member_id","task_description"]}}],"members":[{"agent_id":"basic-agent","name":"Basic Agent","model":{"name":"OpenAIChat","model":"gpt-4o","provider":"OpenAI gpt-4o"},"memory":{"app_name":"Memory","model":{"name":"OpenAIChat","model":"gpt-4o","provider":"OpenAI"}},"session_table":"agno_sessions","memory_table":"agno_memories"}],"enable_agentic_context":false,"memory":{"app_name":"agno_memories","app_url":"/memory/1","model":{"name":"OpenAIChat","model":"gpt-4o","provider":"OpenAI"}},"async_mode":false,"session_table":"agno_sessions","memory_table":"agno_memories"}]}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthenticatedResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/teams/{team_id}":{"get":{"tags":["Teams"],"summary":"Get Team Details","description":"Retrieve detailed configuration and member information for a specific team.","operationId":"get_team","security":[{"HTTPBearer":[]}],"parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","title":"Team Id"}}],"responses":{"200":{"description":"Team details retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamResponse"},"example":{"team_id":"basic-team","name":"Basic Team","mode":"coordinate","model":{"name":"OpenAIChat","model":"gpt-4o","provider":"OpenAI"},"tools":[{"name":"transfer_task_to_member","description":"Use this function to transfer a task to the selected team member.\nYou must provide a clear and concise description of the task the member should achieve AND the expected output.","parameters":{"type":"object","properties":{"member_id":{"type":"string","description":"(str) The ID of the member to transfer the task to. Use only the ID of the member, not the ID of the team followed by the ID of the member."},"task_description":{"type":"string","description":"(str) A clear and concise description of the task the member should achieve."},"expected_output":{"type":"string","description":"(str) The expected output from the member (optional)."}},"additionalProperties":false,"required":["member_id","task_description"]}}],"members":[{"agent_id":"basic-agent","name":"Basic Agent","model":{"name":"OpenAIChat","model":"gpt-4o","provider":"OpenAI gpt-4o"},"memory":{"app_name":"Memory","model":{"name":"OpenAIChat","model":"gpt-4o","provider":"OpenAI"}},"session_table":"agno_sessions","memory_table":"agno_memories"}],"enable_agentic_context":false,"memory":{"app_name":"Memory","model":{"name":"OpenAIChat","model":"gpt-4o","provider":"OpenAI"}},"async_mode":false,"session_table":"agno_sessions","memory_table":"agno_memories"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthenticatedResponse"}}}},"404":{"description":"Team not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/workflows":{"get":{"tags":["Workflows"],"summary":"List All Workflows","description":"Retrieve a comprehensive list of all workflows configured in this OS instance.\n\n**Return Information:**\n- Workflow metadata (ID, name, description)\n- Input schema requirements\n- Step sequence and execution flow\n- Associated agents and teams","operationId":"get_workflows","responses":{"200":{"description":"List of workflows retrieved successfully","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/WorkflowSummaryResponse"},"type":"array","title":"Response Get Workflows"},"example":[{"id":"content-creation-workflow","name":"Content Creation Workflow","description":"Automated content creation from blog posts to social media","db_id":"123"}]}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthenticatedResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/workflows/{workflow_id}":{"get":{"tags":["Workflows"],"summary":"Get Workflow Details","description":"Retrieve detailed configuration and step information for a specific workflow.","operationId":"get_workflow","security":[{"HTTPBearer":[]}],"parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","title":"Workflow Id"}}],"responses":{"200":{"description":"Workflow details retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowResponse"},"example":{"id":"content-creation-workflow","name":"Content Creation Workflow","description":"Automated content creation from blog posts to social media","db_id":"123"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthenticatedResponse"}}}},"404":{"description":"Workflow not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/workflows/{workflow_id}/runs":{"post":{"tags":["Workflows"],"summary":"Execute Workflow","description":"Execute a workflow with the provided input data. Workflows can run in streaming or batch mode.\n\n**Execution Modes:**\n- **Streaming (`stream=true`)**: Real-time step-by-step execution updates via SSE\n- **Non-Streaming (`stream=false`)**: Complete workflow execution with final result\n\n**Workflow Execution Process:**\n1. Input validation against workflow schema\n2. Sequential or parallel step execution based on workflow design\n3. Data flow between steps with transformation\n4. Error handling and automatic retries where configured\n5. Final result compilation and response\n\n**Session Management:**\nWorkflows support session continuity for stateful execution across multiple runs.","operationId":"create_workflow_run","security":[{"HTTPBearer":[]}],"parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","title":"Workflow Id"}}],"requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_create_workflow_run"}}}},"responses":{"200":{"description":"Workflow executed successfully","content":{"application/json":{"schema":{}},"text/event-stream":{"example":"event: RunStarted\ndata: {\"content\": \"Hello!\", \"run_id\": \"123...\"}\n\n"}}},"400":{"description":"Invalid input data or workflow configuration","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthenticatedResponse"}}}},"404":{"description":"Workflow not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"500":{"description":"Workflow execution error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/workflows/{workflow_id}/runs/{run_id}/cancel":{"post":{"tags":["Workflows"],"summary":"Cancel Workflow Run","description":"Cancel a currently executing workflow run, stopping all active steps and cleanup.\n**Note:** Complex workflows with multiple parallel steps may take time to fully cancel.","operationId":"cancel_workflow_run","security":[{"HTTPBearer":[]}],"parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","title":"Workflow Id"}},{"name":"run_id","in":"path","required":true,"schema":{"type":"string","title":"Run Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthenticatedResponse"}}}},"404":{"description":"Workflow or run not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"500":{"description":"Failed to cancel workflow run","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/slack/events":{"post":{"tags":["Slack"],"summary":"Slack Events","description":"Process incoming Slack events","operationId":"slack_events_agent","responses":{"200":{"description":"Event processed successfully","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/SlackChallengeResponse"},{"$ref":"#/components/schemas/SlackEventResponse"}],"title":"Response Slack Events Agent"}}}},"400":{"description":"Missing Slack headers"},"403":{"description":"Invalid Slack signature"}}}},"/whatsapp/status":{"get":{"tags":["Whatsapp"],"summary":"Status","operationId":"status_whatsapp_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/whatsapp/webhook":{"get":{"tags":["Whatsapp"],"summary":"Verify Webhook","description":"Handle WhatsApp webhook verification","operationId":"verify_webhook_whatsapp_webhook_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"post":{"tags":["Whatsapp"],"summary":"Webhook","description":"Handle incoming WhatsApp messages","operationId":"webhook_whatsapp_webhook_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/agui":{"post":{"tags":["AGUI"],"summary":"Run Agent","operationId":"run_agent_agui_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunAgentInput"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/status":{"get":{"tags":["AGUI"],"summary":"Get Status","operationId":"get_status_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/a2a/agents/{id}/.well-known/agent-card.json":{"get":{"tags":["A2A"],"summary":"Get Agent Card","operationId":"get_agent_card_a2a_agents__id___well_known_agent_card_json_get","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","title":"Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/a2a/agents/{id}/v1/message:send":{"post":{"tags":["A2A"],"summary":"Run Message Agent","description":"Send a message to an Agno Agent (non-streaming). The Agent is identified via the path parameter '{id}'. Optional: Pass user ID via X-User-ID header (recommended) or 'userId' in params.message.metadata.","operationId":"run_message_agent","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","title":"Id"}}],"responses":{"200":{"description":"Message sent successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendMessageSuccessResponse"},"example":{"jsonrpc":"2.0","id":"request-123","result":{"task":{"id":"task-456","context_id":"context-789","status":"completed","history":[{"message_id":"msg-1","role":"agent","parts":[{"kind":"text","text":"Response from agent"}]}]}}}}}},"400":{"description":"Invalid request"},"404":{"description":"Agent not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/a2a/agents/{id}/v1/message:stream":{"post":{"tags":["A2A"],"summary":"Stream Message Agent","description":"Stream a message to an Agno Agent (streaming). The Agent is identified via the path parameter '{id}'. Optional: Pass user ID via X-User-ID header (recommended) or 'userId' in params.message.metadata. Returns real-time updates as newline-delimited JSON (NDJSON).","operationId":"stream_message_agent","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","title":"Id"}}],"responses":{"200":{"description":"Streaming response with task updates","content":{"application/json":{"schema":{}},"text/event-stream":{"example":"event: TaskStatusUpdateEvent\ndata: {\"jsonrpc\":\"2.0\",\"id\":\"request-123\",\"result\":{\"taskId\":\"task-456\",\"status\":\"working\"}}\n\nevent: Message\ndata: {\"jsonrpc\":\"2.0\",\"id\":\"request-123\",\"result\":{\"messageId\":\"msg-1\",\"role\":\"agent\",\"parts\":[{\"kind\":\"text\",\"text\":\"Response\"}]}}\n\n"}}},"400":{"description":"Invalid request"},"404":{"description":"Agent not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/a2a/teams/{id}/.well-known/agent-card.json":{"get":{"tags":["A2A"],"summary":"Get Team Card","operationId":"get_team_card_a2a_teams__id___well_known_agent_card_json_get","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","title":"Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/a2a/teams/{id}/v1/message:send":{"post":{"tags":["A2A"],"summary":"Run Message Team","description":"Send a message to an Agno Team (non-streaming). The Team is identified via the path parameter '{id}'. Optional: Pass user ID via X-User-ID header (recommended) or 'userId' in params.message.metadata.","operationId":"run_message_team","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","title":"Id"}}],"responses":{"200":{"description":"Message sent successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendMessageSuccessResponse"},"example":{"jsonrpc":"2.0","id":"request-123","result":{"task":{"id":"task-456","context_id":"context-789","status":"completed","history":[{"message_id":"msg-1","role":"agent","parts":[{"kind":"text","text":"Response from agent"}]}]}}}}}},"400":{"description":"Invalid request"},"404":{"description":"Team not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/a2a/teams/{id}/v1/message:stream":{"post":{"tags":["A2A"],"summary":"Stream Message Team","description":"Stream a message to an Agno Team (streaming). The Team is identified via the path parameter '{id}'. Optional: Pass user ID via X-User-ID header (recommended) or 'userId' in params.message.metadata. Returns real-time updates as newline-delimited JSON (NDJSON).","operationId":"stream_message_team","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","title":"Id"}}],"responses":{"200":{"description":"Streaming response with task updates","content":{"application/json":{"schema":{}},"text/event-stream":{"example":"event: TaskStatusUpdateEvent\ndata: {\"jsonrpc\":\"2.0\",\"id\":\"request-123\",\"result\":{\"taskId\":\"task-456\",\"status\":\"working\"}}\n\nevent: Message\ndata: {\"jsonrpc\":\"2.0\",\"id\":\"request-123\",\"result\":{\"messageId\":\"msg-1\",\"role\":\"agent\",\"parts\":[{\"kind\":\"text\",\"text\":\"Response\"}]}}\n\n"}}},"400":{"description":"Invalid request"},"404":{"description":"Team not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/a2a/workflows/{id}/.well-known/agent-card.json":{"get":{"tags":["A2A"],"summary":"Get Workflow Card","operationId":"get_workflow_card_a2a_workflows__id___well_known_agent_card_json_get","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","title":"Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/a2a/workflows/{id}/v1/message:send":{"post":{"tags":["A2A"],"summary":"Run Message Workflow","description":"Send a message to an Agno Workflow (non-streaming). The Workflow is identified via the path parameter '{id}'. Optional: Pass user ID via X-User-ID header (recommended) or 'userId' in params.message.metadata.","operationId":"run_message_workflow","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","title":"Id"}}],"responses":{"200":{"description":"Message sent successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendMessageSuccessResponse"},"example":{"jsonrpc":"2.0","id":"request-123","result":{"task":{"id":"task-456","context_id":"context-789","status":"completed","history":[{"message_id":"msg-1","role":"agent","parts":[{"kind":"text","text":"Response from agent"}]}]}}}}}},"400":{"description":"Invalid request"},"404":{"description":"Workflow not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/a2a/workflows/{id}/v1/message:stream":{"post":{"tags":["A2A"],"summary":"Stream Message Workflow","description":"Stream a message to an Agno Workflow (streaming). The Workflow is identified via the path parameter '{id}'. Optional: Pass user ID via X-User-ID header (recommended) or 'userId' in params.message.metadata. Returns real-time updates as newline-delimited JSON (NDJSON).","operationId":"stream_message_workflow","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","title":"Id"}}],"responses":{"200":{"description":"Streaming response with task updates","content":{"application/json":{"schema":{}},"text/event-stream":{"example":"event: TaskStatusUpdateEvent\ndata: {\"jsonrpc\":\"2.0\",\"id\":\"request-123\",\"result\":{\"taskId\":\"task-456\",\"status\":\"working\"}}\n\nevent: Message\ndata: {\"jsonrpc\":\"2.0\",\"id\":\"request-123\",\"result\":{\"messageId\":\"msg-1\",\"role\":\"agent\",\"parts\":[{\"kind\":\"text\",\"text\":\"Response\"}]}}\n\n"}}},"400":{"description":"Invalid request"},"404":{"description":"Workflow not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/a2a/message/send":{"post":{"tags":["A2A"],"summary":"Send Message","description":"[DEPRECATED] Send a message to an Agno Agent, Team, or Workflow. The Agent, Team or Workflow is identified via the 'agentId' field in params.message or X-Agent-ID header. Optional: Pass user ID via X-User-ID header (recommended) or 'userId' in params.message.metadata.","operationId":"send_message","responses":{"200":{"description":"Message sent successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendMessageSuccessResponse"},"example":{"jsonrpc":"2.0","id":"request-123","result":{"task":{"id":"task-456","context_id":"context-789","status":"completed","history":[{"message_id":"msg-1","role":"agent","parts":[{"kind":"text","text":"Response from agent"}]}]}}}}}},"400":{"description":"Invalid request or unsupported method"},"404":{"description":"Agent, Team, or Workflow not found"}}}},"/a2a/message/stream":{"post":{"tags":["A2A"],"summary":"Stream Message","description":"[DEPRECATED] Stream a message to an Agno Agent, Team, or Workflow. The Agent, Team or Workflow is identified via the 'agentId' field in params.message or X-Agent-ID header. Optional: Pass user ID via X-User-ID header (recommended) or 'userId' in params.message.metadata. Returns real-time updates as newline-delimited JSON (NDJSON).","operationId":"stream_message","responses":{"200":{"description":"Streaming response with task updates","content":{"application/json":{"schema":{}},"text/event-stream":{"example":"event: TaskStatusUpdateEvent\ndata: {\"jsonrpc\":\"2.0\",\"id\":\"request-123\",\"result\":{\"taskId\":\"task-456\",\"status\":\"working\"}}\n\nevent: Message\ndata: {\"jsonrpc\":\"2.0\",\"id\":\"request-123\",\"result\":{\"messageId\":\"msg-1\",\"role\":\"agent\",\"parts\":[{\"kind\":\"text\",\"text\":\"Response\"}]}}\n\n"}}},"400":{"description":"Invalid request or unsupported method"},"404":{"description":"Agent, Team, or Workflow not found"}}}},"/sessions":{"get":{"tags":["Sessions"],"summary":"List Sessions","description":"Retrieve paginated list of sessions with filtering and sorting options. Supports filtering by session type (agent, team, workflow), component, user, and name. Sessions represent conversation histories and execution contexts.","operationId":"get_sessions","security":[{"HTTPBearer":[]}],"parameters":[{"name":"type","in":"query","required":false,"schema":{"$ref":"#/components/schemas/SessionType","description":"Type of sessions to retrieve (agent, team, or workflow)","default":"agent"},"description":"Type of sessions to retrieve (agent, team, or workflow)"},{"name":"component_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter sessions by component ID (agent/team/workflow ID)","title":"Component Id"},"description":"Filter sessions by component ID (agent/team/workflow ID)"},{"name":"user_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter sessions by user ID","title":"User Id"},"description":"Filter sessions by user ID"},{"name":"session_name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter sessions by name (partial match)","title":"Session Name"},"description":"Filter sessions by name (partial match)"},{"name":"limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","minimum":1},{"type":"null"}],"description":"Number of sessions to return per page","default":20,"title":"Limit"},"description":"Number of sessions to return per page"},{"name":"page","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}],"description":"Page number for pagination","default":1,"title":"Page"},"description":"Page number for pagination"},{"name":"sort_by","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Field to sort sessions by","default":"created_at","title":"Sort By"},"description":"Field to sort sessions by"},{"name":"sort_order","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/SortOrder"},{"type":"null"}],"description":"Sort order (asc or desc)","default":"desc","title":"Sort Order"},"description":"Sort order (asc or desc)"},{"name":"db_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Database ID to query sessions from","title":"Db Id"},"description":"Database ID to query sessions from"},{"name":"table","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The database table to use","title":"Table"},"description":"The database table to use"}],"responses":{"200":{"description":"Sessions retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResponse_SessionSchema_"},"example":{"session_example":{"summary":"Example session response","value":{"data":[{"session_id":"6f6cfbfd-9643-479a-ae47-b8f32eb4d710","session_name":"What tools do you have?","session_state":{},"created_at":"2025-09-05T16:02:09Z","updated_at":"2025-09-05T16:02:09Z"}]}}}}}},"400":{"description":"Invalid session type or filter parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthenticatedResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponse"}}}},"422":{"description":"Validation error in query parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}},"post":{"tags":["Sessions"],"summary":"Create New Session","description":"Create a new empty session with optional configuration. Useful for pre-creating sessions with specific session_state, metadata, or other properties before running any agent/team/workflow interactions. The session can later be used by providing its session_id in run requests.","operationId":"create_session","security":[{"HTTPBearer":[]}],"parameters":[{"name":"type","in":"query","required":false,"schema":{"$ref":"#/components/schemas/SessionType","description":"Type of session to create (agent, team, or workflow)","default":"agent"},"description":"Type of session to create (agent, team, or workflow)"},{"name":"db_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Database ID to create session in","title":"Db Id"},"description":"Database ID to create session in"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSessionRequest","description":"Session configuration data","default":{}}}}},"responses":{"201":{"description":"Session created successfully","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/AgentSessionDetailSchema"},{"$ref":"#/components/schemas/TeamSessionDetailSchema"},{"$ref":"#/components/schemas/WorkflowSessionDetailSchema"}],"title":"Response Create Session"},"examples":{"agent_session_example":{"summary":"Example created agent session","value":{"user_id":"user-123","agent_session_id":"new-session-id","session_id":"new-session-id","session_name":"New Session","session_state":{"key":"value"},"metadata":{"key":"value"},"agent_id":"agent-1","created_at":"2025-10-21T12:00:00Z","updated_at":"2025-10-21T12:00:00Z"}}}}}},"400":{"description":"Invalid request parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthenticatedResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponse"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"500":{"description":"Failed to create session","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}},"delete":{"tags":["Sessions"],"summary":"Delete Multiple Sessions","description":"Delete multiple sessions by their IDs in a single operation. This action cannot be undone and will permanently remove all specified sessions and their runs.","operationId":"delete_sessions","security":[{"HTTPBearer":[]}],"parameters":[{"name":"db_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Database ID to use for deletion","title":"Db Id"},"description":"Database ID to use for deletion"},{"name":"table","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Table to use for deletion","title":"Table"},"description":"Table to use for deletion"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteSessionRequest"}}}},"responses":{"204":{"description":"Sessions deleted successfully"},"400":{"description":"Invalid request - session IDs and types length mismatch","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthenticatedResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"500":{"description":"Failed to delete sessions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/sessions/{session_id}":{"get":{"tags":["Sessions"],"summary":"Get Session by ID","description":"Retrieve detailed information about a specific session including metadata, configuration, and run history. Response schema varies based on session type (agent, team, or workflow).","operationId":"get_session_by_id","security":[{"HTTPBearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","description":"Session ID to retrieve","title":"Session Id"},"description":"Session ID to retrieve"},{"name":"type","in":"query","required":false,"schema":{"$ref":"#/components/schemas/SessionType","description":"Session type (agent, team, or workflow)","default":"agent"},"description":"Session type (agent, team, or workflow)"},{"name":"user_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"User ID to query session from","title":"User Id"},"description":"User ID to query session from"},{"name":"db_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Database ID to query session from","title":"Db Id"},"description":"Database ID to query session from"},{"name":"table","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Table to query session from","title":"Table"},"description":"Table to query session from"}],"responses":{"200":{"description":"Session details retrieved successfully","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/AgentSessionDetailSchema"},{"$ref":"#/components/schemas/TeamSessionDetailSchema"},{"$ref":"#/components/schemas/WorkflowSessionDetailSchema"}],"title":"Response Get Session By Id"},"examples":{"agent_session_example":{"summary":"Example agent session response","value":{"user_id":"123","agent_session_id":"6f6cfbfd-9643-479a-ae47-b8f32eb4d710","session_id":"6f6cfbfd-9643-479a-ae47-b8f32eb4d710","session_name":"What tools do you have?","session_summary":{"summary":"The user and assistant engaged in a conversation about the tools the agent has available.","updated_at":"2025-09-05T18:02:12.269392"},"session_state":{},"agent_id":"basic-agent","total_tokens":160,"agent_data":{"name":"Basic Agent","agent_id":"basic-agent","model":{"provider":"OpenAI","name":"OpenAIChat","id":"gpt-4o"}},"metrics":{"input_tokens":134,"output_tokens":26,"total_tokens":160,"audio_input_tokens":0,"audio_output_tokens":0,"audio_total_tokens":0,"cache_read_tokens":0,"cache_write_tokens":0,"reasoning_tokens":0},"chat_history":[{"content":"\n- Use markdown to format your answers.\n- The current time is 2025-09-05 18:02:09.171627.\n\n\nYou have access to memories from previous interactions with the user that you can use:\n\n\n- User really likes Digimon and Japan.\n- User really likes Japan.\n- User likes coffee.\n\n\nNote: this information is from previous interactions and may be updated in this conversation. You should always prefer information from this conversation over the past memories.","from_history":false,"stop_after_tool_call":false,"role":"system","created_at":1757088129},{"content":"What tools do you have?","from_history":false,"stop_after_tool_call":false,"role":"user","created_at":1757088129},{"content":"I don't have access to external tools or the internet. However, I can assist you with a wide range of topics by providing information, answering questions, and offering suggestions based on the knowledge I've been trained on. If there's anything specific you need help with, feel free to ask!","from_history":false,"stop_after_tool_call":false,"role":"assistant","metrics":{"input_tokens":134,"output_tokens":26,"total_tokens":160},"created_at":1757088129}],"created_at":"2025-09-05T16:02:09Z","updated_at":"2025-09-05T16:02:09Z"}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthenticatedResponse"}}}},"404":{"description":"Session not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponse"}}}},"422":{"description":"Invalid session type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}},"delete":{"tags":["Sessions"],"summary":"Delete Session","description":"Permanently delete a specific session and all its associated runs. This action cannot be undone and will remove all conversation history.","operationId":"delete_session","security":[{"HTTPBearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","description":"Session ID to delete","title":"Session Id"},"description":"Session ID to delete"},{"name":"db_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Database ID to use for deletion","title":"Db Id"},"description":"Database ID to use for deletion"},{"name":"table","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Table to use for deletion","title":"Table"},"description":"Table to use for deletion"}],"responses":{"204":{"description":"Successful Response"},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthenticatedResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"500":{"description":"Failed to delete session","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}},"patch":{"tags":["Sessions"],"summary":"Update Session","description":"Update session properties such as session_name, session_state, metadata, or summary. Use this endpoint to modify the session name, update state, add metadata, or update the session summary.","operationId":"update_session","security":[{"HTTPBearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","description":"Session ID to update","title":"Session Id"},"description":"Session ID to update"},{"name":"type","in":"query","required":false,"schema":{"$ref":"#/components/schemas/SessionType","description":"Session type (agent, team, or workflow)","default":"agent"},"description":"Session type (agent, team, or workflow)"},{"name":"user_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"User ID","title":"User Id"},"description":"User ID"},{"name":"db_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Database ID to use for update operation","title":"Db Id"},"description":"Database ID to use for update operation"},{"name":"table","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Table to use for update operation","title":"Table"},"description":"Table to use for update operation"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateSessionRequest","description":"Session update data"}}}},"responses":{"200":{"description":"Session updated successfully","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/AgentSessionDetailSchema"},{"$ref":"#/components/schemas/TeamSessionDetailSchema"},{"$ref":"#/components/schemas/WorkflowSessionDetailSchema"}],"title":"Response Update Session"},"examples":{"update_summary":{"summary":"Update session summary","value":{"summary":{"summary":"The user discussed project planning with the agent.","updated_at":"2025-10-21T14:30:00Z"}}},"update_metadata":{"summary":"Update session metadata","value":{"metadata":{"tags":["planning","project"],"priority":"high"}}},"update_session_name":{"summary":"Update session name","value":{"session_name":"Updated Session Name"}},"update_session_state":{"summary":"Update session state","value":{"session_state":{"step":"completed","context":"Project planning finished","progress":100}}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthenticatedResponse"}}}},"404":{"description":"Session not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponse"}}}},"422":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"500":{"description":"Failed to update session","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/sessions/{session_id}/runs":{"get":{"tags":["Sessions"],"summary":"Get Session Runs","description":"Retrieve all runs (executions) for a specific session with optional timestamp filtering. Runs represent individual interactions or executions within a session. Response schema varies based on session type.","operationId":"get_session_runs","security":[{"HTTPBearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","description":"Session ID to get runs from","title":"Session Id"},"description":"Session ID to get runs from"},{"name":"type","in":"query","required":false,"schema":{"$ref":"#/components/schemas/SessionType","description":"Session type (agent, team, or workflow)","default":"agent"},"description":"Session type (agent, team, or workflow)"},{"name":"user_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"User ID to query runs from","title":"User Id"},"description":"User ID to query runs from"},{"name":"created_after","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Filter runs created after this Unix timestamp (epoch time in seconds)","title":"Created After"},"description":"Filter runs created after this Unix timestamp (epoch time in seconds)"},{"name":"created_before","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Filter runs created before this Unix timestamp (epoch time in seconds)","title":"Created Before"},"description":"Filter runs created before this Unix timestamp (epoch time in seconds)"},{"name":"db_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Database ID to query runs from","title":"Db Id"},"description":"Database ID to query runs from"},{"name":"table","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Table to query runs from","title":"Table"},"description":"Table to query runs from"}],"responses":{"200":{"description":"Session runs retrieved successfully","content":{"application/json":{"schema":{"type":"array","items":{"anyOf":[{"$ref":"#/components/schemas/RunSchema"},{"$ref":"#/components/schemas/TeamRunSchema"},{"$ref":"#/components/schemas/WorkflowRunSchema"}]},"title":"Response Get Session Runs"},"examples":{"completed_run":{"summary":"Example completed run","value":{"run_id":"fcdf50f0-7c32-4593-b2ef-68a558774340","parent_run_id":"80056af0-c7a5-4d69-b6a2-c3eba9f040e0","agent_id":"basic-agent","user_id":"","run_input":"Which tools do you have access to?","content":"I don't have access to external tools or the internet. However, I can assist you with a wide range of topics by providing information, answering questions, and offering suggestions based on the knowledge I've been trained on. If there's anything specific you need help with, feel free to ask!","run_response_format":"text","reasoning_content":"","metrics":{"input_tokens":82,"output_tokens":56,"total_tokens":138,"time_to_first_token":0.047505500027909875,"duration":4.840060166025069},"messages":[{"content":"\n- Use markdown to format your answers.\n- The current time is 2025-09-08 17:52:10.101003.\n\n\nYou have the capability to retain memories from previous interactions with the user, but have not had any interactions with the user yet.","from_history":false,"stop_after_tool_call":false,"role":"system","created_at":1757346730},{"content":"Which tools do you have access to?","from_history":false,"stop_after_tool_call":false,"role":"user","created_at":1757346730},{"content":"I don't have access to external tools or the internet. However, I can assist you with a wide range of topics by providing information, answering questions, and offering suggestions based on the knowledge I've been trained on. If there's anything specific you need help with, feel free to ask!","from_history":false,"stop_after_tool_call":false,"role":"assistant","metrics":{"input_tokens":82,"output_tokens":56,"total_tokens":138},"created_at":1757346730}],"events":[{"created_at":1757346730,"event":"RunStarted","agent_id":"basic-agent","agent_name":"Basic Agent","run_id":"fcdf50f0-7c32-4593-b2ef-68a558774340","session_id":"80056af0-c7a5-4d69-b6a2-c3eba9f040e0","model":"gpt-4o","model_provider":"OpenAI"},{"created_at":1757346733,"event":"MemoryUpdateStarted","agent_id":"basic-agent","agent_name":"Basic Agent","run_id":"fcdf50f0-7c32-4593-b2ef-68a558774340","session_id":"80056af0-c7a5-4d69-b6a2-c3eba9f040e0"},{"created_at":1757346734,"event":"MemoryUpdateCompleted","agent_id":"basic-agent","agent_name":"Basic Agent","run_id":"fcdf50f0-7c32-4593-b2ef-68a558774340","session_id":"80056af0-c7a5-4d69-b6a2-c3eba9f040e0"},{"created_at":1757346734,"event":"RunCompleted","agent_id":"basic-agent","agent_name":"Basic Agent","run_id":"fcdf50f0-7c32-4593-b2ef-68a558774340","session_id":"80056af0-c7a5-4d69-b6a2-c3eba9f040e0","content":"I don't have access to external tools or the internet. However, I can assist you with a wide range of topics by providing information, answering questions, and offering suggestions based on the knowledge I've been trained on. If there's anything specific you need help with, feel free to ask!","content_type":"str","metrics":{"input_tokens":82,"output_tokens":56,"total_tokens":138,"time_to_first_token":0.047505500027909875,"duration":4.840060166025069}}],"created_at":"2025-09-08T15:52:10Z"}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthenticatedResponse"}}}},"404":{"description":"Session not found or has no runs","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponse"}}}},"422":{"description":"Invalid session type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/sessions/{session_id}/runs/{run_id}":{"get":{"tags":["Sessions"],"summary":"Get Run by ID","description":"Retrieve a specific run by its ID from a session. Response schema varies based on the run type (agent run, team run, or workflow run).","operationId":"get_session_run","security":[{"HTTPBearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","description":"Session ID to get run from","title":"Session Id"},"description":"Session ID to get run from"},{"name":"run_id","in":"path","required":true,"schema":{"type":"string","description":"Run ID to retrieve","title":"Run Id"},"description":"Run ID to retrieve"},{"name":"type","in":"query","required":false,"schema":{"$ref":"#/components/schemas/SessionType","description":"Session type (agent, team, or workflow)","default":"agent"},"description":"Session type (agent, team, or workflow)"},{"name":"user_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"User ID to query run from","title":"User Id"},"description":"User ID to query run from"},{"name":"db_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Database ID to query run from","title":"Db Id"},"description":"Database ID to query run from"},{"name":"table","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Table to query run from","title":"Table"},"description":"Table to query run from"}],"responses":{"200":{"description":"Run retrieved successfully","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/RunSchema"},{"$ref":"#/components/schemas/TeamRunSchema"},{"$ref":"#/components/schemas/WorkflowRunSchema"}],"title":"Response Get Session Run"},"examples":{"agent_run":{"summary":"Example agent run","value":{"run_id":"fcdf50f0-7c32-4593-b2ef-68a558774340","parent_run_id":"80056af0-c7a5-4d69-b6a2-c3eba9f040e0","agent_id":"basic-agent","user_id":"user_123","run_input":"Which tools do you have access to?","content":"I don't have access to external tools.","created_at":1728499200}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthenticatedResponse"}}}},"404":{"description":"Session or run not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponse"}}}},"422":{"description":"Invalid session type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/sessions/{session_id}/rename":{"post":{"tags":["Sessions"],"summary":"Rename Session","description":"Update the name of an existing session. Useful for organizing and categorizing sessions with meaningful names for better identification and management.","operationId":"rename_session","security":[{"HTTPBearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","description":"Session ID to rename","title":"Session Id"},"description":"Session ID to rename"},{"name":"type","in":"query","required":false,"schema":{"$ref":"#/components/schemas/SessionType","description":"Session type (agent, team, or workflow)","default":"agent"},"description":"Session type (agent, team, or workflow)"},{"name":"db_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Database ID to use for rename operation","title":"Db Id"},"description":"Database ID to use for rename operation"},{"name":"table","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Table to use for rename operation","title":"Table"},"description":"Table to use for rename operation"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_rename_session"}}}},"responses":{"200":{"description":"Session renamed successfully","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/AgentSessionDetailSchema"},{"$ref":"#/components/schemas/TeamSessionDetailSchema"},{"$ref":"#/components/schemas/WorkflowSessionDetailSchema"}],"title":"Response Rename Session"},"examples":{"agent_session_example":{"summary":"Example agent session response","value":{"user_id":"123","agent_session_id":"6f6cfbfd-9643-479a-ae47-b8f32eb4d710","session_id":"6f6cfbfd-9643-479a-ae47-b8f32eb4d710","session_name":"What tools do you have?","session_summary":{"summary":"The user and assistant engaged in a conversation about the tools the agent has available.","updated_at":"2025-09-05T18:02:12.269392"},"session_state":{},"agent_id":"basic-agent","total_tokens":160,"agent_data":{"name":"Basic Agent","agent_id":"basic-agent","model":{"provider":"OpenAI","name":"OpenAIChat","id":"gpt-4o"}},"metrics":{"input_tokens":134,"output_tokens":26,"total_tokens":160,"audio_input_tokens":0,"audio_output_tokens":0,"audio_total_tokens":0,"cache_read_tokens":0,"cache_write_tokens":0,"reasoning_tokens":0},"chat_history":[{"content":"\n- Use markdown to format your answers.\n- The current time is 2025-09-05 18:02:09.171627.\n\n\nYou have access to memories from previous interactions with the user that you can use:\n\n\n- User really likes Digimon and Japan.\n- User really likes Japan.\n- User likes coffee.\n\n\nNote: this information is from previous interactions and may be updated in this conversation. You should always prefer information from this conversation over the past memories.","from_history":false,"stop_after_tool_call":false,"role":"system","created_at":1757088129},{"content":"What tools do you have?","from_history":false,"stop_after_tool_call":false,"role":"user","created_at":1757088129},{"content":"I don't have access to external tools or the internet. However, I can assist you with a wide range of topics by providing information, answering questions, and offering suggestions based on the knowledge I've been trained on. If there's anything specific you need help with, feel free to ask!","from_history":false,"stop_after_tool_call":false,"role":"assistant","metrics":{"input_tokens":134,"output_tokens":26,"total_tokens":160},"created_at":1757088129}],"created_at":"2025-09-05T16:02:09Z","updated_at":"2025-09-05T16:02:09Z"}}}}}},"400":{"description":"Invalid session name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthenticatedResponse"}}}},"404":{"description":"Session not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponse"}}}},"422":{"description":"Invalid session type or validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/memories":{"post":{"tags":["Memory"],"summary":"Create Memory","description":"Create a new user memory with content and associated topics. Memories are used to store contextual information for users across conversations.","operationId":"create_memory","security":[{"HTTPBearer":[]}],"parameters":[{"name":"db_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Database ID to use for memory storage","title":"Db Id"},"description":"Database ID to use for memory storage"},{"name":"table","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Table to use for memory storage","title":"Table"},"description":"Table to use for memory storage"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserMemoryCreateSchema"}}}},"responses":{"200":{"description":"Memory created successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserMemorySchema"},"example":{"memory_id":"mem-123","memory":"User prefers technical explanations with code examples","topics":["preferences","communication_style","technical"],"user_id":"user-456","created_at":"2024-01-15T10:30:00Z","updated_at":"2024-01-15T10:30:00Z"}}}},"400":{"description":"Invalid request data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthenticatedResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponse"}}}},"422":{"description":"Validation error in payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"500":{"description":"Failed to create memory","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}},"delete":{"tags":["Memory"],"summary":"Delete Multiple Memories","description":"Delete multiple user memories by their IDs in a single operation. This action cannot be undone and all specified memories will be permanently removed.","operationId":"delete_memories","security":[{"HTTPBearer":[]}],"parameters":[{"name":"db_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Database ID to use for deletion","title":"Db Id"},"description":"Database ID to use for deletion"},{"name":"table","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Table to use for deletion","title":"Table"},"description":"Table to use for deletion"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteMemoriesRequest"}}}},"responses":{"204":{"description":"Memories deleted successfully"},"400":{"description":"Invalid request - empty memory_ids list","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthenticatedResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"500":{"description":"Failed to delete memories","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}},"get":{"tags":["Memory"],"summary":"List Memories","description":"Retrieve paginated list of user memories with filtering and search capabilities. Filter by user, agent, team, topics, or search within memory content.","operationId":"get_memories","security":[{"HTTPBearer":[]}],"parameters":[{"name":"user_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter memories by user ID","title":"User Id"},"description":"Filter memories by user ID"},{"name":"agent_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter memories by agent ID","title":"Agent Id"},"description":"Filter memories by agent ID"},{"name":"team_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter memories by team ID","title":"Team Id"},"description":"Filter memories by team ID"},{"name":"search_content","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Fuzzy search within memory content","title":"Search Content"},"description":"Fuzzy search within memory content"},{"name":"limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","minimum":1},{"type":"null"}],"description":"Number of memories to return per page","default":20,"title":"Limit"},"description":"Number of memories to return per page"},{"name":"page","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}],"description":"Page number for pagination","default":1,"title":"Page"},"description":"Page number for pagination"},{"name":"sort_by","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Field to sort memories by","default":"updated_at","title":"Sort By"},"description":"Field to sort memories by"},{"name":"sort_order","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/SortOrder"},{"type":"null"}],"description":"Sort order (asc or desc)","default":"desc","title":"Sort Order"},"description":"Sort order (asc or desc)"},{"name":"db_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Database ID to query memories from","title":"Db Id"},"description":"Database ID to query memories from"},{"name":"table","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The database table to use","title":"Table"},"description":"The database table to use"},{"name":"topics","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Comma-separated list of topics to filter by","examples":["preferences,technical,communication_style"],"title":"Topics"},"description":"Comma-separated list of topics to filter by"}],"responses":{"200":{"description":"Memories retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResponse_UserMemorySchema_"},"example":{"data":[{"memory_id":"f9361a69-2997-40c7-ae4e-a5861d434047","memory":"User likes coffee.","topics":["preferences"],"user_id":"123","updated_at":"2025-09-01T07:53:17Z"}]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthenticatedResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/memories/{memory_id}":{"delete":{"tags":["Memory"],"summary":"Delete Memory","description":"Permanently delete a specific user memory. This action cannot be undone.","operationId":"delete_memory","security":[{"HTTPBearer":[]}],"parameters":[{"name":"memory_id","in":"path","required":true,"schema":{"type":"string","description":"Memory ID to delete","title":"Memory Id"},"description":"Memory ID to delete"},{"name":"user_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"User ID to delete memory for","title":"User Id"},"description":"User ID to delete memory for"},{"name":"db_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Database ID to use for deletion","title":"Db Id"},"description":"Database ID to use for deletion"},{"name":"table","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Table to use for deletion","title":"Table"},"description":"Table to use for deletion"}],"responses":{"204":{"description":"Memory deleted successfully"},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthenticatedResponse"}}}},"404":{"description":"Memory not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"500":{"description":"Failed to delete memory","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}},"get":{"tags":["Memory"],"summary":"Get Memory by ID","description":"Retrieve detailed information about a specific user memory by its ID.","operationId":"get_memory","security":[{"HTTPBearer":[]}],"parameters":[{"name":"memory_id","in":"path","required":true,"schema":{"type":"string","description":"Memory ID to retrieve","title":"Memory Id"},"description":"Memory ID to retrieve"},{"name":"user_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"User ID to query memory for","title":"User Id"},"description":"User ID to query memory for"},{"name":"db_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Database ID to query memory from","title":"Db Id"},"description":"Database ID to query memory from"},{"name":"table","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Table to query memory from","title":"Table"},"description":"Table to query memory from"}],"responses":{"200":{"description":"Memory retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserMemorySchema"},"example":{"memory_id":"f9361a69-2997-40c7-ae4e-a5861d434047","memory":"User likes coffee.","topics":["preferences"],"user_id":"123","updated_at":"2025-09-01T07:53:17Z"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthenticatedResponse"}}}},"404":{"description":"Memory not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}},"patch":{"tags":["Memory"],"summary":"Update Memory","description":"Update an existing user memory's content and topics. Replaces the entire memory content and topic list with the provided values.","operationId":"update_memory","security":[{"HTTPBearer":[]}],"parameters":[{"name":"memory_id","in":"path","required":true,"schema":{"type":"string","description":"Memory ID to update","title":"Memory Id"},"description":"Memory ID to update"},{"name":"db_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Database ID to use for update","title":"Db Id"},"description":"Database ID to use for update"},{"name":"table","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Table to use for update","title":"Table"},"description":"Table to use for update"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserMemoryCreateSchema"}}}},"responses":{"200":{"description":"Memory updated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserMemorySchema"},"example":{"memory_id":"f9361a69-2997-40c7-ae4e-a5861d434047","memory":"User likes coffee.","topics":["preferences"],"user_id":"123","updated_at":"2025-09-01T07:53:17Z"}}}},"400":{"description":"Invalid request data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthenticatedResponse"}}}},"404":{"description":"Memory not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponse"}}}},"422":{"description":"Validation error in payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"500":{"description":"Failed to update memory","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/memory_topics":{"get":{"tags":["Memory"],"summary":"Get Memory Topics","description":"Retrieve all unique topics associated with memories in the system. Useful for filtering and categorizing memories by topic.","operationId":"get_memory_topics","security":[{"HTTPBearer":[]}],"parameters":[{"name":"db_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Database ID to query topics from","title":"Db Id"},"description":"Database ID to query topics from"},{"name":"table","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Table to query topics from","title":"Table"},"description":"Table to query topics from"}],"responses":{"200":{"description":"Memory topics retrieved successfully","content":{"application/json":{"schema":{"type":"array","items":{"type":"string"},"title":"Response Get Memory Topics"},"example":["preferences","communication_style","technical","industry","compliance","code_examples","requirements","healthcare","finance"]}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthenticatedResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/user_memory_stats":{"get":{"tags":["Memory"],"summary":"Get User Memory Statistics","description":"Retrieve paginated statistics about memory usage by user. Provides insights into user engagement and memory distribution across users.","operationId":"get_user_memory_stats","security":[{"HTTPBearer":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","minimum":1},{"type":"null"}],"description":"Number of user statistics to return per page","default":20,"title":"Limit"},"description":"Number of user statistics to return per page"},{"name":"page","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}],"description":"Page number for pagination","default":1,"title":"Page"},"description":"Page number for pagination"},{"name":"db_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Database ID to query statistics from","title":"Db Id"},"description":"Database ID to query statistics from"},{"name":"table","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Table to query statistics from","title":"Table"},"description":"Table to query statistics from"}],"responses":{"200":{"description":"User memory statistics retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResponse_UserStatsSchema_"},"example":{"data":[{"user_id":"123","total_memories":3,"last_memory_updated_at":"2025-09-01T07:53:17Z"}]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthenticatedResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"500":{"description":"Failed to retrieve user statistics","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/optimize-memories":{"post":{"tags":["Memory"],"summary":"Optimize User Memories","description":"Optimize all memories for a given user using the default summarize strategy. This operation combines all memories into a single comprehensive summary, achieving maximum token reduction while preserving all key information. To use a custom model, specify the model parameter in 'provider:model_id' format (e.g., 'openai:gpt-4o-mini', 'anthropic:claude-3-5-sonnet-20241022'). If not specified, uses MemoryManager's default model (gpt-4o). Set apply=false to preview optimization results without saving to database.","operationId":"optimize_memories","security":[{"HTTPBearer":[]}],"parameters":[{"name":"db_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Database ID to use for optimization","title":"Db Id"},"description":"Database ID to use for optimization"},{"name":"table","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Table to use for optimization","title":"Table"},"description":"Table to use for optimization"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OptimizeMemoriesRequest"}}}},"responses":{"200":{"description":"Memories optimized successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OptimizeMemoriesResponse"},"example":{"memories":[{"memory_id":"f9361a69-2997-40c7-ae4e-a5861d434047","memory":"User has a 3-year-old golden retriever named Max who loves fetch and walks. Lives in San Francisco's Mission district, works as a product manager in tech. Enjoys hiking Bay Area trails, trying new restaurants (especially Japanese, Thai, Mexican), and learning piano for 1.5 years.","topics":["pets","location","work","hobbies","food_preferences"],"user_id":"user2","updated_at":"2025-11-18T10:30:00Z"}],"memories_before":4,"memories_after":1,"tokens_before":450,"tokens_after":180,"tokens_saved":270,"reduction_percentage":60.0}}}},"400":{"description":"Bad request - User ID is required or invalid model string format","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthenticatedResponse"}}}},"404":{"description":"No memories found for user","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"500":{"description":"Failed to optimize memories","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/eval-runs":{"get":{"tags":["Evals"],"summary":"List Evaluation Runs","description":"Retrieve paginated evaluation runs with filtering and sorting options. Filter by agent, team, workflow, model, or evaluation type.","operationId":"get_eval_runs","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Agent ID","title":"Agent Id"},"description":"Agent ID"},{"name":"team_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Team ID","title":"Team Id"},"description":"Team ID"},{"name":"workflow_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Workflow ID","title":"Workflow Id"},"description":"Workflow ID"},{"name":"model_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Model ID","title":"Model Id"},"description":"Model ID"},{"name":"type","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/EvalFilterType"},{"type":"null"}],"description":"Filter type","title":"Type"},"description":"Filter type"},{"name":"limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","minimum":1},{"type":"null"}],"description":"Number of eval runs to return","default":20,"title":"Limit"},"description":"Number of eval runs to return"},{"name":"page","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}],"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"sort_by","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Field to sort by","default":"created_at","title":"Sort By"},"description":"Field to sort by"},{"name":"sort_order","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/SortOrder"},{"type":"null"}],"description":"Sort order (asc or desc)","default":"desc","title":"Sort Order"},"description":"Sort order (asc or desc)"},{"name":"db_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The ID of the database to use","title":"Db Id"},"description":"The ID of the database to use"},{"name":"table","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The database table to use","title":"Table"},"description":"The database table to use"},{"name":"eval_types","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Comma-separated eval types (accuracy,agent_as_judge,performance,reliability)","examples":["accuracy,agent_as_judge,performance,reliability"],"title":"Eval Types"},"description":"Comma-separated eval types (accuracy,agent_as_judge,performance,reliability)"}],"responses":{"200":{"description":"Evaluation runs retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResponse_EvalSchema_"},"example":{"data":[{"id":"a03fa2f4-900d-482d-afe0-470d4cd8d1f4","agent_id":"basic-agent","model_id":"gpt-4o","model_provider":"OpenAI","name":"Test ","eval_type":"reliability","eval_data":{"eval_status":"PASSED","failed_tool_calls":[],"passed_tool_calls":["multiply"]},"eval_input":{"expected_tool_calls":["multiply"]},"created_at":"2025-08-27T15:41:59Z","updated_at":"2025-08-27T15:41:59Z"}]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthenticatedResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}},"delete":{"tags":["Evals"],"summary":"Delete Evaluation Runs","description":"Delete multiple evaluation runs by their IDs. This action cannot be undone.","operationId":"delete_eval_runs","security":[{"HTTPBearer":[]}],"parameters":[{"name":"db_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Database ID to use for deletion","title":"Db Id"},"description":"Database ID to use for deletion"},{"name":"table","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Table to use for deletion","title":"Table"},"description":"Table to use for deletion"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteEvalRunsRequest"}}}},"responses":{"204":{"description":"Successful Response"},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthenticatedResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"500":{"description":"Failed to delete evaluation runs","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}},"post":{"tags":["Evals"],"summary":"Execute Evaluation","description":"Run evaluation tests on agents or teams. Supports accuracy, agent-as-judge, performance, and reliability evaluations. Requires either agent_id or team_id, but not both.","operationId":"run_eval","security":[{"HTTPBearer":[]}],"parameters":[{"name":"db_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Database ID to use for evaluation","title":"Db Id"},"description":"Database ID to use for evaluation"},{"name":"table","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Table to use for evaluation","title":"Table"},"description":"Table to use for evaluation"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvalRunInput"}}}},"responses":{"200":{"description":"Evaluation executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvalSchema"},"example":{"id":"f2b2d72f-e9e2-4f0e-8810-0a7e1ff58614","agent_id":"basic-agent","model_id":"gpt-4o","model_provider":"OpenAI","eval_type":"reliability","eval_data":{"eval_status":"PASSED","failed_tool_calls":[],"passed_tool_calls":["multiply"]},"created_at":"2025-08-27T15:41:59Z","updated_at":"2025-08-27T15:41:59Z"}}}},"400":{"description":"Invalid request - provide either agent_id or team_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthenticatedResponse"}}}},"404":{"description":"Agent or team not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/eval-runs/{eval_run_id}":{"get":{"tags":["Evals"],"summary":"Get Evaluation Run","description":"Retrieve detailed results and metrics for a specific evaluation run.","operationId":"get_eval_run","security":[{"HTTPBearer":[]}],"parameters":[{"name":"eval_run_id","in":"path","required":true,"schema":{"type":"string","title":"Eval Run Id"}},{"name":"db_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The ID of the database to use","title":"Db Id"},"description":"The ID of the database to use"},{"name":"table","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Table to query eval run from","title":"Table"},"description":"Table to query eval run from"}],"responses":{"200":{"description":"Evaluation run details retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvalSchema"},"example":{"id":"a03fa2f4-900d-482d-afe0-470d4cd8d1f4","agent_id":"basic-agent","model_id":"gpt-4o","model_provider":"OpenAI","name":"Test ","eval_type":"reliability","eval_data":{"eval_status":"PASSED","failed_tool_calls":[],"passed_tool_calls":["multiply"]},"eval_input":{"expected_tool_calls":["multiply"]},"created_at":"2025-08-27T15:41:59Z","updated_at":"2025-08-27T15:41:59Z"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthenticatedResponse"}}}},"404":{"description":"Evaluation run not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}},"patch":{"tags":["Evals"],"summary":"Update Evaluation Run","description":"Update the name or other properties of an existing evaluation run.","operationId":"update_eval_run","security":[{"HTTPBearer":[]}],"parameters":[{"name":"eval_run_id","in":"path","required":true,"schema":{"type":"string","title":"Eval Run Id"}},{"name":"db_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The ID of the database to use","title":"Db Id"},"description":"The ID of the database to use"},{"name":"table","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Table to use for rename operation","title":"Table"},"description":"Table to use for rename operation"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateEvalRunRequest"}}}},"responses":{"200":{"description":"Evaluation run updated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvalSchema"},"example":{"id":"a03fa2f4-900d-482d-afe0-470d4cd8d1f4","agent_id":"basic-agent","model_id":"gpt-4o","model_provider":"OpenAI","name":"Test ","eval_type":"reliability","eval_data":{"eval_status":"PASSED","failed_tool_calls":[],"passed_tool_calls":["multiply"]},"eval_input":{"expected_tool_calls":["multiply"]},"created_at":"2025-08-27T15:41:59Z","updated_at":"2025-08-27T15:41:59Z"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthenticatedResponse"}}}},"404":{"description":"Evaluation run not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"500":{"description":"Failed to update evaluation run","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/metrics":{"get":{"tags":["Metrics"],"summary":"Get AgentOS Metrics","description":"Retrieve AgentOS metrics and analytics data for a specified date range. If no date range is specified, returns all available metrics.","operationId":"get_metrics","security":[{"HTTPBearer":[]}],"parameters":[{"name":"starting_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"Starting date for metrics range (YYYY-MM-DD format)","title":"Starting Date"},"description":"Starting date for metrics range (YYYY-MM-DD format)"},{"name":"ending_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"Ending date for metrics range (YYYY-MM-DD format)","title":"Ending Date"},"description":"Ending date for metrics range (YYYY-MM-DD format)"},{"name":"db_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Database ID to query metrics from","title":"Db Id"},"description":"Database ID to query metrics from"},{"name":"table","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The database table to use","title":"Table"},"description":"The database table to use"}],"responses":{"200":{"description":"Metrics retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MetricsResponse"},"example":{"metrics":[{"id":"7bf39658-a00a-484c-8a28-67fd8a9ddb2a","agent_runs_count":5,"agent_sessions_count":5,"team_runs_count":0,"team_sessions_count":0,"workflow_runs_count":0,"workflow_sessions_count":0,"users_count":1,"token_metrics":{"input_tokens":448,"output_tokens":148,"total_tokens":596,"audio_tokens":0,"input_audio_tokens":0,"output_audio_tokens":0,"cached_tokens":0,"cache_write_tokens":0,"reasoning_tokens":0},"model_metrics":[{"model_id":"gpt-4o","model_provider":"OpenAI","count":5}],"date":"2025-07-31T00:00:00Z","created_at":"2025-07-31T12:38:52Z","updated_at":"2025-07-31T12:49:01Z"}]}}}},"400":{"description":"Invalid date range parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthenticatedResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"500":{"description":"Failed to retrieve metrics","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/metrics/refresh":{"post":{"tags":["Metrics"],"summary":"Refresh Metrics","description":"Manually trigger recalculation of system metrics from raw data. This operation analyzes system activity logs and regenerates aggregated metrics. Useful for ensuring metrics are up-to-date or after system maintenance.","operationId":"refresh_metrics","security":[{"HTTPBearer":[]}],"parameters":[{"name":"db_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Database ID to use for metrics calculation","title":"Db Id"},"description":"Database ID to use for metrics calculation"},{"name":"table","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Table to use for metrics calculation","title":"Table"},"description":"Table to use for metrics calculation"}],"responses":{"200":{"description":"Metrics refreshed successfully","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DayAggregatedMetrics"},"title":"Response Refresh Metrics"},"example":[{"id":"e77c9531-818b-47a5-99cd-59fed61e5403","agent_runs_count":2,"agent_sessions_count":2,"team_runs_count":0,"team_sessions_count":0,"workflow_runs_count":0,"workflow_sessions_count":0,"users_count":1,"token_metrics":{"input_tokens":256,"output_tokens":441,"total_tokens":697,"audio_total_tokens":0,"audio_input_tokens":0,"audio_output_tokens":0,"cache_read_tokens":0,"cache_write_tokens":0,"reasoning_tokens":0},"model_metrics":[{"model_id":"gpt-4o","model_provider":"OpenAI","count":2}],"date":"2025-08-12T00:00:00Z","created_at":"2025-08-12T08:01:47Z","updated_at":"2025-08-12T08:01:47Z"}]}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthenticatedResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"500":{"description":"Failed to refresh metrics","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/knowledge/content":{"post":{"tags":["Knowledge"],"summary":"Upload Content","description":"Upload content to the knowledge base. Supports file uploads, text content, or URLs. Content is processed asynchronously in the background. Supports custom readers and chunking strategies.","operationId":"upload_content","security":[{"HTTPBearer":[]}],"parameters":[{"name":"db_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Database ID to use for content storage","title":"Db Id"},"description":"Database ID to use for content storage"}],"requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_content"}}}},"responses":{"202":{"description":"Content upload accepted for processing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContentResponseSchema"},"example":{"id":"content-123","name":"example-document.pdf","description":"Sample document for processing","metadata":{"category":"documentation","priority":"high"},"status":"processing"}}}},"400":{"description":"Invalid request - malformed metadata or missing content","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthenticatedResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponse"}}}},"422":{"description":"Validation error in form data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}},"get":{"tags":["Knowledge"],"summary":"List Content","description":"Retrieve paginated list of all content in the knowledge base with filtering and sorting options. Filter by status, content type, or metadata properties.","operationId":"get_content","security":[{"HTTPBearer":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","minimum":1},{"type":"null"}],"description":"Number of content entries to return","default":20,"title":"Limit"},"description":"Number of content entries to return"},{"name":"page","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}],"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"sort_by","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Field to sort by","default":"created_at","title":"Sort By"},"description":"Field to sort by"},{"name":"sort_order","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/SortOrder"},{"type":"null"}],"description":"Sort order (asc or desc)","default":"desc","title":"Sort Order"},"description":"Sort order (asc or desc)"},{"name":"db_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The ID of the database to use","title":"Db Id"},"description":"The ID of the database to use"}],"responses":{"200":{"description":"Content list retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResponse_ContentResponseSchema_"},"example":{"data":[{"id":"3c2fc685-d451-4d47-b0c0-b9a544c672b7","name":"example.pdf","description":"","type":"application/pdf","size":"251261","metadata":{},"access_count":1,"status":"completed","status_message":"","created_at":"2025-09-08T15:22:53Z","updated_at":"2025-09-08T15:22:54Z"}],"meta":{"page":1,"limit":20,"total_pages":1,"total_count":2}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthenticatedResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}},"delete":{"tags":["Knowledge"],"summary":"Delete All Content","description":"Permanently remove all content from the knowledge base. This is a destructive operation that cannot be undone. Use with extreme caution.","operationId":"delete_all_content","security":[{"HTTPBearer":[]}],"parameters":[{"name":"db_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The ID of the database to use","title":"Db Id"},"description":"The ID of the database to use"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthenticatedResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"500":{"description":"Failed to delete all content","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/knowledge/remote-content":{"post":{"tags":["Knowledge"],"summary":"Upload Remote Content","description":"Upload content from a remote source (S3, GCS, SharePoint, GitHub) to the knowledge base. Content is processed asynchronously in the background.","operationId":"upload_remote_content","security":[{"HTTPBearer":[]}],"parameters":[{"name":"db_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Database ID to use for content storage","title":"Db Id"},"description":"Database ID to use for content storage"}],"requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_upload_remote_content"}}}},"responses":{"202":{"description":"Remote content upload accepted for processing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContentResponseSchema"},"example":{"id":"content-456","name":"reports/q1-2024.pdf","description":"Q1 Report from S3","metadata":{"source":"s3-docs"},"status":"processing"}}}},"400":{"description":"Invalid request - unknown config or missing path","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthenticatedResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponse"}}}},"422":{"description":"Validation error in request body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/knowledge/content/{content_id}":{"patch":{"tags":["Knowledge"],"summary":"Update Content","description":"Update content properties such as name, description, metadata, or processing configuration. Allows modification of existing content without re-uploading.","operationId":"update_content","security":[{"HTTPBearer":[]}],"parameters":[{"name":"content_id","in":"path","required":true,"schema":{"type":"string","description":"Content ID","title":"Content Id"},"description":"Content ID"},{"name":"db_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The ID of the database to use","title":"Db Id"},"description":"The ID of the database to use"}],"requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_update_content"}}}},"responses":{"200":{"description":"Content updated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContentResponseSchema"},"example":{"id":"3c2fc685-d451-4d47-b0c0-b9a544c672b7","name":"example.pdf","description":"","type":"application/pdf","size":"251261","metadata":{},"access_count":1,"status":"completed","status_message":"","created_at":"2025-09-08T15:22:53Z","updated_at":"2025-09-08T15:22:54Z"}}}},"400":{"description":"Invalid request - malformed metadata or invalid reader_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthenticatedResponse"}}}},"404":{"description":"Content not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}},"get":{"tags":["Knowledge"],"summary":"Get Content by ID","description":"Retrieve detailed information about a specific content item including processing status and metadata.","operationId":"get_content_by_id","security":[{"HTTPBearer":[]}],"parameters":[{"name":"content_id","in":"path","required":true,"schema":{"type":"string","title":"Content Id"}},{"name":"db_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The ID of the database to use","title":"Db Id"},"description":"The ID of the database to use"}],"responses":{"200":{"description":"Content details retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContentResponseSchema"},"example":{"id":"3c2fc685-d451-4d47-b0c0-b9a544c672b7","name":"example.pdf","description":"","type":"application/pdf","size":"251261","metadata":{},"access_count":1,"status":"completed","status_message":"","created_at":"2025-09-08T15:22:53Z","updated_at":"2025-09-08T15:22:54Z"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthenticatedResponse"}}}},"404":{"description":"Content not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}},"delete":{"tags":["Knowledge"],"summary":"Delete Content by ID","description":"Permanently remove a specific content item from the knowledge base. This action cannot be undone.","operationId":"delete_content_by_id","security":[{"HTTPBearer":[]}],"parameters":[{"name":"content_id","in":"path","required":true,"schema":{"type":"string","title":"Content Id"}},{"name":"db_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The ID of the database to use","title":"Db Id"},"description":"The ID of the database to use"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContentResponseSchema"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthenticatedResponse"}}}},"404":{"description":"Content not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"500":{"description":"Failed to delete content","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/knowledge/content/{content_id}/status":{"get":{"tags":["Knowledge"],"summary":"Get Content Status","description":"Retrieve the current processing status of a content item. Useful for monitoring asynchronous content processing progress and identifying any processing errors.","operationId":"get_content_status","security":[{"HTTPBearer":[]}],"parameters":[{"name":"content_id","in":"path","required":true,"schema":{"type":"string","title":"Content Id"}},{"name":"db_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The ID of the database to use","title":"Db Id"},"description":"The ID of the database to use"}],"responses":{"200":{"description":"Content status retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContentStatusResponse"},"examples":{"completed":{"summary":"Example completed content status","value":{"status":"completed","status_message":""}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthenticatedResponse"}}}},"404":{"description":"Content not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/knowledge/search":{"post":{"tags":["Knowledge"],"summary":"Search Knowledge","description":"Search the knowledge base for relevant documents using query, filters and search type.","operationId":"search_knowledge","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VectorSearchRequestSchema"}}},"required":true},"responses":{"200":{"description":"Search results retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResponse_VectorSearchResult_"},"example":{"data":[{"id":"doc_123","content":"Jordan Mitchell - Software Engineer with skills in JavaScript, React, Python","name":"cv_1","meta_data":{"page":1,"chunk":1},"usage":{"total_tokens":14},"reranking_score":0.95,"content_id":"content_456"}],"meta":{"page":1,"limit":20,"total_pages":2,"total_count":35}}}}},"400":{"description":"Invalid search parameters"},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthenticatedResponse"}}}},"404":{"description":"No documents found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/knowledge/config":{"get":{"tags":["Knowledge"],"summary":"Get Config","description":"Retrieve available readers, chunkers, and configuration options for content processing. This endpoint provides metadata about supported file types, processing strategies, and filters.","operationId":"get_knowledge_config","security":[{"HTTPBearer":[]}],"parameters":[{"name":"db_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The ID of the database to use","title":"Db Id"},"description":"The ID of the database to use"}],"responses":{"200":{"description":"Knowledge configuration retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConfigResponseSchema"},"example":{"readers":{"website":{"id":"website","name":"WebsiteReader","description":"Reads website files","chunkers":["AgenticChunker","DocumentChunker","RecursiveChunker","SemanticChunker","FixedSizeChunker"]},"firecrawl":{"id":"firecrawl","name":"FirecrawlReader","description":"Reads firecrawl files","chunkers":["SemanticChunker","FixedSizeChunker","AgenticChunker","DocumentChunker","RecursiveChunker"]},"youtube":{"id":"youtube","name":"YoutubeReader","description":"Reads youtube files","chunkers":["RecursiveChunker","AgenticChunker","DocumentChunker","SemanticChunker","FixedSizeChunker"]},"web_search":{"id":"web_search","name":"WebSearchReader","description":"Reads web_search files","chunkers":["AgenticChunker","DocumentChunker","RecursiveChunker","SemanticChunker","FixedSizeChunker"]},"arxiv":{"id":"arxiv","name":"ArxivReader","description":"Reads arxiv files","chunkers":["FixedSizeChunker","AgenticChunker","DocumentChunker","RecursiveChunker","SemanticChunker"]},"csv":{"id":"csv","name":"CsvReader","description":"Reads csv files","chunkers":["RowChunker","FixedSizeChunker","AgenticChunker","DocumentChunker","RecursiveChunker"]},"docx":{"id":"docx","name":"DocxReader","description":"Reads docx files","chunkers":["DocumentChunker","FixedSizeChunker","SemanticChunker","AgenticChunker","RecursiveChunker"]},"gcs":{"id":"gcs","name":"GcsReader","description":"Reads gcs files","chunkers":["FixedSizeChunker","AgenticChunker","DocumentChunker","RecursiveChunker","SemanticChunker"]},"json":{"id":"json","name":"JsonReader","description":"Reads json files","chunkers":["FixedSizeChunker","AgenticChunker","DocumentChunker","RecursiveChunker","SemanticChunker"]},"markdown":{"id":"markdown","name":"MarkdownReader","description":"Reads markdown files","chunkers":["MarkdownChunker","DocumentChunker","AgenticChunker","RecursiveChunker","SemanticChunker","FixedSizeChunker"]},"pdf":{"id":"pdf","name":"PdfReader","description":"Reads pdf files","chunkers":["DocumentChunker","FixedSizeChunker","AgenticChunker","SemanticChunker","RecursiveChunker"]},"text":{"id":"text","name":"TextReader","description":"Reads text files","chunkers":["CodeChunker","FixedSizeChunker","AgenticChunker","DocumentChunker","RecursiveChunker","SemanticChunker"]}},"readersForType":{"url":["url","website","firecrawl","youtube","web_search","gcs"],"youtube":["youtube"],"text":["web_search"],"topic":["arxiv"],"file":["csv","gcs"],".csv":["csv","field_labeled_csv"],".xlsx":["excel"],".xls":["excel"],"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":["excel"],"application/vnd.ms-excel":["excel"],".docx":["docx"],".doc":["docx"],".json":["json"],".md":["markdown"],".pdf":["pdf"],".txt":["text"]},"chunkers":{"AgenticChunker":{"key":"AgenticChunker","name":"AgenticChunker","description":"Chunking strategy that uses an LLM to determine natural breakpoints in the text","metadata":{"chunk_size":5000}},"CodeChunker":{"key":"CodeChunker","name":"CodeChunker","description":"The CodeChunker splits code into chunks based on its structure, leveraging Abstract Syntax Trees (ASTs) to create contextually relevant segments","metadata":{"chunk_size":2048}},"DocumentChunker":{"key":"DocumentChunker","name":"DocumentChunker","description":"A chunking strategy that splits text based on document structure like paragraphs and sections","metadata":{"chunk_size":5000,"chunk_overlap":0}},"FixedSizeChunker":{"key":"FixedSizeChunker","name":"FixedSizeChunker","description":"Chunking strategy that splits text into fixed-size chunks with optional overlap","metadata":{"chunk_size":5000,"chunk_overlap":0}},"MarkdownChunker":{"key":"MarkdownChunker","name":"MarkdownChunker","description":"A chunking strategy that splits markdown based on structure like headers, paragraphs and sections","metadata":{"chunk_size":5000,"chunk_overlap":0}},"RecursiveChunker":{"key":"RecursiveChunker","name":"RecursiveChunker","description":"Chunking strategy that recursively splits text into chunks by finding natural break points","metadata":{"chunk_size":5000,"chunk_overlap":0}},"RowChunker":{"key":"RowChunker","name":"RowChunker","description":"RowChunking chunking strategy","metadata":{}},"SemanticChunker":{"key":"SemanticChunker","name":"SemanticChunker","description":"Chunking strategy that splits text into semantic chunks using chonkie","metadata":{"chunk_size":5000}}},"vector_dbs":[{"id":"vector_db_1","name":"Vector DB 1","description":"Vector DB 1 description","search_types":["vector","keyword","hybrid"]}],"filters":["filter_tag_1","filter_tag2"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthenticatedResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/traces":{"get":{"tags":["Traces","Traces"],"summary":"List Traces","description":"Retrieve a paginated list of execution traces with optional filtering.\n\n**Traces provide observability into:**\n- Agent execution flows\n- Model invocations and token usage\n- Tool calls and their results\n- Errors and performance bottlenecks\n\n**Filtering Options:**\n- By run, session, user, or agent ID\n- By status (OK, ERROR)\n- By time range\n\n**Pagination:**\n- Use `page` (1-indexed) and `limit` parameters\n- Response includes pagination metadata (total_pages, total_count, etc.)\n\n**Response Format:**\nReturns summary information for each trace. Use GET `/traces/{trace_id}` for detailed hierarchy.","operationId":"get_traces","security":[{"HTTPBearer":[]}],"parameters":[{"name":"run_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by run ID","title":"Run Id"},"description":"Filter by run ID"},{"name":"session_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by session ID","title":"Session Id"},"description":"Filter by session ID"},{"name":"user_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by user ID","title":"User Id"},"description":"Filter by user ID"},{"name":"agent_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by agent ID","title":"Agent Id"},"description":"Filter by agent ID"},{"name":"team_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by team ID","title":"Team Id"},"description":"Filter by team ID"},{"name":"workflow_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by workflow ID","title":"Workflow Id"},"description":"Filter by workflow ID"},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by status (OK, ERROR)","title":"Status"},"description":"Filter by status (OK, ERROR)"},{"name":"start_time","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter traces starting after this time (ISO 8601 format with timezone, e.g., '2025-11-19T10:00:00Z' or '2025-11-19T15:30:00+05:30'). Times are converted to UTC for comparison.","title":"Start Time"},"description":"Filter traces starting after this time (ISO 8601 format with timezone, e.g., '2025-11-19T10:00:00Z' or '2025-11-19T15:30:00+05:30'). Times are converted to UTC for comparison."},{"name":"end_time","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter traces ending before this time (ISO 8601 format with timezone, e.g., '2025-11-19T11:00:00Z' or '2025-11-19T16:30:00+05:30'). Times are converted to UTC for comparison.","title":"End Time"},"description":"Filter traces ending before this time (ISO 8601 format with timezone, e.g., '2025-11-19T11:00:00Z' or '2025-11-19T16:30:00+05:30'). Times are converted to UTC for comparison."},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Page number (1-indexed)","default":1,"title":"Page"},"description":"Page number (1-indexed)"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Number of traces per page","default":20,"title":"Limit"},"description":"Number of traces per page"},{"name":"db_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Database ID to query traces from","title":"Db Id"},"description":"Database ID to query traces from"}],"responses":{"200":{"description":"List of traces retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResponse_TraceSummary_"},"example":{"data":[{"trace_id":"a1b2c3d4","name":"Stock_Price_Agent.run","status":"OK","duration":"1.2s","start_time":"2025-11-19T10:30:00.000000+00:00","total_spans":4,"error_count":0,"input":"What is the stock price of NVDA?","run_id":"run123","session_id":"session456","user_id":"user789","agent_id":"agent_stock","created_at":"2025-11-19T10:30:00+00:00"}],"meta":{"page":1,"limit":20,"total_pages":5,"total_count":95}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthenticatedResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/traces/{trace_id}":{"get":{"tags":["Traces","Traces"],"summary":"Get Trace or Span Detail","description":"Retrieve detailed trace information with hierarchical span tree, or a specific span within the trace.\n\n**Without span_id parameter:**\nReturns the full trace with hierarchical span tree:\n- Trace metadata (ID, status, duration, context)\n- Hierarchical tree of all spans\n- Each span includes timing, status, and type-specific metadata\n\n**With span_id parameter:**\nReturns details for a specific span within the trace:\n- Span metadata (ID, name, type, timing)\n- Status and error information\n- Type-specific attributes (model, tokens, tool params, etc.)\n\n**Span Hierarchy (full trace):**\nThe `tree` field contains root spans, each with potential `children`.\nThis recursive structure represents the execution flow:\n```\nAgent.run (root)\n ├─ LLM.invoke\n ├─ Tool.execute\n │ └─ LLM.invoke (nested)\n └─ LLM.invoke\n```\n\n**Span Types:**\n- `AGENT`: Agent execution with input/output\n- `LLM`: Model invocations with tokens and prompts\n- `TOOL`: Tool calls with parameters and results","operationId":"get_trace","security":[{"HTTPBearer":[]}],"parameters":[{"name":"trace_id","in":"path","required":true,"schema":{"type":"string","title":"Trace Id"}},{"name":"span_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional: Span ID to retrieve specific span","title":"Span Id"},"description":"Optional: Span ID to retrieve specific span"},{"name":"run_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional: Run ID to retrieve trace for","title":"Run Id"},"description":"Optional: Run ID to retrieve trace for"},{"name":"db_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Database ID to query trace from","title":"Db Id"},"description":"Database ID to query trace from"}],"responses":{"200":{"description":"Trace or span detail retrieved successfully","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/TraceDetail"},{"$ref":"#/components/schemas/TraceNode"}],"title":"Response Get Trace"},"examples":{"full_trace":{"summary":"Full trace with hierarchy (no span_id)","value":{"trace_id":"a1b2c3d4","name":"Stock_Price_Agent.run","status":"OK","duration":"1.2s","start_time":"2025-11-19T10:30:00.000000+00:00","end_time":"2025-11-19T10:30:01.200000+00:00","total_spans":4,"error_count":0,"input":"What is Tesla stock price?","output":"The current price of Tesla (TSLA) is $245.67.","run_id":"run123","session_id":"session456","user_id":"user789","agent_id":"stock_agent","created_at":"2025-11-19T10:30:00+00:00","tree":[{"id":"span1","name":"Stock_Price_Agent.run","type":"AGENT","duration":"1.2s","status":"OK","spans":[]}]}},"single_span":{"summary":"Single span detail (with span_id)","value":{"id":"span2","name":"gpt-4o-mini.invoke","type":"LLM","duration":"800ms","status":"OK","metadata":{"model":"gpt-4o-mini","input_tokens":120}}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthenticatedResponse"}}}},"404":{"description":"Trace or span not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/trace_session_stats":{"get":{"tags":["Traces","Traces"],"summary":"Get Trace Statistics by Session","description":"Retrieve aggregated trace statistics grouped by session ID with pagination.\n\n**Provides insights into:**\n- Total traces per session\n- First and last trace timestamps per session\n- Associated user and agent information\n\n**Filtering Options:**\n- By user ID\n- By agent ID\n\n**Use Cases:**\n- Monitor session-level activity\n- Track conversation flows\n- Identify high-activity sessions\n- Analyze user engagement patterns","operationId":"get_trace_stats","security":[{"HTTPBearer":[]}],"parameters":[{"name":"user_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by user ID","title":"User Id"},"description":"Filter by user ID"},{"name":"agent_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by agent ID","title":"Agent Id"},"description":"Filter by agent ID"},{"name":"team_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by team ID","title":"Team Id"},"description":"Filter by team ID"},{"name":"workflow_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by workflow ID","title":"Workflow Id"},"description":"Filter by workflow ID"},{"name":"start_time","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter sessions with traces created after this time (ISO 8601 format with timezone, e.g., '2025-11-19T10:00:00Z' or '2025-11-19T15:30:00+05:30'). Times are converted to UTC for comparison.","title":"Start Time"},"description":"Filter sessions with traces created after this time (ISO 8601 format with timezone, e.g., '2025-11-19T10:00:00Z' or '2025-11-19T15:30:00+05:30'). Times are converted to UTC for comparison."},{"name":"end_time","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter sessions with traces created before this time (ISO 8601 format with timezone, e.g., '2025-11-19T11:00:00Z' or '2025-11-19T16:30:00+05:30'). Times are converted to UTC for comparison.","title":"End Time"},"description":"Filter sessions with traces created before this time (ISO 8601 format with timezone, e.g., '2025-11-19T11:00:00Z' or '2025-11-19T16:30:00+05:30'). Times are converted to UTC for comparison."},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number (1-indexed)","default":1,"title":"Page"},"description":"Page number (1-indexed)"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Number of sessions per page","default":20,"title":"Limit"},"description":"Number of sessions per page"},{"name":"db_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Database ID to query statistics from","title":"Db Id"},"description":"Database ID to query statistics from"}],"responses":{"200":{"description":"Trace statistics retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResponse_TraceSessionStats_"},"example":{"data":[{"session_id":"37029bc6-1794-4ba8-a629-1efedc53dcad","user_id":"kaustubh@agno.com","agent_id":"hackernews-agent","total_traces":5,"first_trace_at":"2025-11-19T10:15:16+00:00","last_trace_at":"2025-11-19T10:21:30+00:00"}],"meta":{"page":1,"limit":20,"total_pages":3,"total_count":45}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthenticatedResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"500":{"description":"Failed to retrieve statistics","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/databases/all/migrate":{"post":{"tags":["Database"],"summary":"Migrate All Databases","description":"Migrate all database schemas to the given target version. If a target version is not provided, all databases will be migrated to the latest version.","operationId":"migrate_all_databases","security":[{"HTTPBearer":[]}],"parameters":[{"name":"target_version","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Target Version"}}],"responses":{"200":{"description":"All databases migrated successfully","content":{"application/json":{"schema":{},"example":{"message":"All databases migrated successfully to version 3.0.0"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthenticatedResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"500":{"description":"Failed to migrate databases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/databases/{db_id}/migrate":{"post":{"tags":["Database"],"summary":"Migrate Database","description":"Migrate the given database schema to the given target version. If a target version is not provided, the database will be migrated to the latest version.","operationId":"migrate_database","security":[{"HTTPBearer":[]}],"parameters":[{"name":"db_id","in":"path","required":true,"schema":{"type":"string","title":"Db Id"}},{"name":"target_version","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Target Version"}}],"responses":{"200":{"description":"Database migrated successfully","content":{"application/json":{"schema":{},"example":{"message":"Database migrated successfully to version 3.0.0"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthenticatedResponse"}}}},"404":{"description":"Database not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"500":{"description":"Failed to migrate database","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}}},"components":{"schemas":{"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."},"AgentResponse":{"properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"db_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Db Id"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"role":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Role"},"model":{"anyOf":[{"$ref":"#/components/schemas/ModelResponse"},{"type":"null"}]},"tools":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Tools"},"sessions":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Sessions"},"knowledge":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Knowledge"},"memory":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Memory"},"reasoning":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Reasoning"},"default_tools":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Default Tools"},"system_message":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"System Message"},"extra_messages":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Extra Messages"},"response_settings":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Response Settings"},"introduction":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Introduction"},"streaming":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Streaming"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata"},"input_schema":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Input Schema"}},"type":"object","title":"AgentResponse"},"AgentSessionDetailSchema":{"properties":{"user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id","description":"User ID associated with the session"},"agent_session_id":{"type":"string","title":"Agent Session Id","description":"Unique agent session identifier"},"session_id":{"type":"string","title":"Session Id","description":"Session identifier"},"session_name":{"type":"string","title":"Session Name","description":"Human-readable session name"},"session_summary":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Session Summary","description":"Summary of session interactions"},"session_state":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Session State","description":"Current state of the session"},"agent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Id","description":"Agent ID used in this session"},"total_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Tokens","description":"Total tokens used in this session"},"agent_data":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Agent Data","description":"Agent-specific data"},"metrics":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metrics","description":"Session metrics"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata","description":"Additional metadata"},"chat_history":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Chat History","description":"Complete chat history"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At","description":"Session creation timestamp"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At","description":"Last update timestamp"}},"type":"object","required":["agent_session_id","session_id","session_name"],"title":"AgentSessionDetailSchema"},"AgentSummaryResponse":{"properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id","description":"Unique identifier for the agent"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Name of the agent"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Description of the agent"},"db_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Db Id","description":"Database identifier"}},"type":"object","title":"AgentSummaryResponse"},"Artifact":{"properties":{"artifactId":{"type":"string","title":"Artifactid"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"extensions":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Extensions"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"parts":{"items":{"$ref":"#/components/schemas/Part"},"type":"array","title":"Parts"}},"type":"object","required":["artifactId","parts"],"title":"Artifact","description":"Represents a file, data structure, or other resource generated by an agent during a task."},"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."},"BadRequestResponse":{"properties":{"detail":{"type":"string","title":"Detail","description":"Error detail message"},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Code","description":"Error code for categorization"}},"type":"object","required":["detail"],"title":"BadRequestResponse","example":{"detail":"Bad request","error_code":"BAD_REQUEST"}},"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."},"Body_continue_agent_run":{"properties":{"tools":{"type":"string","title":"Tools"},"session_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session Id"},"user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id"},"stream":{"type":"boolean","title":"Stream","default":true}},"type":"object","required":["tools"],"title":"Body_continue_agent_run"},"Body_create_agent_run":{"properties":{"message":{"type":"string","title":"Message"},"stream":{"type":"boolean","title":"Stream","default":true},"session_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session Id"},"user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id"},"files":{"anyOf":[{"items":{"type":"string","format":"binary"},"type":"array"},{"type":"null"}],"title":"Files"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"}},"type":"object","required":["message"],"title":"Body_create_agent_run"},"Body_create_team_run":{"properties":{"message":{"type":"string","title":"Message"},"stream":{"type":"boolean","title":"Stream","default":true},"monitor":{"type":"boolean","title":"Monitor","default":true},"session_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session Id"},"user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id"},"files":{"anyOf":[{"items":{"type":"string","format":"binary"},"type":"array"},{"type":"null"}],"title":"Files"},"version":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Version"}},"type":"object","required":["message"],"title":"Body_create_team_run"},"Body_create_workflow_run":{"properties":{"message":{"type":"string","title":"Message"},"stream":{"type":"boolean","title":"Stream","default":true},"session_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session Id"},"user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id"},"version":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Version"}},"type":"object","required":["message"],"title":"Body_create_workflow_run"},"Body_rename_session":{"properties":{"session_name":{"type":"string","title":"Session Name","description":"New name for the session"}},"type":"object","required":["session_name"],"title":"Body_rename_session"},"Body_update_content":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Content name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Content description"},"metadata":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Metadata","description":"Content metadata as JSON string"},"reader_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reader Id","description":"ID of the reader to use for processing"}},"type":"object","title":"Body_update_content"},"Body_upload_content":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Content name (auto-generated from file/URL if not provided)"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Content description for context"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url","description":"URL to fetch content from (JSON array or single URL string)"},"metadata":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Metadata","description":"JSON metadata object for additional content properties"},"file":{"anyOf":[{"type":"string","format":"binary"},{"type":"null"}],"title":"File","description":"File to upload for processing"},"text_content":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Text Content","description":"Raw text content to process"},"reader_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reader Id","description":"ID of the reader to use for content processing"},"chunker":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Chunker","description":"Chunking strategy to apply during processing"},"chunk_size":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Chunk Size","description":"Chunk size to use for processing"},"chunk_overlap":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Chunk Overlap","description":"Chunk overlap to use for processing"}},"type":"object","title":"Body_upload_content"},"Body_upload_remote_content":{"properties":{"config_id":{"type":"string","title":"Config Id","description":"ID of the configured remote content source (from /knowledge/config)"},"path":{"type":"string","title":"Path","description":"Path to file or folder in the remote source"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Content name (auto-generated if not provided)"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Content description"},"metadata":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Metadata","description":"JSON metadata object"},"reader_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reader Id","description":"ID of the reader to use for processing"},"chunker":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Chunker","description":"Chunking strategy to apply"},"chunk_size":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Chunk Size","description":"Chunk size for processing"},"chunk_overlap":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Chunk Overlap","description":"Chunk overlap for processing"}},"type":"object","required":["config_id","path"],"title":"Body_upload_remote_content"},"ChatConfig":{"properties":{"quick_prompts":{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object","title":"Quick Prompts"}},"type":"object","required":["quick_prompts"],"title":"ChatConfig","description":"Configuration for the Chat page of the AgentOS"},"ChunkerSchema":{"properties":{"key":{"type":"string","title":"Key"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata"}},"type":"object","required":["key"],"title":"ChunkerSchema"},"ConfigResponse":{"properties":{"os_id":{"type":"string","title":"Os Id","description":"Unique identifier for the OS instance"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Name of the OS instance"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Description of the OS instance"},"available_models":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Available Models","description":"List of available models"},"os_database":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Os Database","description":"ID of the database used for the OS instance"},"databases":{"items":{"type":"string"},"type":"array","title":"Databases","description":"List of database IDs used by the components of the OS instance"},"chat":{"anyOf":[{"$ref":"#/components/schemas/ChatConfig"},{"type":"null"}],"description":"Chat configuration"},"session":{"anyOf":[{"$ref":"#/components/schemas/SessionConfig"},{"type":"null"}],"description":"Session configuration"},"metrics":{"anyOf":[{"$ref":"#/components/schemas/MetricsConfig"},{"type":"null"}],"description":"Metrics configuration"},"memory":{"anyOf":[{"$ref":"#/components/schemas/MemoryConfig"},{"type":"null"}],"description":"Memory configuration"},"knowledge":{"anyOf":[{"$ref":"#/components/schemas/KnowledgeConfig"},{"type":"null"}],"description":"Knowledge configuration"},"evals":{"anyOf":[{"$ref":"#/components/schemas/EvalsConfig"},{"type":"null"}],"description":"Evaluations configuration"},"traces":{"anyOf":[{"$ref":"#/components/schemas/TracesConfig"},{"type":"null"}],"description":"Traces configuration"},"agents":{"items":{"$ref":"#/components/schemas/AgentSummaryResponse"},"type":"array","title":"Agents","description":"List of registered agents"},"teams":{"items":{"$ref":"#/components/schemas/TeamSummaryResponse"},"type":"array","title":"Teams","description":"List of registered teams"},"workflows":{"items":{"$ref":"#/components/schemas/WorkflowSummaryResponse"},"type":"array","title":"Workflows","description":"List of registered workflows"},"interfaces":{"items":{"$ref":"#/components/schemas/InterfaceResponse"},"type":"array","title":"Interfaces","description":"List of available interfaces"}},"type":"object","required":["os_id","databases","agents","teams","workflows","interfaces"],"title":"ConfigResponse","description":"Response schema for the general config endpoint"},"ConfigResponseSchema":{"properties":{"readers":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/ReaderSchema"},"type":"object"},{"type":"null"}],"title":"Readers","description":"Available content readers"},"readersForType":{"anyOf":[{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"},{"type":"null"}],"title":"Readersfortype","description":"Mapping of content types to reader IDs"},"chunkers":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/ChunkerSchema"},"type":"object"},{"type":"null"}],"title":"Chunkers","description":"Available chunking strategies"},"filters":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Filters","description":"Available filter tags"},"vector_dbs":{"anyOf":[{"items":{"$ref":"#/components/schemas/VectorDbSchema"},"type":"array"},{"type":"null"}],"title":"Vector Dbs","description":"Configured vector databases"},"remote_content_sources":{"anyOf":[{"items":{"$ref":"#/components/schemas/RemoteContentSourceSchema"},"type":"array"},{"type":"null"}],"title":"Remote Content Sources","description":"Configured remote content sources (S3, GCS, SharePoint, GitHub)"}},"type":"object","title":"ConfigResponseSchema"},"ContentResponseSchema":{"properties":{"id":{"type":"string","title":"Id","description":"Unique identifier for the content"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Name of the content"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Description of the content"},"type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Type","description":"MIME type of the content"},"size":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Size","description":"Size of the content in bytes"},"linked_to":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Linked To","description":"ID of related content if linked"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata","description":"Additional metadata as key-value pairs"},"access_count":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Access Count","description":"Number of times content has been accessed"},"status":{"anyOf":[{"$ref":"#/components/schemas/ContentStatus"},{"type":"null"}],"description":"Processing status of the content"},"status_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status Message","description":"Status message or error details"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At","description":"Timestamp when content was created"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At","description":"Timestamp when content was last updated"}},"type":"object","required":["id"],"title":"ContentResponseSchema"},"ContentStatus":{"type":"string","enum":["processing","completed","failed"],"title":"ContentStatus","description":"Enumeration of possible content processing statuses."},"ContentStatusResponse":{"properties":{"status":{"$ref":"#/components/schemas/ContentStatus","description":"Current processing status of the content"},"status_message":{"type":"string","title":"Status Message","description":"Status message or error details","default":""}},"type":"object","required":["status"],"title":"ContentStatusResponse","description":"Response model for content status endpoint."},"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."},"CreateSessionRequest":{"properties":{"session_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session Id","description":"Optional session ID (generated if not provided)"},"session_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session Name","description":"Name for the session"},"session_state":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Session State","description":"Initial session state"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata","description":"Additional metadata"},"user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id","description":"User ID associated with the session"},"agent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Id","description":"Agent ID if this is an agent session"},"team_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Team Id","description":"Team ID if this is a team session"},"workflow_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workflow Id","description":"Workflow ID if this is a workflow session"}},"type":"object","title":"CreateSessionRequest"},"DataPart":{"properties":{"data":{"additionalProperties":true,"type":"object","title":"Data"},"kind":{"type":"string","const":"data","title":"Kind","default":"data"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata"}},"type":"object","required":["data"],"title":"DataPart","description":"Represents a structured data segment (e.g., JSON) within a message or artifact."},"DatabaseConfig_EvalsDomainConfig_":{"properties":{"db_id":{"type":"string","title":"Db Id"},"domain_config":{"anyOf":[{"$ref":"#/components/schemas/EvalsDomainConfig"},{"type":"null"}]},"tables":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Tables"}},"type":"object","required":["db_id"],"title":"DatabaseConfig[EvalsDomainConfig]"},"DatabaseConfig_KnowledgeDomainConfig_":{"properties":{"db_id":{"type":"string","title":"Db Id"},"domain_config":{"anyOf":[{"$ref":"#/components/schemas/KnowledgeDomainConfig"},{"type":"null"}]},"tables":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Tables"}},"type":"object","required":["db_id"],"title":"DatabaseConfig[KnowledgeDomainConfig]"},"DatabaseConfig_MemoryDomainConfig_":{"properties":{"db_id":{"type":"string","title":"Db Id"},"domain_config":{"anyOf":[{"$ref":"#/components/schemas/MemoryDomainConfig"},{"type":"null"}]},"tables":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Tables"}},"type":"object","required":["db_id"],"title":"DatabaseConfig[MemoryDomainConfig]"},"DatabaseConfig_MetricsDomainConfig_":{"properties":{"db_id":{"type":"string","title":"Db Id"},"domain_config":{"anyOf":[{"$ref":"#/components/schemas/MetricsDomainConfig"},{"type":"null"}]},"tables":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Tables"}},"type":"object","required":["db_id"],"title":"DatabaseConfig[MetricsDomainConfig]"},"DatabaseConfig_SessionDomainConfig_":{"properties":{"db_id":{"type":"string","title":"Db Id"},"domain_config":{"anyOf":[{"$ref":"#/components/schemas/SessionDomainConfig"},{"type":"null"}]},"tables":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Tables"}},"type":"object","required":["db_id"],"title":"DatabaseConfig[SessionDomainConfig]"},"DatabaseConfig_TracesDomainConfig_":{"properties":{"db_id":{"type":"string","title":"Db Id"},"domain_config":{"anyOf":[{"$ref":"#/components/schemas/TracesDomainConfig"},{"type":"null"}]},"tables":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Tables"}},"type":"object","required":["db_id"],"title":"DatabaseConfig[TracesDomainConfig]"},"DayAggregatedMetrics":{"properties":{"id":{"type":"string","title":"Id","description":"Unique identifier for the metrics record"},"agent_runs_count":{"type":"integer","minimum":0.0,"title":"Agent Runs Count","description":"Total number of agent runs"},"agent_sessions_count":{"type":"integer","minimum":0.0,"title":"Agent Sessions Count","description":"Total number of agent sessions"},"team_runs_count":{"type":"integer","minimum":0.0,"title":"Team Runs Count","description":"Total number of team runs"},"team_sessions_count":{"type":"integer","minimum":0.0,"title":"Team Sessions Count","description":"Total number of team sessions"},"workflow_runs_count":{"type":"integer","minimum":0.0,"title":"Workflow Runs Count","description":"Total number of workflow runs"},"workflow_sessions_count":{"type":"integer","minimum":0.0,"title":"Workflow Sessions Count","description":"Total number of workflow sessions"},"users_count":{"type":"integer","minimum":0.0,"title":"Users Count","description":"Total number of unique users"},"token_metrics":{"additionalProperties":true,"type":"object","title":"Token Metrics","description":"Token usage metrics (input, output, cached, etc.)"},"model_metrics":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Model Metrics","description":"Metrics grouped by model (model_id, provider, count)"},"date":{"type":"string","format":"date-time","title":"Date","description":"Date for which these metrics are aggregated"},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Timestamp when metrics were created"},"updated_at":{"type":"string","format":"date-time","title":"Updated At","description":"Timestamp when metrics were last updated"}},"type":"object","required":["id","agent_runs_count","agent_sessions_count","team_runs_count","team_sessions_count","workflow_runs_count","workflow_sessions_count","users_count","token_metrics","model_metrics","date","created_at","updated_at"],"title":"DayAggregatedMetrics","description":"Aggregated metrics for a given day"},"DeleteEvalRunsRequest":{"properties":{"eval_run_ids":{"items":{"type":"string"},"type":"array","minItems":1,"title":"Eval Run Ids","description":"List of evaluation run IDs to delete"}},"type":"object","required":["eval_run_ids"],"title":"DeleteEvalRunsRequest"},"DeleteMemoriesRequest":{"properties":{"memory_ids":{"items":{"type":"string"},"type":"array","minItems":1,"title":"Memory Ids","description":"List of memory IDs to delete"},"user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id","description":"User ID to filter memories for deletion"}},"type":"object","required":["memory_ids"],"title":"DeleteMemoriesRequest"},"DeleteSessionRequest":{"properties":{"session_ids":{"items":{"type":"string"},"type":"array","minItems":1,"title":"Session Ids","description":"List of session IDs to delete"},"session_types":{"items":{"$ref":"#/components/schemas/SessionType"},"type":"array","minItems":1,"title":"Session Types","description":"Types of sessions to delete"}},"type":"object","required":["session_ids","session_types"],"title":"DeleteSessionRequest"},"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."},"EvalFilterType":{"type":"string","enum":["agent","team","workflow"],"title":"EvalFilterType"},"EvalRunInput":{"properties":{"agent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Id","description":"Agent ID to evaluate"},"team_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Team Id","description":"Team ID to evaluate"},"model_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model Id","description":"Model ID to use for evaluation"},"model_provider":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model Provider","description":"Model provider name"},"eval_type":{"$ref":"#/components/schemas/EvalType","description":"Type of evaluation to run (accuracy, performance, or reliability)"},"input":{"type":"string","minLength":1,"title":"Input","description":"Input text/query for the evaluation"},"additional_guidelines":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Additional Guidelines","description":"Additional guidelines for the evaluation"},"additional_context":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Additional Context","description":"Additional context for the evaluation"},"num_iterations":{"type":"integer","maximum":100.0,"minimum":1.0,"title":"Num Iterations","description":"Number of times to run the evaluation","default":1},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Name for this evaluation run"},"expected_output":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Expected Output","description":"Expected output for accuracy evaluation"},"criteria":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Criteria","description":"Evaluation criteria for agent-as-judge evaluation"},"scoring_strategy":{"anyOf":[{"type":"string","enum":["numeric","binary"]},{"type":"null"}],"title":"Scoring Strategy","description":"Scoring strategy: 'numeric' (1-10 with threshold) or 'binary' (PASS/FAIL)","default":"binary"},"threshold":{"anyOf":[{"type":"integer","maximum":10.0,"minimum":1.0},{"type":"null"}],"title":"Threshold","description":"Score threshold for pass/fail (1-10), only used with numeric scoring","default":7},"warmup_runs":{"type":"integer","maximum":10.0,"minimum":0.0,"title":"Warmup Runs","description":"Number of warmup runs before measuring performance","default":0},"expected_tool_calls":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Expected Tool Calls","description":"Expected tool calls for reliability evaluation"}},"type":"object","required":["eval_type","input"],"title":"EvalRunInput"},"EvalSchema":{"properties":{"id":{"type":"string","title":"Id","description":"Unique identifier for the evaluation run"},"agent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Id","description":"Agent ID that was evaluated"},"model_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model Id","description":"Model ID used in evaluation"},"model_provider":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model Provider","description":"Model provider name"},"team_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Team Id","description":"Team ID that was evaluated"},"workflow_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workflow Id","description":"Workflow ID that was evaluated"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Name of the evaluation run"},"evaluated_component_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Evaluated Component Name","description":"Name of the evaluated component"},"eval_type":{"$ref":"#/components/schemas/EvalType","description":"Type of evaluation (accuracy, performance, or reliability)"},"eval_data":{"additionalProperties":true,"type":"object","title":"Eval Data","description":"Evaluation results and metrics"},"eval_input":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Eval Input","description":"Input parameters used for the evaluation"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At","description":"Timestamp when evaluation was created"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At","description":"Timestamp when evaluation was last updated"}},"type":"object","required":["id","eval_type","eval_data"],"title":"EvalSchema"},"EvalType":{"type":"string","enum":["accuracy","agent_as_judge","performance","reliability"],"title":"EvalType"},"EvalsConfig":{"properties":{"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name"},"available_models":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Available Models"},"dbs":{"anyOf":[{"items":{"$ref":"#/components/schemas/DatabaseConfig_EvalsDomainConfig_"},"type":"array"},{"type":"null"}],"title":"Dbs"}},"type":"object","title":"EvalsConfig","description":"Configuration for the Evals domain of the AgentOS"},"EvalsDomainConfig":{"properties":{"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name"},"available_models":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Available Models"}},"type":"object","title":"EvalsDomainConfig","description":"Configuration for the Evals domain of the AgentOS"},"FilePart":{"properties":{"file":{"anyOf":[{"$ref":"#/components/schemas/FileWithBytes"},{"$ref":"#/components/schemas/FileWithUri"}],"title":"File"},"kind":{"type":"string","const":"file","title":"Kind","default":"file"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata"}},"type":"object","required":["file"],"title":"FilePart","description":"Represents a file segment within a message or artifact. The file content can be\nprovided either directly as bytes or as a URI."},"FileWithBytes":{"properties":{"bytes":{"type":"string","title":"Bytes"},"mimeType":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mimetype"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},"type":"object","required":["bytes"],"title":"FileWithBytes","description":"Represents a file with its content provided directly as a base64-encoded string."},"FileWithUri":{"properties":{"mimeType":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mimetype"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"uri":{"type":"string","title":"Uri"}},"type":"object","required":["uri"],"title":"FileWithUri","description":"Represents a file with its content located at a specific URI."},"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"},"HealthResponse":{"properties":{"status":{"type":"string","title":"Status","description":"Health status of the service"},"instantiated_at":{"type":"string","format":"date-time","title":"Instantiated At","description":"Timestamp when service was instantiated"}},"type":"object","required":["status","instantiated_at"],"title":"HealthResponse","example":{"instantiated_at":"2025-06-10T12:00:00Z","status":"ok"}},"InterfaceResponse":{"properties":{"type":{"type":"string","title":"Type","description":"Type of the interface"},"version":{"type":"string","title":"Version","description":"Version of the interface"},"route":{"type":"string","title":"Route","description":"API route path"}},"type":"object","required":["type","version","route"],"title":"InterfaceResponse"},"InternalServerErrorResponse":{"properties":{"detail":{"type":"string","title":"Detail","description":"Error detail message"},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Code","description":"Error code for categorization"}},"type":"object","required":["detail"],"title":"InternalServerErrorResponse","example":{"detail":"Internal server error","error_code":"INTERNAL_SERVER_ERROR"}},"KnowledgeConfig":{"properties":{"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name"},"dbs":{"anyOf":[{"items":{"$ref":"#/components/schemas/DatabaseConfig_KnowledgeDomainConfig_"},"type":"array"},{"type":"null"}],"title":"Dbs"}},"type":"object","title":"KnowledgeConfig","description":"Configuration for the Knowledge domain of the AgentOS"},"KnowledgeDomainConfig":{"properties":{"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name"}},"type":"object","title":"KnowledgeDomainConfig","description":"Configuration for the Knowledge domain of the AgentOS"},"MemoryConfig":{"properties":{"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name"},"dbs":{"anyOf":[{"items":{"$ref":"#/components/schemas/DatabaseConfig_MemoryDomainConfig_"},"type":"array"},{"type":"null"}],"title":"Dbs"}},"type":"object","title":"MemoryConfig","description":"Configuration for the Memory domain of the AgentOS"},"MemoryDomainConfig":{"properties":{"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name"}},"type":"object","title":"MemoryDomainConfig","description":"Configuration for the Memory domain of the AgentOS"},"Message":{"properties":{"contextId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contextid"},"extensions":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Extensions"},"kind":{"type":"string","const":"message","title":"Kind","default":"message"},"messageId":{"type":"string","title":"Messageid"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata"},"parts":{"items":{"$ref":"#/components/schemas/Part"},"type":"array","title":"Parts"},"referenceTaskIds":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Referencetaskids"},"role":{"$ref":"#/components/schemas/Role"},"taskId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Taskid"}},"type":"object","required":["messageId","parts","role"],"title":"Message","description":"Represents a single message in the conversation between a user and an agent."},"Meta":{"properties":{"limit":{"type":"integer","minimum":1.0,"title":"Limit","description":"Number of results per page","default":20},"page":{"type":"integer","minimum":1.0,"title":"Page","description":"Page number","default":1}},"type":"object","title":"Meta","description":"Inline metadata schema for pagination."},"MetricsConfig":{"properties":{"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name"},"dbs":{"anyOf":[{"items":{"$ref":"#/components/schemas/DatabaseConfig_MetricsDomainConfig_"},"type":"array"},{"type":"null"}],"title":"Dbs"}},"type":"object","title":"MetricsConfig","description":"Configuration for the Metrics domain of the AgentOS"},"MetricsDomainConfig":{"properties":{"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name"}},"type":"object","title":"MetricsDomainConfig","description":"Configuration for the Metrics domain of the AgentOS"},"MetricsResponse":{"properties":{"metrics":{"items":{"$ref":"#/components/schemas/DayAggregatedMetrics"},"type":"array","title":"Metrics","description":"List of daily aggregated metrics"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At","description":"Timestamp of the most recent metrics update"}},"type":"object","required":["metrics"],"title":"MetricsResponse"},"Model":{"properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id","description":"Model identifier"},"provider":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provider","description":"Model provider name"}},"type":"object","title":"Model"},"ModelResponse":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Name of the model"},"model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model","description":"Model identifier"},"provider":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provider","description":"Model provider name"}},"type":"object","title":"ModelResponse"},"NotFoundResponse":{"properties":{"detail":{"type":"string","title":"Detail","description":"Error detail message"},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Code","description":"Error code for categorization"}},"type":"object","required":["detail"],"title":"NotFoundResponse","example":{"detail":"Not found","error_code":"NOT_FOUND"}},"OptimizeMemoriesRequest":{"properties":{"user_id":{"type":"string","title":"User Id","description":"User ID to optimize memories for"},"model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model","description":"Model to use for optimization in format 'provider:model_id' (e.g., 'openai:gpt-4o-mini', 'anthropic:claude-3-5-sonnet-20241022', 'google:gemini-2.0-flash-exp'). If not specified, uses MemoryManager's default model (gpt-4o)."},"apply":{"type":"boolean","title":"Apply","description":"If True, apply optimization changes to database. If False, return preview only without saving.","default":true}},"type":"object","required":["user_id"],"title":"OptimizeMemoriesRequest","description":"Schema for memory optimization request"},"OptimizeMemoriesResponse":{"properties":{"memories":{"items":{"$ref":"#/components/schemas/UserMemorySchema"},"type":"array","title":"Memories","description":"List of optimized memory objects"},"memories_before":{"type":"integer","minimum":0.0,"title":"Memories Before","description":"Number of memories before optimization"},"memories_after":{"type":"integer","minimum":0.0,"title":"Memories After","description":"Number of memories after optimization"},"tokens_before":{"type":"integer","minimum":0.0,"title":"Tokens Before","description":"Token count before optimization"},"tokens_after":{"type":"integer","minimum":0.0,"title":"Tokens After","description":"Token count after optimization"},"tokens_saved":{"type":"integer","minimum":0.0,"title":"Tokens Saved","description":"Number of tokens saved through optimization"},"reduction_percentage":{"type":"number","maximum":100.0,"minimum":0.0,"title":"Reduction Percentage","description":"Percentage of token reduction achieved"}},"type":"object","required":["memories","memories_before","memories_after","tokens_before","tokens_after","tokens_saved","reduction_percentage"],"title":"OptimizeMemoriesResponse","description":"Schema for memory optimization response"},"PaginatedResponse_ContentResponseSchema_":{"properties":{"data":{"items":{"$ref":"#/components/schemas/ContentResponseSchema"},"type":"array","title":"Data","description":"List of items for the current page"},"meta":{"$ref":"#/components/schemas/PaginationInfo","description":"Pagination metadata"}},"type":"object","required":["data","meta"],"title":"PaginatedResponse[ContentResponseSchema]"},"PaginatedResponse_EvalSchema_":{"properties":{"data":{"items":{"$ref":"#/components/schemas/EvalSchema"},"type":"array","title":"Data","description":"List of items for the current page"},"meta":{"$ref":"#/components/schemas/PaginationInfo","description":"Pagination metadata"}},"type":"object","required":["data","meta"],"title":"PaginatedResponse[EvalSchema]"},"PaginatedResponse_SessionSchema_":{"properties":{"data":{"items":{"$ref":"#/components/schemas/SessionSchema"},"type":"array","title":"Data","description":"List of items for the current page"},"meta":{"$ref":"#/components/schemas/PaginationInfo","description":"Pagination metadata"}},"type":"object","required":["data","meta"],"title":"PaginatedResponse[SessionSchema]"},"PaginatedResponse_TraceSessionStats_":{"properties":{"data":{"items":{"$ref":"#/components/schemas/TraceSessionStats"},"type":"array","title":"Data","description":"List of items for the current page"},"meta":{"$ref":"#/components/schemas/PaginationInfo","description":"Pagination metadata"}},"type":"object","required":["data","meta"],"title":"PaginatedResponse[TraceSessionStats]"},"PaginatedResponse_TraceSummary_":{"properties":{"data":{"items":{"$ref":"#/components/schemas/TraceSummary"},"type":"array","title":"Data","description":"List of items for the current page"},"meta":{"$ref":"#/components/schemas/PaginationInfo","description":"Pagination metadata"}},"type":"object","required":["data","meta"],"title":"PaginatedResponse[TraceSummary]"},"PaginatedResponse_UserMemorySchema_":{"properties":{"data":{"items":{"$ref":"#/components/schemas/UserMemorySchema"},"type":"array","title":"Data","description":"List of items for the current page"},"meta":{"$ref":"#/components/schemas/PaginationInfo","description":"Pagination metadata"}},"type":"object","required":["data","meta"],"title":"PaginatedResponse[UserMemorySchema]"},"PaginatedResponse_UserStatsSchema_":{"properties":{"data":{"items":{"$ref":"#/components/schemas/UserStatsSchema"},"type":"array","title":"Data","description":"List of items for the current page"},"meta":{"$ref":"#/components/schemas/PaginationInfo","description":"Pagination metadata"}},"type":"object","required":["data","meta"],"title":"PaginatedResponse[UserStatsSchema]"},"PaginatedResponse_VectorSearchResult_":{"properties":{"data":{"items":{"$ref":"#/components/schemas/VectorSearchResult"},"type":"array","title":"Data","description":"List of items for the current page"},"meta":{"$ref":"#/components/schemas/PaginationInfo","description":"Pagination metadata"}},"type":"object","required":["data","meta"],"title":"PaginatedResponse[VectorSearchResult]"},"PaginationInfo":{"properties":{"page":{"type":"integer","minimum":0.0,"title":"Page","description":"Current page number (0-indexed)","default":0},"limit":{"type":"integer","minimum":1.0,"title":"Limit","description":"Number of items per page","default":20},"total_pages":{"type":"integer","minimum":0.0,"title":"Total Pages","description":"Total number of pages","default":0},"total_count":{"type":"integer","minimum":0.0,"title":"Total Count","description":"Total count of items","default":0},"search_time_ms":{"type":"number","minimum":0.0,"title":"Search Time Ms","description":"Search execution time in milliseconds","default":0}},"type":"object","title":"PaginationInfo"},"Part":{"anyOf":[{"$ref":"#/components/schemas/TextPart"},{"$ref":"#/components/schemas/FilePart"},{"$ref":"#/components/schemas/DataPart"}],"title":"Part"},"ReaderSchema":{"properties":{"id":{"type":"string","title":"Id","description":"Unique identifier for the reader"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Name of the reader"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Description of the reader's capabilities"},"chunkers":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Chunkers","description":"List of supported chunking strategies"}},"type":"object","required":["id"],"title":"ReaderSchema"},"RemoteContentSourceSchema":{"properties":{"id":{"type":"string","title":"Id","description":"Unique identifier for the content source"},"name":{"type":"string","title":"Name","description":"Display name for the content source"},"type":{"type":"string","title":"Type","description":"Type of content source (s3, gcs, sharepoint, github, azureblob)"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata","description":"Custom metadata for the content source"}},"type":"object","required":["id","name","type"],"title":"RemoteContentSourceSchema","description":"Schema for remote content source configuration."},"Role":{"type":"string","enum":["agent","user"],"title":"Role","description":"Identifies the sender of the message. `user` for the client, `agent` for the service."},"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."},"RunSchema":{"properties":{"run_id":{"type":"string","title":"Run Id","description":"Unique identifier for the run"},"parent_run_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Run Id","description":"Parent run ID if this is a nested run"},"agent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Id","description":"Agent ID that executed this run"},"user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id","description":"User ID associated with the run"},"run_input":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Run Input","description":"Input provided to the run"},"content":{"anyOf":[{"type":"string"},{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Content","description":"Output content from the run"},"run_response_format":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Run Response Format","description":"Format of the response (text/json)"},"reasoning_content":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reasoning Content","description":"Reasoning content if reasoning was enabled"},"reasoning_steps":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Reasoning Steps","description":"List of reasoning steps"},"metrics":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metrics","description":"Performance and usage metrics"},"messages":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Messages","description":"Message history for the run"},"tools":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Tools","description":"Tools used in the run"},"events":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Events","description":"Events generated during the run"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At","description":"Run creation timestamp"},"references":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"References","description":"References cited in the run"},"citations":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Citations","description":"Citations from the model (e.g., from Gemini grounding/search)"},"reasoning_messages":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Reasoning Messages","description":"Reasoning process messages"},"session_state":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Session State","description":"Session state at the end of the run"},"images":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Images","description":"Images included in the run"},"videos":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Videos","description":"Videos included in the run"},"audio":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Audio","description":"Audio files included in the run"},"files":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Files","description":"Files included in the run"},"response_audio":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Response Audio","description":"Audio response if generated"},"input_media":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Input Media","description":"Input media attachments"}},"type":"object","required":["run_id"],"title":"RunSchema"},"SendMessageSuccessResponse":{"properties":{"id":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"null"}],"title":"Id"},"jsonrpc":{"type":"string","const":"2.0","title":"Jsonrpc","default":"2.0"},"result":{"anyOf":[{"$ref":"#/components/schemas/Task"},{"$ref":"#/components/schemas/Message"}],"title":"Result"}},"type":"object","required":["result"],"title":"SendMessageSuccessResponse","description":"Represents a successful JSON-RPC response for the `message/send` method."},"SessionConfig":{"properties":{"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name"},"dbs":{"anyOf":[{"items":{"$ref":"#/components/schemas/DatabaseConfig_SessionDomainConfig_"},"type":"array"},{"type":"null"}],"title":"Dbs"}},"type":"object","title":"SessionConfig","description":"Configuration for the Session domain of the AgentOS"},"SessionDomainConfig":{"properties":{"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name"}},"type":"object","title":"SessionDomainConfig","description":"Configuration for the Session domain of the AgentOS"},"SessionSchema":{"properties":{"session_id":{"type":"string","title":"Session Id","description":"Unique identifier for the session"},"session_name":{"type":"string","title":"Session Name","description":"Human-readable name for the session"},"session_state":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Session State","description":"Current state data of the session"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At","description":"Timestamp when session was created"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At","description":"Timestamp when session was last updated"}},"type":"object","required":["session_id","session_name"],"title":"SessionSchema"},"SessionType":{"type":"string","enum":["agent","team","workflow"],"title":"SessionType"},"SlackChallengeResponse":{"properties":{"challenge":{"type":"string","title":"Challenge","description":"Challenge string to echo back to Slack"}},"type":"object","required":["challenge"],"title":"SlackChallengeResponse","description":"Response model for Slack URL verification challenge"},"SlackEventResponse":{"properties":{"status":{"type":"string","title":"Status","description":"Processing status","default":"ok"}},"type":"object","title":"SlackEventResponse","description":"Response model for Slack event processing"},"SortOrder":{"type":"string","enum":["asc","desc"],"title":"SortOrder"},"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."},"Task":{"properties":{"artifacts":{"anyOf":[{"items":{"$ref":"#/components/schemas/Artifact"},"type":"array"},{"type":"null"}],"title":"Artifacts"},"contextId":{"type":"string","title":"Contextid"},"history":{"anyOf":[{"items":{"$ref":"#/components/schemas/Message"},"type":"array"},{"type":"null"}],"title":"History"},"id":{"type":"string","title":"Id"},"kind":{"type":"string","const":"task","title":"Kind","default":"task"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata"},"status":{"$ref":"#/components/schemas/TaskStatus"}},"type":"object","required":["contextId","id","status"],"title":"Task","description":"Represents a single, stateful operation or conversation between a client and an agent."},"TaskState":{"type":"string","enum":["submitted","working","input-required","completed","canceled","failed","rejected","auth-required","unknown"],"title":"TaskState","description":"Defines the lifecycle states of a Task."},"TaskStatus":{"properties":{"message":{"anyOf":[{"$ref":"#/components/schemas/Message"},{"type":"null"}]},"state":{"$ref":"#/components/schemas/TaskState"},"timestamp":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timestamp","examples":["2023-10-27T10:00:00Z"]}},"type":"object","required":["state"],"title":"TaskStatus","description":"Represents the status of a task at a specific point in time."},"TeamResponse":{"properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"db_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Db Id"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"role":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Role"},"model":{"anyOf":[{"$ref":"#/components/schemas/ModelResponse"},{"type":"null"}]},"tools":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Tools"},"sessions":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Sessions"},"knowledge":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Knowledge"},"memory":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Memory"},"reasoning":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Reasoning"},"default_tools":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Default Tools"},"system_message":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"System Message"},"response_settings":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Response Settings"},"introduction":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Introduction"},"streaming":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Streaming"},"members":{"anyOf":[{"items":{"anyOf":[{"$ref":"#/components/schemas/AgentResponse"},{"$ref":"#/components/schemas/TeamResponse"}]},"type":"array"},{"type":"null"}],"title":"Members"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata"},"input_schema":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Input Schema"}},"type":"object","title":"TeamResponse"},"TeamRunSchema":{"properties":{"run_id":{"type":"string","title":"Run Id","description":"Unique identifier for the team run"},"parent_run_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Run Id","description":"Parent run ID if this is a nested run"},"team_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Team Id","description":"Team ID that executed this run"},"content":{"anyOf":[{"type":"string"},{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Content","description":"Output content from the team run"},"reasoning_content":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reasoning Content","description":"Reasoning content if reasoning was enabled"},"reasoning_steps":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Reasoning Steps","description":"List of reasoning steps"},"run_input":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Run Input","description":"Input provided to the run"},"run_response_format":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Run Response Format","description":"Format of the response (text/json)"},"metrics":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metrics","description":"Performance and usage metrics"},"tools":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Tools","description":"Tools used in the run"},"messages":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Messages","description":"Message history for the run"},"events":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Events","description":"Events generated during the run"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At","description":"Run creation timestamp"},"references":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"References","description":"References cited in the run"},"citations":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Citations","description":"Citations from the model (e.g., from Gemini grounding/search)"},"reasoning_messages":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Reasoning Messages","description":"Reasoning process messages"},"session_state":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Session State","description":"Session state at the end of the run"},"input_media":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Input Media","description":"Input media attachments"},"images":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Images","description":"Images included in the run"},"videos":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Videos","description":"Videos included in the run"},"audio":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Audio","description":"Audio files included in the run"},"files":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Files","description":"Files included in the run"},"response_audio":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Response Audio","description":"Audio response if generated"}},"type":"object","required":["run_id"],"title":"TeamRunSchema"},"TeamSessionDetailSchema":{"properties":{"session_id":{"type":"string","title":"Session Id","description":"Unique session identifier"},"session_name":{"type":"string","title":"Session Name","description":"Human-readable session name"},"user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id","description":"User ID associated with the session"},"team_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Team Id","description":"Team ID used in this session"},"session_summary":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Session Summary","description":"Summary of team interactions"},"session_state":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Session State","description":"Current state of the session"},"metrics":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metrics","description":"Session metrics"},"team_data":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Team Data","description":"Team-specific data"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata","description":"Additional metadata"},"chat_history":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Chat History","description":"Complete chat history"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At","description":"Session creation timestamp"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At","description":"Last update timestamp"},"total_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Tokens","description":"Total tokens used in this session"}},"type":"object","required":["session_id","session_name"],"title":"TeamSessionDetailSchema"},"TeamSummaryResponse":{"properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id","description":"Unique identifier for the team"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Name of the team"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Description of the team"},"db_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Db Id","description":"Database identifier"}},"type":"object","title":"TeamSummaryResponse"},"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."},"TextPart":{"properties":{"kind":{"type":"string","const":"text","title":"Kind","default":"text"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata"},"text":{"type":"string","title":"Text"}},"type":"object","required":["text"],"title":"TextPart","description":"Represents a text segment within a message or artifact."},"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."},"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."},"TraceDetail":{"properties":{"trace_id":{"type":"string","title":"Trace Id","description":"Unique trace identifier"},"name":{"type":"string","title":"Name","description":"Trace name (usually root span name)"},"status":{"type":"string","title":"Status","description":"Overall status (OK, ERROR)"},"duration":{"type":"string","title":"Duration","description":"Human-readable total duration"},"start_time":{"type":"string","format":"date-time","title":"Start Time","description":"Trace start time (Pydantic auto-serializes to ISO 8601)"},"end_time":{"type":"string","format":"date-time","title":"End Time","description":"Trace end time (Pydantic auto-serializes to ISO 8601)"},"total_spans":{"type":"integer","title":"Total Spans","description":"Total number of spans in this trace"},"error_count":{"type":"integer","title":"Error Count","description":"Number of spans with errors"},"input":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Input","description":"Input to the agent/workflow"},"output":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Output","description":"Output from the agent/workflow"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error","description":"Error message if status is ERROR"},"run_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Run Id","description":"Associated run ID"},"session_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session Id","description":"Associated session ID"},"user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id","description":"Associated user ID"},"agent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Id","description":"Associated agent ID"},"team_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Team Id","description":"Associated team ID"},"workflow_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workflow Id","description":"Associated workflow ID"},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Time when trace was created (Pydantic auto-serializes to ISO 8601)"},"tree":{"items":{"$ref":"#/components/schemas/TraceNode"},"type":"array","title":"Tree","description":"Hierarchical tree of spans (root nodes)"}},"type":"object","required":["trace_id","name","status","duration","start_time","end_time","total_spans","error_count","created_at","tree"],"title":"TraceDetail","description":"Detailed trace information with hierarchical span tree"},"TraceNode":{"properties":{"id":{"type":"string","title":"Id","description":"Span ID"},"name":{"type":"string","title":"Name","description":"Span name (e.g., 'agent.run', 'llm.invoke')"},"type":{"type":"string","title":"Type","description":"Span kind (AGENT, TEAM, WORKFLOW, LLM, TOOL)"},"duration":{"type":"string","title":"Duration","description":"Human-readable duration (e.g., '123ms', '1.5s')"},"start_time":{"type":"string","format":"date-time","title":"Start Time","description":"Start time (Pydantic auto-serializes to ISO 8601)"},"end_time":{"type":"string","format":"date-time","title":"End Time","description":"End time (Pydantic auto-serializes to ISO 8601)"},"status":{"type":"string","title":"Status","description":"Status code (OK, ERROR)"},"input":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Input","description":"Input to the span"},"output":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Output","description":"Output from the span"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error","description":"Error message if status is ERROR"},"spans":{"anyOf":[{"items":{"$ref":"#/components/schemas/TraceNode"},"type":"array"},{"type":"null"}],"title":"Spans","description":"Child spans in the trace hierarchy"},"step_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Step Type","description":"Workflow step type (Step, Condition, function, Agent, Team)"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata","description":"Additional span attributes and data"},"extra_data":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Extra Data","description":"Flexible field for custom attributes and additional data"}},"type":"object","required":["id","name","type","duration","start_time","end_time","status"],"title":"TraceNode","description":"Recursive node structure for rendering trace hierarchy in the frontend"},"TraceSessionStats":{"properties":{"session_id":{"type":"string","title":"Session Id","description":"Session identifier"},"user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id","description":"User ID associated with the session"},"agent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Id","description":"Agent ID(s) used in the session"},"team_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Team Id","description":"Team ID associated with the session"},"workflow_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workflow Id","description":"Workflow ID associated with the session"},"total_traces":{"type":"integer","title":"Total Traces","description":"Total number of traces in this session"},"first_trace_at":{"type":"string","format":"date-time","title":"First Trace At","description":"Time of first trace (Pydantic auto-serializes to ISO 8601)"},"last_trace_at":{"type":"string","format":"date-time","title":"Last Trace At","description":"Time of last trace (Pydantic auto-serializes to ISO 8601)"}},"type":"object","required":["session_id","total_traces","first_trace_at","last_trace_at"],"title":"TraceSessionStats","description":"Aggregated trace statistics grouped by session"},"TraceSummary":{"properties":{"trace_id":{"type":"string","title":"Trace Id","description":"Unique trace identifier"},"name":{"type":"string","title":"Name","description":"Trace name (usually root span name)"},"status":{"type":"string","title":"Status","description":"Overall status (OK, ERROR, UNSET)"},"duration":{"type":"string","title":"Duration","description":"Human-readable total duration"},"start_time":{"type":"string","format":"date-time","title":"Start Time","description":"Trace start time (Pydantic auto-serializes to ISO 8601)"},"end_time":{"type":"string","format":"date-time","title":"End Time","description":"Trace end time (Pydantic auto-serializes to ISO 8601)"},"total_spans":{"type":"integer","title":"Total Spans","description":"Total number of spans in this trace"},"error_count":{"type":"integer","title":"Error Count","description":"Number of spans with errors"},"input":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Input","description":"Input to the agent"},"run_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Run Id","description":"Associated run ID"},"session_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session Id","description":"Associated session ID"},"user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id","description":"Associated user ID"},"agent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Id","description":"Associated agent ID"},"team_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Team Id","description":"Associated team ID"},"workflow_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workflow Id","description":"Associated workflow ID"},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Time when trace was created (Pydantic auto-serializes to ISO 8601)"}},"type":"object","required":["trace_id","name","status","duration","start_time","end_time","total_spans","error_count","created_at"],"title":"TraceSummary","description":"Summary information for trace list view"},"TracesConfig":{"properties":{"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name"},"dbs":{"anyOf":[{"items":{"$ref":"#/components/schemas/DatabaseConfig_TracesDomainConfig_"},"type":"array"},{"type":"null"}],"title":"Dbs"}},"type":"object","title":"TracesConfig","description":"Configuration for the Traces domain of the AgentOS"},"TracesDomainConfig":{"properties":{"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name"}},"type":"object","title":"TracesDomainConfig","description":"Configuration for the Traces domain of the AgentOS"},"UnauthenticatedResponse":{"properties":{"detail":{"type":"string","title":"Detail","description":"Error detail message"},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Code","description":"Error code for categorization"}},"type":"object","required":["detail"],"title":"UnauthenticatedResponse","example":{"detail":"Unauthenticated access","error_code":"UNAUTHENTICATED"}},"UpdateEvalRunRequest":{"properties":{"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name","description":"New name for the evaluation run"}},"type":"object","required":["name"],"title":"UpdateEvalRunRequest"},"UpdateSessionRequest":{"properties":{"session_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session Name","description":"Updated session name"},"session_state":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Session State","description":"Updated session state"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata","description":"Updated metadata"},"summary":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Summary","description":"Session summary"}},"type":"object","title":"UpdateSessionRequest"},"UserMemoryCreateSchema":{"properties":{"memory":{"type":"string","maxLength":5000,"minLength":1,"title":"Memory","description":"Memory content text"},"user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id","description":"User ID who owns this memory"},"topics":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Topics","description":"Topics or tags to categorize the memory"}},"type":"object","required":["memory"],"title":"UserMemoryCreateSchema","description":"Define the payload expected for creating a new user memory"},"UserMemorySchema":{"properties":{"memory_id":{"type":"string","title":"Memory Id","description":"Unique identifier for the memory"},"memory":{"type":"string","title":"Memory","description":"Memory content text"},"topics":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Topics","description":"Topics or tags associated with the memory"},"agent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Id","description":"Agent ID associated with this memory"},"team_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Team Id","description":"Team ID associated with this memory"},"user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id","description":"User ID who owns this memory"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At","description":"Timestamp when memory was last updated"}},"type":"object","required":["memory_id","memory"],"title":"UserMemorySchema"},"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."},"UserStatsSchema":{"properties":{"user_id":{"type":"string","title":"User Id","description":"User ID"},"total_memories":{"type":"integer","minimum":0.0,"title":"Total Memories","description":"Total number of memories for this user"},"last_memory_updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Memory Updated At","description":"Timestamp of the most recent memory update"}},"type":"object","required":["user_id","total_memories"],"title":"UserStatsSchema","description":"Schema for user memory statistics"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"ValidationErrorResponse":{"properties":{"detail":{"type":"string","title":"Detail","description":"Error detail message"},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Code","description":"Error code for categorization"}},"type":"object","required":["detail"],"title":"ValidationErrorResponse","example":{"detail":"Validation error","error_code":"VALIDATION_ERROR"}},"VectorDbSchema":{"properties":{"id":{"type":"string","title":"Id","description":"Unique identifier for the vector database"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Name of the vector database"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Description of the vector database"},"search_types":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Search Types","description":"List of supported search types (vector, keyword, hybrid)"}},"type":"object","required":["id"],"title":"VectorDbSchema"},"VectorSearchRequestSchema":{"properties":{"query":{"type":"string","title":"Query","description":"The search query text"},"db_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Db Id","description":"The content database ID to search in"},"vector_db_ids":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Vector Db Ids","description":"List of vector database IDs to search in"},"search_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search Type","description":"The type of search to perform (vector, keyword, hybrid)"},"max_results":{"anyOf":[{"type":"integer","maximum":1000.0,"minimum":1.0},{"type":"null"}],"title":"Max Results","description":"The maximum number of results to return"},"filters":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Filters","description":"Filters to apply to the search results"},"meta":{"anyOf":[{"$ref":"#/components/schemas/Meta"},{"type":"null"}],"description":"Pagination metadata. Limit and page number to return a subset of results."}},"type":"object","required":["query"],"title":"VectorSearchRequestSchema","description":"Schema for vector search request."},"VectorSearchResult":{"properties":{"id":{"type":"string","title":"Id","description":"Unique identifier for the search result document"},"content":{"type":"string","title":"Content","description":"Content text of the document"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Name of the document"},"meta_data":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Meta Data","description":"Metadata associated with the document"},"usage":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Usage","description":"Usage statistics (e.g., token counts)"},"reranking_score":{"anyOf":[{"type":"number","maximum":1.0,"minimum":0.0},{"type":"null"}],"title":"Reranking Score","description":"Reranking score for relevance"},"content_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content Id","description":"ID of the source content"},"content_origin":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content Origin","description":"Origin URL or source of the content"},"size":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Size","description":"Size of the content in bytes"}},"type":"object","required":["id","content"],"title":"VectorSearchResult","description":"Schema for search result documents."},"WorkflowResponse":{"properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id","description":"Unique identifier for the workflow"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Name of the workflow"},"db_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Db Id","description":"Database identifier"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Description of the workflow"},"input_schema":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Input Schema","description":"Input schema for the workflow"},"steps":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Steps","description":"List of workflow steps"},"agent":{"anyOf":[{"$ref":"#/components/schemas/AgentResponse"},{"type":"null"}],"description":"Agent configuration if used"},"team":{"anyOf":[{"$ref":"#/components/schemas/TeamResponse"},{"type":"null"}],"description":"Team configuration if used"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata","description":"Additional metadata"},"workflow_agent":{"type":"boolean","title":"Workflow Agent","description":"Whether this workflow uses a WorkflowAgent","default":false}},"type":"object","title":"WorkflowResponse"},"WorkflowRunSchema":{"properties":{"run_id":{"type":"string","title":"Run Id","description":"Unique identifier for the workflow run"},"run_input":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Run Input","description":"Input provided to the workflow"},"events":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Events","description":"Events generated during the workflow"},"workflow_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workflow Id","description":"Workflow ID that was executed"},"user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id","description":"User ID associated with the run"},"content":{"anyOf":[{"type":"string"},{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Content","description":"Output content from the workflow"},"content_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content Type","description":"Type of content returned"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status","description":"Status of the workflow run"},"step_results":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Step Results","description":"Results from each workflow step"},"step_executor_runs":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Step Executor Runs","description":"Executor runs for each step"},"metrics":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metrics","description":"Performance and usage metrics"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At","description":"Run creation timestamp"},"reasoning_content":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reasoning Content","description":"Reasoning content if reasoning was enabled"},"reasoning_steps":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Reasoning Steps","description":"List of reasoning steps"},"references":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"References","description":"References cited in the workflow"},"citations":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Citations","description":"Citations from the model (e.g., from Gemini grounding/search)"},"reasoning_messages":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Reasoning Messages","description":"Reasoning process messages"},"images":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Images","description":"Images included in the workflow"},"videos":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Videos","description":"Videos included in the workflow"},"audio":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Audio","description":"Audio files included in the workflow"},"files":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Files","description":"Files included in the workflow"},"response_audio":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Response Audio","description":"Audio response if generated"}},"type":"object","required":["run_id"],"title":"WorkflowRunSchema"},"WorkflowSessionDetailSchema":{"properties":{"user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id","description":"User ID associated with the session"},"workflow_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workflow Id","description":"Workflow ID used in this session"},"workflow_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workflow Name","description":"Name of the workflow"},"session_id":{"type":"string","title":"Session Id","description":"Unique session identifier"},"session_name":{"type":"string","title":"Session Name","description":"Human-readable session name"},"session_data":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Session Data","description":"Complete session data"},"session_state":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Session State","description":"Current workflow state"},"workflow_data":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Workflow Data","description":"Workflow-specific data"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata","description":"Additional metadata"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At","description":"Session creation timestamp"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At","description":"Last update timestamp"}},"type":"object","required":["session_id","session_name"],"title":"WorkflowSessionDetailSchema"},"WorkflowSummaryResponse":{"properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id","description":"Unique identifier for the workflow"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Name of the workflow"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Description of the workflow"},"db_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Db Id","description":"Database identifier"}},"type":"object","title":"WorkflowSummaryResponse"}},"securitySchemes":{"HTTPBearer":{"type":"http","scheme":"bearer"}}}}
\ No newline at end of file
diff --git a/reference-api/schema/core/get-available-models.mdx b/reference-api/schema/core/get-available-models.mdx
new file mode 100644
index 000000000..983aa2de6
--- /dev/null
+++ b/reference-api/schema/core/get-available-models.mdx
@@ -0,0 +1,3 @@
+---
+openapi: get /models
+---
\ No newline at end of file
diff --git a/reference-api/schema/health/health-check.mdx b/reference-api/schema/health/health-check.mdx
new file mode 100644
index 000000000..f27caa880
--- /dev/null
+++ b/reference-api/schema/health/health-check.mdx
@@ -0,0 +1,3 @@
+---
+openapi: get /health
+---
\ No newline at end of file
diff --git a/reference-api/schema/home/api-information.mdx b/reference-api/schema/home/api-information.mdx
new file mode 100644
index 000000000..8c64891f9
--- /dev/null
+++ b/reference-api/schema/home/api-information.mdx
@@ -0,0 +1,3 @@
+---
+openapi: get /
+---
\ No newline at end of file
diff --git a/reference-api/schema/knowledge/upload-remote-content.mdx b/reference-api/schema/knowledge/upload-remote-content.mdx
new file mode 100644
index 000000000..d63942a44
--- /dev/null
+++ b/reference-api/schema/knowledge/upload-remote-content.mdx
@@ -0,0 +1,3 @@
+---
+openapi: post /knowledge/remote-content
+---
\ No newline at end of file
diff --git a/reference-api/schema/memory/optimize-user-memories.mdx b/reference-api/schema/memory/optimize-user-memories.mdx
new file mode 100644
index 000000000..1a310199f
--- /dev/null
+++ b/reference-api/schema/memory/optimize-user-memories.mdx
@@ -0,0 +1,3 @@
+---
+openapi: post /optimize-memories
+---
\ No newline at end of file