UNPKG

letta-mcp-server

Version:

Model Context Protocol (MCP) server for Letta - provides tools for managing agents, memory, and passages

1 lines 252 kB
{"openapi":"3.1.0","info":{"title":"Letta","summary":"Create LLM agents with long-term memory and custom tools 📚🦙","version":"1.0.0"},"paths":{"/v1/tools/{tool_id}":{"delete":{"tags":["tools"],"summary":"Delete Tool","description":"Delete a tool by name","operationId":"delete_tool","parameters":[{"name":"tool_id","in":"path","required":true,"schema":{"type":"string","title":"Tool Id"}},{"name":"user_id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["tools"],"summary":"Retrieve Tool","description":"Get a tool by ID","operationId":"retrieve_tool","parameters":[{"name":"tool_id","in":"path","required":true,"schema":{"type":"string","title":"Tool Id"}},{"name":"user_id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tool"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["tools"],"summary":"Modify Tool","description":"Update an existing tool","operationId":"modify_tool","parameters":[{"name":"tool_id","in":"path","required":true,"schema":{"type":"string","title":"Tool Id"}},{"name":"user_id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tool"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/tools/":{"get":{"tags":["tools"],"summary":"List Tools","description":"Get a list of all tools available to agents belonging to the org of the user","operationId":"list_tools","parameters":[{"name":"after","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"After"}},{"name":"limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":50,"title":"Limit"}},{"name":"name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},{"name":"user_id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Tool"},"title":"Response List Tools"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["tools"],"summary":"Create Tool","description":"Create a new tool","operationId":"create_tool","parameters":[{"name":"user_id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tool"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["tools"],"summary":"Upsert Tool","description":"Create or update a tool","operationId":"upsert_tool","parameters":[{"name":"user_id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tool"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/tools/add-base-tools":{"post":{"tags":["tools"],"summary":"Upsert Base Tools","description":"Upsert base tools","operationId":"add_base_tools","parameters":[{"name":"user_id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Tool"},"title":"Response Add Base Tools"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/tools/run":{"post":{"tags":["tools"],"summary":"Run Tool From Source","description":"Attempt to build a tool from source, then run it on the provided arguments","operationId":"run_tool_from_source","parameters":[{"name":"user_id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolRunFromSource"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolReturnMessage"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/tools/composio/apps":{"get":{"tags":["tools"],"summary":"List Composio Apps","description":"Get a list of all Composio apps","operationId":"list_composio_apps","parameters":[{"name":"user-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AppModel"},"title":"Response List Composio Apps"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/tools/composio/apps/{composio_app_name}/actions":{"get":{"tags":["tools"],"summary":"List Composio Actions By App","description":"Get a list of all Composio actions for a specific app","operationId":"list_composio_actions_by_app","parameters":[{"name":"composio_app_name","in":"path","required":true,"schema":{"type":"string","title":"Composio App Name"}},{"name":"user_id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ActionModel"},"title":"Response List Composio Actions By App"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/tools/composio/{composio_action_name}":{"post":{"tags":["tools"],"summary":"Add Composio Tool","description":"Add a new Composio tool by action name (Composio refers to each tool as an `Action`)","operationId":"add_composio_tool","parameters":[{"name":"composio_action_name","in":"path","required":true,"schema":{"type":"string","title":"Composio Action Name"}},{"name":"user_id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tool"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/tools/mcp/servers":{"get":{"tags":["tools"],"summary":"List Mcp Servers","description":"Get a list of all configured MCP servers","operationId":"list_mcp_servers","parameters":[{"name":"user-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"anyOf":[{"$ref":"#/components/schemas/SSEServerConfig"},{"$ref":"#/components/schemas/StdioServerConfig"}]},"title":"Response List Mcp Servers"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["tools"],"summary":"Add Mcp Server To Config","description":"Add a new MCP server to the Letta MCP server config","operationId":"add_mcp_server","parameters":[{"name":"user_id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/StdioServerConfig"},{"$ref":"#/components/schemas/SSEServerConfig"}],"title":"Request"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"anyOf":[{"$ref":"#/components/schemas/SSEServerConfig"},{"$ref":"#/components/schemas/StdioServerConfig"}]},"title":"Response Add Mcp Server"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/tools/mcp/servers/{mcp_server_name}/tools":{"get":{"tags":["tools"],"summary":"List Mcp Tools By Server","description":"Get a list of all tools for a specific MCP server","operationId":"list_mcp_tools_by_server","parameters":[{"name":"mcp_server_name","in":"path","required":true,"schema":{"type":"string","title":"Mcp Server Name"}},{"name":"user_id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/MCPTool"},"title":"Response List Mcp Tools By Server"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/tools/mcp/servers/{mcp_server_name}/{mcp_tool_name}":{"post":{"tags":["tools"],"summary":"Add Mcp Tool","description":"Register a new MCP tool as a Letta server by MCP server + tool name","operationId":"add_mcp_tool","parameters":[{"name":"mcp_server_name","in":"path","required":true,"schema":{"type":"string","title":"Mcp Server Name"}},{"name":"mcp_tool_name","in":"path","required":true,"schema":{"type":"string","title":"Mcp Tool Name"}},{"name":"user_id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tool"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/tools/mcp/servers/{mcp_server_name}":{"delete":{"tags":["tools"],"summary":"Delete Mcp Server From Config","description":"Add a new MCP server to the Letta MCP server config","operationId":"delete_mcp_server","parameters":[{"name":"mcp_server_name","in":"path","required":true,"schema":{"type":"string","title":"Mcp Server Name"}},{"name":"user_id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"anyOf":[{"$ref":"#/components/schemas/SSEServerConfig"},{"$ref":"#/components/schemas/StdioServerConfig"}]},"title":"Response Delete Mcp Server"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/sources/{source_id}":{"get":{"tags":["sources"],"summary":"Retrieve Source","description":"Get all sources","operationId":"retrieve_source","parameters":[{"name":"source_id","in":"path","required":true,"schema":{"type":"string","title":"Source Id"}},{"name":"user_id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Source"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["sources"],"summary":"Modify Source","description":"Update the name or documentation of an existing data source.","operationId":"modify_source","parameters":[{"name":"source_id","in":"path","required":true,"schema":{"type":"string","title":"Source Id"}},{"name":"user_id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SourceUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Source"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["sources"],"summary":"Delete Source","description":"Delete a data source.","operationId":"delete_source","parameters":[{"name":"source_id","in":"path","required":true,"schema":{"type":"string","title":"Source Id"}},{"name":"user_id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/sources/name/{source_name}":{"get":{"tags":["sources"],"summary":"Get Source Id By Name","description":"Get a source by name","operationId":"get_source_id_by_name","parameters":[{"name":"source_name","in":"path","required":true,"schema":{"type":"string","title":"Source Name"}},{"name":"user_id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"string","title":"Response Get Source Id By Name"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/sources/":{"get":{"tags":["sources"],"summary":"List Sources","description":"List all data sources created by a user.","operationId":"list_sources","parameters":[{"name":"user_id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Source"},"title":"Response List Sources"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["sources"],"summary":"Create Source","description":"Create a new data source.","operationId":"create_source","parameters":[{"name":"user_id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SourceCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Source"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/sources/{source_id}/upload":{"post":{"tags":["sources"],"summary":"Upload File To Source","description":"Upload a file to a data source.","operationId":"upload_file_to_source","parameters":[{"name":"source_id","in":"path","required":true,"schema":{"type":"string","title":"Source Id"}},{"name":"user_id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_file_to_source"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Job"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/sources/{source_id}/passages":{"get":{"tags":["sources"],"summary":"List Source Passages","description":"List all passages associated with a data source.","operationId":"list_source_passages","parameters":[{"name":"source_id","in":"path","required":true,"schema":{"type":"string","title":"Source Id"}},{"name":"user_id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Passage"},"title":"Response List Source Passages"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/sources/{source_id}/files":{"get":{"tags":["sources"],"summary":"List Source Files","description":"List paginated files associated with a data source.","operationId":"list_source_files","parameters":[{"name":"source_id","in":"path","required":true,"schema":{"type":"string","title":"Source Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","description":"Number of files to return","default":1000,"title":"Limit"},"description":"Number of files to return"},{"name":"after","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Pagination cursor to fetch the next set of results","title":"After"},"description":"Pagination cursor to fetch the next set of results"},{"name":"user_id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/FileMetadata"},"title":"Response List Source Files"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/sources/{source_id}/{file_id}":{"delete":{"tags":["sources"],"summary":"Delete File From Source","description":"Delete a data source.","operationId":"delete_file_from_source","parameters":[{"name":"source_id","in":"path","required":true,"schema":{"type":"string","title":"Source Id"}},{"name":"file_id","in":"path","required":true,"schema":{"type":"string","title":"File Id"}},{"name":"user_id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/agents/":{"get":{"tags":["agents"],"summary":"List Agents","description":"List all agents associated with a given user.\n\nThis endpoint retrieves a list of all agents and their configurations\nassociated with the specified user ID.","operationId":"list_agents","parameters":[{"name":"name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Name of the agent","title":"Name"},"description":"Name of the agent"},{"name":"tags","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"List of tags to filter agents by","title":"Tags"},"description":"List of tags to filter agents by"},{"name":"match_all_tags","in":"query","required":false,"schema":{"type":"boolean","description":"If True, only returns agents that match ALL given tags. Otherwise, return agents that have ANY of the passed-in tags.","default":false,"title":"Match All Tags"},"description":"If True, only returns agents that match ALL given tags. Otherwise, return agents that have ANY of the passed-in tags."},{"name":"before","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Cursor for pagination","title":"Before"},"description":"Cursor for pagination"},{"name":"after","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Cursor for pagination","title":"After"},"description":"Cursor for pagination"},{"name":"limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Limit for pagination","default":50,"title":"Limit"},"description":"Limit for pagination"},{"name":"query_text","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Search agents by name","title":"Query Text"},"description":"Search agents by name"},{"name":"project_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Search agents by project ID","title":"Project Id"},"description":"Search agents by project ID"},{"name":"template_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Search agents by template ID","title":"Template Id"},"description":"Search agents by template ID"},{"name":"base_template_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Search agents by base template ID","title":"Base Template Id"},"description":"Search agents by base template ID"},{"name":"identity_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Search agents by identity ID","title":"Identity Id"},"description":"Search agents by identity ID"},{"name":"identifier_keys","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Search agents by identifier keys","title":"Identifier Keys"},"description":"Search agents by identifier keys"},{"name":"include_relationships","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Specify which relational fields (e.g., 'tools', 'sources', 'memory') to include in the response. If not provided, all relationships are loaded by default. Using this can optimize performance by reducing unnecessary joins.","title":"Include Relationships"},"description":"Specify which relational fields (e.g., 'tools', 'sources', 'memory') to include in the response. If not provided, all relationships are loaded by default. Using this can optimize performance by reducing unnecessary joins."},{"name":"ascending","in":"query","required":false,"schema":{"type":"boolean","description":"Whether to sort agents oldest to newest (True) or newest to oldest (False, default)","default":false,"title":"Ascending"},"description":"Whether to sort agents oldest to newest (True) or newest to oldest (False, default)"},{"name":"user_id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AgentState"},"title":"Response List Agents"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["agents"],"summary":"Create Agent","description":"Create a new agent with the specified configuration.","operationId":"create_agent","parameters":[{"name":"user_id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id"}},{"name":"X-Project","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Project"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAgentRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentState"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/agents/{agent_id}/export":{"get":{"tags":["agents"],"summary":"Export Agent Serialized","description":"Export the serialized JSON representation of an agent.","operationId":"export_agent_serialized","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","title":"Agent Id"}},{"name":"user_id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/agents/import":{"post":{"tags":["agents"],"summary":"Import Agent Serialized","description":"Import a serialized agent file and recreate the agent in the system.","operationId":"import_agent_serialized","parameters":[{"name":"append_copy_suffix","in":"query","required":false,"schema":{"type":"boolean","description":"If set to True, appends \"_copy\" to the end of the agent name.","default":true,"title":"Append Copy Suffix"},"description":"If set to True, appends \"_copy\" to the end of the agent name."},{"name":"override_existing_tools","in":"query","required":false,"schema":{"type":"boolean","description":"If set to True, existing tools can get their source code overwritten by the uploaded tool definitions. Note that Letta core tools can never be updated externally.","default":true,"title":"Override Existing Tools"},"description":"If set to True, existing tools can get their source code overwritten by the uploaded tool definitions. Note that Letta core tools can never be updated externally."},{"name":"project_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The project ID to associate the uploaded agent with.","title":"Project Id"},"description":"The project ID to associate the uploaded agent with."},{"name":"user_id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_import_agent_serialized"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentState"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/agents/{agent_id}/context":{"get":{"tags":["agents"],"summary":"Retrieve Agent Context Window","description":"Retrieve the context window of a specific agent.","operationId":"retrieve_agent_context_window","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","title":"Agent Id"}},{"name":"user_id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContextWindowOverview"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/agents/{agent_id}":{"patch":{"tags":["agents"],"summary":"Modify Agent","description":"Update an existing agent","operationId":"modify_agent","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","title":"Agent Id"}},{"name":"user_id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateAgent"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentState"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["agents"],"summary":"Retrieve Agent","description":"Get the state of the agent.","operationId":"retrieve_agent","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","title":"Agent Id"}},{"name":"user_id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentState"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["agents"],"summary":"Delete Agent","description":"Delete an agent.","operationId":"delete_agent","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","title":"Agent Id"}},{"name":"user_id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/agents/{agent_id}/tools":{"get":{"tags":["agents"],"summary":"List Agent Tools","description":"Get tools from an existing agent","operationId":"list_agent_tools","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","title":"Agent Id"}},{"name":"user_id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Tool"},"title":"Response List Agent Tools"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/agents/{agent_id}/tools/attach/{tool_id}":{"patch":{"tags":["agents"],"summary":"Attach Tool","description":"Attach a tool to an agent.","operationId":"attach_tool","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","title":"Agent Id"}},{"name":"tool_id","in":"path","required":true,"schema":{"type":"string","title":"Tool Id"}},{"name":"user_id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentState"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/agents/{agent_id}/tools/detach/{tool_id}":{"patch":{"tags":["agents"],"summary":"Detach Tool","description":"Detach a tool from an agent.","operationId":"detach_tool","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","title":"Agent Id"}},{"name":"tool_id","in":"path","required":true,"schema":{"type":"string","title":"Tool Id"}},{"name":"user_id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentState"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/agents/{agent_id}/sources/attach/{source_id}":{"patch":{"tags":["agents"],"summary":"Attach Source","description":"Attach a source to an agent.","operationId":"attach_source_to_agent","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","title":"Agent Id"}},{"name":"source_id","in":"path","required":true,"schema":{"type":"string","title":"Source Id"}},{"name":"user_id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentState"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/agents/{agent_id}/sources/detach/{source_id}":{"patch":{"tags":["agents"],"summary":"Detach Source","description":"Detach a source from an agent.","operationId":"detach_source_from_agent","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","title":"Agent Id"}},{"name":"source_id","in":"path","required":true,"schema":{"type":"string","title":"Source Id"}},{"name":"user_id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentState"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/agents/{agent_id}/sources":{"get":{"tags":["agents"],"summary":"List Agent Sources","description":"Get the sources associated with an agent.","operationId":"list_agent_sources","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","title":"Agent Id"}},{"name":"user_id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Source"},"title":"Response List Agent Sources"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/agents/{agent_id}/core-memory":{"get":{"tags":["agents"],"summary":"Retrieve Agent Memory","description":"Retrieve the memory state of a specific agent.\nThis endpoint fetches the current memory state of the agent identified by the user ID and agent ID.","operationId":"retrieve_agent_memory","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","title":"Agent Id"}},{"name":"user_id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Memory"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/agents/{agent_id}/core-memory/blocks/{block_label}":{"get":{"tags":["agents"],"summary":"Retrieve Block","description":"Retrieve a core memory block from an agent.","operationId":"retrieve_core_memory_block","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","title":"Agent Id"}},{"name":"block_label","in":"path","required":true,"schema":{"type":"string","title":"Block Label"}},{"name":"user_id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Block"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["agents"],"summary":"Modify Block","description":"Updates a core memory block of an agent.","operationId":"modify_core_memory_block","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","title":"Agent Id"}},{"name":"block_label","in":"path","required":true,"schema":{"type":"string","title":"Block Label"}},{"name":"user_id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlockUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Block"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/agents/{agent_id}/core-memory/blocks":{"get":{"tags":["agents"],"summary":"List Blocks","description":"Retrieve the core memory blocks of a specific agent.","operationId":"list_core_memory_blocks","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","title":"Agent Id"}},{"name":"user_id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Block"},"title":"Response List Core Memory Blocks"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/agents/{agent_id}/core-memory/blocks/attach/{block_id}":{"patch":{"tags":["agents"],"summary":"Attach Block","description":"Attach a core memoryblock to an agent.","operationId":"attach_core_memory_block","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","title":"Agent Id"}},{"name":"block_id","in":"path","required":true,"schema":{"type":"string","title":"Block Id"}},{"name":"user_id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentState"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/agents/{agent_id}/core-memory/blocks/detach/{block_id}":{"patch":{"tags":["agents"],"summary":"Detach Block","description":"Detach a core memory block from an agent.","operationId":"detach_core_memory_block","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","title":"Agent Id"}},{"name":"block_id","in":"path","required":true,"schema":{"type":"string","title":"Block Id"}},{"name":"user_id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentState"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/agents/{agent_id}/archival-memory":{"get":{"tags":["agents"],"summary":"List Passages","description":"Retrieve the memories in an agent's archival memory store (paginated query).","operationId":"list_passages","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","title":"Agent Id"}},{"name":"after","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Unique ID of the memory to start the query range at.","title":"After"},"description":"Unique ID of the memory to start the query range at."},{"name":"before","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Unique ID of the memory to end the query range at.","title":"Before"},"description":"Unique ID of the memory to end the query range at."},{"name":"limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"How many results to include in the response.","title":"Limit"},"description":"How many results to include in the response."},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Search passages by text","title":"Search"},"description":"Search passages by text"},{"name":"ascending","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether to sort passages oldest to newest (True, default) or newest to oldest (False)","default":true,"title":"Ascending"},"description":"Whether to sort passages oldest to newest (True, default) or newest to oldest (False)"},{"name":"user_id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Passage"},"title":"Response List Passages"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["agents"],"summary":"Create Passage","description":"Insert a memory into an agent's archival memory store.","operationId":"create_passage","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","title":"Agent Id"}},{"name":"user_id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateArchivalMemory"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Passage"},"title":"Response Create Passage"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/agents/{agent_id}/archival-memory/{memory_id}":{"patch":{"tags":["agents"],"summary":"Modify Passage","description":"Modify a memory in the agent's archival memory store.","operationId":"modify_passage","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","title":"Agent Id"}},{"name":"memory_id","in":"path","required":true,"schema":{"type":"string","title":"Memory Id"}},{"name":"user_id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PassageUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Passage"},"title":"Response Modify Passage"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["agents"],"summary":"Delete Passage","description":"Delete a memory from an agent's archival memory store.","operationId":"delete_passage","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","title":"Agent Id"}},{"name":"memory_id","in":"path","required":true,"schema":{"type":"string","title":"Memory Id"}},{"name":"user_id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/agents/{agent_id}/messages":{"get":{"tags":["agents"],"summary":"List Messages","description":"Retrieve message history for an agent.","operationId":"list_messages","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","title":"Agent Id"}},{"name":"after","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Message after which to retrieve the returned messages.","title":"After"},"description":"Message after which to retrieve the returned messages."},{"name":"before","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Message before which to retrieve the returned messages.","title":"Before"},"description":"Message before which to retrieve the returned messages."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","description":"Maximum number of messages to retrieve.","default":10,"title":"Limit"},"description":"Maximum number of messages to retrieve."},{"name":"group_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Group ID to filter messages by.","title":"Group Id"},"description":"Group ID to filter messages by."},{"name":"use_assistant_message","in":"query","required":false,"schema":{"type":"boolean","description":"Whether to use assistant messages","default":true,"title":"Use Assistant Message"},"description":"Whether to use assistant messages"},{"name":"assistant_message_tool_name","in":"query","required":false,"schema":{"type":"string","description":"The name of the designated message tool.","default":"send_message","title":"Assistant Message Tool Name"},"description":"The name of the designated message tool."},{"name":"assistant_message_tool_kwarg","in":"query","required":false,"schema":{"type":"string","description":"The name of the message argument.","default":"message","title":"Assistant Message Tool Kwarg"},"description":"The name of the message argument."},{"name":"user_id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/LettaMessageUnion"},"title":"Response List Messages"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["agents"],"summary":"Send Message","description":"Process a user message and return the agent's response.\nThis endpoint accepts a message from a user and processes it through the agent.","operationId":"send_message","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","title":"Agent Id"}},{"name":"user_id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LettaRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LettaResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/agents/{agent_id}/messages/{message_id}":{"patch":{"tags":["agents"],"summary":"Modify Message","description":"Update the details of a message associated with an agent.","operationId":"modify_message","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","title":"Agent Id"}},{"name":"message_id","in":"path","required":true,"schema":{"type":"string","title":"Message Id"}},{"name":"user_id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/UpdateSystemMessage"},{"$ref":"#/components/schemas/UpdateUserMessage"},{"$ref":"#/components/schemas/UpdateReasoningMessage"},{"$ref":"#/components/schemas/UpdateAssistantMessage"}],"title":"Request"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/SystemMessage"},{"$ref":"#/components/schemas/UserMessage"},{"$ref":"#/components/schemas/ReasoningMessage"},{"$ref":"#/components/schemas/HiddenReasoningMessage"},{"$ref":"#/components/schemas/ToolCallMessage"},{"$ref":"#/components/schemas/ToolReturnMessage"},{"$ref":"#/components/schemas/AssistantMessage"}],"discriminator":{"propertyName":"message_type","mapping":{"system_message":"#/components/schemas/SystemMessage","user_message":"#/components/schemas/UserMessage","reasoning_message":"#/components/schemas/ReasoningMessage","hidden_reasoning_message":"#/components/schemas/HiddenReasoningMessage","tool_call_message":"#/components/schemas/ToolCallMessage","tool_return_message":"#/components/schemas/ToolReturnMessage","assistant_message":"#/components/schemas/AssistantMessage"}},"title":"Response Modify Message"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/agents/{agent_id}/messages/stream":{"post":{"tags":["agents"],"summary":"Send Message Streaming","description":"Process a user message and return the agent's response.\nThis endpoint accepts a message from a user and pro