Skip to main content
Glama

Letta MCP Server

by oculairmedia
lettaopenapi.json252 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 processes it through the agent.\nIt will stream the steps of the response always, and stream the tokens if 'stream_tokens' is set to True.","operationId":"create_agent_message_stream","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/LettaStreamingRequest"}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{}},"text/event-stream":{"description":"Server-Sent Events stream"}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/agents/{agent_id}/messages/async":{"post":{"tags":["agents"],"summary":"Send Message Async","description":"Asynchronously process a user message and return a run object.\nThe actual processing happens in the background, and the status can be checked using the run ID.","operationId":"create_agent_message_async","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/Run"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/agents/{agent_id}/reset-messages":{"patch":{"tags":["agents"],"summary":"Reset Messages","description":"Resets the messages for an agent","operationId":"reset_messages","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","title":"Agent Id"}},{"name":"add_default_initial_messages","in":"query","required":false,"schema":{"type":"boolean","description":"If true, adds the default initial messages after resetting.","default":false,"title":"Add Default Initial Messages"},"description":"If true, adds the default initial messages after resetting."},{"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/groups/":{"get":{"tags":["groups"],"summary":"List Groups","description":"Fetch all multi-agent groups matching query.","operationId":"list_groups","parameters":[{"name":"manager_type","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/ManagerType"},{"type":"null"}],"description":"Search groups by manager type","title":"Manager Type"},"description":"Search groups by manager type"},{"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","title":"Limit"},"description":"Limit for pagination"},{"name":"project_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Search groups by project id","title":"Project Id"},"description":"Search groups by project 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/Group"},"title":"Response List Groups"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["groups"],"summary":"Create Group","description":"Create a new multi-agent group with the specified configuration.","operationId":"create_group","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/GroupCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Group"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/groups/{group_id}":{"get":{"tags":["groups"],"summary":"Retrieve Group","description":"Retrieve the group by id.","operationId":"retrieve_group","parameters":[{"name":"group_id","in":"path","required":true,"schema":{"type":"string","title":"Group 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/Group"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["groups"],"summary":"Modify Group","description":"Create a new multi-agent group with the specified configuration.","operationId":"modify_group","parameters":[{"name":"group_id","in":"path","required":true,"schema":{"type":"string","title":"Group Id"}},{"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/GroupUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Group"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["groups"],"summary":"Delete Group","description":"Delete a multi-agent group.","operationId":"delete_group","parameters":[{"name":"group_id","in":"path","required":true,"schema":{"type":"string","title":"Group 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/groups/{group_id}/messages":{"post":{"tags":["groups"],"summary":"Send Group Message","description":"Process a user message and return the group's response.\nThis endpoint accepts a message from a user and processes it through through agents in the group based on the specified pattern","operationId":"send_group_message","parameters":[{"name":"group_id","in":"path","required":true,"schema":{"type":"string","title":"Group 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"}}}}}},"get":{"tags":["groups"],"summary":"List Group Messages","description":"Retrieve message history for an agent.","operationId":"list_group_messages","parameters":[{"name":"group_id","in":"path","required":true,"schema":{"type":"string","title":"Group 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":"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 Group Messages"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/groups/{group_id}/messages/stream":{"post":{"tags":["groups"],"summary":"Send Group Message Streaming","description":"Process a user message and return the group's responses.\nThis endpoint accepts a message from a user and processes it through agents in the group based on the specified pattern.\nIt will stream the steps of the response always, and stream the tokens if 'stream_tokens' is set to True.","operationId":"send_group_message_streaming","parameters":[{"name":"group_id","in":"path","required":true,"schema":{"type":"string","title":"Group 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/LettaStreamingRequest"}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{}},"text/event-stream":{"description":"Server-Sent Events stream"}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/groups/{group_id}/messages/{message_id}":{"patch":{"tags":["groups"],"summary":"Modify Group Message","description":"Update the details of a message associated with an agent.","operationId":"modify_group_message","parameters":[{"name":"group_id","in":"path","required":true,"schema":{"type":"string","title":"Group 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 Group Message"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/groups/{group_id}/reset-messages":{"patch":{"tags":["groups"],"summary":"Reset Group Messages","description":"Delete the group messages for all agents that are part of the multi-agent group.","operationId":"reset_group_messages","parameters":[{"name":"group_id","in":"path","required":true,"schema":{"type":"string","title":"Group 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/identities/":{"get":{"tags":["identities","identities"],"summary":"List Identities","description":"Get a list of all identities in the database","operationId":"list_identities","parameters":[{"name":"name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},{"name":"project_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Project Id"}},{"name":"identifier_key","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Identifier Key"}},{"name":"identity_type","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/IdentityType"},{"type":"null"}],"title":"Identity Type"}},{"name":"before","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Before"}},{"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":"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/Identity"},"title":"Response List Identities"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["identities","identities"],"summary":"Create Identity","operationId":"create_identity","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/IdentityCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Identity"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["identities","identities"],"summary":"Upsert Identity","operationId":"upsert_identity","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/IdentityCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Identity"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/identities/{identity_id}":{"get":{"tags":["identities","identities"],"summary":"Retrieve Identity","operationId":"retrieve_identity","parameters":[{"name":"identity_id","in":"path","required":true,"schema":{"type":"string","title":"Identity 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/Identity"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["identities","identities"],"summary":"Modify Identity","operationId":"update_identity","parameters":[{"name":"identity_id","in":"path","required":true,"schema":{"type":"string","title":"Identity 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/IdentityUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Identity"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["identities","identities"],"summary":"Delete Identity","description":"Delete an identity by its identifier key","operationId":"delete_identity","parameters":[{"name":"identity_id","in":"path","required":true,"schema":{"type":"string","title":"Identity 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/models/":{"get":{"tags":["models","llms"],"summary":"List Llm Backends","operationId":"list_models","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/LLMConfig"},"type":"array","title":"Response List Models"}}}}}}},"/v1/models/embedding":{"get":{"tags":["models","llms"],"summary":"List Embedding Backends","operationId":"list_embedding_models","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/EmbeddingConfig"},"type":"array","title":"Response List Embedding Models"}}}}}}},"/v1/blocks/":{"get":{"tags":["blocks"],"summary":"List Blocks","operationId":"list_blocks","parameters":[{"name":"label","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Labels to include (e.g. human, persona)","title":"Label"},"description":"Labels to include (e.g. human, persona)"},{"name":"templates_only","in":"query","required":false,"schema":{"type":"boolean","description":"Whether to include only templates","default":false,"title":"Templates Only"},"description":"Whether to include only templates"},{"name":"name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Name of the block","title":"Name"},"description":"Name of the block"},{"name":"identity_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Search agents by identifier id","title":"Identity Id"},"description":"Search agents by identifier 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":"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 Blocks"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["blocks"],"summary":"Create Block","operationId":"create_block","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/CreateBlock"}}}},"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/blocks/{block_id}":{"patch":{"tags":["blocks"],"summary":"Modify Block","operationId":"modify_block","parameters":[{"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"}}],"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"}}}}}},"delete":{"tags":["blocks"],"summary":"Delete Block","operationId":"delete_block","parameters":[{"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/Block"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["blocks"],"summary":"Retrieve Block","operationId":"retrieve_block","parameters":[{"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/Block"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/blocks/{block_id}/agents":{"get":{"tags":["blocks"],"summary":"List Agents For Block","description":"Retrieves all agents associated with the specified block.\nRaises a 404 if the block does not exist.","operationId":"list_agents_for_block","parameters":[{"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":{"type":"array","items":{"$ref":"#/components/schemas/AgentState"},"title":"Response List Agents For Block"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/jobs/":{"get":{"tags":["jobs"],"summary":"List Jobs","description":"List all jobs.","operationId":"list_jobs","parameters":[{"name":"source_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Only list jobs associated with the source.","title":"Source Id"},"description":"Only list jobs associated with the source."},{"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/Job"},"title":"Response List Jobs"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/jobs/active":{"get":{"tags":["jobs"],"summary":"List Active Jobs","description":"List all active jobs.","operationId":"list_active_jobs","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/Job"},"title":"Response List Active Jobs"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/jobs/{job_id}":{"get":{"tags":["jobs"],"summary":"Retrieve Job","description":"Get the status of a job.","operationId":"retrieve_job","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job 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/Job"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["jobs"],"summary":"Delete Job","description":"Delete a job by its job_id.","operationId":"delete_job","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job 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/Job"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/health/":{"get":{"tags":["health"],"summary":"Health Check","operationId":"health_check","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Health"}}}}}}},"/v1/sandbox-config/":{"post":{"tags":["sandbox-config"],"summary":"Create Sandbox Config","operationId":"create_sandbox_config_v1_sandbox_config__post","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/SandboxConfigCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SandboxConfig"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["sandbox-config"],"summary":"List Sandbox Configs","operationId":"list_sandbox_configs_v1_sandbox_config__get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","description":"Number of results to return","default":1000,"title":"Limit"},"description":"Number of results 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":"sandbox_type","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/SandboxType"},{"type":"null"}],"description":"Filter for this specific sandbox type","title":"Sandbox Type"},"description":"Filter for this specific sandbox type"},{"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/SandboxConfig"},"title":"Response List Sandbox Configs V1 Sandbox Config Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/sandbox-config/e2b/default":{"post":{"tags":["sandbox-config"],"summary":"Create Default E2B Sandbox Config","operationId":"create_default_e2b_sandbox_config_v1_sandbox_config_e2b_default_post","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":{"$ref":"#/components/schemas/SandboxConfig"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/sandbox-config/local/default":{"post":{"tags":["sandbox-config"],"summary":"Create Default Local Sandbox Config","operationId":"create_default_local_sandbox_config_v1_sandbox_config_local_default_post","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":{"$ref":"#/components/schemas/SandboxConfig"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/sandbox-config/local":{"post":{"tags":["sandbox-config"],"summary":"Create Custom Local Sandbox Config","description":"Create or update a custom LocalSandboxConfig, including pip_requirements.","operationId":"create_custom_local_sandbox_config_v1_sandbox_config_local_post","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/LocalSandboxConfig"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SandboxConfig"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/sandbox-config/{sandbox_config_id}":{"patch":{"tags":["sandbox-config"],"summary":"Update Sandbox Config","operationId":"update_sandbox_config_v1_sandbox_config__sandbox_config_id__patch","parameters":[{"name":"sandbox_config_id","in":"path","required":true,"schema":{"type":"string","title":"Sandbox Config 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/SandboxConfigUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SandboxConfig"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["sandbox-config"],"summary":"Delete Sandbox Config","operationId":"delete_sandbox_config_v1_sandbox_config__sandbox_config_id__delete","parameters":[{"name":"sandbox_config_id","in":"path","required":true,"schema":{"type":"string","title":"Sandbox Config 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/sandbox-config/local/recreate-venv":{"post":{"tags":["sandbox-config"],"summary":"Force Recreate Local Sandbox Venv","description":"Forcefully recreate the virtual environment for the local sandbox.\nDeletes and recreates the venv, then reinstalls required dependencies.","operationId":"force_recreate_local_sandbox_venv_v1_sandbox_config_local_recreate_venv_post","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":{"$ref":"#/components/schemas/SandboxConfig"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/sandbox-config/{sandbox_config_id}/environment-variable":{"post":{"tags":["sandbox-config"],"summary":"Create Sandbox Env Var","operationId":"create_sandbox_env_var_v1_sandbox_config__sandbox_config_id__environment_variable_post","parameters":[{"name":"sandbox_config_id","in":"path","required":true,"schema":{"type":"string","title":"Sandbox Config 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/SandboxEnvironmentVariableCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SandboxEnvironmentVariable"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["sandbox-config"],"summary":"List Sandbox Env Vars","operationId":"list_sandbox_env_vars_v1_sandbox_config__sandbox_config_id__environment_variable_get","parameters":[{"name":"sandbox_config_id","in":"path","required":true,"schema":{"type":"string","title":"Sandbox Config Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","description":"Number of results to return","default":1000,"title":"Limit"},"description":"Number of results 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/SandboxEnvironmentVariable"},"title":"Response List Sandbox Env Vars V1 Sandbox Config Sandbox Config Id Environment Variable Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/sandbox-config/environment-variable/{env_var_id}":{"patch":{"tags":["sandbox-config"],"summary":"Update Sandbox Env Var","operationId":"update_sandbox_env_var_v1_sandbox_config_environment_variable__env_var_id__patch","parameters":[{"name":"env_var_id","in":"path","required":true,"schema":{"type":"string","title":"Env Var 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/SandboxEnvironmentVariableUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SandboxEnvironmentVariable"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["sandbox-config"],"summary":"Delete Sandbox Env Var","operationId":"delete_sandbox_env_var_v1_sandbox_config_environment_variable__env_var_id__delete","parameters":[{"name":"env_var_id","in":"path","required":true,"schema":{"type":"string","title":"Env Var 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/providers/":{"get":{"tags":["providers","providers"],"summary":"List Providers","description":"Get a list of all custom providers in the database","operationId":"list_providers","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":"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/Provider"},"title":"Response List Providers"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["providers","providers"],"summary":"Create Provider","description":"Create a new custom provider","operationId":"create_provider","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/ProviderCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Provider"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["providers","providers"],"summary":"Modify Provider","description":"Update an existing custom provider","operationId":"modify_provider","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/ProviderUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Provider"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["providers","providers"],"summary":"Delete Provider","description":"Delete an existing custom provider","operationId":"delete_provider","parameters":[{"name":"provider_id","in":"query","required":true,"schema":{"type":"string","description":"The provider_id key to be deleted.","title":"Provider Id"},"description":"The provider_id key to be deleted."},{"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/runs/":{"get":{"tags":["runs"],"summary":"List Runs","description":"List all runs.","operationId":"list_runs","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/Run"},"title":"Response List Runs"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/runs/active":{"get":{"tags":["runs"],"summary":"List Active Runs","description":"List all active runs.","operationId":"list_active_runs","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/Run"},"title":"Response List Active Runs"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/runs/{run_id}":{"get":{"tags":["runs"],"summary":"Retrieve Run","description":"Get the status of a run.","operationId":"retrieve_run","parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","title":"Run 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/Run"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["runs"],"summary":"Delete Run","description":"Delete a run by its run_id.","operationId":"delete_run","parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","title":"Run 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/Run"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/runs/{run_id}/messages":{"get":{"tags":["runs"],"summary":"List Run Messages","description":"Get messages associated with a run with filtering options.\n\nArgs:\n run_id: ID of the run\n before: A cursor for use in pagination. `before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list.\n after: A cursor for use in pagination. `after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list.\n limit: Maximum number of messages to return\n order: Sort order by the created_at timestamp of the objects. asc for ascending order and desc for descending order.\n role: Filter by role (user/assistant/system/tool)\n return_message_object: Whether to return Message objects or LettaMessage objects\n user_id: ID of the user making the request\n\nReturns:\n A list of messages associated with the run. Default is List[LettaMessage].","operationId":"list_run_messages","parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","title":"Run Id"}},{"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":"Maximum number of messages to return","default":100,"title":"Limit"},"description":"Maximum number of messages to return"},{"name":"order","in":"query","required":false,"schema":{"type":"string","description":"Sort order by the created_at timestamp of the objects. asc for ascending order and desc for descending order.","default":"desc","title":"Order"},"description":"Sort order by the created_at timestamp of the objects. asc for ascending order and desc for descending order."},{"name":"role","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/MessageRole"},{"type":"null"}],"description":"Filter by role","title":"Role"},"description":"Filter by role"},{"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 Run Messages"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/runs/{run_id}/usage":{"get":{"tags":["runs"],"summary":"Retrieve Run Usage","description":"Get usage statistics for a run.","operationId":"retrieve_run_usage","parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","title":"Run 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/UsageStatistics"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/runs/{run_id}/steps":{"get":{"tags":["runs"],"summary":"List Run Steps","description":"Get messages associated with a run with filtering options.\n\nArgs:\n run_id: ID of the run\n before: A cursor for use in pagination. `before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list.\n after: A cursor for use in pagination. `after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list.\n limit: Maximum number of steps to return\n order: Sort order by the created_at timestamp of the objects. asc for ascending order and desc for descending order.\n\nReturns:\n A list of steps associated with the run.","operationId":"list_run_steps","parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","title":"Run Id"}},{"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":"Maximum number of messages to return","default":100,"title":"Limit"},"description":"Maximum number of messages to return"},{"name":"order","in":"query","required":false,"schema":{"type":"string","description":"Sort order by the created_at timestamp of the objects. asc for ascending order and desc for descending order.","default":"desc","title":"Order"},"description":"Sort order by the created_at timestamp of the objects. asc for ascending order and desc for descending order."},{"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/Step"},"title":"Response List Run Steps"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/steps":{"get":{"tags":["steps"],"summary":"List Steps","description":"List steps with optional pagination and date filters.\nDates should be provided in ISO 8601 format (e.g. 2025-01-29T15:01:19-08:00)","operationId":"list_steps","parameters":[{"name":"before","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Return steps before this step ID","title":"Before"},"description":"Return steps before this step ID"},{"name":"after","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Return steps after this step ID","title":"After"},"description":"Return steps after this step ID"},{"name":"limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Maximum number of steps to return","default":50,"title":"Limit"},"description":"Maximum number of steps to return"},{"name":"order","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Sort order (asc or desc)","default":"desc","title":"Order"},"description":"Sort order (asc or desc)"},{"name":"start_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Return steps after this ISO datetime (e.g. \"2025-01-29T15:01:19-08:00\")","title":"Start Date"},"description":"Return steps after this ISO datetime (e.g. \"2025-01-29T15:01:19-08:00\")"},{"name":"end_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Return steps before this ISO datetime (e.g. \"2025-01-29T15:01:19-08:00\")","title":"End Date"},"description":"Return steps before this ISO datetime (e.g. \"2025-01-29T15:01:19-08:00\")"},{"name":"model","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by the name of the model used for the step","title":"Model"},"description":"Filter by the name of the model used for the step"},{"name":"agent_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by the ID of the agent that performed the step","title":"Agent Id"},"description":"Filter by the ID of the agent that performed the step"},{"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/Step"},"title":"Response List Steps"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/steps/{step_id}":{"get":{"tags":["steps"],"summary":"Retrieve Step","description":"Get a step by ID.","operationId":"retrieve_step","parameters":[{"name":"step_id","in":"path","required":true,"schema":{"type":"string","title":"Step 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/Step"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/steps/{step_id}/transaction/{transaction_id}":{"patch":{"tags":["steps"],"summary":"Update Step Transaction Id","description":"Update the transaction ID for a step.","operationId":"update_step_transaction_id","parameters":[{"name":"step_id","in":"path","required":true,"schema":{"type":"string","title":"Step Id"}},{"name":"transaction_id","in":"path","required":true,"schema":{"type":"string","title":"Transaction 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/Step"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/tags/":{"get":{"tags":["tag","admin","admin"],"summary":"List Tags","description":"Get a list of all tags in the database","operationId":"list_tags","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":"query_text","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Query Text"}},{"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":{"type":"string"},"title":"Response List Tags"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/voice-beta/{agent_id}/chat/completions":{"post":{"tags":["voice"],"summary":"Create Voice Chat Completions","operationId":"create_voice_chat_completions","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":{"anyOf":[{"$ref":"#/components/schemas/CompletionCreateParamsNonStreaming"},{"$ref":"#/components/schemas/CompletionCreateParamsStreaming"}],"title":"Completion Request"}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{}},"text/event-stream":{"description":"Server-Sent Events stream"}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/admin/users/":{"get":{"tags":["users","admin","admin"],"summary":"List Users","description":"Get a list of all users in the database","operationId":"list_users","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"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/User"},"title":"Response List Users"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["users","admin","admin"],"summary":"Create User","description":"Create a new user in the database","operationId":"create_user","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/User"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["users","admin","admin"],"summary":"Update User","description":"Update a user in the database","operationId":"update_user","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/User"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["users","admin","admin"],"summary":"Delete User","operationId":"delete_user","parameters":[{"name":"user_id","in":"query","required":true,"schema":{"type":"string","description":"The user_id key to be deleted.","title":"User Id"},"description":"The user_id key to be deleted."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/User"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/admin/orgs/":{"get":{"tags":["organization","admin","admin"],"summary":"Get All Orgs","description":"Get a list of all orgs in the database","operationId":"list_orgs","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"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Organization"},"title":"Response List Orgs"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["organization","admin","admin"],"summary":"Create Org","description":"Create a new org in the database","operationId":"create_organization","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Organization"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["organization","admin","admin"],"summary":"Delete Org","operationId":"delete_organization_by_id","parameters":[{"name":"org_id","in":"query","required":true,"schema":{"type":"string","description":"The org_id key to be deleted.","title":"Org Id"},"description":"The org_id key to be deleted."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Organization"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["organization","admin","admin"],"summary":"Update Org","operationId":"update_organization","parameters":[{"name":"org_id","in":"query","required":true,"schema":{"type":"string","description":"The org_id key to be updated.","title":"Org Id"},"description":"The org_id key to be updated."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Organization"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/openai/v1/{agent_id}/chat/completions":{"post":{"tags":["chat_completions"],"summary":"Create Chat Completions","operationId":"create_chat_completions","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":{"anyOf":[{"$ref":"#/components/schemas/CompletionCreateParamsNonStreaming"},{"$ref":"#/components/schemas/CompletionCreateParamsStreaming"}],"title":"Completion Request"}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{}},"text/event-stream":{"description":"Server-Sent Events stream"}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/auth":{"post":{"tags":["auth"],"summary":"Authenticate User","description":"Authenticates the user and sends response with User related data.\n\nCurrently, this is a placeholder that simply returns a UUID placeholder","operationId":"authenticate_user_v1_auth_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"ActionModel":{"properties":{"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"parameters":{"$ref":"#/components/schemas/ActionParametersModel"},"response":{"$ref":"#/components/schemas/ActionResponseModel"},"appName":{"type":"string","title":"Appname"},"appId":{"type":"string","title":"Appid"},"version":{"type":"string","title":"Version"},"available_versions":{"items":{"type":"string"},"type":"array","title":"Available Versions"},"tags":{"items":{"type":"string"},"type":"array","title":"Tags"},"logo":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Logo"},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name"},"enabled":{"type":"boolean","title":"Enabled","default":false}},"type":"object","required":["name","description","parameters","response","appName","appId","version","available_versions","tags"],"title":"ActionModel","description":"Action data model."},"ActionParametersModel":{"properties":{"properties":{"additionalProperties":true,"type":"object","title":"Properties"},"title":{"type":"string","title":"Title"},"type":{"type":"string","title":"Type"},"required":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Required"},"examples":{"anyOf":[{"items":{},"type":"array"},{"type":"null"}],"title":"Examples"}},"type":"object","required":["properties","title","type"],"title":"ActionParametersModel","description":"Action parameter data models."},"ActionResponseModel":{"properties":{"properties":{"additionalProperties":true,"type":"object","title":"Properties"},"title":{"type":"string","title":"Title"},"type":{"type":"string","title":"Type"},"required":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Required"},"examples":{"anyOf":[{"items":{},"type":"array"},{"type":"null"}],"title":"Examples"}},"type":"object","required":["properties","title","type"],"title":"ActionResponseModel","description":"Action response data model."},"AgentEnvironmentVariable":{"properties":{"created_by_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created By Id","description":"The id of the user that made this object."},"last_updated_by_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Updated By Id","description":"The id of the user that made this object."},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At","description":"The timestamp when the object was created."},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At","description":"The timestamp when the object was last updated."},"id":{"type":"string","pattern":"^agent-env-[a-fA-F0-9]{8}","title":"Id","description":"The human-friendly ID of the Agent-env","examples":["agent-env-123e4567-e89b-12d3-a456-426614174000"]},"key":{"type":"string","title":"Key","description":"The name of the environment variable."},"value":{"type":"string","title":"Value","description":"The value of the environment variable."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"An optional description of the environment variable."},"organization_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Organization Id","description":"The ID of the organization this environment variable belongs to."},"agent_id":{"type":"string","title":"Agent Id","description":"The ID of the agent this environment variable belongs to."}},"additionalProperties":false,"type":"object","required":["key","value","agent_id"],"title":"AgentEnvironmentVariable"},"AgentSchema":{"properties":{"agent_type":{"type":"string","title":"Agent Type"},"core_memory":{"items":{"$ref":"#/components/schemas/CoreMemoryBlockSchema"},"type":"array","title":"Core Memory"},"created_at":{"type":"string","title":"Created At"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"embedding_config":{"$ref":"#/components/schemas/EmbeddingConfig"},"llm_config":{"$ref":"#/components/schemas/LLMConfig"},"message_buffer_autoclear":{"type":"boolean","title":"Message Buffer Autoclear"},"in_context_message_indices":{"items":{"type":"integer"},"type":"array","title":"In Context Message Indices"},"messages":{"items":{"$ref":"#/components/schemas/MessageSchema"},"type":"array","title":"Messages"},"metadata_":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata"},"multi_agent_group":{"anyOf":[{},{"type":"null"}],"title":"Multi Agent Group"},"name":{"type":"string","title":"Name"},"system":{"type":"string","title":"System"},"tags":{"items":{"$ref":"#/components/schemas/TagSchema"},"type":"array","title":"Tags"},"tool_exec_environment_variables":{"items":{"$ref":"#/components/schemas/ToolEnvVarSchema"},"type":"array","title":"Tool Exec Environment Variables"},"tool_rules":{"items":{"anyOf":[{"$ref":"#/components/schemas/BaseToolRuleSchema"},{"$ref":"#/components/schemas/ChildToolRuleSchema"},{"$ref":"#/components/schemas/MaxCountPerStepToolRuleSchema"},{"$ref":"#/components/schemas/ConditionalToolRuleSchema"}]},"type":"array","title":"Tool Rules"},"tools":{"items":{"$ref":"#/components/schemas/ToolSchema"},"type":"array","title":"Tools"},"updated_at":{"type":"string","title":"Updated At"},"version":{"type":"string","title":"Version"}},"type":"object","required":["agent_type","core_memory","created_at","description","embedding_config","llm_config","message_buffer_autoclear","in_context_message_indices","messages","multi_agent_group","name","system","tags","tool_exec_environment_variables","tool_rules","tools","updated_at","version"],"title":"AgentSchema"},"AgentState":{"properties":{"created_by_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created By Id","description":"The id of the user that made this object."},"last_updated_by_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Updated By Id","description":"The id of the user that made this object."},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At","description":"The timestamp when the object was created."},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At","description":"The timestamp when the object was last updated."},"id":{"type":"string","title":"Id","description":"The id of the agent. Assigned by the database."},"name":{"type":"string","title":"Name","description":"The name of the agent."},"tool_rules":{"anyOf":[{"items":{"oneOf":[{"$ref":"#/components/schemas/ChildToolRule"},{"$ref":"#/components/schemas/InitToolRule"},{"$ref":"#/components/schemas/TerminalToolRule"},{"$ref":"#/components/schemas/ConditionalToolRule"},{"$ref":"#/components/schemas/ContinueToolRule"},{"$ref":"#/components/schemas/MaxCountPerStepToolRule"}],"discriminator":{"propertyName":"type","mapping":{"conditional":"#/components/schemas/ConditionalToolRule","constrain_child_tools":"#/components/schemas/ChildToolRule","continue_loop":"#/components/schemas/ContinueToolRule","exit_loop":"#/components/schemas/TerminalToolRule","max_count_per_step":"#/components/schemas/MaxCountPerStepToolRule","run_first":"#/components/schemas/InitToolRule"}}},"type":"array"},{"type":"null"}],"title":"Tool Rules","description":"The list of tool rules."},"message_ids":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Message Ids","description":"The ids of the messages in the agent's in-context memory."},"system":{"type":"string","title":"System","description":"The system prompt used by the agent."},"agent_type":{"$ref":"#/components/schemas/AgentType","description":"The type of agent."},"llm_config":{"$ref":"#/components/schemas/LLMConfig","description":"The LLM configuration used by the agent."},"embedding_config":{"$ref":"#/components/schemas/EmbeddingConfig","description":"The embedding configuration used by the agent."},"organization_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Organization Id","description":"The unique identifier of the organization associated with the agent."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"The description of the agent."},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata","description":"The metadata of the agent."},"memory":{"$ref":"#/components/schemas/Memory","description":"The in-context memory of the agent."},"tools":{"items":{"$ref":"#/components/schemas/Tool"},"type":"array","title":"Tools","description":"The tools used by the agent."},"sources":{"items":{"$ref":"#/components/schemas/Source"},"type":"array","title":"Sources","description":"The sources used by the agent."},"tags":{"items":{"type":"string"},"type":"array","title":"Tags","description":"The tags associated with the agent."},"tool_exec_environment_variables":{"items":{"$ref":"#/components/schemas/AgentEnvironmentVariable"},"type":"array","title":"Tool Exec Environment Variables","description":"The environment variables for tool execution specific to this agent."},"project_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Project Id","description":"The id of the project the agent belongs to."},"template_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Template Id","description":"The id of the template the agent belongs to."},"base_template_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Base Template Id","description":"The base template id of the agent."},"identity_ids":{"items":{"type":"string"},"type":"array","title":"Identity Ids","description":"The ids of the identities associated with this agent.","default":[]},"message_buffer_autoclear":{"type":"boolean","title":"Message Buffer Autoclear","description":"If set to True, the agent will not remember previous messages (though the agent will still retain state via core memory blocks and archival/recall memory). Not recommended unless you have an advanced use case.","default":false},"multi_agent_group":{"anyOf":[{"$ref":"#/components/schemas/Group"},{"type":"null"}],"description":"The multi-agent group that this agent manages"}},"additionalProperties":false,"type":"object","required":["id","name","system","agent_type","llm_config","embedding_config","memory","tools","sources","tags"],"title":"AgentState","description":"Representation of an agent's state. This is the state of the agent at a given time, and is persisted in the DB backend. The state has all the information needed to recreate a persisted agent.\n\nParameters:\n id (str): The unique identifier of the agent.\n name (str): The name of the agent (must be unique to the user).\n created_at (datetime): The datetime the agent was created.\n message_ids (List[str]): The ids of the messages in the agent's in-context memory.\n memory (Memory): The in-context memory of the agent.\n tools (List[str]): The tools used by the agent. This includes any memory editing functions specified in `memory`.\n system (str): The system prompt used by the agent.\n llm_config (LLMConfig): The LLM configuration used by the agent.\n embedding_config (EmbeddingConfig): The embedding configuration used by the agent."},"AgentType":{"type":"string","enum":["memgpt_agent","split_thread_agent","offline_memory_agent"],"title":"AgentType","description":"Enum to represent the type of agent."},"AppAuthScheme":{"properties":{"scheme_name":{"type":"string","title":"Scheme Name"},"auth_mode":{"type":"string","enum":["OAUTH2","OAUTH1","API_KEY","BASIC","BEARER_TOKEN","BASIC_WITH_JWT","GOOGLE_SERVICE_ACCOUNT","GOOGLEADS_AUTH","NO_AUTH","CALCOM_AUTH"],"title":"Auth Mode"},"fields":{"items":{"$ref":"#/components/schemas/AuthSchemeField"},"type":"array","title":"Fields"},"proxy":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Proxy"},"authorization_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization Url"},"token_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Token Url"},"default_scopes":{"anyOf":[{"items":{},"type":"array"},{"type":"null"}],"title":"Default Scopes"},"token_response_metadata":{"anyOf":[{"items":{},"type":"array"},{"type":"null"}],"title":"Token Response Metadata"},"client_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Id"},"client_secret":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Secret"}},"type":"object","required":["scheme_name","auth_mode","fields"],"title":"AppAuthScheme","description":"App authenticatio scheme."},"AppModel":{"properties":{"name":{"type":"string","title":"Name"},"key":{"type":"string","title":"Key"},"appId":{"type":"string","title":"Appid"},"description":{"type":"string","title":"Description"},"categories":{"items":{"type":"string"},"type":"array","title":"Categories"},"meta":{"additionalProperties":true,"type":"object","title":"Meta"},"logo":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Logo"},"docs":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Docs"},"group":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Group"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"},"enabled":{"type":"boolean","title":"Enabled","default":false},"no_auth":{"type":"boolean","title":"No Auth","default":false},"auth_schemes":{"anyOf":[{"items":{"$ref":"#/components/schemas/AppAuthScheme"},"type":"array"},{"type":"null"}],"title":"Auth Schemes"},"testConnectors":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Testconnectors"},"documentation_doc_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Documentation Doc Text"},"configuration_docs_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Configuration Docs Text"}},"type":"object","required":["name","key","appId","description","categories","meta"],"title":"AppModel","description":"App data model."},"AssistantMessage":{"properties":{"id":{"type":"string","title":"Id"},"date":{"type":"string","format":"date-time","title":"Date"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"message_type":{"type":"string","const":"assistant_message","title":"Message Type","default":"assistant_message"},"content":{"anyOf":[{"items":{"$ref":"#/components/schemas/LettaAssistantMessageContentUnion"},"type":"array"},{"type":"string"}],"title":"Content","description":"The message content sent by the agent (can be a string or an array of content parts)"}},"type":"object","required":["id","date","content"],"title":"AssistantMessage","description":"A message sent by the LLM in response to user input. Used in the LLM context.\n\nArgs:\n id (str): The ID of the message\n date (datetime): The date the message was created in ISO format\n name (Optional[str]): The name of the sender of the message\n content (Union[str, List[LettaAssistantMessageContentUnion]]): The message content sent by the agent (can be a string or an array of content parts)"},"Audio":{"properties":{"id":{"type":"string","title":"Id"}},"type":"object","required":["id"],"title":"Audio"},"AuthRequest":{"properties":{"password":{"type":"string","title":"Password","description":"Admin password provided when starting the Letta server"}},"type":"object","title":"AuthRequest"},"AuthResponse":{"properties":{"uuid":{"type":"string","format":"uuid","title":"Uuid","description":"UUID of the user"},"is_admin":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Admin","description":"Whether the user is an admin"}},"type":"object","required":["uuid"],"title":"AuthResponse"},"AuthSchemeField":{"properties":{"name":{"type":"string","title":"Name"},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name"},"description":{"type":"string","title":"Description"},"type":{"type":"string","title":"Type"},"default":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Default"},"required":{"type":"boolean","title":"Required","default":false},"expected_from_customer":{"type":"boolean","title":"Expected From Customer","default":true},"get_current_user_endpoint":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Get Current User Endpoint"}},"type":"object","required":["name","description","type"],"title":"AuthSchemeField","description":"Auth scheme field."},"BaseToolRuleSchema":{"properties":{"tool_name":{"type":"string","title":"Tool Name"},"type":{"type":"string","title":"Type"}},"type":"object","required":["tool_name","type"],"title":"BaseToolRuleSchema"},"Block":{"properties":{"value":{"type":"string","title":"Value","description":"Value of the block."},"limit":{"type":"integer","title":"Limit","description":"Character limit of the block.","default":5000},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Name of the block if it is a template."},"is_template":{"type":"boolean","title":"Is Template","description":"Whether the block is a template (e.g. saved human/persona options).","default":false},"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label","description":"Label of the block (e.g. 'human', 'persona') in the context window."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Description of the block."},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata","description":"Metadata of the block.","default":{}},"id":{"type":"string","pattern":"^block-[a-fA-F0-9]{8}","title":"Id","description":"The human-friendly ID of the Block","examples":["block-123e4567-e89b-12d3-a456-426614174000"]},"organization_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Organization Id","description":"The unique identifier of the organization associated with the block."},"created_by_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created By Id","description":"The id of the user that made this Block."},"last_updated_by_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Updated By Id","description":"The id of the user that last updated this Block."}},"type":"object","required":["value"],"title":"Block","description":"A Block represents a reserved section of the LLM's context window which is editable. `Block` objects contained in the `Memory` object, which is able to edit the Block values.\n\nParameters:\n label (str): The label of the block (e.g. 'human', 'persona'). This defines a category for the block.\n value (str): The value of the block. This is the string that is represented in the context window.\n limit (int): The character limit of the block.\n is_template (bool): Whether the block is a template (e.g. saved human/persona options). Non-template blocks are not stored in the database and are ephemeral, while templated blocks are stored in the database.\n label (str): The label of the block (e.g. 'human', 'persona'). This defines a category for the block.\n template_name (str): The name of the block template (if it is a template).\n description (str): Description of the block.\n metadata (Dict): Metadata of the block.\n user_id (str): The unique identifier of the user associated with the block."},"BlockUpdate":{"properties":{"value":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Value","description":"Value of the block."},"limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit","description":"Character limit of the block."},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Name of the block if it is a template."},"is_template":{"type":"boolean","title":"Is Template","description":"Whether the block is a template (e.g. saved human/persona options).","default":false},"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label","description":"Label of the block (e.g. 'human', 'persona') in the context window."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Description of the block."},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata","description":"Metadata of the block.","default":{}}},"type":"object","title":"BlockUpdate","description":"Update a block"},"Body_import_agent_serialized":{"properties":{"file":{"type":"string","format":"binary","title":"File"}},"type":"object","required":["file"],"title":"Body_import_agent_serialized"},"Body_upload_file_to_source":{"properties":{"file":{"type":"string","format":"binary","title":"File"}},"type":"object","required":["file"],"title":"Body_upload_file_to_source"},"ChatCompletionAssistantMessageParam":{"properties":{"role":{"type":"string","const":"assistant","title":"Role"},"audio":{"anyOf":[{"$ref":"#/components/schemas/Audio"},{"type":"null"}]},"content":{"anyOf":[{"type":"string"},{"items":{"anyOf":[{"$ref":"#/components/schemas/ChatCompletionContentPartTextParam"},{"$ref":"#/components/schemas/ChatCompletionContentPartRefusalParam"}]},"type":"array"},{"type":"null"}],"title":"Content"},"function_call":{"anyOf":[{"$ref":"#/components/schemas/FunctionCall"},{"type":"null"}]},"name":{"type":"string","title":"Name"},"refusal":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Refusal"},"tool_calls":{"items":{"$ref":"#/components/schemas/ChatCompletionMessageToolCallParam"},"type":"array","title":"Tool Calls"}},"type":"object","required":["role"],"title":"ChatCompletionAssistantMessageParam"},"ChatCompletionAudioParam":{"properties":{"format":{"type":"string","enum":["wav","mp3","flac","opus","pcm16"],"title":"Format"},"voice":{"anyOf":[{"type":"string"},{"type":"string","enum":["alloy","ash","ballad","coral","echo","fable","onyx","nova","sage","shimmer","verse"]}],"title":"Voice"}},"type":"object","required":["format","voice"],"title":"ChatCompletionAudioParam"},"ChatCompletionContentPartImageParam":{"properties":{"image_url":{"$ref":"#/components/schemas/ImageURL"},"type":{"type":"string","const":"image_url","title":"Type"}},"type":"object","required":["image_url","type"],"title":"ChatCompletionContentPartImageParam"},"ChatCompletionContentPartInputAudioParam":{"properties":{"input_audio":{"$ref":"#/components/schemas/InputAudio"},"type":{"type":"string","const":"input_audio","title":"Type"}},"type":"object","required":["input_audio","type"],"title":"ChatCompletionContentPartInputAudioParam"},"ChatCompletionContentPartRefusalParam":{"properties":{"refusal":{"type":"string","title":"Refusal"},"type":{"type":"string","const":"refusal","title":"Type"}},"type":"object","required":["refusal","type"],"title":"ChatCompletionContentPartRefusalParam"},"ChatCompletionContentPartTextParam":{"properties":{"text":{"type":"string","title":"Text"},"type":{"type":"string","const":"text","title":"Type"}},"type":"object","required":["text","type"],"title":"ChatCompletionContentPartTextParam"},"ChatCompletionDeveloperMessageParam":{"properties":{"content":{"anyOf":[{"type":"string"},{"items":{"$ref":"#/components/schemas/ChatCompletionContentPartTextParam"},"type":"array"}],"title":"Content"},"role":{"type":"string","const":"developer","title":"Role"},"name":{"type":"string","title":"Name"}},"type":"object","required":["content","role"],"title":"ChatCompletionDeveloperMessageParam"},"ChatCompletionFunctionCallOptionParam":{"properties":{"name":{"type":"string","title":"Name"}},"type":"object","required":["name"],"title":"ChatCompletionFunctionCallOptionParam"},"ChatCompletionFunctionMessageParam":{"properties":{"content":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content"},"name":{"type":"string","title":"Name"},"role":{"type":"string","const":"function","title":"Role"}},"type":"object","required":["content","name","role"],"title":"ChatCompletionFunctionMessageParam"},"ChatCompletionMessageToolCall":{"properties":{"id":{"type":"string","title":"Id"},"function":{"$ref":"#/components/schemas/Function-Output"},"type":{"type":"string","const":"function","title":"Type"}},"additionalProperties":true,"type":"object","required":["id","function","type"],"title":"ChatCompletionMessageToolCall"},"ChatCompletionMessageToolCallParam":{"properties":{"id":{"type":"string","title":"Id"},"function":{"$ref":"#/components/schemas/openai__types__chat__chat_completion_message_tool_call_param__Function"},"type":{"type":"string","const":"function","title":"Type"}},"type":"object","required":["id","function","type"],"title":"ChatCompletionMessageToolCallParam"},"ChatCompletionNamedToolChoiceParam":{"properties":{"function":{"$ref":"#/components/schemas/openai__types__chat__chat_completion_named_tool_choice_param__Function"},"type":{"type":"string","const":"function","title":"Type"}},"type":"object","required":["function","type"],"title":"ChatCompletionNamedToolChoiceParam"},"ChatCompletionPredictionContentParam":{"properties":{"content":{"anyOf":[{"type":"string"},{"items":{"$ref":"#/components/schemas/ChatCompletionContentPartTextParam"},"type":"array"}],"title":"Content"},"type":{"type":"string","const":"content","title":"Type"}},"type":"object","required":["content","type"],"title":"ChatCompletionPredictionContentParam"},"ChatCompletionStreamOptionsParam":{"properties":{"include_usage":{"type":"boolean","title":"Include Usage"}},"type":"object","title":"ChatCompletionStreamOptionsParam"},"ChatCompletionSystemMessageParam":{"properties":{"content":{"anyOf":[{"type":"string"},{"items":{"$ref":"#/components/schemas/ChatCompletionContentPartTextParam"},"type":"array"}],"title":"Content"},"role":{"type":"string","const":"system","title":"Role"},"name":{"type":"string","title":"Name"}},"type":"object","required":["content","role"],"title":"ChatCompletionSystemMessageParam"},"ChatCompletionToolMessageParam":{"properties":{"content":{"anyOf":[{"type":"string"},{"items":{"$ref":"#/components/schemas/ChatCompletionContentPartTextParam"},"type":"array"}],"title":"Content"},"role":{"type":"string","const":"tool","title":"Role"},"tool_call_id":{"type":"string","title":"Tool Call Id"}},"type":"object","required":["content","role","tool_call_id"],"title":"ChatCompletionToolMessageParam"},"ChatCompletionToolParam":{"properties":{"function":{"$ref":"#/components/schemas/FunctionDefinition-Input"},"type":{"type":"string","const":"function","title":"Type"}},"type":"object","required":["function","type"],"title":"ChatCompletionToolParam"},"ChatCompletionUserMessageParam":{"properties":{"content":{"anyOf":[{"type":"string"},{"items":{"anyOf":[{"$ref":"#/components/schemas/ChatCompletionContentPartTextParam"},{"$ref":"#/components/schemas/ChatCompletionContentPartImageParam"},{"$ref":"#/components/schemas/ChatCompletionContentPartInputAudioParam"},{"$ref":"#/components/schemas/File"}]},"type":"array"}],"title":"Content"},"role":{"type":"string","const":"user","title":"Role"},"name":{"type":"string","title":"Name"}},"type":"object","required":["content","role"],"title":"ChatCompletionUserMessageParam"},"ChildToolRule":{"properties":{"tool_name":{"type":"string","title":"Tool Name","description":"The name of the tool. Must exist in the database for the user's organization."},"type":{"type":"string","const":"constrain_child_tools","title":"Type","default":"constrain_child_tools"},"children":{"items":{"type":"string"},"type":"array","title":"Children","description":"The children tools that can be invoked."}},"additionalProperties":false,"type":"object","required":["tool_name","children"],"title":"ChildToolRule","description":"A ToolRule represents a tool that can be invoked by the agent."},"ChildToolRuleSchema":{"properties":{"tool_name":{"type":"string","title":"Tool Name"},"type":{"type":"string","title":"Type"},"children":{"items":{"type":"string"},"type":"array","title":"Children"}},"type":"object","required":["tool_name","type","children"],"title":"ChildToolRuleSchema"},"CompletionCreateParamsNonStreaming":{"properties":{"messages":{"items":{"anyOf":[{"$ref":"#/components/schemas/ChatCompletionDeveloperMessageParam"},{"$ref":"#/components/schemas/ChatCompletionSystemMessageParam"},{"$ref":"#/components/schemas/ChatCompletionUserMessageParam"},{"$ref":"#/components/schemas/ChatCompletionAssistantMessageParam"},{"$ref":"#/components/schemas/ChatCompletionToolMessageParam"},{"$ref":"#/components/schemas/ChatCompletionFunctionMessageParam"}]},"type":"array","title":"Messages"},"model":{"anyOf":[{"type":"string"},{"type":"string","enum":["o3-mini","o3-mini-2025-01-31","o1","o1-2024-12-17","o1-preview","o1-preview-2024-09-12","o1-mini","o1-mini-2024-09-12","gpt-4o","gpt-4o-2024-11-20","gpt-4o-2024-08-06","gpt-4o-2024-05-13","gpt-4o-audio-preview","gpt-4o-audio-preview-2024-10-01","gpt-4o-audio-preview-2024-12-17","gpt-4o-mini-audio-preview","gpt-4o-mini-audio-preview-2024-12-17","gpt-4o-search-preview","gpt-4o-mini-search-preview","gpt-4o-search-preview-2025-03-11","gpt-4o-mini-search-preview-2025-03-11","chatgpt-4o-latest","gpt-4o-mini","gpt-4o-mini-2024-07-18","gpt-4-turbo","gpt-4-turbo-2024-04-09","gpt-4-0125-preview","gpt-4-turbo-preview","gpt-4-1106-preview","gpt-4-vision-preview","gpt-4","gpt-4-0314","gpt-4-0613","gpt-4-32k","gpt-4-32k-0314","gpt-4-32k-0613","gpt-3.5-turbo","gpt-3.5-turbo-16k","gpt-3.5-turbo-0301","gpt-3.5-turbo-0613","gpt-3.5-turbo-1106","gpt-3.5-turbo-0125","gpt-3.5-turbo-16k-0613"]}],"title":"Model"},"audio":{"anyOf":[{"$ref":"#/components/schemas/ChatCompletionAudioParam"},{"type":"null"}]},"frequency_penalty":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Frequency Penalty"},"function_call":{"anyOf":[{"type":"string","enum":["none","auto"]},{"$ref":"#/components/schemas/ChatCompletionFunctionCallOptionParam"}],"title":"Function Call"},"functions":{"items":{"$ref":"#/components/schemas/openai__types__chat__completion_create_params__Function"},"type":"array","title":"Functions"},"logit_bias":{"anyOf":[{"additionalProperties":{"type":"integer"},"type":"object"},{"type":"null"}],"title":"Logit Bias"},"logprobs":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Logprobs"},"max_completion_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Completion Tokens"},"max_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Tokens"},"metadata":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Metadata"},"modalities":{"anyOf":[{"items":{"type":"string","enum":["text","audio"]},"type":"array"},{"type":"null"}],"title":"Modalities"},"n":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"N"},"parallel_tool_calls":{"type":"boolean","title":"Parallel Tool Calls"},"prediction":{"anyOf":[{"$ref":"#/components/schemas/ChatCompletionPredictionContentParam"},{"type":"null"}]},"presence_penalty":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Presence Penalty"},"reasoning_effort":{"anyOf":[{"type":"string","enum":["low","medium","high"]},{"type":"null"}],"title":"Reasoning Effort"},"response_format":{"anyOf":[{"$ref":"#/components/schemas/ResponseFormatText"},{"$ref":"#/components/schemas/ResponseFormatJSONSchema"},{"$ref":"#/components/schemas/ResponseFormatJSONObject"}],"title":"Response Format"},"seed":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Seed"},"service_tier":{"anyOf":[{"type":"string","enum":["auto","default"]},{"type":"null"}],"title":"Service Tier"},"stop":{"anyOf":[{"type":"string"},{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Stop"},"store":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Store"},"stream_options":{"anyOf":[{"$ref":"#/components/schemas/ChatCompletionStreamOptionsParam"},{"type":"null"}]},"temperature":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Temperature"},"tool_choice":{"anyOf":[{"type":"string","enum":["none","auto","required"]},{"$ref":"#/components/schemas/ChatCompletionNamedToolChoiceParam"}],"title":"Tool Choice"},"tools":{"items":{"$ref":"#/components/schemas/ChatCompletionToolParam"},"type":"array","title":"Tools"},"top_logprobs":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Top Logprobs"},"top_p":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Top P"},"user":{"type":"string","title":"User"},"web_search_options":{"$ref":"#/components/schemas/WebSearchOptions"},"stream":{"anyOf":[{"type":"boolean","const":false},{"type":"null"}],"title":"Stream"}},"type":"object","required":["messages","model"],"title":"CompletionCreateParamsNonStreaming"},"CompletionCreateParamsStreaming":{"properties":{"messages":{"items":{"anyOf":[{"$ref":"#/components/schemas/ChatCompletionDeveloperMessageParam"},{"$ref":"#/components/schemas/ChatCompletionSystemMessageParam"},{"$ref":"#/components/schemas/ChatCompletionUserMessageParam"},{"$ref":"#/components/schemas/ChatCompletionAssistantMessageParam"},{"$ref":"#/components/schemas/ChatCompletionToolMessageParam"},{"$ref":"#/components/schemas/ChatCompletionFunctionMessageParam"}]},"type":"array","title":"Messages"},"model":{"anyOf":[{"type":"string"},{"type":"string","enum":["o3-mini","o3-mini-2025-01-31","o1","o1-2024-12-17","o1-preview","o1-preview-2024-09-12","o1-mini","o1-mini-2024-09-12","gpt-4o","gpt-4o-2024-11-20","gpt-4o-2024-08-06","gpt-4o-2024-05-13","gpt-4o-audio-preview","gpt-4o-audio-preview-2024-10-01","gpt-4o-audio-preview-2024-12-17","gpt-4o-mini-audio-preview","gpt-4o-mini-audio-preview-2024-12-17","gpt-4o-search-preview","gpt-4o-mini-search-preview","gpt-4o-search-preview-2025-03-11","gpt-4o-mini-search-preview-2025-03-11","chatgpt-4o-latest","gpt-4o-mini","gpt-4o-mini-2024-07-18","gpt-4-turbo","gpt-4-turbo-2024-04-09","gpt-4-0125-preview","gpt-4-turbo-preview","gpt-4-1106-preview","gpt-4-vision-preview","gpt-4","gpt-4-0314","gpt-4-0613","gpt-4-32k","gpt-4-32k-0314","gpt-4-32k-0613","gpt-3.5-turbo","gpt-3.5-turbo-16k","gpt-3.5-turbo-0301","gpt-3.5-turbo-0613","gpt-3.5-turbo-1106","gpt-3.5-turbo-0125","gpt-3.5-turbo-16k-0613"]}],"title":"Model"},"audio":{"anyOf":[{"$ref":"#/components/schemas/ChatCompletionAudioParam"},{"type":"null"}]},"frequency_penalty":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Frequency Penalty"},"function_call":{"anyOf":[{"type":"string","enum":["none","auto"]},{"$ref":"#/components/schemas/ChatCompletionFunctionCallOptionParam"}],"title":"Function Call"},"functions":{"items":{"$ref":"#/components/schemas/openai__types__chat__completion_create_params__Function"},"type":"array","title":"Functions"},"logit_bias":{"anyOf":[{"additionalProperties":{"type":"integer"},"type":"object"},{"type":"null"}],"title":"Logit Bias"},"logprobs":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Logprobs"},"max_completion_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Completion Tokens"},"max_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Tokens"},"metadata":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Metadata"},"modalities":{"anyOf":[{"items":{"type":"string","enum":["text","audio"]},"type":"array"},{"type":"null"}],"title":"Modalities"},"n":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"N"},"parallel_tool_calls":{"type":"boolean","title":"Parallel Tool Calls"},"prediction":{"anyOf":[{"$ref":"#/components/schemas/ChatCompletionPredictionContentParam"},{"type":"null"}]},"presence_penalty":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Presence Penalty"},"reasoning_effort":{"anyOf":[{"type":"string","enum":["low","medium","high"]},{"type":"null"}],"title":"Reasoning Effort"},"response_format":{"anyOf":[{"$ref":"#/components/schemas/ResponseFormatText"},{"$ref":"#/components/schemas/ResponseFormatJSONSchema"},{"$ref":"#/components/schemas/ResponseFormatJSONObject"}],"title":"Response Format"},"seed":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Seed"},"service_tier":{"anyOf":[{"type":"string","enum":["auto","default"]},{"type":"null"}],"title":"Service Tier"},"stop":{"anyOf":[{"type":"string"},{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Stop"},"store":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Store"},"stream_options":{"anyOf":[{"$ref":"#/components/schemas/ChatCompletionStreamOptionsParam"},{"type":"null"}]},"temperature":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Temperature"},"tool_choice":{"anyOf":[{"type":"string","enum":["none","auto","required"]},{"$ref":"#/components/schemas/ChatCompletionNamedToolChoiceParam"}],"title":"Tool Choice"},"tools":{"items":{"$ref":"#/components/schemas/ChatCompletionToolParam"},"type":"array","title":"Tools"},"top_logprobs":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Top Logprobs"},"top_p":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Top P"},"user":{"type":"string","title":"User"},"web_search_options":{"$ref":"#/components/schemas/WebSearchOptions"},"stream":{"type":"boolean","const":true,"title":"Stream"}},"type":"object","required":["messages","model","stream"],"title":"CompletionCreateParamsStreaming"},"ConditionalToolRule":{"properties":{"tool_name":{"type":"string","title":"Tool Name","description":"The name of the tool. Must exist in the database for the user's organization."},"type":{"type":"string","const":"conditional","title":"Type","default":"conditional"},"default_child":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Default Child","description":"The default child tool to be called. If None, any tool can be called."},"child_output_mapping":{"additionalProperties":{"type":"string"},"type":"object","title":"Child Output Mapping","description":"The output case to check for mapping"},"require_output_mapping":{"type":"boolean","title":"Require Output Mapping","description":"Whether to throw an error when output doesn't match any case","default":false}},"additionalProperties":false,"type":"object","required":["tool_name","child_output_mapping"],"title":"ConditionalToolRule","description":"A ToolRule that conditionally maps to different child tools based on the output."},"ConditionalToolRuleSchema":{"properties":{"tool_name":{"type":"string","title":"Tool Name"},"type":{"type":"string","title":"Type"},"default_child":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Default Child"},"child_output_mapping":{"additionalProperties":{"type":"string"},"type":"object","title":"Child Output Mapping"},"require_output_mapping":{"type":"boolean","title":"Require Output Mapping"}},"type":"object","required":["tool_name","type","default_child","child_output_mapping","require_output_mapping"],"title":"ConditionalToolRuleSchema"},"ContextWindowOverview":{"properties":{"context_window_size_max":{"type":"integer","title":"Context Window Size Max","description":"The maximum amount of tokens the context window can hold."},"context_window_size_current":{"type":"integer","title":"Context Window Size Current","description":"The current number of tokens in the context window."},"num_messages":{"type":"integer","title":"Num Messages","description":"The number of messages in the context window."},"num_archival_memory":{"type":"integer","title":"Num Archival Memory","description":"The number of messages in the archival memory."},"num_recall_memory":{"type":"integer","title":"Num Recall Memory","description":"The number of messages in the recall memory."},"num_tokens_external_memory_summary":{"type":"integer","title":"Num Tokens External Memory Summary","description":"The number of tokens in the external memory summary (archival + recall metadata)."},"external_memory_summary":{"type":"string","title":"External Memory Summary","description":"The metadata summary of the external memory sources (archival + recall metadata)."},"num_tokens_system":{"type":"integer","title":"Num Tokens System","description":"The number of tokens in the system prompt."},"system_prompt":{"type":"string","title":"System Prompt","description":"The content of the system prompt."},"num_tokens_core_memory":{"type":"integer","title":"Num Tokens Core Memory","description":"The number of tokens in the core memory."},"core_memory":{"type":"string","title":"Core Memory","description":"The content of the core memory."},"num_tokens_summary_memory":{"type":"integer","title":"Num Tokens Summary Memory","description":"The number of tokens in the summary memory."},"summary_memory":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Summary Memory","description":"The content of the summary memory."},"num_tokens_functions_definitions":{"type":"integer","title":"Num Tokens Functions Definitions","description":"The number of tokens in the functions definitions."},"functions_definitions":{"anyOf":[{"items":{"$ref":"#/components/schemas/FunctionTool"},"type":"array"},{"type":"null"}],"title":"Functions Definitions","description":"The content of the functions definitions."},"num_tokens_messages":{"type":"integer","title":"Num Tokens Messages","description":"The number of tokens in the messages list."},"messages":{"items":{"$ref":"#/components/schemas/Message"},"type":"array","title":"Messages","description":"The messages in the context window."}},"type":"object","required":["context_window_size_max","context_window_size_current","num_messages","num_archival_memory","num_recall_memory","num_tokens_external_memory_summary","external_memory_summary","num_tokens_system","system_prompt","num_tokens_core_memory","core_memory","num_tokens_summary_memory","num_tokens_functions_definitions","functions_definitions","num_tokens_messages","messages"],"title":"ContextWindowOverview","description":"Overview of the context window, including the number of messages and tokens."},"ContinueToolRule":{"properties":{"tool_name":{"type":"string","title":"Tool Name","description":"The name of the tool. Must exist in the database for the user's organization."},"type":{"type":"string","const":"continue_loop","title":"Type","default":"continue_loop"}},"additionalProperties":false,"type":"object","required":["tool_name"],"title":"ContinueToolRule","description":"Represents a tool rule configuration where if this tool gets called, it must continue the agent loop."},"CoreMemoryBlockSchema":{"properties":{"created_at":{"type":"string","title":"Created At"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"is_template":{"type":"boolean","title":"Is Template"},"label":{"type":"string","title":"Label"},"limit":{"type":"integer","title":"Limit"},"metadata_":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata"},"template_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Template Name"},"updated_at":{"type":"string","title":"Updated At"},"value":{"type":"string","title":"Value"}},"type":"object","required":["created_at","description","is_template","label","limit","template_name","updated_at","value"],"title":"CoreMemoryBlockSchema"},"CreateAgentRequest":{"properties":{"name":{"type":"string","title":"Name","description":"The name of the agent."},"memory_blocks":{"anyOf":[{"items":{"$ref":"#/components/schemas/CreateBlock"},"type":"array"},{"type":"null"}],"title":"Memory Blocks","description":"The blocks to create in the agent's in-context memory."},"tools":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Tools","description":"The tools used by the agent."},"tool_ids":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Tool Ids","description":"The ids of the tools used by the agent."},"source_ids":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Source Ids","description":"The ids of the sources used by the agent."},"block_ids":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Block Ids","description":"The ids of the blocks used by the agent."},"tool_rules":{"anyOf":[{"items":{"oneOf":[{"$ref":"#/components/schemas/ChildToolRule"},{"$ref":"#/components/schemas/InitToolRule"},{"$ref":"#/components/schemas/TerminalToolRule"},{"$ref":"#/components/schemas/ConditionalToolRule"},{"$ref":"#/components/schemas/ContinueToolRule"},{"$ref":"#/components/schemas/MaxCountPerStepToolRule"}],"discriminator":{"propertyName":"type","mapping":{"conditional":"#/components/schemas/ConditionalToolRule","constrain_child_tools":"#/components/schemas/ChildToolRule","continue_loop":"#/components/schemas/ContinueToolRule","exit_loop":"#/components/schemas/TerminalToolRule","max_count_per_step":"#/components/schemas/MaxCountPerStepToolRule","run_first":"#/components/schemas/InitToolRule"}}},"type":"array"},{"type":"null"}],"title":"Tool Rules","description":"The tool rules governing the agent."},"tags":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Tags","description":"The tags associated with the agent."},"system":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"System","description":"The system prompt used by the agent."},"agent_type":{"$ref":"#/components/schemas/AgentType","description":"The type of agent."},"llm_config":{"anyOf":[{"$ref":"#/components/schemas/LLMConfig"},{"type":"null"}],"description":"The LLM configuration used by the agent."},"embedding_config":{"anyOf":[{"$ref":"#/components/schemas/EmbeddingConfig"},{"type":"null"}],"description":"The embedding configuration used by the agent."},"initial_message_sequence":{"anyOf":[{"items":{"$ref":"#/components/schemas/MessageCreate"},"type":"array"},{"type":"null"}],"title":"Initial Message Sequence","description":"The initial set of messages to put in the agent's in-context memory."},"include_base_tools":{"type":"boolean","title":"Include Base Tools","description":"If true, attaches the Letta core tools (e.g. archival_memory and core_memory related functions).","default":true},"include_multi_agent_tools":{"type":"boolean","title":"Include Multi Agent Tools","description":"If true, attaches the Letta multi-agent tools (e.g. sending a message to another agent).","default":false},"include_base_tool_rules":{"type":"boolean","title":"Include Base Tool Rules","description":"If true, attaches the Letta base tool rules (e.g. deny all tools not explicitly allowed).","default":true},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"The description of the agent."},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata","description":"The metadata of the agent."},"model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model","description":"The LLM configuration handle used by the agent, specified in the format provider/model-name, as an alternative to specifying llm_config."},"embedding":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Embedding","description":"The embedding configuration handle used by the agent, specified in the format provider/model-name."},"context_window_limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Context Window Limit","description":"The context window limit used by the agent."},"embedding_chunk_size":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Embedding Chunk Size","description":"The embedding chunk size used by the agent.","default":300},"max_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Tokens","description":"The maximum number of tokens to generate, including reasoning step. If not set, the model will use its default value."},"max_reasoning_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Reasoning Tokens","description":"The maximum number of tokens to generate for reasoning step. If not set, the model will use its default value."},"enable_reasoner":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Enable Reasoner","description":"Whether to enable internal extended thinking step for a reasoner model.","default":false},"from_template":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"From Template","description":"The template id used to configure the agent"},"template":{"type":"boolean","title":"Template","description":"Whether the agent is a template","default":false},"project":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Project","description":"Deprecated: Project should now be passed via the X-Project header instead of in the request body. If using the sdk, this can be done via the new x_project field below.","deprecated":true},"tool_exec_environment_variables":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Tool Exec Environment Variables","description":"The environment variables for tool execution specific to this agent."},"memory_variables":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Memory Variables","description":"The variables that should be set for the agent."},"project_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Project Id","description":"The id of the project the agent belongs to."},"template_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Template Id","description":"The id of the template the agent belongs to."},"base_template_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Base Template Id","description":"The base template id of the agent."},"identity_ids":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Identity Ids","description":"The ids of the identities associated with this agent."},"message_buffer_autoclear":{"type":"boolean","title":"Message Buffer Autoclear","description":"If set to True, the agent will not remember previous messages (though the agent will still retain state via core memory blocks and archival/recall memory). Not recommended unless you have an advanced use case.","default":false},"actor_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Actor Id"}},"type":"object","title":"CreateAgentRequest","description":"CreateAgent model specifically for POST request body, excluding user_id which comes from headers"},"CreateArchivalMemory":{"properties":{"text":{"type":"string","title":"Text","description":"Text to write to archival memory."}},"type":"object","required":["text"],"title":"CreateArchivalMemory"},"CreateBlock":{"properties":{"value":{"type":"string","title":"Value","description":"Value of the block."},"limit":{"type":"integer","title":"Limit","description":"Character limit of the block.","default":5000},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Name of the block if it is a template."},"is_template":{"type":"boolean","title":"Is Template","default":false},"label":{"type":"string","title":"Label","description":"Label of the block."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Description of the block."},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata","description":"Metadata of the block.","default":{}}},"type":"object","required":["value","label"],"title":"CreateBlock","description":"Create a block"},"DynamicManager":{"properties":{"manager_type":{"type":"string","const":"dynamic","title":"Manager Type","description":"","default":"dynamic"},"manager_agent_id":{"type":"string","title":"Manager Agent Id","description":""},"termination_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Termination Token","description":"","default":"DONE!"},"max_turns":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Turns","description":""}},"type":"object","required":["manager_agent_id"],"title":"DynamicManager"},"E2BSandboxConfig":{"properties":{"timeout":{"type":"integer","title":"Timeout","description":"Time limit for the sandbox (in seconds).","default":300},"template":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Template","description":"The E2B template id (docker image)."},"pip_requirements":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Pip Requirements","description":"A list of pip packages to install on the E2B Sandbox"}},"type":"object","title":"E2BSandboxConfig"},"EmbeddingConfig":{"properties":{"embedding_endpoint_type":{"type":"string","enum":["openai","anthropic","bedrock","cohere","google_ai","google_vertex","azure","groq","ollama","webui","webui-legacy","lmstudio","lmstudio-legacy","llamacpp","koboldcpp","vllm","hugging-face","mistral","together"],"title":"Embedding Endpoint Type","description":"The endpoint type for the model."},"embedding_endpoint":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Embedding Endpoint","description":"The endpoint for the model (`None` if local)."},"embedding_model":{"type":"string","title":"Embedding Model","description":"The model for the embedding."},"embedding_dim":{"type":"integer","title":"Embedding Dim","description":"The dimension of the embedding."},"embedding_chunk_size":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Embedding Chunk Size","description":"The chunk size of the embedding.","default":300},"handle":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Handle","description":"The handle for this config, in the format provider/model-name."},"azure_endpoint":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Azure Endpoint","description":"The Azure endpoint for the model."},"azure_version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Azure Version","description":"The Azure version for the model."},"azure_deployment":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Azure Deployment","description":"The Azure deployment for the model."}},"type":"object","required":["embedding_endpoint_type","embedding_model","embedding_dim"],"title":"EmbeddingConfig","description":"Embedding model configuration. This object specifies all the information necessary to access an embedding model to usage with Letta, except for secret keys.\n\nAttributes:\n embedding_endpoint_type (str): The endpoint type for the model.\n embedding_endpoint (str): The endpoint for the model.\n embedding_model (str): The model for the embedding.\n embedding_dim (int): The dimension of the embedding.\n embedding_chunk_size (int): The chunk size of the embedding.\n azure_endpoint (:obj:`str`, optional): The Azure endpoint for the model (Azure only).\n azure_version (str): The Azure version for the model (Azure only).\n azure_deployment (str): The Azure deployment for the model (Azure only)."},"File":{"properties":{"file":{"$ref":"#/components/schemas/FileFile"},"type":{"type":"string","const":"file","title":"Type"}},"type":"object","required":["file","type"],"title":"File"},"FileFile":{"properties":{"file_data":{"type":"string","title":"File Data"},"file_id":{"type":"string","title":"File Id"},"filename":{"type":"string","title":"Filename"}},"type":"object","title":"FileFile"},"FileMetadata":{"properties":{"id":{"type":"string","pattern":"^file-[a-fA-F0-9]{8}","title":"Id","description":"The human-friendly ID of the File","examples":["file-123e4567-e89b-12d3-a456-426614174000"]},"organization_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Organization Id","description":"The unique identifier of the organization associated with the document."},"source_id":{"type":"string","title":"Source Id","description":"The unique identifier of the source associated with the document."},"file_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"File Name","description":"The name of the file."},"file_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"File Path","description":"The path to the file."},"file_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"File Type","description":"The type of the file (MIME type)."},"file_size":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"File Size","description":"The size of the file in bytes."},"file_creation_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"File Creation Date","description":"The creation date of the file."},"file_last_modified_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"File Last Modified Date","description":"The last modified date of the file."},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At","description":"The creation date of the file."},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At","description":"The update date of the file."},"is_deleted":{"type":"boolean","title":"Is Deleted","description":"Whether this file is deleted or not.","default":false}},"additionalProperties":false,"type":"object","required":["source_id"],"title":"FileMetadata","description":"Representation of a single FileMetadata"},"Function-Output":{"properties":{"arguments":{"type":"string","title":"Arguments"},"name":{"type":"string","title":"Name"}},"additionalProperties":true,"type":"object","required":["arguments","name"],"title":"Function"},"FunctionCall":{"properties":{"arguments":{"type":"string","title":"Arguments"},"name":{"type":"string","title":"Name"}},"type":"object","required":["arguments","name"],"title":"FunctionCall"},"FunctionDefinition-Input":{"properties":{"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"parameters":{"additionalProperties":true,"type":"object","title":"Parameters"},"strict":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Strict"}},"type":"object","required":["name"],"title":"FunctionDefinition"},"FunctionDefinition-Output":{"properties":{"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"parameters":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Parameters"},"strict":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Strict"}},"additionalProperties":true,"type":"object","required":["name"],"title":"FunctionDefinition"},"FunctionTool":{"properties":{"function":{"$ref":"#/components/schemas/FunctionDefinition-Output"},"type":{"type":"string","const":"function","title":"Type"}},"additionalProperties":true,"type":"object","required":["function","type"],"title":"FunctionTool"},"Group":{"properties":{"id":{"type":"string","title":"Id","description":"The id of the group. Assigned by the database."},"manager_type":{"$ref":"#/components/schemas/ManagerType","description":""},"agent_ids":{"items":{"type":"string"},"type":"array","title":"Agent Ids","description":""},"description":{"type":"string","title":"Description","description":""},"manager_agent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Manager Agent Id","description":""},"termination_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Termination Token","description":""},"max_turns":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Turns","description":""}},"additionalProperties":false,"type":"object","required":["id","manager_type","agent_ids","description"],"title":"Group"},"GroupCreate":{"properties":{"agent_ids":{"items":{"type":"string"},"type":"array","title":"Agent Ids","description":""},"description":{"type":"string","title":"Description","description":""},"manager_config":{"oneOf":[{"$ref":"#/components/schemas/RoundRobinManager"},{"$ref":"#/components/schemas/SupervisorManager"},{"$ref":"#/components/schemas/DynamicManager"}],"title":"Manager Config","description":"","default":{"manager_type":"round_robin"},"discriminator":{"propertyName":"manager_type","mapping":{"dynamic":"#/components/schemas/DynamicManager","round_robin":"#/components/schemas/RoundRobinManager","supervisor":"#/components/schemas/SupervisorManager"}}}},"type":"object","required":["agent_ids","description"],"title":"GroupCreate"},"GroupUpdate":{"properties":{"agent_ids":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Agent Ids","description":""},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":""},"manager_config":{"anyOf":[{"oneOf":[{"$ref":"#/components/schemas/RoundRobinManager"},{"$ref":"#/components/schemas/SupervisorManager"},{"$ref":"#/components/schemas/DynamicManager"}],"discriminator":{"propertyName":"manager_type","mapping":{"dynamic":"#/components/schemas/DynamicManager","round_robin":"#/components/schemas/RoundRobinManager","supervisor":"#/components/schemas/SupervisorManager"}}},{"type":"null"}],"title":"Manager Config","description":""}},"type":"object","title":"GroupUpdate"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"Health":{"properties":{"version":{"type":"string","title":"Version"},"status":{"type":"string","title":"Status"}},"type":"object","required":["version","status"],"title":"Health","description":"Health check response body"},"HiddenReasoningMessage":{"properties":{"id":{"type":"string","title":"Id"},"date":{"type":"string","format":"date-time","title":"Date"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"message_type":{"type":"string","const":"hidden_reasoning_message","title":"Message Type","default":"hidden_reasoning_message"},"state":{"type":"string","enum":["redacted","omitted"],"title":"State"},"hidden_reasoning":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Hidden Reasoning"}},"type":"object","required":["id","date","state"],"title":"HiddenReasoningMessage","description":"Representation of an agent's internal reasoning where reasoning content\nhas been hidden from the response.\n\nArgs:\n id (str): The ID of the message\n date (datetime): The date the message was created in ISO format\n name (Optional[str]): The name of the sender of the message\n state (Literal[\"redacted\", \"omitted\"]): Whether the reasoning\n content was redacted by the provider or simply omitted by the API\n hidden_reasoning (Optional[str]): The internal reasoning of the agent"},"Identity":{"properties":{"id":{"type":"string","pattern":"^identity-[a-fA-F0-9]{8}","title":"Id","description":"The human-friendly ID of the Identity","examples":["identity-123e4567-e89b-12d3-a456-426614174000"]},"identifier_key":{"type":"string","title":"Identifier Key","description":"External, user-generated identifier key of the identity."},"name":{"type":"string","title":"Name","description":"The name of the identity."},"identity_type":{"$ref":"#/components/schemas/IdentityType","description":"The type of the identity."},"project_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Project Id","description":"The project id of the identity, if applicable."},"agent_ids":{"items":{"type":"string"},"type":"array","title":"Agent Ids","description":"The IDs of the agents associated with the identity."},"block_ids":{"items":{"type":"string"},"type":"array","title":"Block Ids","description":"The IDs of the blocks associated with the identity."},"organization_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Organization Id","description":"The organization id of the user"},"properties":{"items":{"$ref":"#/components/schemas/IdentityProperty"},"type":"array","title":"Properties","description":"List of properties associated with the identity"}},"additionalProperties":false,"type":"object","required":["identifier_key","name","identity_type","agent_ids","block_ids"],"title":"Identity"},"IdentityCreate":{"properties":{"identifier_key":{"type":"string","title":"Identifier Key","description":"External, user-generated identifier key of the identity."},"name":{"type":"string","title":"Name","description":"The name of the identity."},"identity_type":{"$ref":"#/components/schemas/IdentityType","description":"The type of the identity."},"project_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Project Id","description":"The project id of the identity, if applicable."},"agent_ids":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Agent Ids","description":"The agent ids that are associated with the identity."},"block_ids":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Block Ids","description":"The IDs of the blocks associated with the identity."},"properties":{"anyOf":[{"items":{"$ref":"#/components/schemas/IdentityProperty"},"type":"array"},{"type":"null"}],"title":"Properties","description":"List of properties associated with the identity."}},"additionalProperties":false,"type":"object","required":["identifier_key","name","identity_type"],"title":"IdentityCreate"},"IdentityProperty":{"properties":{"key":{"type":"string","title":"Key","description":"The key of the property"},"value":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":true,"type":"object"}],"title":"Value","description":"The value of the property"},"type":{"$ref":"#/components/schemas/IdentityPropertyType","description":"The type of the property"}},"additionalProperties":false,"type":"object","required":["key","value","type"],"title":"IdentityProperty","description":"A property of an identity"},"IdentityPropertyType":{"type":"string","enum":["string","number","boolean","json"],"title":"IdentityPropertyType","description":"Enum to represent the type of the identity property."},"IdentityType":{"type":"string","enum":["org","user","other"],"title":"IdentityType","description":"Enum to represent the type of the identity."},"IdentityUpdate":{"properties":{"identifier_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Identifier Key","description":"External, user-generated identifier key of the identity."},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"The name of the identity."},"identity_type":{"anyOf":[{"$ref":"#/components/schemas/IdentityType"},{"type":"null"}],"description":"The type of the identity."},"agent_ids":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Agent Ids","description":"The agent ids that are associated with the identity."},"block_ids":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Block Ids","description":"The IDs of the blocks associated with the identity."},"properties":{"anyOf":[{"items":{"$ref":"#/components/schemas/IdentityProperty"},"type":"array"},{"type":"null"}],"title":"Properties","description":"List of properties associated with the identity."}},"additionalProperties":false,"type":"object","title":"IdentityUpdate"},"ImageURL":{"properties":{"url":{"type":"string","title":"Url"},"detail":{"type":"string","enum":["auto","low","high"],"title":"Detail"}},"type":"object","required":["url"],"title":"ImageURL"},"InitToolRule":{"properties":{"tool_name":{"type":"string","title":"Tool Name","description":"The name of the tool. Must exist in the database for the user's organization."},"type":{"type":"string","const":"run_first","title":"Type","default":"run_first"}},"additionalProperties":false,"type":"object","required":["tool_name"],"title":"InitToolRule","description":"Represents the initial tool rule configuration."},"InputAudio":{"properties":{"data":{"type":"string","title":"Data"},"format":{"type":"string","enum":["wav","mp3"],"title":"Format"}},"type":"object","required":["data","format"],"title":"InputAudio"},"JSONSchema":{"properties":{"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"schema":{"additionalProperties":true,"type":"object","title":"Schema"},"strict":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Strict"}},"type":"object","required":["name"],"title":"JSONSchema"},"Job":{"properties":{"created_by_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created By Id","description":"The id of the user that made this object."},"last_updated_by_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Updated By Id","description":"The id of the user that made this object."},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At","description":"The timestamp when the object was created."},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At","description":"The timestamp when the object was last updated."},"status":{"$ref":"#/components/schemas/JobStatus","description":"The status of the job.","default":"created"},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed At","description":"The unix timestamp of when the job was completed."},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata","description":"The metadata of the job."},"job_type":{"$ref":"#/components/schemas/JobType","description":"The type of the job.","default":"job"},"id":{"type":"string","pattern":"^(job|run)-[a-fA-F0-9]{8}","title":"Id","description":"The human-friendly ID of the Job","examples":["job-123e4567-e89b-12d3-a456-426614174000"]},"user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id","description":"The unique identifier of the user associated with the job."}},"additionalProperties":false,"type":"object","title":"Job","description":"Representation of offline jobs, used for tracking status of data loading tasks (involving parsing and embedding files).\n\nParameters:\n id (str): The unique identifier of the job.\n status (JobStatus): The status of the job.\n created_at (datetime): The unix timestamp of when the job was created.\n completed_at (datetime): The unix timestamp of when the job was completed.\n user_id (str): The unique identifier of the user associated with the."},"JobStatus":{"type":"string","enum":["created","running","completed","failed","pending"],"title":"JobStatus","description":"Status of the job."},"JobType":{"type":"string","enum":["job","run"],"title":"JobType"},"LLMConfig":{"properties":{"model":{"type":"string","title":"Model","description":"LLM model name. "},"model_endpoint_type":{"type":"string","enum":["openai","anthropic","cohere","google_ai","google_vertex","azure","groq","ollama","webui","webui-legacy","lmstudio","lmstudio-legacy","lmstudio-chatcompletions","llamacpp","koboldcpp","vllm","hugging-face","mistral","together","bedrock","deepseek","xai"],"title":"Model Endpoint Type","description":"The endpoint type for the model."},"model_endpoint":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model Endpoint","description":"The endpoint for the model."},"model_wrapper":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model Wrapper","description":"The wrapper for the model."},"context_window":{"type":"integer","title":"Context Window","description":"The context window size for the model."},"put_inner_thoughts_in_kwargs":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Put Inner Thoughts In Kwargs","description":"Puts 'inner_thoughts' as a kwarg in the function call if this is set to True. This helps with function calling performance and also the generation of inner thoughts.","default":true},"handle":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Handle","description":"The handle for this config, in the format provider/model-name."},"temperature":{"type":"number","title":"Temperature","description":"The temperature to use when generating text with the model. A higher temperature will result in more random text.","default":0.7},"max_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Tokens","description":"The maximum number of tokens to generate. If not set, the model will use its default value.","default":4096},"enable_reasoner":{"type":"boolean","title":"Enable Reasoner","description":"Whether or not the model should use extended thinking if it is a 'reasoning' style model","default":false},"max_reasoning_tokens":{"type":"integer","title":"Max Reasoning Tokens","description":"Configurable thinking budget for extended thinking, only used if enable_reasoner is True. Minimum value is 1024.","default":0}},"type":"object","required":["model","model_endpoint_type","context_window"],"title":"LLMConfig","description":"Configuration for a Language Model (LLM) model. This object specifies all the information necessary to access an LLM model to usage with Letta, except for secret keys.\n\nAttributes:\n model (str): The name of the LLM model.\n model_endpoint_type (str): The endpoint type for the model.\n model_endpoint (str): The endpoint for the model.\n model_wrapper (str): The wrapper for the model. This is used to wrap additional text around the input/output of the model. This is useful for text-to-text completions, such as the Completions API in OpenAI.\n context_window (int): The context window size for the model.\n put_inner_thoughts_in_kwargs (bool): Puts `inner_thoughts` as a kwarg in the function call if this is set to True. This helps with function calling performance and also the generation of inner thoughts.\n temperature (float): The temperature to use when generating text with the model. A higher temperature will result in more random text.\n max_tokens (int): The maximum number of tokens to generate."},"LettaRequest":{"properties":{"messages":{"items":{"$ref":"#/components/schemas/MessageCreate"},"type":"array","title":"Messages","description":"The messages to be sent to the agent."},"use_assistant_message":{"type":"boolean","title":"Use Assistant Message","description":"Whether the server should parse specific tool call arguments (default `send_message`) as `AssistantMessage` objects.","default":true},"assistant_message_tool_name":{"type":"string","title":"Assistant Message Tool Name","description":"The name of the designated message tool.","default":"send_message"},"assistant_message_tool_kwarg":{"type":"string","title":"Assistant Message Tool Kwarg","description":"The name of the message argument in the designated message tool.","default":"message"}},"type":"object","required":["messages"],"title":"LettaRequest"},"LettaRequestConfig":{"properties":{"use_assistant_message":{"type":"boolean","title":"Use Assistant Message","description":"Whether the server should parse specific tool call arguments (default `send_message`) as `AssistantMessage` objects.","default":true},"assistant_message_tool_name":{"type":"string","title":"Assistant Message Tool Name","description":"The name of the designated message tool.","default":"send_message"},"assistant_message_tool_kwarg":{"type":"string","title":"Assistant Message Tool Kwarg","description":"The name of the message argument in the designated message tool.","default":"message"}},"type":"object","title":"LettaRequestConfig"},"LettaResponse":{"properties":{"messages":{"items":{"$ref":"#/components/schemas/LettaMessageUnion"},"type":"array","title":"Messages","description":"The messages returned by the agent."},"usage":{"$ref":"#/components/schemas/LettaUsageStatistics","description":"The usage statistics of the agent."}},"type":"object","required":["messages","usage"],"title":"LettaResponse","description":"Response object from an agent interaction, consisting of the new messages generated by the agent and usage statistics.\nThe type of the returned messages can be either `Message` or `LettaMessage`, depending on what was specified in the request.\n\nAttributes:\n messages (List[Union[Message, LettaMessage]]): The messages returned by the agent.\n usage (LettaUsageStatistics): The usage statistics"},"LettaStreamingRequest":{"properties":{"messages":{"items":{"$ref":"#/components/schemas/MessageCreate"},"type":"array","title":"Messages","description":"The messages to be sent to the agent."},"use_assistant_message":{"type":"boolean","title":"Use Assistant Message","description":"Whether the server should parse specific tool call arguments (default `send_message`) as `AssistantMessage` objects.","default":true},"assistant_message_tool_name":{"type":"string","title":"Assistant Message Tool Name","description":"The name of the designated message tool.","default":"send_message"},"assistant_message_tool_kwarg":{"type":"string","title":"Assistant Message Tool Kwarg","description":"The name of the message argument in the designated message tool.","default":"message"},"stream_tokens":{"type":"boolean","title":"Stream Tokens","description":"Flag to determine if individual tokens should be streamed. Set to True for token streaming (requires stream_steps = True).","default":false}},"type":"object","required":["messages"],"title":"LettaStreamingRequest"},"LettaUsageStatistics":{"properties":{"message_type":{"type":"string","const":"usage_statistics","title":"Message Type","default":"usage_statistics"},"completion_tokens":{"type":"integer","title":"Completion Tokens","description":"The number of tokens generated by the agent.","default":0},"prompt_tokens":{"type":"integer","title":"Prompt Tokens","description":"The number of tokens in the prompt.","default":0},"total_tokens":{"type":"integer","title":"Total Tokens","description":"The total number of tokens processed by the agent.","default":0},"step_count":{"type":"integer","title":"Step Count","description":"The number of steps taken by the agent.","default":0},"steps_messages":{"anyOf":[{"items":{"items":{"$ref":"#/components/schemas/Message"},"type":"array"},"type":"array"},{"type":"null"}],"title":"Steps Messages","description":"The messages generated per step"}},"type":"object","title":"LettaUsageStatistics","description":"Usage statistics for the agent interaction.\n\nAttributes:\n completion_tokens (int): The number of tokens generated by the agent.\n prompt_tokens (int): The number of tokens in the prompt.\n total_tokens (int): The total number of tokens processed by the agent.\n step_count (int): The number of steps taken by the agent."},"LocalSandboxConfig":{"properties":{"sandbox_dir":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sandbox Dir","description":"Directory for the sandbox environment."},"use_venv":{"type":"boolean","title":"Use Venv","description":"Whether or not to use the venv, or run directly in the same run loop.","default":false},"venv_name":{"type":"string","title":"Venv Name","description":"The name for the venv in the sandbox directory. We first search for an existing venv with this name, otherwise, we make it from the requirements.txt.","default":"venv"},"pip_requirements":{"items":{"$ref":"#/components/schemas/PipRequirement"},"type":"array","title":"Pip Requirements","description":"List of pip packages to install with mandatory name and optional version following semantic versioning. This only is considered when use_venv is True."}},"type":"object","title":"LocalSandboxConfig"},"MCPServerType":{"type":"string","enum":["sse","stdio"],"title":"MCPServerType"},"MCPTool":{"properties":{"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"inputSchema":{"additionalProperties":true,"type":"object","title":"Inputschema"}},"additionalProperties":true,"type":"object","required":["name","inputSchema"],"title":"MCPTool","description":"A simple wrapper around MCP's tool definition (to avoid conflict with our own)"},"ManagerType":{"type":"string","enum":["round_robin","supervisor","dynamic","swarm"],"title":"ManagerType"},"MaxCountPerStepToolRule":{"properties":{"tool_name":{"type":"string","title":"Tool Name","description":"The name of the tool. Must exist in the database for the user's organization."},"type":{"type":"string","const":"max_count_per_step","title":"Type","default":"max_count_per_step"},"max_count_limit":{"type":"integer","title":"Max Count Limit","description":"The max limit for the total number of times this tool can be invoked in a single step."}},"additionalProperties":false,"type":"object","required":["tool_name","max_count_limit"],"title":"MaxCountPerStepToolRule","description":"Represents a tool rule configuration which constrains the total number of times this tool can be invoked in a single step."},"MaxCountPerStepToolRuleSchema":{"properties":{"tool_name":{"type":"string","title":"Tool Name"},"type":{"type":"string","title":"Type"},"max_count_limit":{"type":"integer","title":"Max Count Limit"}},"type":"object","required":["tool_name","type","max_count_limit"],"title":"MaxCountPerStepToolRuleSchema"},"Memory":{"properties":{"blocks":{"items":{"$ref":"#/components/schemas/Block"},"type":"array","title":"Blocks","description":"Memory blocks contained in the agent's in-context memory"},"prompt_template":{"type":"string","title":"Prompt Template","description":"Jinja2 template for compiling memory blocks into a prompt string","default":"{% for block in blocks %}<{{ block.label }} characters=\"{{ block.value|length }}/{{ block.limit }}\">\n{{ block.value }}\n</{{ block.label }}>{% if not loop.last %}\n{% endif %}{% endfor %}"}},"type":"object","required":["blocks"],"title":"Memory","description":"Represents the in-context memory (i.e. Core memory) of the agent. This includes both the `Block` objects (labelled by sections), as well as tools to edit the blocks."},"Message":{"properties":{"created_by_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created By Id","description":"The id of the user that made this object."},"last_updated_by_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Updated By Id","description":"The id of the user that made this object."},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"The timestamp when the object was created."},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At","description":"The timestamp when the object was last updated."},"id":{"type":"string","pattern":"^message-[a-fA-F0-9]{8}","title":"Id","description":"The human-friendly ID of the Message","examples":["message-123e4567-e89b-12d3-a456-426614174000"]},"role":{"$ref":"#/components/schemas/MessageRole","description":"The role of the participant."},"content":{"anyOf":[{"items":{"oneOf":[{"$ref":"#/components/schemas/TextContent"},{"$ref":"#/components/schemas/ToolCallContent"},{"$ref":"#/components/schemas/ToolReturnContent"},{"$ref":"#/components/schemas/ReasoningContent"},{"$ref":"#/components/schemas/RedactedReasoningContent"},{"$ref":"#/components/schemas/OmittedReasoningContent"}],"discriminator":{"propertyName":"type","mapping":{"omitted_reasoning":"#/components/schemas/OmittedReasoningContent","reasoning":"#/components/schemas/ReasoningContent","redacted_reasoning":"#/components/schemas/RedactedReasoningContent","text":"#/components/schemas/TextContent","tool_call":"#/components/schemas/ToolCallContent","tool_return":"#/components/schemas/ToolReturnContent"}}},"type":"array"},{"type":"null"}],"title":"Content","description":"The content of the message."},"organization_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Organization Id","description":"The unique identifier of the organization."},"agent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Id","description":"The unique identifier of the agent."},"model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model","description":"The model used to make the function call."},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"The name of the participant."},"tool_calls":{"anyOf":[{"items":{"$ref":"#/components/schemas/ChatCompletionMessageToolCall"},"type":"array"},{"type":"null"}],"title":"Tool Calls","description":"The list of tool calls requested."},"tool_call_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tool Call Id","description":"The id of the tool call."},"step_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Step Id","description":"The id of the step that this message was created in."},"otid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Otid","description":"The offline threading id associated with this message"},"tool_returns":{"anyOf":[{"items":{"$ref":"#/components/schemas/ToolReturn"},"type":"array"},{"type":"null"}],"title":"Tool Returns","description":"Tool execution return information for prior tool calls"},"group_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Group Id","description":"The multi-agent group that the message was sent in"}},"additionalProperties":false,"type":"object","required":["role"],"title":"Message","description":"Letta's internal representation of a message. Includes methods to convert to/from LLM provider formats.\n\nAttributes:\n id (str): The unique identifier of the message.\n role (MessageRole): The role of the participant.\n text (str): The text of the message.\n user_id (str): The unique identifier of the user.\n agent_id (str): The unique identifier of the agent.\n model (str): The model used to make the function call.\n name (str): The name of the participant.\n created_at (datetime): The time the message was created.\n tool_calls (List[OpenAIToolCall,]): The list of tool calls requested.\n tool_call_id (str): The id of the tool call."},"MessageCreate":{"properties":{"role":{"type":"string","enum":["user","system"],"title":"Role","description":"The role of the participant."},"content":{"anyOf":[{"items":{"$ref":"#/components/schemas/LettaMessageContentUnion"},"type":"array"},{"type":"string"}],"title":"Content","description":"The content of the message."},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"The name of the participant."}},"type":"object","required":["role","content"],"title":"MessageCreate","description":"Request to create a message"},"MessageRole":{"type":"string","enum":["assistant","user","tool","function","system"],"title":"MessageRole"},"MessageSchema":{"properties":{"created_at":{"type":"string","title":"Created At"},"group_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Group Id"},"model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"role":{"type":"string","title":"Role"},"content":{"items":{"$ref":"#/components/schemas/TextContent"},"type":"array","title":"Content"},"tool_call_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tool Call Id"},"tool_calls":{"items":{},"type":"array","title":"Tool Calls"},"tool_returns":{"items":{},"type":"array","title":"Tool Returns"},"updated_at":{"type":"string","title":"Updated At"}},"type":"object","required":["created_at","group_id","model","name","role","content","tool_call_id","tool_calls","tool_returns","updated_at"],"title":"MessageSchema"},"OmittedReasoningContent":{"properties":{"type":{"type":"string","const":"omitted_reasoning","title":"Type","description":"Indicates this is an omitted reasoning step.","default":"omitted_reasoning"},"tokens":{"type":"integer","title":"Tokens","description":"The reasoning token count for intermediate reasoning content."}},"type":"object","required":["tokens"],"title":"OmittedReasoningContent"},"Organization":{"properties":{"id":{"type":"string","pattern":"^org-[a-fA-F0-9]{8}","title":"Id","description":"The human-friendly ID of the Org","examples":["org-123e4567-e89b-12d3-a456-426614174000"]},"name":{"type":"string","title":"Name","description":"The name of the organization.","default":"SincereYogurt"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At","description":"The creation date of the organization."},"privileged_tools":{"type":"boolean","title":"Privileged Tools","description":"Whether the organization has access to privileged tools.","default":false}},"additionalProperties":false,"type":"object","title":"Organization"},"OrganizationCreate":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"The name of the organization."},"privileged_tools":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Privileged Tools","description":"Whether the organization has access to privileged tools.","default":false}},"additionalProperties":false,"type":"object","title":"OrganizationCreate"},"OrganizationUpdate":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"The name of the organization."},"privileged_tools":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Privileged Tools","description":"Whether the organization has access to privileged tools.","default":false}},"additionalProperties":false,"type":"object","title":"OrganizationUpdate"},"ParameterProperties":{"properties":{"type":{"type":"string","title":"Type"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},"type":"object","required":["type"],"title":"ParameterProperties"},"ParametersSchema":{"properties":{"type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Type","default":"object"},"properties":{"additionalProperties":{"$ref":"#/components/schemas/ParameterProperties"},"type":"object","title":"Properties"},"required":{"items":{"type":"string"},"type":"array","title":"Required"}},"type":"object","required":["properties"],"title":"ParametersSchema"},"Passage":{"properties":{"created_by_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created By Id","description":"The id of the user that made this object."},"last_updated_by_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Updated By Id","description":"The id of the user that made this object."},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"The creation date of the passage."},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At","description":"The timestamp when the object was last updated."},"is_deleted":{"type":"boolean","title":"Is Deleted","description":"Whether this passage is deleted or not.","default":false},"organization_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Organization Id","description":"The unique identifier of the user associated with the passage."},"agent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Id","description":"The unique identifier of the agent associated with the passage."},"source_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Id","description":"The data source of the passage."},"file_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"File Id","description":"The unique identifier of the file associated with the passage."},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata","description":"The metadata of the passage.","default":{}},"id":{"type":"string","pattern":"^passage-[a-fA-F0-9]{8}","title":"Id","description":"The human-friendly ID of the Passage","examples":["passage-123e4567-e89b-12d3-a456-426614174000"]},"text":{"type":"string","title":"Text","description":"The text of the passage."},"embedding":{"anyOf":[{"items":{"type":"number"},"type":"array"},{"type":"null"}],"title":"Embedding","description":"The embedding of the passage."},"embedding_config":{"anyOf":[{"$ref":"#/components/schemas/EmbeddingConfig"},{"type":"null"}],"description":"The embedding configuration used by the passage."}},"additionalProperties":false,"type":"object","required":["text","embedding","embedding_config"],"title":"Passage","description":"Representation of a passage, which is stored in archival memory.\n\nParameters:\n text (str): The text of the passage.\n embedding (List[float]): The embedding of the passage.\n embedding_config (EmbeddingConfig): The embedding configuration used by the passage.\n created_at (datetime): The creation date of the passage.\n user_id (str): The unique identifier of the user associated with the passage.\n agent_id (str): The unique identifier of the agent associated with the passage.\n source_id (str): The data source of the passage.\n file_id (str): The unique identifier of the file associated with the passage."},"PassageUpdate":{"properties":{"created_by_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created By Id","description":"The id of the user that made this object."},"last_updated_by_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Updated By Id","description":"The id of the user that made this object."},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At","description":"The timestamp when the object was created."},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At","description":"The timestamp when the object was last updated."},"is_deleted":{"type":"boolean","title":"Is Deleted","description":"Whether this passage is deleted or not.","default":false},"organization_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Organization Id","description":"The unique identifier of the user associated with the passage."},"agent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Id","description":"The unique identifier of the agent associated with the passage."},"source_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Id","description":"The data source of the passage."},"file_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"File Id","description":"The unique identifier of the file associated with the passage."},"metadata_":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata","description":"The metadata of the passage.","default":{}},"text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Text","description":"The text of the passage."},"embedding":{"anyOf":[{"items":{"type":"number"},"type":"array"},{"type":"null"}],"title":"Embedding","description":"The embedding of the passage."},"embedding_config":{"anyOf":[{"$ref":"#/components/schemas/EmbeddingConfig"},{"type":"null"}],"description":"The embedding configuration used by the passage."},"id":{"type":"string","title":"Id","description":"The unique identifier of the passage."}},"additionalProperties":false,"type":"object","required":["id"],"title":"PassageUpdate"},"PipRequirement":{"properties":{"name":{"type":"string","minLength":1,"title":"Name","description":"Name of the pip package."},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version","description":"Optional version of the package, following semantic versioning."}},"type":"object","required":["name"],"title":"PipRequirement"},"Provider":{"properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id","description":"The id of the provider, lazily created by the database manager."},"name":{"type":"string","title":"Name","description":"The name of the provider"},"api_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Api Key","description":"API key used for requests to the provider."},"organization_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Organization Id","description":"The organization id of the user"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At","description":"The last update timestamp of the provider."}},"additionalProperties":false,"type":"object","required":["name"],"title":"Provider"},"ProviderCreate":{"properties":{"name":{"type":"string","title":"Name","description":"The name of the provider."},"api_key":{"type":"string","title":"Api Key","description":"API key used for requests to the provider."}},"additionalProperties":false,"type":"object","required":["name","api_key"],"title":"ProviderCreate"},"ProviderUpdate":{"properties":{"id":{"type":"string","title":"Id","description":"The id of the provider to update."},"api_key":{"type":"string","title":"Api Key","description":"API key used for requests to the provider."}},"additionalProperties":false,"type":"object","required":["id","api_key"],"title":"ProviderUpdate"},"ReasoningContent":{"properties":{"type":{"type":"string","const":"reasoning","title":"Type","description":"Indicates this is a reasoning/intermediate step.","default":"reasoning"},"is_native":{"type":"boolean","title":"Is Native","description":"Whether the reasoning content was generated by a reasoner model that processed this step."},"reasoning":{"type":"string","title":"Reasoning","description":"The intermediate reasoning or thought process content."},"signature":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Signature","description":"A unique identifier for this reasoning step."}},"type":"object","required":["is_native","reasoning"],"title":"ReasoningContent"},"ReasoningMessage":{"properties":{"id":{"type":"string","title":"Id"},"date":{"type":"string","format":"date-time","title":"Date"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"message_type":{"type":"string","const":"reasoning_message","title":"Message Type","default":"reasoning_message"},"source":{"type":"string","enum":["reasoner_model","non_reasoner_model"],"title":"Source","default":"non_reasoner_model"},"reasoning":{"type":"string","title":"Reasoning"},"signature":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Signature"}},"type":"object","required":["id","date","reasoning"],"title":"ReasoningMessage","description":"Representation of an agent's internal reasoning.\n\nArgs:\n id (str): The ID of the message\n date (datetime): The date the message was created in ISO format\n name (Optional[str]): The name of the sender of the message\n source (Literal[\"reasoner_model\", \"non_reasoner_model\"]): Whether the reasoning\n content was generated natively by a reasoner model or derived via prompting\n reasoning (str): The internal reasoning of the agent\n signature (Optional[str]): The model-generated signature of the reasoning step"},"RedactedReasoningContent":{"properties":{"type":{"type":"string","const":"redacted_reasoning","title":"Type","description":"Indicates this is a redacted thinking step.","default":"redacted_reasoning"},"data":{"type":"string","title":"Data","description":"The redacted or filtered intermediate reasoning content."}},"type":"object","required":["data"],"title":"RedactedReasoningContent"},"ResponseFormatJSONObject":{"properties":{"type":{"type":"string","const":"json_object","title":"Type"}},"type":"object","required":["type"],"title":"ResponseFormatJSONObject"},"ResponseFormatJSONSchema":{"properties":{"json_schema":{"$ref":"#/components/schemas/JSONSchema"},"type":{"type":"string","const":"json_schema","title":"Type"}},"type":"object","required":["json_schema","type"],"title":"ResponseFormatJSONSchema"},"ResponseFormatText":{"properties":{"type":{"type":"string","const":"text","title":"Type"}},"type":"object","required":["type"],"title":"ResponseFormatText"},"RoundRobinManager":{"properties":{"manager_type":{"type":"string","const":"round_robin","title":"Manager Type","description":"","default":"round_robin"},"max_turns":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Turns","description":""}},"type":"object","title":"RoundRobinManager"},"Run":{"properties":{"created_by_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created By Id","description":"The id of the user that made this object."},"last_updated_by_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Updated By Id","description":"The id of the user that made this object."},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At","description":"The timestamp when the object was created."},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At","description":"The timestamp when the object was last updated."},"status":{"$ref":"#/components/schemas/JobStatus","description":"The status of the job.","default":"created"},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed At","description":"The unix timestamp of when the job was completed."},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata","description":"The metadata of the job."},"job_type":{"$ref":"#/components/schemas/JobType","default":"run"},"id":{"type":"string","pattern":"^(job|run)-[a-fA-F0-9]{8}","title":"Id","description":"The human-friendly ID of the Run","examples":["run-123e4567-e89b-12d3-a456-426614174000"]},"user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id","description":"The unique identifier of the user associated with the run."},"request_config":{"anyOf":[{"$ref":"#/components/schemas/LettaRequestConfig"},{"type":"null"}],"description":"The request configuration for the run."}},"additionalProperties":false,"type":"object","title":"Run","description":"Representation of a run, which is a job with a 'run' prefix in its ID.\nInherits all fields and behavior from Job except for the ID prefix.\n\nParameters:\n id (str): The unique identifier of the run (prefixed with 'run-').\n status (JobStatus): The status of the run.\n created_at (datetime): The unix timestamp of when the run was created.\n completed_at (datetime): The unix timestamp of when the run was completed.\n user_id (str): The unique identifier of the user associated with the run."},"SSEServerConfig":{"properties":{"server_name":{"type":"string","title":"Server Name","description":"The name of the server"},"type":{"$ref":"#/components/schemas/MCPServerType","default":"sse"},"server_url":{"type":"string","title":"Server Url","description":"The URL of the server (MCP SSE client will connect to this URL)"}},"type":"object","required":["server_name","server_url"],"title":"SSEServerConfig"},"SandboxConfig":{"properties":{"created_by_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created By Id","description":"The id of the user that made this object."},"last_updated_by_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Updated By Id","description":"The id of the user that made this object."},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At","description":"The timestamp when the object was created."},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At","description":"The timestamp when the object was last updated."},"id":{"type":"string","pattern":"^sandbox-[a-fA-F0-9]{8}","title":"Id","description":"The human-friendly ID of the Sandbox","examples":["sandbox-123e4567-e89b-12d3-a456-426614174000"]},"type":{"$ref":"#/components/schemas/SandboxType","description":"The type of sandbox."},"organization_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Organization Id","description":"The unique identifier of the organization associated with the sandbox."},"config":{"additionalProperties":true,"type":"object","title":"Config","description":"The JSON sandbox settings data."}},"additionalProperties":false,"type":"object","title":"SandboxConfig"},"SandboxConfigCreate":{"properties":{"config":{"anyOf":[{"$ref":"#/components/schemas/LocalSandboxConfig"},{"$ref":"#/components/schemas/E2BSandboxConfig"}],"title":"Config","description":"The configuration for the sandbox."}},"additionalProperties":false,"type":"object","required":["config"],"title":"SandboxConfigCreate"},"SandboxConfigUpdate":{"properties":{"config":{"anyOf":[{"$ref":"#/components/schemas/LocalSandboxConfig"},{"$ref":"#/components/schemas/E2BSandboxConfig"}],"title":"Config","description":"The JSON configuration data for the sandbox."}},"additionalProperties":false,"type":"object","title":"SandboxConfigUpdate","description":"Pydantic model for updating SandboxConfig fields."},"SandboxEnvironmentVariable":{"properties":{"created_by_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created By Id","description":"The id of the user that made this object."},"last_updated_by_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Updated By Id","description":"The id of the user that made this object."},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At","description":"The timestamp when the object was created."},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At","description":"The timestamp when the object was last updated."},"id":{"type":"string","pattern":"^sandbox-env-[a-fA-F0-9]{8}","title":"Id","description":"The human-friendly ID of the Sandbox-env","examples":["sandbox-env-123e4567-e89b-12d3-a456-426614174000"]},"key":{"type":"string","title":"Key","description":"The name of the environment variable."},"value":{"type":"string","title":"Value","description":"The value of the environment variable."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"An optional description of the environment variable."},"organization_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Organization Id","description":"The ID of the organization this environment variable belongs to."},"sandbox_config_id":{"type":"string","title":"Sandbox Config Id","description":"The ID of the sandbox config this environment variable belongs to."}},"additionalProperties":false,"type":"object","required":["key","value","sandbox_config_id"],"title":"SandboxEnvironmentVariable"},"SandboxEnvironmentVariableCreate":{"properties":{"key":{"type":"string","title":"Key","description":"The name of the environment variable."},"value":{"type":"string","title":"Value","description":"The value of the environment variable."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"An optional description of the environment variable."}},"additionalProperties":false,"type":"object","required":["key","value"],"title":"SandboxEnvironmentVariableCreate"},"SandboxEnvironmentVariableUpdate":{"properties":{"key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Key","description":"The name of the environment variable."},"value":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Value","description":"The value of the environment variable."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"An optional description of the environment variable."}},"additionalProperties":false,"type":"object","title":"SandboxEnvironmentVariableUpdate"},"SandboxType":{"type":"string","enum":["e2b","local"],"title":"SandboxType"},"Source":{"properties":{"id":{"type":"string","pattern":"^source-[a-fA-F0-9]{8}","title":"Id","description":"The human-friendly ID of the Source","examples":["source-123e4567-e89b-12d3-a456-426614174000"]},"name":{"type":"string","title":"Name","description":"The name of the source."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"The description of the source."},"embedding_config":{"$ref":"#/components/schemas/EmbeddingConfig","description":"The embedding configuration used by the source."},"organization_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Organization Id","description":"The ID of the organization that created the source."},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata","description":"Metadata associated with the source."},"created_by_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created By Id","description":"The id of the user that made this Tool."},"last_updated_by_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Updated By Id","description":"The id of the user that made this Tool."},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At","description":"The timestamp when the source was created."},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At","description":"The timestamp when the source was last updated."}},"additionalProperties":false,"type":"object","required":["name","embedding_config"],"title":"Source","description":"Representation of a source, which is a collection of files and passages.\n\nParameters:\n id (str): The ID of the source\n name (str): The name of the source.\n embedding_config (EmbeddingConfig): The embedding configuration used by the source.\n user_id (str): The ID of the user that created the source.\n metadata (dict): Metadata associated with the source.\n description (str): The description of the source."},"SourceCreate":{"properties":{"name":{"type":"string","title":"Name","description":"The name of the source."},"embedding":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Embedding","description":"The hande for the embedding config used by the source."},"embedding_chunk_size":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Embedding Chunk Size","description":"The chunk size of the embedding."},"embedding_config":{"anyOf":[{"$ref":"#/components/schemas/EmbeddingConfig"},{"type":"null"}],"description":"(Legacy) The embedding configuration used by the source."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"The description of the source."},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata","description":"Metadata associated with the source."}},"additionalProperties":false,"type":"object","required":["name"],"title":"SourceCreate","description":"Schema for creating a new Source."},"SourceUpdate":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"The name of the source."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"The description of the source."},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata","description":"Metadata associated with the source."},"embedding_config":{"anyOf":[{"$ref":"#/components/schemas/EmbeddingConfig"},{"type":"null"}],"description":"The embedding configuration used by the source."}},"additionalProperties":false,"type":"object","title":"SourceUpdate","description":"Schema for updating an existing Source."},"StdioServerConfig":{"properties":{"server_name":{"type":"string","title":"Server Name","description":"The name of the server"},"type":{"$ref":"#/components/schemas/MCPServerType","default":"stdio"},"command":{"type":"string","title":"Command","description":"The command to run (MCP 'local' client will run this command)"},"args":{"items":{"type":"string"},"type":"array","title":"Args","description":"The arguments to pass to the command"},"env":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Env","description":"Environment variables to set"}},"type":"object","required":["server_name","command","args"],"title":"StdioServerConfig"},"Step":{"properties":{"id":{"type":"string","title":"Id","description":"The id of the step. Assigned by the database."},"origin":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Origin","description":"The surface that this agent step was initiated from."},"organization_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Organization Id","description":"The unique identifier of the organization associated with the step."},"provider_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provider Id","description":"The unique identifier of the provider that was configured for this step"},"job_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Job Id","description":"The unique identifier of the job that this step belongs to. Only included for async calls."},"agent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Id","description":"The ID of the agent that performed the step."},"provider_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provider Name","description":"The name of the provider used for this step."},"model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model","description":"The name of the model used for this step."},"model_endpoint":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model Endpoint","description":"The model endpoint url used for this step."},"context_window_limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Context Window Limit","description":"The context window limit configured for this step."},"completion_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Completion Tokens","description":"The number of tokens generated by the agent during this step."},"prompt_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Prompt Tokens","description":"The number of tokens in the prompt during this step."},"total_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Tokens","description":"The total number of tokens processed by the agent during this step."},"completion_tokens_details":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Completion Tokens Details","description":"Metadata for the agent."},"tags":{"items":{"type":"string"},"type":"array","title":"Tags","description":"Metadata tags.","default":[]},"tid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tid","description":"The unique identifier of the transaction that processed this step."},"trace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trace Id","description":"The trace id of the agent step."},"messages":{"items":{"$ref":"#/components/schemas/Message"},"type":"array","title":"Messages","description":"The messages generated during this step.","default":[]}},"additionalProperties":false,"type":"object","required":["id"],"title":"Step"},"SupervisorManager":{"properties":{"manager_type":{"type":"string","const":"supervisor","title":"Manager Type","description":"","default":"supervisor"},"manager_agent_id":{"type":"string","title":"Manager Agent Id","description":""}},"type":"object","required":["manager_agent_id"],"title":"SupervisorManager"},"SystemMessage":{"properties":{"id":{"type":"string","title":"Id"},"date":{"type":"string","format":"date-time","title":"Date"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"message_type":{"type":"string","const":"system_message","title":"Message Type","default":"system_message"},"content":{"type":"string","title":"Content","description":"The message content sent by the system"}},"type":"object","required":["id","date","content"],"title":"SystemMessage","description":"A message generated by the system. Never streamed back on a response, only used for cursor pagination.\n\nArgs:\n id (str): The ID of the message\n date (datetime): The date the message was created in ISO format\n name (Optional[str]): The name of the sender of the message\n content (str): The message content sent by the system"},"TagSchema":{"properties":{"tag":{"type":"string","title":"Tag"}},"type":"object","required":["tag"],"title":"TagSchema"},"TerminalToolRule":{"properties":{"tool_name":{"type":"string","title":"Tool Name","description":"The name of the tool. Must exist in the database for the user's organization."},"type":{"type":"string","const":"exit_loop","title":"Type","default":"exit_loop"}},"additionalProperties":false,"type":"object","required":["tool_name"],"title":"TerminalToolRule","description":"Represents a terminal tool rule configuration where if this tool gets called, it must end the agent loop."},"TextContent":{"properties":{"type":{"type":"string","const":"text","title":"Type","description":"The type of the message.","default":"text"},"text":{"type":"string","title":"Text","description":"The text content of the message."}},"type":"object","required":["text"],"title":"TextContent"},"Tool":{"properties":{"id":{"type":"string","pattern":"^tool-[a-fA-F0-9]{8}","title":"Id","description":"The human-friendly ID of the Tool","examples":["tool-123e4567-e89b-12d3-a456-426614174000"]},"tool_type":{"$ref":"#/components/schemas/ToolType","description":"The type of the tool.","default":"custom"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"The description of the tool."},"source_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Type","description":"The type of the source code."},"organization_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Organization Id","description":"The unique identifier of the organization associated with the tool."},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"The name of the function."},"tags":{"items":{"type":"string"},"type":"array","title":"Tags","description":"Metadata tags.","default":[]},"source_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Code","description":"The source code of the function."},"json_schema":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Json Schema","description":"The JSON schema of the function."},"args_json_schema":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Args Json Schema","description":"The args JSON schema of the function."},"return_char_limit":{"type":"integer","title":"Return Char Limit","description":"The maximum number of characters in the response.","default":6000},"created_by_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created By Id","description":"The id of the user that made this Tool."},"last_updated_by_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Updated By Id","description":"The id of the user that made this Tool."},"metadata_":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata","description":"A dictionary of additional metadata for the tool."}},"additionalProperties":false,"type":"object","title":"Tool","description":"Representation of a tool, which is a function that can be called by the agent.\n\nParameters:\n id (str): The unique identifier of the tool.\n name (str): The name of the function.\n tags (List[str]): Metadata tags.\n source_code (str): The source code of the function.\n json_schema (Dict): The JSON schema of the function."},"ToolCall":{"properties":{"name":{"type":"string","title":"Name"},"arguments":{"type":"string","title":"Arguments"},"tool_call_id":{"type":"string","title":"Tool Call Id"}},"type":"object","required":["name","arguments","tool_call_id"],"title":"ToolCall"},"ToolCallContent":{"properties":{"type":{"type":"string","const":"tool_call","title":"Type","description":"Indicates this content represents a tool call event.","default":"tool_call"},"id":{"type":"string","title":"Id","description":"A unique identifier for this specific tool call instance."},"name":{"type":"string","title":"Name","description":"The name of the tool being called."},"input":{"additionalProperties":true,"type":"object","title":"Input","description":"The parameters being passed to the tool, structured as a dictionary of parameter names to values."}},"type":"object","required":["id","name","input"],"title":"ToolCallContent"},"ToolCallDelta":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"arguments":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Arguments"},"tool_call_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tool Call Id"}},"type":"object","required":["name","arguments","tool_call_id"],"title":"ToolCallDelta"},"ToolCallMessage":{"properties":{"id":{"type":"string","title":"Id"},"date":{"type":"string","format":"date-time","title":"Date"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"message_type":{"type":"string","const":"tool_call_message","title":"Message Type","default":"tool_call_message"},"tool_call":{"anyOf":[{"$ref":"#/components/schemas/ToolCall"},{"$ref":"#/components/schemas/ToolCallDelta"}],"title":"Tool Call"}},"type":"object","required":["id","date","tool_call"],"title":"ToolCallMessage","description":"A message representing a request to call a tool (generated by the LLM to trigger tool execution).\n\nArgs:\n id (str): The ID of the message\n date (datetime): The date the message was created in ISO format\n name (Optional[str]): The name of the sender of the message\n tool_call (Union[ToolCall, ToolCallDelta]): The tool call"},"ToolCreate":{"properties":{"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"The description of the tool."},"tags":{"items":{"type":"string"},"type":"array","title":"Tags","description":"Metadata tags.","default":[]},"source_code":{"type":"string","title":"Source Code","description":"The source code of the function."},"source_type":{"type":"string","title":"Source Type","description":"The source type of the function.","default":"python"},"json_schema":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Json Schema","description":"The JSON schema of the function (auto-generated from source_code if not provided)"},"args_json_schema":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Args Json Schema","description":"The args JSON schema of the function."},"return_char_limit":{"type":"integer","title":"Return Char Limit","description":"The maximum number of characters in the response.","default":6000}},"additionalProperties":false,"type":"object","required":["source_code"],"title":"ToolCreate"},"ToolEnvVarSchema":{"properties":{"created_at":{"type":"string","title":"Created At"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"key":{"type":"string","title":"Key"},"updated_at":{"type":"string","title":"Updated At"},"value":{"type":"string","title":"Value"}},"type":"object","required":["created_at","description","key","updated_at","value"],"title":"ToolEnvVarSchema"},"ToolJSONSchema":{"properties":{"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"parameters":{"$ref":"#/components/schemas/ParametersSchema"},"type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Type"},"required":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Required"}},"type":"object","required":["name","description","parameters"],"title":"ToolJSONSchema"},"ToolReturn":{"properties":{"status":{"type":"string","enum":["success","error"],"title":"Status","description":"The status of the tool call"},"stdout":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Stdout","description":"Captured stdout (e.g. prints, logs) from the tool invocation"},"stderr":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Stderr","description":"Captured stderr from the tool invocation"}},"type":"object","required":["status"],"title":"ToolReturn"},"ToolReturnContent":{"properties":{"type":{"type":"string","const":"tool_return","title":"Type","description":"Indicates this content represents a tool return event.","default":"tool_return"},"tool_call_id":{"type":"string","title":"Tool Call Id","description":"References the ID of the ToolCallContent that initiated this tool call."},"content":{"type":"string","title":"Content","description":"The content returned by the tool execution."},"is_error":{"type":"boolean","title":"Is Error","description":"Indicates whether the tool execution resulted in an error."}},"type":"object","required":["tool_call_id","content","is_error"],"title":"ToolReturnContent"},"ToolReturnMessage":{"properties":{"id":{"type":"string","title":"Id"},"date":{"type":"string","format":"date-time","title":"Date"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"message_type":{"type":"string","const":"tool_return_message","title":"Message Type","default":"tool_return_message"},"tool_return":{"type":"string","title":"Tool Return"},"status":{"type":"string","enum":["success","error"],"title":"Status"},"tool_call_id":{"type":"string","title":"Tool Call Id"},"stdout":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Stdout"},"stderr":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Stderr"}},"type":"object","required":["id","date","tool_return","status","tool_call_id"],"title":"ToolReturnMessage","description":"A message representing the return value of a tool call (generated by Letta executing the requested tool).\n\nArgs:\n id (str): The ID of the message\n date (datetime): The date the message was created in ISO format\n name (Optional[str]): The name of the sender of the message\n tool_return (str): The return value of the tool\n status (Literal[\"success\", \"error\"]): The status of the tool call\n tool_call_id (str): A unique identifier for the tool call that generated this message\n stdout (Optional[List(str)]): Captured stdout (e.g. prints, logs) from the tool invocation\n stderr (Optional[List(str)]): Captured stderr from the tool invocation"},"ToolRunFromSource":{"properties":{"source_code":{"type":"string","title":"Source Code","description":"The source code of the function."},"args":{"additionalProperties":true,"type":"object","title":"Args","description":"The arguments to pass to the tool."},"env_vars":{"additionalProperties":{"type":"string"},"type":"object","title":"Env Vars","description":"The environment variables to pass to the tool."},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"The name of the tool to run."},"source_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Type","description":"The type of the source code."},"args_json_schema":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Args Json Schema","description":"The args JSON schema of the function."},"json_schema":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Json Schema","description":"The JSON schema of the function (auto-generated from source_code if not provided)"}},"additionalProperties":false,"type":"object","required":["source_code","args"],"title":"ToolRunFromSource"},"ToolSchema":{"properties":{"args_json_schema":{"anyOf":[{},{"type":"null"}],"title":"Args Json Schema"},"created_at":{"type":"string","title":"Created At"},"description":{"type":"string","title":"Description"},"json_schema":{"$ref":"#/components/schemas/ToolJSONSchema"},"name":{"type":"string","title":"Name"},"return_char_limit":{"type":"integer","title":"Return Char Limit"},"source_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Code"},"source_type":{"type":"string","title":"Source Type"},"tags":{"items":{"type":"string"},"type":"array","title":"Tags"},"tool_type":{"type":"string","title":"Tool Type"},"updated_at":{"type":"string","title":"Updated At"},"metadata_":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata"}},"type":"object","required":["args_json_schema","created_at","description","json_schema","name","return_char_limit","source_code","source_type","tags","tool_type","updated_at"],"title":"ToolSchema"},"ToolType":{"type":"string","enum":["custom","letta_core","letta_memory_core","letta_multi_agent_core","external_composio","external_langchain","external_mcp"],"title":"ToolType"},"ToolUpdate":{"properties":{"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"The description of the tool."},"tags":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Tags","description":"Metadata tags."},"source_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Code","description":"The source code of the function."},"source_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Type","description":"The type of the source code."},"json_schema":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Json Schema","description":"The JSON schema of the function (auto-generated from source_code if not provided)"},"args_json_schema":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Args Json Schema","description":"The args JSON schema of the function."},"return_char_limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Return Char Limit","description":"The maximum number of characters in the response."}},"type":"object","title":"ToolUpdate"},"UpdateAgent":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"The name of the agent."},"tool_ids":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Tool Ids","description":"The ids of the tools used by the agent."},"source_ids":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Source Ids","description":"The ids of the sources used by the agent."},"block_ids":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Block Ids","description":"The ids of the blocks used by the agent."},"tags":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Tags","description":"The tags associated with the agent."},"system":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"System","description":"The system prompt used by the agent."},"tool_rules":{"anyOf":[{"items":{"oneOf":[{"$ref":"#/components/schemas/ChildToolRule"},{"$ref":"#/components/schemas/InitToolRule"},{"$ref":"#/components/schemas/TerminalToolRule"},{"$ref":"#/components/schemas/ConditionalToolRule"},{"$ref":"#/components/schemas/ContinueToolRule"},{"$ref":"#/components/schemas/MaxCountPerStepToolRule"}],"discriminator":{"propertyName":"type","mapping":{"conditional":"#/components/schemas/ConditionalToolRule","constrain_child_tools":"#/components/schemas/ChildToolRule","continue_loop":"#/components/schemas/ContinueToolRule","exit_loop":"#/components/schemas/TerminalToolRule","max_count_per_step":"#/components/schemas/MaxCountPerStepToolRule","run_first":"#/components/schemas/InitToolRule"}}},"type":"array"},{"type":"null"}],"title":"Tool Rules","description":"The tool rules governing the agent."},"llm_config":{"anyOf":[{"$ref":"#/components/schemas/LLMConfig"},{"type":"null"}],"description":"The LLM configuration used by the agent."},"embedding_config":{"anyOf":[{"$ref":"#/components/schemas/EmbeddingConfig"},{"type":"null"}],"description":"The embedding configuration used by the agent."},"message_ids":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Message Ids","description":"The ids of the messages in the agent's in-context memory."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"The description of the agent."},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata","description":"The metadata of the agent."},"tool_exec_environment_variables":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Tool Exec Environment Variables","description":"The environment variables for tool execution specific to this agent."},"project_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Project Id","description":"The id of the project the agent belongs to."},"template_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Template Id","description":"The id of the template the agent belongs to."},"base_template_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Base Template Id","description":"The base template id of the agent."},"identity_ids":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Identity Ids","description":"The ids of the identities associated with this agent."},"message_buffer_autoclear":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Message Buffer Autoclear","description":"If set to True, the agent will not remember previous messages (though the agent will still retain state via core memory blocks and archival/recall memory). Not recommended unless you have an advanced use case."},"model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model","description":"The LLM configuration handle used by the agent, specified in the format provider/model-name, as an alternative to specifying llm_config."},"embedding":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Embedding","description":"The embedding configuration handle used by the agent, specified in the format provider/model-name."}},"type":"object","title":"UpdateAgent"},"UpdateAssistantMessage":{"properties":{"message_type":{"type":"string","const":"assistant_message","title":"Message Type","default":"assistant_message"},"content":{"anyOf":[{"items":{"$ref":"#/components/schemas/LettaAssistantMessageContentUnion"},"type":"array"},{"type":"string"}],"title":"Content","description":"The message content sent by the assistant (can be a string or an array of content parts)"}},"type":"object","required":["content"],"title":"UpdateAssistantMessage"},"UpdateReasoningMessage":{"properties":{"reasoning":{"type":"string","title":"Reasoning"},"message_type":{"type":"string","const":"reasoning_message","title":"Message Type","default":"reasoning_message"}},"type":"object","required":["reasoning"],"title":"UpdateReasoningMessage"},"UpdateSystemMessage":{"properties":{"message_type":{"type":"string","const":"system_message","title":"Message Type","default":"system_message"},"content":{"type":"string","title":"Content","description":"The message content sent by the system (can be a string or an array of multi-modal content parts)"}},"type":"object","required":["content"],"title":"UpdateSystemMessage"},"UpdateUserMessage":{"properties":{"message_type":{"type":"string","const":"user_message","title":"Message Type","default":"user_message"},"content":{"anyOf":[{"items":{"$ref":"#/components/schemas/LettaUserMessageContentUnion"},"type":"array"},{"type":"string"}],"title":"Content","description":"The message content sent by the user (can be a string or an array of multi-modal content parts)"}},"type":"object","required":["content"],"title":"UpdateUserMessage"},"UsageStatistics":{"properties":{"completion_tokens":{"type":"integer","title":"Completion Tokens","default":0},"prompt_tokens":{"type":"integer","title":"Prompt Tokens","default":0},"total_tokens":{"type":"integer","title":"Total Tokens","default":0}},"type":"object","title":"UsageStatistics"},"User":{"properties":{"id":{"type":"string","pattern":"^user-[a-fA-F0-9]{8}","title":"Id","description":"The human-friendly ID of the User","examples":["user-123e4567-e89b-12d3-a456-426614174000"]},"organization_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Organization Id","description":"The organization id of the user","default":"org-00000000-0000-4000-8000-000000000000"},"name":{"type":"string","title":"Name","description":"The name of the user."},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At","description":"The creation date of the user."},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At","description":"The update date of the user."},"is_deleted":{"type":"boolean","title":"Is Deleted","description":"Whether this user is deleted or not.","default":false}},"additionalProperties":false,"type":"object","required":["name"],"title":"User","description":"Representation of a user.\n\nParameters:\n id (str): The unique identifier of the user.\n name (str): The name of the user.\n created_at (datetime): The creation date of the user."},"UserCreate":{"properties":{"name":{"type":"string","title":"Name","description":"The name of the user."},"organization_id":{"type":"string","title":"Organization Id","description":"The organization id of the user."}},"additionalProperties":false,"type":"object","required":["name","organization_id"],"title":"UserCreate"},"UserMessage":{"properties":{"id":{"type":"string","title":"Id"},"date":{"type":"string","format":"date-time","title":"Date"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"message_type":{"type":"string","const":"user_message","title":"Message Type","default":"user_message"},"content":{"anyOf":[{"items":{"$ref":"#/components/schemas/LettaUserMessageContentUnion"},"type":"array"},{"type":"string"}],"title":"Content","description":"The message content sent by the user (can be a string or an array of multi-modal content parts)"}},"type":"object","required":["id","date","content"],"title":"UserMessage","description":"A message sent by the user. Never streamed back on a response, only used for cursor pagination.\n\nArgs:\n id (str): The ID of the message\n date (datetime): The date the message was created in ISO format\n name (Optional[str]): The name of the sender of the message\n content (Union[str, List[LettaUserMessageContentUnion]]): The message content sent by the user (can be a string or an array of multi-modal content parts)"},"UserUpdate":{"properties":{"id":{"type":"string","title":"Id","description":"The id of the user to update."},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"The new name of the user."},"organization_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Organization Id","description":"The new organization id of the user."}},"additionalProperties":false,"type":"object","required":["id"],"title":"UserUpdate"},"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"},"WebSearchOptions":{"properties":{"search_context_size":{"type":"string","enum":["low","medium","high"],"title":"Search Context Size"},"user_location":{"anyOf":[{"$ref":"#/components/schemas/WebSearchOptionsUserLocation"},{"type":"null"}]}},"type":"object","title":"WebSearchOptions"},"WebSearchOptionsUserLocation":{"properties":{"approximate":{"$ref":"#/components/schemas/WebSearchOptionsUserLocationApproximate"},"type":{"type":"string","const":"approximate","title":"Type"}},"type":"object","required":["approximate","type"],"title":"WebSearchOptionsUserLocation"},"WebSearchOptionsUserLocationApproximate":{"properties":{"city":{"type":"string","title":"City"},"country":{"type":"string","title":"Country"},"region":{"type":"string","title":"Region"},"timezone":{"type":"string","title":"Timezone"}},"type":"object","title":"WebSearchOptionsUserLocationApproximate"},"openai__types__chat__chat_completion_message_tool_call_param__Function":{"properties":{"arguments":{"type":"string","title":"Arguments"},"name":{"type":"string","title":"Name"}},"type":"object","required":["arguments","name"],"title":"Function"},"openai__types__chat__chat_completion_named_tool_choice_param__Function":{"properties":{"name":{"type":"string","title":"Name"}},"type":"object","required":["name"],"title":"Function"},"openai__types__chat__completion_create_params__Function":{"properties":{"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"parameters":{"additionalProperties":true,"type":"object","title":"Parameters"}},"type":"object","required":["name"],"title":"Function"}}}}

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/oculairmedia/Letta-MCP-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server