openapi: 3.1.0 info: title: Letta Admin Agents API version: 1.0.0 description: REST API for Letta, the stateful agents platform. Manage agents, memory blocks, archival passages, sources, custom tools, MCP servers, multi-agent groups, runs, and streaming responses. Available as Letta Cloud (managed) at https://api.letta.com/v1 and as the self-hosted open-source server (Apache-2.0) typically run at http://localhost:8283. contact: name: Letta url: https://www.letta.com/ email: support@letta.com license: name: Apache-2.0 url: https://github.com/letta-ai/letta/blob/main/LICENSE x-logo: url: https://www.letta.com/favicon.ico servers: - url: https://api.letta.com description: Letta Cloud (managed) - url: https://app.letta.com description: Letta Cloud (app) - url: http://localhost:8283 description: Self-hosted Letta server security: - bearerAuth: [] tags: - name: Agents description: Create, list, modify, export, and delete stateful agents with memory and tools. paths: /v1/agents/: get: tags: - Agents summary: List Agents description: Get a list of all agents. 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 - this will default to your default project on cloud title: Project Id description: Search agents by project ID - this will default to your default project on cloud - 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.This is a legacy parameter, and no longer supported after 1.0.0 SDK versions. deprecated: true 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.This is a legacy parameter, and no longer supported after 1.0.0 SDK versions. deprecated: true - name: include in: query required: false schema: type: array items: enum: - agent.blocks - agent.identities - agent.managed_group - agent.pending_approval - agent.secrets - agent.sources - agent.tags - agent.tools type: string description: Specify which relational fields to include in the response. No relationships are included by default. default: [] title: Include description: Specify which relational fields to include in the response. No relationships are included by default. - name: order in: query required: false schema: enum: - asc - desc type: string description: Sort order for agents by creation time. 'asc' for oldest first, 'desc' for newest first default: desc title: Order description: Sort order for agents by creation time. 'asc' for oldest first, 'desc' for newest first - name: order_by in: query required: false schema: enum: - created_at - updated_at - last_run_completion type: string description: Field to sort by default: created_at title: Order By description: Field to sort by - name: ascending in: query required: false schema: type: boolean description: Whether to sort agents oldest to newest (True) or newest to oldest (False, default) deprecated: true default: false title: Ascending description: Whether to sort agents oldest to newest (True) or newest to oldest (False, default) deprecated: true - name: sort_by in: query required: false schema: anyOf: - type: string - type: 'null' description: 'Field to sort by. Options: ''created_at'' (default), ''last_run_completion''' deprecated: true default: created_at title: Sort By description: 'Field to sort by. Options: ''created_at'' (default), ''last_run_completion''' deprecated: true - name: last_stop_reason in: query required: false schema: anyOf: - $ref: '#/components/schemas/StopReasonType' - type: 'null' description: Filter agents by their last stop reason. title: Last Stop Reason description: Filter agents by their last stop reason. - name: created_by_id in: query required: false schema: anyOf: - type: string - type: 'null' description: Filter agents by the user who created them. title: Created By Id description: Filter agents by the user who created them. 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 an agent. operationId: create_agent parameters: - name: X-Project in: header required: false schema: anyOf: - type: string - type: 'null' description: The project slug to associate with the agent (cloud only). title: X-Project description: The project slug to associate with the agent (cloud only). 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/count: get: tags: - Agents summary: Count Agents description: 'Get the total number of agents with optional filtering. Supports the same filters as list_agents for consistent querying.' operationId: count_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 counts agents that match ALL given tags. Otherwise, counts agents that have ANY of the passed-in tags. default: false title: Match All Tags description: If True, only counts agents that match ALL given tags. Otherwise, counts agents that have ANY of the passed-in tags. - 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 - this will default to your default project on cloud title: Project Id description: Search agents by project ID - this will default to your default project on cloud - 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: last_stop_reason in: query required: false schema: anyOf: - $ref: '#/components/schemas/StopReasonType' - type: 'null' description: Filter agents by their last stop reason. title: Last Stop Reason description: Filter agents by their last stop reason. - name: created_by_id in: query required: false schema: anyOf: - type: string - type: 'null' description: Filter agents by the user who created them. title: Created By Id description: Filter agents by the user who created them. responses: '200': description: Successful Response content: application/json: schema: type: integer title: Response Count Agents '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /v1/agents/{agent_id}/export: get: tags: - Agents summary: Export Agent description: Export the serialized JSON representation of an agent, formatted with indentation. operationId: export_agent parameters: - name: agent_id in: path required: true schema: type: string title: Agent Id - name: max_steps in: query required: false schema: type: integer deprecated: true default: 100 title: Max Steps deprecated: true - name: use_legacy_format in: query required: false schema: type: boolean description: If True, exports using the legacy single-agent 'v1' format with inline tools/blocks. If False, exports using the new multi-entity 'v2' format, with separate agents, tools, blocks, files, etc. deprecated: true default: false title: Use Legacy Format description: If True, exports using the legacy single-agent 'v1' format with inline tools/blocks. If False, exports using the new multi-entity 'v2' format, with separate agents, tools, blocks, files, etc. deprecated: true - name: conversation_id in: query required: false schema: anyOf: - type: string - type: 'null' description: Conversation ID to export. If provided, uses messages from this conversation instead of the agent's global message history. title: Conversation Id description: Conversation ID to export. If provided, uses messages from this conversation instead of the agent's global message history. - name: scrub_messages in: query required: false schema: type: boolean description: If True, excludes all messages from the export. Useful for sharing agent configs without conversation history. default: false title: Scrub Messages description: If True, excludes all messages from the export. Useful for sharing agent configs without conversation history. requestBody: content: application/json: schema: $ref: '#/components/schemas/Body_export_agent' responses: '200': description: Successful Response content: application/json: schema: type: string '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' post: tags: - Agents summary: Export Agent with Skills description: 'Export the serialized JSON representation of an agent with optional skills. This POST endpoint allows including skills in the export by providing them in the request body. Skills are resolved client-side and passed as SkillSchema objects containing the skill files.' operationId: export_agent_with_skills parameters: - name: agent_id in: path required: true schema: type: string title: Agent Id requestBody: content: application/json: schema: anyOf: - $ref: '#/components/schemas/ExportAgentRequest' - type: 'null' title: Request responses: '200': description: Successful Response content: application/json: schema: type: string '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /v1/agents/import: post: tags: - Agents summary: Import Agent description: 'Import a serialized agent file and recreate the agent(s) in the system. Returns the IDs of all imported agents.' operationId: import_agent parameters: - name: x-override-embedding-model in: header required: false schema: anyOf: - type: string - type: 'null' title: X-Override-Embedding-Model requestBody: required: true content: multipart/form-data: schema: $ref: '#/components/schemas/Body_import_agent' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/ImportedAgentsResponse' '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 deprecated: true parameters: - name: agent_id in: path required: true schema: type: string minLength: 42 maxLength: 42 pattern: ^agent-[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ description: The ID of the agent in the format 'agent-' examples: - agent-123e4567-e89b-42d3-8456-426614174000 title: Agent Id description: The ID of the agent in the format 'agent-' - name: conversation_id in: query required: false schema: anyOf: - type: string - type: 'null' description: Conversation ID to get context window for. If provided, uses messages from this conversation. title: Conversation Id description: Conversation ID to get context window for. If provided, uses messages from this conversation. 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 minLength: 42 maxLength: 42 pattern: ^agent-[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ description: The ID of the agent in the format 'agent-' examples: - agent-123e4567-e89b-42d3-8456-426614174000 title: Agent Id description: The ID of the agent in the format 'agent-' 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 minLength: 42 maxLength: 42 pattern: ^agent-[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ description: The ID of the agent in the format 'agent-' examples: - agent-123e4567-e89b-42d3-8456-426614174000 title: Agent Id description: The ID of the agent in the format 'agent-' - 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.This is a legacy parameter, and no longer supported after 1.0.0 SDK versions. deprecated: true 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.This is a legacy parameter, and no longer supported after 1.0.0 SDK versions. deprecated: true - name: include in: query required: false schema: type: array items: enum: - agent.blocks - agent.identities - agent.managed_group - agent.pending_approval - agent.secrets - agent.sources - agent.tags - agent.tools type: string description: Specify which relational fields to include in the response. No relationships are included by default. default: [] title: Include description: Specify which relational fields to include in the response. No relationships are included by default. 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 minLength: 42 maxLength: 42 pattern: ^agent-[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ description: The ID of the agent in the format 'agent-' examples: - agent-123e4567-e89b-42d3-8456-426614174000 title: Agent Id description: The ID of the agent in the format 'agent-' 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 Tools for Agent description: Get tools from an existing agent. operationId: list_tools_for_agent parameters: - name: agent_id in: path required: true schema: type: string minLength: 42 maxLength: 42 pattern: ^agent-[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ description: The ID of the agent in the format 'agent-' examples: - agent-123e4567-e89b-42d3-8456-426614174000 title: Agent Id description: The ID of the agent in the format 'agent-' - name: before in: query required: false schema: anyOf: - type: string - type: 'null' description: Tool ID cursor for pagination. Returns tools that come before this tool ID in the specified sort order title: Before description: Tool ID cursor for pagination. Returns tools that come before this tool ID in the specified sort order - name: after in: query required: false schema: anyOf: - type: string - type: 'null' description: Tool ID cursor for pagination. Returns tools that come after this tool ID in the specified sort order title: After description: Tool ID cursor for pagination. Returns tools that come after this tool ID in the specified sort order - name: limit in: query required: false schema: anyOf: - type: integer - type: 'null' description: Maximum number of tools to return default: 10 title: Limit description: Maximum number of tools to return - name: order in: query required: false schema: enum: - asc - desc type: string description: Sort order for tools by creation time. 'asc' for oldest first, 'desc' for newest first default: desc title: Order description: Sort order for tools by creation time. 'asc' for oldest first, 'desc' for newest first - name: order_by in: query required: false schema: const: created_at type: string description: Field to sort by default: created_at title: Order By description: Field to sort by responses: '200': description: Successful Response content: application/json: schema: type: array items: $ref: '#/components/schemas/Tool' title: Response List Tools For Agent '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 to Agent description: Attach a tool to an agent. operationId: attach_tool_to_agent parameters: - name: tool_id in: path required: true schema: type: string minLength: 41 maxLength: 41 pattern: ^tool-[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ description: The ID of the tool in the format 'tool-' examples: - tool-123e4567-e89b-42d3-8456-426614174000 title: Tool Id description: The ID of the tool in the format 'tool-' - name: agent_id in: path required: true schema: type: string minLength: 42 maxLength: 42 pattern: ^agent-[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ description: The ID of the agent in the format 'agent-' examples: - agent-123e4567-e89b-42d3-8456-426614174000 title: Agent Id description: The ID of the agent in the format 'agent-' responses: '200': description: Successful Response content: application/json: schema: anyOf: - $ref: '#/components/schemas/AgentState' - type: 'null' title: Response Attach Tool To Agent '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 from Agent description: Detach a tool from an agent. operationId: detach_tool_from_agent parameters: - name: tool_id in: path required: true schema: type: string minLength: 41 maxLength: 41 pattern: ^tool-[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ description: The ID of the tool in the format 'tool-' examples: - tool-123e4567-e89b-42d3-8456-426614174000 title: Tool Id description: The ID of the tool in the format 'tool-' - name: agent_id in: path required: true schema: type: string minLength: 42 maxLength: 42 pattern: ^agent-[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ description: The ID of the agent in the format 'agent-' examples: - agent-123e4567-e89b-42d3-8456-426614174000 title: Agent Id description: The ID of the agent in the format 'agent-' responses: '200': description: Successful Response content: application/json: schema: anyOf: - $ref: '#/components/schemas/AgentState' - type: 'null' title: Response Detach Tool From Agent '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /v1/agents/{agent_id}/tools/approval/{tool_name}: patch: tags: - Agents summary: Modify Approval for Tool description: 'Modify the approval requirement for a tool attached to an agent. Accepts requires_approval via request body (preferred) or query parameter (deprecated).' operationId: modify_approval_for_tool parameters: - name: tool_name in: path required: true schema: type: string title: Tool Name - name: agent_id in: path required: true schema: type: string minLength: 42 maxLength: 42 pattern: ^agent-[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ description: The ID of the agent in the format 'agent-' examples: - agent-123e4567-e89b-42d3-8456-426614174000 title: Agent Id description: The ID of the agent in the format 'agent-' - name: requires_approval in: query required: false schema: anyOf: - type: boolean - type: 'null' description: Whether the tool requires approval before execution deprecated: true title: Requires Approval description: Whether the tool requires approval before execution deprecated: true requestBody: content: application/json: schema: anyOf: - $ref: '#/components/schemas/ModifyApprovalRequest' - type: 'null' title: Request responses: '200': description: Successful Response content: application/json: schema: anyOf: - $ref: '#/components/schemas/AgentState' - type: 'null' title: Response Modify Approval For Tool '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /v1/agents/{agent_id}/tools/{tool_name}/run: post: tags: - Agents summary: Run Tool for Agent description: 'Trigger a tool by name on a specific agent, providing the necessary arguments. This endpoint executes a tool that is attached to the agent, using the agent''s state and environment variables for execution context.' operationId: run_tool_for_agent parameters: - name: agent_id in: path required: true schema: type: string minLength: 42 maxLength: 42 pattern: ^agent-[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ description: The ID of the agent in the format 'agent-' examples: - agent-123e4567-e89b-42d3-8456-426614174000 title: Agent Id description: The ID of the agent in the format 'agent-' - name: tool_name in: path required: true schema: type: string title: Tool Name requestBody: content: application/json: schema: $ref: '#/components/schemas/letta__schemas__mcp_server__ToolExecuteRequest' default: args: {} responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/ToolExecutionResult' '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 deprecated: true parameters: - name: source_id in: path required: true schema: type: string minLength: 43 maxLength: 43 pattern: ^source-[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ description: The ID of the source in the format 'source-' examples: - source-123e4567-e89b-42d3-8456-426614174000 title: Source Id description: The ID of the source in the format 'source-' - name: agent_id in: path required: true schema: type: string minLength: 42 maxLength: 42 pattern: ^agent-[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ description: The ID of the agent in the format 'agent-' examples: - agent-123e4567-e89b-42d3-8456-426614174000 title: Agent Id description: The ID of the agent in the format 'agent-' 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}/folders/attach/{folder_id}: patch: tags: - Agents summary: Attach Folder to Agent description: Attach a folder to an agent. operationId: attach_folder_to_agent parameters: - name: folder_id in: path required: true schema: type: string minLength: 43 maxLength: 43 pattern: ^source-[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ description: The ID of the source in the format 'source-' examples: - source-123e4567-e89b-42d3-8456-426614174000 title: Folder Id description: The ID of the source in the format 'source-' - name: agent_id in: path required: true schema: type: string minLength: 42 maxLength: 42 pattern: ^agent-[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ description: The ID of the agent in the format 'agent-' examples: - agent-123e4567-e89b-42d3-8456-426614174000 title: Agent Id description: The ID of the agent in the format 'agent-' responses: '200': description: Successful Response content: application/json: schema: anyOf: - $ref: '#/components/schemas/AgentState' - type: 'null' title: Response Attach Folder To Agent '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 deprecated: true parameters: - name: source_id in: path required: true schema: type: string minLength: 43 maxLength: 43 pattern: ^source-[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ description: The ID of the source in the format 'source-' examples: - source-123e4567-e89b-42d3-8456-426614174000 title: Source Id description: The ID of the source in the format 'source-' - name: agent_id in: path required: true schema: type: string minLength: 42 maxLength: 42 pattern: ^agent-[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ description: The ID of the agent in the format 'agent-' examples: - agent-123e4567-e89b-42d3-8456-426614174000 title: Agent Id description: The ID of the agent in the format 'agent-' 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}/folders/detach/{folder_id}: patch: tags: - Agents summary: Detach Folder from Agent description: Detach a folder from an agent. operationId: detach_folder_from_agent parameters: - name: folder_id in: path required: true schema: type: string minLength: 43 maxLength: 43 pattern: ^source-[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ description: The ID of the source in the format 'source-' examples: - source-123e4567-e89b-42d3-8456-426614174000 title: Folder Id description: The ID of the source in the format 'source-' - name: agent_id in: path required: true schema: type: string minLength: 42 maxLength: 42 pattern: ^agent-[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ description: The ID of the agent in the format 'agent-' examples: - agent-123e4567-e89b-42d3-8456-426614174000 title: Agent Id description: The ID of the agent in the format 'agent-' responses: '200': description: Successful Response content: application/json: schema: anyOf: - $ref: '#/components/schemas/AgentState' - type: 'null' title: Response Detach Folder From Agent '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /v1/agents/{agent_id}/files/close-all: patch: tags: - Agents summary: Close All Files for Agent description: 'Closes all currently open files for a given agent. This endpoint updates the file state for the agent so that no files are marked as open. Typically used to reset the working memory view for the agent.' operationId: close_all_files_for_agent parameters: - name: agent_id in: path required: true schema: type: string minLength: 42 maxLength: 42 pattern: ^agent-[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ description: The ID of the agent in the format 'agent-' examples: - agent-123e4567-e89b-42d3-8456-426614174000 title: Agent Id description: The ID of the agent in the format 'agent-' responses: '200': description: Successful Response content: application/json: schema: type: array items: type: string title: Response Close All Files For Agent '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /v1/agents/{agent_id}/files/{file_id}/open: patch: tags: - Agents summary: Open File for Agent description: 'Opens a specific file for a given agent. This endpoint marks a specific file as open in the agent''s file state. The file will be included in the agent''s working memory view. Returns a list of file names that were closed due to LRU eviction.' operationId: open_file_for_agent parameters: - name: file_id in: path required: true schema: type: string minLength: 41 maxLength: 41 pattern: ^file-[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ description: The ID of the file in the format 'file-' examples: - file-123e4567-e89b-42d3-8456-426614174000 title: File Id description: The ID of the file in the format 'file-' - name: agent_id in: path required: true schema: type: string minLength: 42 maxLength: 42 pattern: ^agent-[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ description: The ID of the agent in the format 'agent-' examples: - agent-123e4567-e89b-42d3-8456-426614174000 title: Agent Id description: The ID of the agent in the format 'agent-' responses: '200': description: Successful Response content: application/json: schema: type: array items: type: string title: Response Open File For Agent '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /v1/agents/{agent_id}/files/{file_id}/close: patch: tags: - Agents summary: Close File for Agent description: 'Closes a specific file for a given agent. This endpoint marks a specific file as closed in the agent''s file state. The file will be removed from the agent''s working memory view.' operationId: close_file_for_agent parameters: - name: file_id in: path required: true schema: type: string minLength: 41 maxLength: 41 pattern: ^file-[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ description: The ID of the file in the format 'file-' examples: - file-123e4567-e89b-42d3-8456-426614174000 title: File Id description: The ID of the file in the format 'file-' - name: agent_id in: path required: true schema: type: string minLength: 42 maxLength: 42 pattern: ^agent-[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ description: The ID of the agent in the format 'agent-' examples: - agent-123e4567-e89b-42d3-8456-426614174000 title: Agent Id description: The ID of the agent in the format 'agent-' 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}/sources: get: tags: - Agents summary: List Agent Sources description: Get the sources associated with an agent. operationId: list_agent_sources deprecated: true parameters: - name: agent_id in: path required: true schema: type: string minLength: 42 maxLength: 42 pattern: ^agent-[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ description: The ID of the agent in the format 'agent-' examples: - agent-123e4567-e89b-42d3-8456-426614174000 title: Agent Id description: The ID of the agent in the format 'agent-' - name: before in: query required: false schema: anyOf: - type: string - type: 'null' description: Source ID cursor for pagination. Returns sources that come before this source ID in the specified sort order title: Before description: Source ID cursor for pagination. Returns sources that come before this source ID in the specified sort order - name: after in: query required: false schema: anyOf: - type: string - type: 'null' description: Source ID cursor for pagination. Returns sources that come after this source ID in the specified sort order title: After description: Source ID cursor for pagination. Returns sources that come after this source ID in the specified sort order - name: limit in: query required: false schema: anyOf: - type: integer - type: 'null' description: Maximum number of sources to return default: 100 title: Limit description: Maximum number of sources to return - name: order in: query required: false schema: enum: - asc - desc type: string description: Sort order for sources by creation time. 'asc' for oldest first, 'desc' for newest first default: desc title: Order description: Sort order for sources by creation time. 'asc' for oldest first, 'desc' for newest first - name: order_by in: query required: false schema: const: created_at type: string description: Field to sort by default: created_at title: Order By description: Field to sort by 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}/folders: get: tags: - Agents summary: List Folders for Agent description: Get the folders associated with an agent. operationId: list_folders_for_agent parameters: - name: agent_id in: path required: true schema: type: string minLength: 42 maxLength: 42 pattern: ^agent-[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ description: The ID of the agent in the format 'agent-' examples: - agent-123e4567-e89b-42d3-8456-426614174000 title: Agent Id description: The ID of the agent in the format 'agent-' - name: before in: query required: false schema: anyOf: - type: string - type: 'null' description: Source ID cursor for pagination. Returns sources that come before this source ID in the specified sort order title: Before description: Source ID cursor for pagination. Returns sources that come before this source ID in the specified sort order - name: after in: query required: false schema: anyOf: - type: string - type: 'null' description: Source ID cursor for pagination. Returns sources that come after this source ID in the specified sort order title: After description: Source ID cursor for pagination. Returns sources that come after this source ID in the specified sort order - name: limit in: query required: false schema: anyOf: - type: integer - type: 'null' description: Maximum number of sources to return default: 100 title: Limit description: Maximum number of sources to return - name: order in: query required: false schema: enum: - asc - desc type: string description: Sort order for sources by creation time. 'asc' for oldest first, 'desc' for newest first default: desc title: Order description: Sort order for sources by creation time. 'asc' for oldest first, 'desc' for newest first - name: order_by in: query required: false schema: const: created_at type: string description: Field to sort by default: created_at title: Order By description: Field to sort by responses: '200': description: Successful Response content: application/json: schema: type: array items: $ref: '#/components/schemas/Source' title: Response List Folders For Agent '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /v1/agents/{agent_id}/files: get: tags: - Agents summary: List Files for Agent description: Get the files attached to an agent with their open/closed status. operationId: list_files_for_agent parameters: - name: agent_id in: path required: true schema: type: string minLength: 42 maxLength: 42 pattern: ^agent-[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ description: The ID of the agent in the format 'agent-' examples: - agent-123e4567-e89b-42d3-8456-426614174000 title: Agent Id description: The ID of the agent in the format 'agent-' - name: before in: query required: false schema: anyOf: - type: string - type: 'null' description: File ID cursor for pagination. Returns files that come before this file ID in the specified sort order title: Before description: File ID cursor for pagination. Returns files that come before this file ID in the specified sort order - name: after in: query required: false schema: anyOf: - type: string - type: 'null' description: File ID cursor for pagination. Returns files that come after this file ID in the specified sort order title: After description: File ID cursor for pagination. Returns files that come after this file ID in the specified sort order - name: limit in: query required: false schema: anyOf: - type: integer - type: 'null' description: Maximum number of files to return default: 100 title: Limit description: Maximum number of files to return - name: order in: query required: false schema: enum: - asc - desc type: string description: Sort order for files by creation time. 'asc' for oldest first, 'desc' for newest first default: desc title: Order description: Sort order for files by creation time. 'asc' for oldest first, 'desc' for newest first - name: order_by in: query required: false schema: const: created_at type: string description: Field to sort by default: created_at title: Order By description: Field to sort by - name: cursor in: query required: false schema: anyOf: - type: string - type: 'null' description: Pagination cursor from previous response (deprecated, use before/after) deprecated: true title: Cursor description: Pagination cursor from previous response (deprecated, use before/after) deprecated: true - name: is_open in: query required: false schema: anyOf: - type: boolean - type: 'null' description: Filter by open status (true for open files, false for closed files) title: Is Open description: Filter by open status (true for open files, false for closed files) responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/PaginatedAgentFiles' '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. This endpoint fetches the current memory state of the agent identified by the user ID and agent ID.' operationId: retrieve_agent_memory deprecated: true parameters: - name: agent_id in: path required: true schema: type: string minLength: 42 maxLength: 42 pattern: ^agent-[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ description: The ID of the agent in the format 'agent-' examples: - agent-123e4567-e89b-42d3-8456-426614174000 title: Agent Id description: The ID of the agent in the format 'agent-' 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 for Agent description: Retrieve a core memory block from an agent. operationId: retrieve_core_memory_block parameters: - name: block_label in: path required: true schema: type: string title: Block Label - name: agent_id in: path required: true schema: type: string minLength: 42 maxLength: 42 pattern: ^agent-[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ description: The ID of the agent in the format 'agent-' examples: - agent-123e4567-e89b-42d3-8456-426614174000 title: Agent Id description: The ID of the agent in the format 'agent-' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/BlockResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' patch: tags: - Agents summary: Modify Block for Agent description: Updates a core memory block of an agent. operationId: modify_core_memory_block parameters: - name: block_label in: path required: true schema: type: string title: Block Label - name: agent_id in: path required: true schema: type: string minLength: 42 maxLength: 42 pattern: ^agent-[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ description: The ID of the agent in the format 'agent-' examples: - agent-123e4567-e89b-42d3-8456-426614174000 title: Agent Id description: The ID of the agent in the format 'agent-' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/BlockUpdate' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/BlockResponse' '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 for Agent 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 minLength: 42 maxLength: 42 pattern: ^agent-[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ description: The ID of the agent in the format 'agent-' examples: - agent-123e4567-e89b-42d3-8456-426614174000 title: Agent Id description: The ID of the agent in the format 'agent-' - name: before in: query required: false schema: anyOf: - type: string - type: 'null' description: Block ID cursor for pagination. Returns blocks that come before this block ID in the specified sort order title: Before description: Block ID cursor for pagination. Returns blocks that come before this block ID in the specified sort order - name: after in: query required: false schema: anyOf: - type: string - type: 'null' description: Block ID cursor for pagination. Returns blocks that come after this block ID in the specified sort order title: After description: Block ID cursor for pagination. Returns blocks that come after this block ID in the specified sort order - name: limit in: query required: false schema: anyOf: - type: integer - type: 'null' description: Maximum number of blocks to return default: 100 title: Limit description: Maximum number of blocks to return - name: order in: query required: false schema: enum: - asc - desc type: string description: Sort order for blocks by creation time. 'asc' for oldest first, 'desc' for newest first default: desc title: Order description: Sort order for blocks by creation time. 'asc' for oldest first, 'desc' for newest first - name: order_by in: query required: false schema: const: created_at type: string description: Field to sort by default: created_at title: Order By description: Field to sort by responses: '200': description: Successful Response content: application/json: schema: type: array items: $ref: '#/components/schemas/BlockResponse' title: Response List Core Memory Blocks '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /v1/agents/{agent_id}/recompile: post: tags: - Agents summary: Recompile Agent description: Manually trigger system prompt recompilation for an agent. operationId: recompile_agent parameters: - name: agent_id in: path required: true schema: type: string minLength: 42 maxLength: 42 pattern: ^agent-[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ description: The ID of the agent in the format 'agent-' examples: - agent-123e4567-e89b-42d3-8456-426614174000 title: Agent Id description: The ID of the agent in the format 'agent-' - name: update_timestamp in: query required: false schema: type: boolean description: If True, update the in-context memory last edit timestamp embedded in the system prompt. default: false title: Update Timestamp description: If True, update the in-context memory last edit timestamp embedded in the system prompt. - name: dry_run in: query required: false schema: type: boolean description: If True, do not persist changes; still returns the compiled system prompt. default: false title: Dry Run description: If True, do not persist changes; still returns the compiled system prompt. responses: '200': description: Successful Response content: application/json: schema: type: string title: Response Recompile Agent '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /v1/agents/{agent_id}/system-prompt/recompile: post: tags: - Agents summary: Recompile Agent System Prompt description: Deprecated alias for POST /v1/agents/{agent_id}/recompile. operationId: recompile_agent_system_prompt deprecated: true parameters: - name: agent_id in: path required: true schema: type: string minLength: 42 maxLength: 42 pattern: ^agent-[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ description: The ID of the agent in the format 'agent-' examples: - agent-123e4567-e89b-42d3-8456-426614174000 title: Agent Id description: The ID of the agent in the format 'agent-' - name: update_timestamp in: query required: false schema: type: boolean description: If True, update the in-context memory last edit timestamp embedded in the system prompt. default: false title: Update Timestamp description: If True, update the in-context memory last edit timestamp embedded in the system prompt. - name: dry_run in: query required: false schema: type: boolean description: If True, do not persist changes; still returns the compiled system prompt. default: false title: Dry Run description: If True, do not persist changes; still returns the compiled system prompt. responses: '200': description: Successful Response content: application/json: schema: type: string title: Response Recompile Agent System Prompt '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 to Agent description: Attach a core memory block to an agent. operationId: attach_core_memory_block parameters: - name: block_id in: path required: true schema: type: string minLength: 42 maxLength: 42 pattern: ^block-[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ description: The ID of the block in the format 'block-' examples: - block-123e4567-e89b-42d3-8456-426614174000 title: Block Id description: The ID of the block in the format 'block-' - name: agent_id in: path required: true schema: type: string minLength: 42 maxLength: 42 pattern: ^agent-[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ description: The ID of the agent in the format 'agent-' examples: - agent-123e4567-e89b-42d3-8456-426614174000 title: Agent Id description: The ID of the agent in the format 'agent-' 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 from Agent description: Detach a core memory block from an agent. operationId: detach_core_memory_block parameters: - name: block_id in: path required: true schema: type: string minLength: 42 maxLength: 42 pattern: ^block-[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ description: The ID of the block in the format 'block-' examples: - block-123e4567-e89b-42d3-8456-426614174000 title: Block Id description: The ID of the block in the format 'block-' - name: agent_id in: path required: true schema: type: string minLength: 42 maxLength: 42 pattern: ^agent-[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ description: The ID of the agent in the format 'agent-' examples: - agent-123e4567-e89b-42d3-8456-426614174000 title: Agent Id description: The ID of the agent in the format 'agent-' 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}/archives/attach/{archive_id}: patch: tags: - Agents summary: Attach Archive to Agent description: Attach an archive to an agent. operationId: attach_archive_to_agent parameters: - name: archive_id in: path required: true schema: type: string title: Archive Id - name: agent_id in: path required: true schema: type: string minLength: 42 maxLength: 42 pattern: ^agent-[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ description: The ID of the agent in the format 'agent-' examples: - agent-123e4567-e89b-42d3-8456-426614174000 title: Agent Id description: The ID of the agent in the format 'agent-' 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}/archives/detach/{archive_id}: patch: tags: - Agents summary: Detach Archive from Agent description: Detach an archive from an agent. operationId: detach_archive_from_agent parameters: - name: archive_id in: path required: true schema: type: string title: Archive Id - name: agent_id in: path required: true schema: type: string minLength: 42 maxLength: 42 pattern: ^agent-[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ description: The ID of the agent in the format 'agent-' examples: - agent-123e4567-e89b-42d3-8456-426614174000 title: Agent Id description: The ID of the agent in the format 'agent-' 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}/identities/attach/{identity_id}: patch: tags: - Agents summary: Attach Identity to Agent description: Attach an identity to an agent. operationId: attach_identity_to_agent parameters: - name: identity_id in: path required: true schema: type: string title: Identity Id - name: agent_id in: path required: true schema: type: string minLength: 42 maxLength: 42 pattern: ^agent-[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ description: The ID of the agent in the format 'agent-' examples: - agent-123e4567-e89b-42d3-8456-426614174000 title: Agent Id description: The ID of the agent in the format 'agent-' 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}/identities/detach/{identity_id}: patch: tags: - Agents summary: Detach Identity from Agent description: Detach an identity from an agent. operationId: detach_identity_from_agent parameters: - name: identity_id in: path required: true schema: type: string title: Identity Id - name: agent_id in: path required: true schema: type: string minLength: 42 maxLength: 42 pattern: ^agent-[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ description: The ID of the agent in the format 'agent-' examples: - agent-123e4567-e89b-42d3-8456-426614174000 title: Agent Id description: The ID of the agent in the format 'agent-' 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}/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 minLength: 42 maxLength: 42 pattern: ^agent-[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ description: The ID of the agent in the format 'agent-' examples: - agent-123e4567-e89b-42d3-8456-426614174000 title: Agent Id description: The ID of the agent in the format 'agent-' - 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. default: 100 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) 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 minLength: 42 maxLength: 42 pattern: ^agent-[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ description: The ID of the agent in the format 'agent-' examples: - agent-123e4567-e89b-42d3-8456-426614174000 title: Agent Id description: The ID of the agent in the format 'agent-' 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/search: get: tags: - Agents summary: Search Archival Memory description: 'Search archival memory using semantic (embedding-based) search with optional temporal filtering. This endpoint allows manual triggering of archival memory searches, enabling users to query an agent''s archival memory store directly via the API. The search uses the same functionality as the agent''s archival_memory_search tool but is accessible for external API usage.' operationId: search_archival_memory parameters: - name: agent_id in: path required: true schema: type: string minLength: 42 maxLength: 42 pattern: ^agent-[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ description: The ID of the agent in the format 'agent-' examples: - agent-123e4567-e89b-42d3-8456-426614174000 title: Agent Id description: The ID of the agent in the format 'agent-' - name: query in: query required: true schema: type: string description: String to search for using semantic similarity title: Query description: String to search for using semantic similarity - name: tags in: query required: false schema: anyOf: - type: array items: type: string - type: 'null' description: Optional list of tags to filter search results title: Tags description: Optional list of tags to filter search results - name: tag_match_mode in: query required: false schema: enum: - any - all type: string description: How to match tags - 'any' to match passages with any of the tags, 'all' to match only passages with all tags default: any title: Tag Match Mode description: How to match tags - 'any' to match passages with any of the tags, 'all' to match only passages with all tags - name: top_k in: query required: false schema: anyOf: - type: integer - type: 'null' description: Maximum number of results to return. Uses system default if not specified title: Top K description: Maximum number of results to return. Uses system default if not specified - name: start_datetime in: query required: false schema: anyOf: - type: string format: date-time - type: 'null' description: Filter results to passages created after this datetime title: Start Datetime description: Filter results to passages created after this datetime - name: end_datetime in: query required: false schema: anyOf: - type: string format: date-time - type: 'null' description: Filter results to passages created before this datetime title: End Datetime description: Filter results to passages created before this datetime responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/ArchivalMemorySearchResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /v1/agents/{agent_id}/archival-memory/{memory_id}: delete: tags: - Agents summary: Delete Passage description: Delete a memory from an agent's archival memory store. operationId: delete_passage parameters: - name: memory_id in: path required: true schema: type: string title: Memory Id - name: agent_id in: path required: true schema: type: string minLength: 42 maxLength: 42 pattern: ^agent-[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ description: The ID of the agent in the format 'agent-' examples: - agent-123e4567-e89b-42d3-8456-426614174000 title: Agent Id description: The ID of the agent in the format 'agent-' 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 minLength: 42 maxLength: 42 pattern: ^agent-[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ description: The ID of the agent in the format 'agent-' examples: - agent-123e4567-e89b-42d3-8456-426614174000 title: Agent Id description: The ID of the agent in the format 'agent-' - name: before in: query required: false schema: anyOf: - type: string - type: 'null' description: Message ID cursor for pagination. Returns messages that come before this message ID in the specified sort order title: Before description: Message ID cursor for pagination. Returns messages that come before this message ID in the specified sort order - name: after in: query required: false schema: anyOf: - type: string - type: 'null' description: Message ID cursor for pagination. Returns messages that come after this message ID in the specified sort order title: After description: Message ID cursor for pagination. Returns messages that come after this message ID in the specified sort order - 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: enum: - asc - desc type: string description: Sort order for messages by creation time. 'asc' for oldest first, 'desc' for newest first default: desc title: Order description: Sort order for messages by creation time. 'asc' for oldest first, 'desc' for newest first - name: order_by in: query required: false schema: const: created_at type: string description: Field to sort by default: created_at title: Order By description: Field to sort by - 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: conversation_id in: query required: false schema: anyOf: - type: string - type: 'null' description: Conversation ID to filter messages by. title: Conversation Id description: Conversation ID to filter messages by. - name: use_assistant_message in: query required: false schema: type: boolean description: Whether to use assistant messages deprecated: true default: true title: Use Assistant Message description: Whether to use assistant messages deprecated: true - name: assistant_message_tool_name in: query required: false schema: type: string description: The name of the designated message tool. deprecated: true default: send_message title: Assistant Message Tool Name description: The name of the designated message tool. deprecated: true - name: assistant_message_tool_kwarg in: query required: false schema: type: string description: The name of the message argument. deprecated: true default: message title: Assistant Message Tool Kwarg description: The name of the message argument. deprecated: true - name: include_err in: query required: false schema: anyOf: - type: boolean - type: 'null' description: Whether to include error messages and error statuses. For debugging purposes only. title: Include Err description: Whether to include error messages and error statuses. For debugging purposes only. - name: include_return_message_types in: query required: false schema: anyOf: - type: array items: $ref: '#/components/schemas/MessageType' - type: 'null' description: Message types to include in response. When null, all message types are returned. title: Include Return Message Types description: Message types to include in response. When null, all message types are returned. 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. This endpoint accepts a message from a user and processes it through the agent. **Note:** Sending multiple concurrent requests to the same agent can lead to undefined behavior. Each agent processes messages sequentially, and concurrent requests may interleave in unexpected ways. Wait for each request to complete before sending the next one. Use separate agents or conversations for parallel processing. The response format is controlled by the `streaming` field in the request body: - If `streaming=false` (default): Returns a complete LettaResponse with all messages - If `streaming=true`: Returns a Server-Sent Events (SSE) stream Additional streaming options (only used when streaming=true): - `stream_tokens`: Stream individual tokens instead of complete steps - `include_pings`: Include keepalive pings to prevent connection timeouts - `background`: Process the request in the background' operationId: send_message parameters: - name: agent_id in: path required: true schema: type: string minLength: 42 maxLength: 42 pattern: ^agent-[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ description: The ID of the agent in the format 'agent-' examples: - agent-123e4567-e89b-42d3-8456-426614174000 title: Agent Id description: The ID of the agent in the format 'agent-' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/LettaStreamingRequest' responses: '200': description: Successful response content: application/json: schema: $ref: '#/components/schemas/LettaResponse' text/event-stream: description: Server-Sent Events stream (when streaming=true in request body) '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. **Deprecated**: Messages are now considered immutable since they can be shared across multiple conversations via forking. This endpoint will be removed in a future version.' operationId: modify_message deprecated: true parameters: - name: agent_id in: path required: true schema: type: string minLength: 42 maxLength: 42 pattern: ^agent-[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ description: The ID of the agent in the format 'agent-' examples: - agent-123e4567-e89b-42d3-8456-426614174000 title: Agent Id description: The ID of the agent in the format 'agent-' - name: message_id in: path required: true schema: type: string minLength: 44 maxLength: 44 pattern: ^message-[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ description: The ID of the message in the format 'message-' examples: - message-123e4567-e89b-42d3-8456-426614174000 title: Message Id description: The ID of the message in the format 'message-' 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' - $ref: '#/components/schemas/ApprovalRequestMessage' - $ref: '#/components/schemas/ApprovalResponseMessage' - $ref: '#/components/schemas/SummaryMessage' - $ref: '#/components/schemas/EventMessage' 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' approval_request_message: '#/components/schemas/ApprovalRequestMessage' approval_response_message: '#/components/schemas/ApprovalResponseMessage' summary_message: '#/components/schemas/SummaryMessage' event_message: '#/components/schemas/EventMessage' 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. Deprecated: Use the `POST /{agent_id}/messages` endpoint with `streaming=true` in the request body instead. **Note:** Sending multiple concurrent requests to the same agent can lead to undefined behavior. Each agent processes messages sequentially, and concurrent requests may interleave in unexpected ways. Wait for each request to complete before sending the next one. Use separate agents or conversations for parallel processing. This endpoint accepts a message from a user and processes it through the agent. It will stream the steps of the response always, and stream the tokens if ''stream_tokens'' is set to True.' operationId: create_agent_message_stream deprecated: true parameters: - name: agent_id in: path required: true schema: type: string minLength: 42 maxLength: 42 pattern: ^agent-[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ description: The ID of the agent in the format 'agent-' examples: - agent-123e4567-e89b-42d3-8456-426614174000 title: Agent Id description: The ID of the agent in the format 'agent-' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/LettaStreamingRequest' responses: '200': description: Successful response content: application/json: schema: $ref: '#/components/schemas/LettaStreamingResponse' 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/cancel: post: tags: - Agents summary: Cancel Message description: 'Cancel runs associated with an agent. If run_ids are passed in, cancel those in particular. Note to cancel active runs associated with an agent, redis is required.' operationId: cancel_message parameters: - name: agent_id in: path required: true schema: type: string minLength: 42 maxLength: 42 pattern: ^agent-[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ description: The ID of the agent in the format 'agent-' examples: - agent-123e4567-e89b-42d3-8456-426614174000 title: Agent Id description: The ID of the agent in the format 'agent-' requestBody: content: application/json: schema: $ref: '#/components/schemas/CancelAgentRunRequest' responses: '200': description: Successful Response content: application/json: schema: type: object additionalProperties: true title: Response Cancel Message '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /v1/agents/{agent_id}/generate: post: tags: - Agents summary: Generate Completion description: 'Generate a completion directly from the LLM provider using the agent''s configuration. This endpoint makes a direct request to the LLM provider without any agent processing: - No memory or context retrieval - No tool calling - No message persistence - No agent state modification Simply provide a prompt, and the endpoint formats it as a user message. Optionally include a system_prompt for context/instructions. The agent''s LLM configuration (model, credentials, settings) is used by default. Use override_model to switch to a different model/provider while still using the organization''s configured providers. Example use cases: - Quick LLM queries without agent overhead - Testing different models with the same prompt - Simple chat completions using agent''s credentials - Comparing model outputs on identical prompts' operationId: generate_completion parameters: - name: agent_id in: path required: true schema: type: string minLength: 42 maxLength: 42 pattern: ^agent-[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ description: The ID of the agent in the format 'agent-' examples: - agent-123e4567-e89b-42d3-8456-426614174000 title: Agent Id description: The ID of the agent in the format 'agent-' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/GenerateRequest' responses: '200': description: Successful generation content: application/json: schema: $ref: '#/components/schemas/GenerateResponse' '404': description: Agent not found '422': description: Invalid request parameters '502': description: LLM provider error /v1/agents/messages/search: post: tags: - Agents summary: Search Messages description: 'Search messages across the entire organization with optional project and template filtering. Returns messages with FTS/vector ranks and total RRF score. This is a cloud-only feature.' operationId: search_messages parameters: [] requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/MessageSearchRequest' responses: '200': description: Successful Response content: application/json: schema: type: array items: $ref: '#/components/schemas/MessageSearchResult' title: Response Search Messages '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. The actual processing happens in the background, and the status can be checked using the run ID. This is "asynchronous" in the sense that it''s a background run and explicitly must be fetched by the run ID. **Note:** Sending multiple concurrent requests to the same agent can lead to undefined behavior. Each agent processes messages sequentially, and concurrent requests may interleave in unexpected ways. Wait for each request to complete before sending the next one. Use separate agents or conversations for parallel processing.' operationId: create_agent_message_async parameters: - name: agent_id in: path required: true schema: type: string minLength: 42 maxLength: 42 pattern: ^agent-[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ description: The ID of the agent in the format 'agent-' examples: - agent-123e4567-e89b-42d3-8456-426614174000 title: Agent Id description: The ID of the agent in the format 'agent-' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/LettaAsyncRequest' 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 minLength: 42 maxLength: 42 pattern: ^agent-[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ description: The ID of the agent in the format 'agent-' examples: - agent-123e4567-e89b-42d3-8456-426614174000 title: Agent Id description: The ID of the agent in the format 'agent-' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/ResetMessagesRequest' responses: '200': description: Successful Response content: application/json: schema: anyOf: - $ref: '#/components/schemas/AgentState' - type: 'null' title: Response Reset Messages '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /v1/agents/{agent_id}/groups: get: tags: - Agents summary: List Groups for Agent description: Lists the groups for an agent. operationId: list_groups_for_agent parameters: - name: agent_id in: path required: true schema: type: string minLength: 42 maxLength: 42 pattern: ^agent-[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ description: The ID of the agent in the format 'agent-' examples: - agent-123e4567-e89b-42d3-8456-426614174000 title: Agent Id description: The ID of the agent in the format 'agent-' - name: manager_type in: query required: false schema: anyOf: - type: string - type: 'null' description: Manager type to filter groups by title: Manager Type description: Manager type to filter groups by - name: before in: query required: false schema: anyOf: - type: string - type: 'null' description: Group ID cursor for pagination. Returns groups that come before this group ID in the specified sort order title: Before description: Group ID cursor for pagination. Returns groups that come before this group ID in the specified sort order - name: after in: query required: false schema: anyOf: - type: string - type: 'null' description: Group ID cursor for pagination. Returns groups that come after this group ID in the specified sort order title: After description: Group ID cursor for pagination. Returns groups that come after this group ID in the specified sort order - name: limit in: query required: false schema: anyOf: - type: integer - type: 'null' description: Maximum number of groups to return default: 100 title: Limit description: Maximum number of groups to return - name: order in: query required: false schema: enum: - asc - desc type: string description: Sort order for groups by creation time. 'asc' for oldest first, 'desc' for newest first default: desc title: Order description: Sort order for groups by creation time. 'asc' for oldest first, 'desc' for newest first - name: order_by in: query required: false schema: const: created_at type: string description: Field to sort by default: created_at title: Order By description: Field to sort by responses: '200': description: Successful Response content: application/json: schema: type: array items: $ref: '#/components/schemas/Group' title: Response List Groups For Agent '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /v1/agents/{agent_id}/messages/preview-raw-payload: post: tags: - Agents summary: Preview Model Request description: 'Inspect the raw LLM request payload without sending it. This endpoint processes the message through the agent loop up until the LLM request, then returns the raw request payload that would be sent to the LLM provider. Useful for debugging and inspection.' operationId: preview_model_request parameters: - name: agent_id in: path required: true schema: type: string minLength: 42 maxLength: 42 pattern: ^agent-[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ description: The ID of the agent in the format 'agent-' examples: - agent-123e4567-e89b-42d3-8456-426614174000 title: Agent Id description: The ID of the agent in the format 'agent-' requestBody: required: true content: application/json: schema: anyOf: - $ref: '#/components/schemas/LettaRequest' - $ref: '#/components/schemas/LettaStreamingRequest' title: Request responses: '200': description: Successful Response content: application/json: schema: type: object additionalProperties: true title: Response Preview Model Request '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /v1/agents/{agent_id}/summarize: post: tags: - Agents summary: Summarize Messages description: Summarize an agent's conversation history. operationId: summarize_messages parameters: - name: agent_id in: path required: true schema: type: string minLength: 42 maxLength: 42 pattern: ^agent-[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ description: The ID of the agent in the format 'agent-' examples: - agent-123e4567-e89b-42d3-8456-426614174000 title: Agent Id description: The ID of the agent in the format 'agent-' requestBody: content: application/json: schema: anyOf: - $ref: '#/components/schemas/letta__server__rest_api__routers__v1__agents__CompactionRequest' - type: 'null' title: Request responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/CompactionResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /v1/agents/search: post: description: Search deployed agents summary: Search Deployed Agents tags: - Agents parameters: [] operationId: agents.searchDeployedAgents requestBody: description: Body content: application/json: schema: type: object properties: search: type: array items: oneOf: - type: object properties: field: type: string enum: - version value: type: string required: - field - value - type: object properties: field: type: string enum: - name operator: type: string enum: - eq - contains value: type: string required: - field - operator - value - type: object properties: field: type: string enum: - tags operator: type: string enum: - contains value: type: array items: type: string required: - field - operator - value - type: object properties: field: type: string enum: - identity operator: type: string enum: - eq value: type: string required: - field - operator - value - type: object properties: field: type: string enum: - templateName operator: type: string enum: - eq value: type: string required: - field - operator - value - type: object properties: field: type: string enum: - agentId operator: type: string enum: - eq value: type: string required: - field - operator - value project_id: type: string combinator: type: string enum: - AND limit: type: number after: type: string nullable: true sortBy: type: string enum: - created_at - last_run_completion - updated_at ascending: type: boolean responses: '200': description: '200' content: application/json: schema: type: object properties: agents: type: array items: $ref: '#/components/schemas/AgentState' nextCursor: type: string nullable: true required: - agents /v1/agents/search/count: get: description: Count deployed agents matching search criteria summary: Count Deployed Agents tags: - Agents parameters: - name: search in: query schema: type: array items: oneOf: - type: object properties: field: type: string enum: - version value: type: string required: - field - value - type: object properties: field: type: string enum: - name operator: type: string enum: - eq - contains value: type: string required: - field - operator - value - type: object properties: field: type: string enum: - tags operator: type: string enum: - contains value: type: array items: type: string required: - field - operator - value - type: object properties: field: type: string enum: - identity operator: type: string enum: - eq value: type: string required: - field - operator - value - type: object properties: field: type: string enum: - templateName operator: type: string enum: - eq value: type: string required: - field - operator - value - type: object properties: field: type: string enum: - agentId operator: type: string enum: - eq value: type: string required: - field - operator - value - name: project_id in: query schema: type: string - name: combinator in: query schema: type: string enum: - AND operationId: agents.countDeployedAgents responses: '200': description: '200' content: application/json: schema: type: object properties: count: type: number required: - count /v1/agents/{agent_id}/core-memory/variables: get: description: Get the variables associated with an agent summary: Retrieve Memory Variables tags: - Agents parameters: - name: agent_id in: path required: true schema: type: string operationId: agents.getAgentVariables responses: '200': description: '200' content: application/json: schema: type: object properties: variables: type: object additionalProperties: type: string required: - variables '404': description: '404' content: application/json: schema: type: object properties: message: type: string enum: - Agent not found required: - message components: schemas: CancelAgentRunRequest: properties: run_ids: anyOf: - items: type: string type: array - type: 'null' title: Run Ids description: Optional list of run IDs to cancel type: object title: CancelAgentRunRequest BlockSchema: properties: value: type: string title: Value description: Value of the block. limit: type: integer title: Limit description: Character limit of the block. default: 100000 project_id: anyOf: - type: string - type: 'null' title: Project Id description: The associated project id. template_name: anyOf: - type: string - type: 'null' title: Template Name description: Name of the block if it is a template. is_template: type: boolean title: Is Template default: false template_id: anyOf: - type: string - type: 'null' title: Template Id description: The id of the template. base_template_id: anyOf: - type: string - type: 'null' title: Base Template Id description: The base template id of the block. deployment_id: anyOf: - type: string - type: 'null' title: Deployment Id description: The id of the deployment. entity_id: anyOf: - type: string - type: 'null' title: Entity Id description: The id of the entity within the template. preserve_on_migration: anyOf: - type: boolean - type: 'null' title: Preserve On Migration description: Preserve the block on template migration. default: false label: type: string title: Label description: Label of the block. read_only: type: boolean title: Read Only description: Whether the agent has read-only access to the block. default: false 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: {} hidden: anyOf: - type: boolean - type: 'null' title: Hidden description: If set to True, the block will be hidden. tags: anyOf: - items: type: string type: array - type: 'null' title: Tags description: The tags to associate with the block. id: type: string title: Id description: Human-readable identifier for this block in the file type: object required: - value - label - id title: BlockSchema description: Block with human-readable ID for agent file 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. value_enc: anyOf: - type: string description: Encrypted secret value (stored as encrypted string) nullable: true - type: 'null' title: Value Enc description: Encrypted value as Secret object 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 ToolType: type: string enum: - custom - letta_core - letta_memory_core - letta_multi_agent_core - letta_sleeptime_core - letta_voice_sleeptime_core - letta_builtin - letta_files_core - external_langchain - external_composio - external_mcp title: ToolType ToolExecutionResult: properties: status: type: string enum: - success - error title: Status description: The status of the tool execution and return object func_return: anyOf: - {} - type: 'null' title: Func Return description: The function return object agent_state: anyOf: - $ref: '#/components/schemas/AgentState' - type: 'null' description: The agent state deprecated: true stdout: anyOf: - items: type: string type: array - type: 'null' title: Stdout description: Captured stdout (prints, logs) from function invocation stderr: anyOf: - items: type: string type: array - type: 'null' title: Stderr description: Captured stderr from the function invocation sandbox_config_fingerprint: anyOf: - type: string - type: 'null' title: Sandbox Config Fingerprint description: The fingerprint of the config for the sandbox type: object required: - status title: ToolExecutionResult 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 prompt_template: anyOf: - type: string - type: 'null' title: Prompt Template description: Optional template string (ignored). 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. ZAIThinking: properties: type: type: string enum: - enabled - disabled title: Type description: Whether thinking is enabled or disabled. default: enabled clear_thinking: type: boolean title: Clear Thinking description: If False, preserved thinking is used (recommended for agents). default: false type: object title: ZAIThinking description: Thinking configuration for ZAI GLM-4.5+ models. 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. signature: anyOf: - type: string - type: 'null' title: Signature description: Stores a unique identifier for any reasoning associated with this text content. type: object required: - text title: TextContent 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. signature: anyOf: - type: string - type: 'null' title: Signature description: Stores a unique identifier for any reasoning associated with this tool call. type: object required: - id - name - input title: ToolCallContent RequiresApprovalToolRule: 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: requires_approval title: Type default: requires_approval prompt_template: anyOf: - type: string - type: 'null' title: Prompt Template description: Optional template string (ignored). Rendering uses fast built-in formatting for performance. additionalProperties: false type: object required: - tool_name title: RequiresApprovalToolRule description: Represents a tool rule configuration which requires approval before the tool can be invoked. GroupSchema: properties: agent_ids: items: type: string type: array title: Agent Ids description: List of agent IDs in this group description: type: string title: Description description: '' manager_config: oneOf: - $ref: '#/components/schemas/RoundRobinManager' - $ref: '#/components/schemas/SupervisorManagerSchema' - $ref: '#/components/schemas/DynamicManagerSchema' - $ref: '#/components/schemas/SleeptimeManagerSchema' - $ref: '#/components/schemas/VoiceSleeptimeManagerSchema' title: Manager Config description: '' default: manager_type: round_robin discriminator: propertyName: manager_type mapping: dynamic: '#/components/schemas/DynamicManagerSchema' round_robin: '#/components/schemas/RoundRobinManager' sleeptime: '#/components/schemas/SleeptimeManagerSchema' supervisor: '#/components/schemas/SupervisorManagerSchema' voice_sleeptime: '#/components/schemas/VoiceSleeptimeManagerSchema' project_id: anyOf: - type: string - type: 'null' title: Project Id description: The associated project id. shared_block_ids: items: type: string type: array title: Shared Block Ids description: List of shared block IDs default: [] hidden: anyOf: - type: boolean - type: 'null' title: Hidden description: If set to True, the group will be hidden. id: type: string title: Id description: Human-readable identifier for this group in the file type: object required: - agent_ids - description - id title: GroupSchema description: Group with human-readable ID for agent file ManagerType: type: string enum: - round_robin - supervisor - dynamic - sleeptime - voice_sleeptime - swarm title: ManagerType LettaToolReturnContentUnion: oneOf: - $ref: '#/components/schemas/TextContent' - $ref: '#/components/schemas/ImageContent' discriminator: propertyName: type mapping: text: '#/components/schemas/TextContent' image: '#/components/schemas/ImageContent' CompactionSettings-Output: properties: model: anyOf: - type: string - type: 'null' title: Model description: 'Model handle to use for sliding_window/all summarization (format: provider/model-name). If None, uses lightweight provider-specific defaults.' model_settings: anyOf: - oneOf: - $ref: '#/components/schemas/OpenAIModelSettings' - $ref: '#/components/schemas/SGLangModelSettings' - $ref: '#/components/schemas/AnthropicModelSettings' - $ref: '#/components/schemas/GoogleAIModelSettings' - $ref: '#/components/schemas/GoogleVertexModelSettings' - $ref: '#/components/schemas/AzureModelSettings' - $ref: '#/components/schemas/XAIModelSettings' - $ref: '#/components/schemas/ZAIModelSettings' - $ref: '#/components/schemas/GroqModelSettings' - $ref: '#/components/schemas/DeepseekModelSettings' - $ref: '#/components/schemas/TogetherModelSettings' - $ref: '#/components/schemas/BedrockModelSettings' - $ref: '#/components/schemas/BasetenModelSettings' - $ref: '#/components/schemas/OpenRouterModelSettings' - $ref: '#/components/schemas/ChatGPTOAuthModelSettings' discriminator: propertyName: provider_type mapping: anthropic: '#/components/schemas/AnthropicModelSettings' azure: '#/components/schemas/AzureModelSettings' baseten: '#/components/schemas/BasetenModelSettings' bedrock: '#/components/schemas/BedrockModelSettings' chatgpt_oauth: '#/components/schemas/ChatGPTOAuthModelSettings' deepseek: '#/components/schemas/DeepseekModelSettings' google_ai: '#/components/schemas/GoogleAIModelSettings' google_vertex: '#/components/schemas/GoogleVertexModelSettings' groq: '#/components/schemas/GroqModelSettings' openai: '#/components/schemas/OpenAIModelSettings' openrouter: '#/components/schemas/OpenRouterModelSettings' sglang: '#/components/schemas/SGLangModelSettings' together: '#/components/schemas/TogetherModelSettings' xai: '#/components/schemas/XAIModelSettings' zai: '#/components/schemas/ZAIModelSettings' - type: 'null' title: Model Settings description: Optional model settings used to override defaults for the summarizer model. prompt: anyOf: - type: string - type: 'null' title: Prompt description: The prompt to use for summarization. If None, uses mode-specific default. prompt_acknowledgement: type: boolean title: Prompt Acknowledgement description: Whether to include an acknowledgement post-prompt (helps prevent non-summary outputs). default: false clip_chars: anyOf: - type: integer - type: 'null' title: Clip Chars description: The maximum length of the summary in characters. If none, no clipping is performed. default: 50000 mode: type: string enum: - all - sliding_window - self_compact_all - self_compact_sliding_window title: Mode description: The type of summarization technique use. default: sliding_window sliding_window_percentage: type: number title: Sliding Window Percentage description: The percentage of the context window to keep post-summarization (only used in sliding window modes). type: object title: CompactionSettings description: 'Configuration for conversation compaction / summarization. Per-model settings (temperature, max tokens, etc.) are derived from the default configuration for that handle.' 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: '' project_id: anyOf: - type: string - type: 'null' title: Project Id description: The associated project id. template_id: anyOf: - type: string - type: 'null' title: Template Id description: The id of the template. base_template_id: anyOf: - type: string - type: 'null' title: Base Template Id description: The base template id. deployment_id: anyOf: - type: string - type: 'null' title: Deployment Id description: The id of the deployment. shared_block_ids: items: type: string type: array title: Shared Block Ids description: '' default: [] deprecated: true 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: '' sleeptime_agent_frequency: anyOf: - type: integer - type: 'null' title: Sleeptime Agent Frequency description: '' turns_counter: anyOf: - type: integer - type: 'null' title: Turns Counter description: '' last_processed_message_id: anyOf: - type: string - type: 'null' title: Last Processed Message Id description: '' max_message_buffer_length: anyOf: - type: integer - type: 'null' title: Max Message Buffer Length description: The desired maximum length of messages in the context window of the convo agent. This is a best effort, and may be off slightly due to user/assistant interleaving. min_message_buffer_length: anyOf: - type: integer - type: 'null' title: Min Message Buffer Length description: The desired minimum length of messages in the context window of the convo agent. This is a best effort, and may be off-by-one due to user/assistant interleaving. hidden: anyOf: - type: boolean - type: 'null' title: Hidden description: If set to True, the group will be hidden. additionalProperties: false type: object required: - id - manager_type - agent_ids - description title: Group FileBlock: properties: value: type: string title: Value description: Value of the block. limit: type: integer title: Limit description: Character limit of the block. default: 100000 project_id: anyOf: - type: string - type: 'null' title: Project Id description: The associated project id. template_name: anyOf: - type: string - type: 'null' title: Template 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 template_id: anyOf: - type: string - type: 'null' title: Template Id description: The id of the template. base_template_id: anyOf: - type: string - type: 'null' title: Base Template Id description: The base template id of the block. deployment_id: anyOf: - type: string - type: 'null' title: Deployment Id description: The id of the deployment. entity_id: anyOf: - type: string - type: 'null' title: Entity Id description: The id of the entity within the template. preserve_on_migration: anyOf: - type: boolean - type: 'null' title: Preserve On Migration description: Preserve the block on template migration. default: false label: anyOf: - type: string - type: 'null' title: Label description: Label of the block (e.g. 'human', 'persona') in the context window. read_only: type: boolean title: Read Only description: Whether the agent has read-only access to the block. default: false 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: {} hidden: anyOf: - type: boolean - type: 'null' title: Hidden description: If set to True, the block will be hidden. 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 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. tags: anyOf: - items: type: string type: array - type: 'null' title: Tags description: The tags associated with the block. default: [] file_id: type: string title: File Id description: Unique identifier of the file. source_id: type: string title: Source Id description: 'Deprecated: Use `folder_id` field instead. Unique identifier of the source.' deprecated: true is_open: type: boolean title: Is Open description: True if the agent currently has the file open. last_accessed_at: anyOf: - type: string format: date-time - type: 'null' title: Last Accessed At description: UTC timestamp of the agent’s most recent access to this file. Any operations from the open, close, or search tools will update this field. type: object required: - value - file_id - source_id - is_open title: FileBlock GeminiThinkingConfig: properties: include_thoughts: type: boolean title: Include Thoughts description: Whether to include thoughts in the model's response. default: true thinking_budget: type: integer title: Thinking Budget description: The thinking budget for the model. default: 1024 type: object title: GeminiThinkingConfig DynamicManagerSchema: 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: DynamicManagerSchema letta__serialize_schemas__pydantic_agent_schema__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/LettaMessageContentUnion' 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 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 OpenAIReasoning: properties: reasoning_effort: type: string enum: - none - minimal - low - medium - high - xhigh title: Reasoning Effort description: The reasoning effort to use when generating text reasoning models default: minimal type: object title: OpenAIReasoning LettaImage: properties: type: type: string const: letta title: Type description: The source type for the image. default: letta file_id: type: string title: File Id description: The unique identifier of the image file persisted in storage. media_type: anyOf: - type: string - type: 'null' title: Media Type description: The media type for the image. data: anyOf: - type: string - type: 'null' title: Data description: The base64 encoded image data. detail: anyOf: - type: string - type: 'null' title: Detail description: What level of detail to use when processing and understanding the image (low, high, or auto to let the model decide) type: object required: - file_id title: LettaImage PaginatedAgentFiles: properties: files: items: $ref: '#/components/schemas/AgentFileAttachment' type: array title: Files description: List of file attachments for the agent next_cursor: anyOf: - type: string - type: 'null' title: Next Cursor description: Cursor for fetching the next page (file-agent relationship ID) has_more: type: boolean title: Has More description: Whether more results exist after this page additionalProperties: false type: object required: - files - has_more title: PaginatedAgentFiles description: Paginated response for agent files XAIModelSettings: properties: max_output_tokens: type: integer title: Max Output Tokens description: The maximum number of tokens the model can generate. default: 4096 parallel_tool_calls: type: boolean title: Parallel Tool Calls description: Whether to enable parallel tool calling. default: true provider_type: type: string const: xai title: Provider Type description: The type of the provider. default: xai temperature: type: number title: Temperature description: The temperature of the model. default: 0.7 response_format: anyOf: - oneOf: - $ref: '#/components/schemas/TextResponseFormat' - $ref: '#/components/schemas/JsonSchemaResponseFormat' - $ref: '#/components/schemas/JsonObjectResponseFormat' discriminator: propertyName: type mapping: json_object: '#/components/schemas/JsonObjectResponseFormat' json_schema: '#/components/schemas/JsonSchemaResponseFormat' text: '#/components/schemas/TextResponseFormat' - type: 'null' title: Response Format description: The response format for the model. type: object title: XAIModelSettings description: xAI model configuration (OpenAI-compatible). 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 LettaAssistantMessageContentUnion: oneOf: - $ref: '#/components/schemas/TextContent' discriminator: propertyName: type mapping: text: '#/components/schemas/TextContent' ParentToolRule: 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: parent_last_tool title: Type default: parent_last_tool prompt_template: anyOf: - type: string - type: 'null' title: Prompt Template description: Optional template string (ignored). 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: ParentToolRule description: A ToolRule that only allows a child tool to be called if the parent has been called. LettaPing: 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: ping title: Message Type description: The type of the message. Ping messages are a keep-alive to prevent SSE streams from timing out during long running requests. default: ping otid: anyOf: - type: string - type: 'null' title: Otid description: The offline threading id (OTID). Set by the client to deduplicate requests. Used for idempotency in background streaming mode — each message in a request must have a unique OTID. Retries of the same request should reuse the same OTIDs. sender_id: anyOf: - type: string - type: 'null' title: Sender Id step_id: anyOf: - type: string - type: 'null' title: Step Id is_err: anyOf: - type: boolean - type: 'null' title: Is Err seq_id: anyOf: - type: integer - type: 'null' title: Seq Id run_id: anyOf: - type: string - type: 'null' title: Run Id type: object required: - id - date title: LettaPing description: "A ping message used as a keepalive to prevent SSE streams from timing out during long running requests.\n\nArgs:\n id (str): The ID of the message\n date (datetime): The date the message was created in ISO format" CompactionSettings-Input: properties: model: anyOf: - type: string - type: 'null' title: Model description: 'Model handle to use for sliding_window/all summarization (format: provider/model-name). If None, uses lightweight provider-specific defaults.' model_settings: anyOf: - oneOf: - $ref: '#/components/schemas/OpenAIModelSettings' - $ref: '#/components/schemas/SGLangModelSettings' - $ref: '#/components/schemas/AnthropicModelSettings' - $ref: '#/components/schemas/GoogleAIModelSettings' - $ref: '#/components/schemas/GoogleVertexModelSettings' - $ref: '#/components/schemas/AzureModelSettings' - $ref: '#/components/schemas/XAIModelSettings' - $ref: '#/components/schemas/ZAIModelSettings' - $ref: '#/components/schemas/GroqModelSettings' - $ref: '#/components/schemas/DeepseekModelSettings' - $ref: '#/components/schemas/TogetherModelSettings' - $ref: '#/components/schemas/BedrockModelSettings' - $ref: '#/components/schemas/BasetenModelSettings' - $ref: '#/components/schemas/OpenRouterModelSettings' - $ref: '#/components/schemas/ChatGPTOAuthModelSettings' discriminator: propertyName: provider_type mapping: anthropic: '#/components/schemas/AnthropicModelSettings' azure: '#/components/schemas/AzureModelSettings' baseten: '#/components/schemas/BasetenModelSettings' bedrock: '#/components/schemas/BedrockModelSettings' chatgpt_oauth: '#/components/schemas/ChatGPTOAuthModelSettings' deepseek: '#/components/schemas/DeepseekModelSettings' google_ai: '#/components/schemas/GoogleAIModelSettings' google_vertex: '#/components/schemas/GoogleVertexModelSettings' groq: '#/components/schemas/GroqModelSettings' openai: '#/components/schemas/OpenAIModelSettings' openrouter: '#/components/schemas/OpenRouterModelSettings' sglang: '#/components/schemas/SGLangModelSettings' together: '#/components/schemas/TogetherModelSettings' xai: '#/components/schemas/XAIModelSettings' zai: '#/components/schemas/ZAIModelSettings' - type: 'null' title: Model Settings description: Optional model settings used to override defaults for the summarizer model. prompt: anyOf: - type: string - type: 'null' title: Prompt description: The prompt to use for summarization. If None, uses mode-specific default. prompt_acknowledgement: type: boolean title: Prompt Acknowledgement description: Whether to include an acknowledgement post-prompt (helps prevent non-summary outputs). default: false clip_chars: anyOf: - type: integer - type: 'null' title: Clip Chars description: The maximum length of the summary in characters. If none, no clipping is performed. default: 50000 mode: type: string enum: - all - sliding_window - self_compact_all - self_compact_sliding_window title: Mode description: The type of summarization technique use. default: sliding_window sliding_window_percentage: type: number title: Sliding Window Percentage description: The percentage of the context window to keep post-summarization (only used in sliding window modes). type: object title: CompactionSettings description: 'Configuration for conversation compaction / summarization. Per-model settings (temperature, max tokens, etc.) are derived from the default configuration for that handle.' EmbeddingConfig: properties: embedding_endpoint_type: type: string enum: - openai - anthropic - bedrock - google_ai - google_vertex - azure - groq - ollama - webui - webui-legacy - lmstudio - lmstudio-legacy - llamacpp - koboldcpp - vllm - hugging-face - mistral - together - pinecone 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. batch_size: type: integer title: Batch Size description: The maximum batch size for processing embeddings. default: 32 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: Configuration for embedding model connection and processing parameters. 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 description: Sent via the Anthropic Messages API 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 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 AzureModelSettings: properties: max_output_tokens: type: integer title: Max Output Tokens description: The maximum number of tokens the model can generate. default: 4096 parallel_tool_calls: type: boolean title: Parallel Tool Calls description: Whether to enable parallel tool calling. default: true provider_type: type: string const: azure title: Provider Type description: The type of the provider. default: azure temperature: type: number title: Temperature description: The temperature of the model. default: 0.7 response_format: anyOf: - oneOf: - $ref: '#/components/schemas/TextResponseFormat' - $ref: '#/components/schemas/JsonSchemaResponseFormat' - $ref: '#/components/schemas/JsonObjectResponseFormat' discriminator: propertyName: type mapping: json_object: '#/components/schemas/JsonObjectResponseFormat' json_schema: '#/components/schemas/JsonSchemaResponseFormat' text: '#/components/schemas/TextResponseFormat' - type: 'null' title: Response Format description: The response format for the model. type: object title: AzureModelSettings description: Azure OpenAI model configuration (OpenAI-compatible). 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 description: The type of the message. default: user_message otid: anyOf: - type: string - type: 'null' title: Otid description: The offline threading id (OTID). Set by the client to deduplicate requests. Used for idempotency in background streaming mode — each message in a request must have a unique OTID. Retries of the same request should reuse the same OTIDs. sender_id: anyOf: - type: string - type: 'null' title: Sender Id step_id: anyOf: - type: string - type: 'null' title: Step Id is_err: anyOf: - type: boolean - type: 'null' title: Is Err seq_id: anyOf: - type: integer - type: 'null' title: Seq Id run_id: anyOf: - type: string - type: 'null' title: Run Id 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)" OpenAIModelSettings: properties: max_output_tokens: type: integer title: Max Output Tokens description: The maximum number of tokens the model can generate. default: 4096 parallel_tool_calls: type: boolean title: Parallel Tool Calls description: Whether to enable parallel tool calling. default: true provider_type: type: string const: openai title: Provider Type description: The type of the provider. default: openai temperature: type: number title: Temperature description: The temperature of the model. default: 0.7 reasoning: $ref: '#/components/schemas/OpenAIReasoning' description: The reasoning configuration for the model. default: reasoning_effort: high response_format: anyOf: - oneOf: - $ref: '#/components/schemas/TextResponseFormat' - $ref: '#/components/schemas/JsonSchemaResponseFormat' - $ref: '#/components/schemas/JsonObjectResponseFormat' discriminator: propertyName: type mapping: json_object: '#/components/schemas/JsonObjectResponseFormat' json_schema: '#/components/schemas/JsonSchemaResponseFormat' text: '#/components/schemas/TextResponseFormat' - type: 'null' title: Response Format description: The response format for the model. strict: type: boolean title: Strict description: Enable strict mode for tool calling. When true, tool outputs are guaranteed to match JSON schemas. default: true type: object title: OpenAIModelSettings 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 GoogleAIModelSettings: properties: max_output_tokens: type: integer title: Max Output Tokens description: The maximum number of tokens the model can generate. default: 65536 parallel_tool_calls: type: boolean title: Parallel Tool Calls description: Whether to enable parallel tool calling. default: true provider_type: type: string const: google_ai title: Provider Type description: The type of the provider. default: google_ai temperature: type: number title: Temperature description: The temperature of the model. default: 0.7 thinking_config: $ref: '#/components/schemas/GeminiThinkingConfig' description: The thinking configuration for the model. default: include_thoughts: true thinking_budget: 1024 response_schema: anyOf: - oneOf: - $ref: '#/components/schemas/TextResponseFormat' - $ref: '#/components/schemas/JsonSchemaResponseFormat' - $ref: '#/components/schemas/JsonObjectResponseFormat' discriminator: propertyName: type mapping: json_object: '#/components/schemas/JsonObjectResponseFormat' json_schema: '#/components/schemas/JsonSchemaResponseFormat' text: '#/components/schemas/TextResponseFormat' - type: 'null' title: Response Schema description: The response schema for the model. type: object title: GoogleAIModelSettings FileAgentSchema: properties: agent_id: type: string title: Agent Id description: Unique identifier of the agent. file_id: type: string title: File Id description: Unique identifier of the file. source_id: type: string title: Source Id description: 'Deprecated: Use `folder_id` field instead. Unique identifier of the source.' deprecated: true file_name: type: string title: File Name description: Name of the file. is_open: type: boolean title: Is Open description: True if the agent currently has the file open. default: true visible_content: anyOf: - type: string - type: 'null' title: Visible Content description: Portion of the file the agent is focused on (may be large). last_accessed_at: anyOf: - type: string format: date-time - type: 'null' title: Last Accessed At description: UTC timestamp of the agent's most recent access to this file. start_line: anyOf: - type: integer - type: 'null' title: Start Line description: Starting line number (1-indexed) when file was opened with line range. end_line: anyOf: - type: integer - type: 'null' title: End Line description: Ending line number (exclusive) when file was opened with line range. id: type: string title: Id description: Human-readable identifier for this file-agent relationship in the file additionalProperties: false type: object required: - agent_id - file_id - source_id - file_name - id title: FileAgentSchema description: File-Agent relationship with human-readable ID for agent file 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. 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 maximum: 1000000 minimum: 1 title: Return Char Limit description: The maximum number of characters in the response. default: 50000 pip_requirements: anyOf: - items: $ref: '#/components/schemas/PipRequirement' type: array - type: 'null' title: Pip Requirements description: Optional list of pip packages required by this tool. npm_requirements: anyOf: - items: $ref: '#/components/schemas/NpmRequirement' type: array - type: 'null' title: Npm Requirements description: Optional list of npm packages required by this tool. default_requires_approval: anyOf: - type: boolean - type: 'null' title: Default Requires Approval description: Default value for whether or not executing this tool requires approval. enable_parallel_execution: anyOf: - type: boolean - type: 'null' title: Enable Parallel Execution description: If set to True, then this tool will potentially be executed concurrently with other tools. Default False. default: false 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. project_id: anyOf: - type: string - type: 'null' title: Project Id description: The project id of the tool. additionalProperties: false type: object title: Tool description: Representation of a tool, which is a function that can be called by the agent. letta__schemas__mcp_server__ToolExecuteRequest: properties: args: additionalProperties: true type: object title: Args description: Arguments to pass to the tool additionalProperties: false type: object title: ToolExecuteRequest description: Request to execute a tool. ChatGPTOAuthModelSettings: properties: max_output_tokens: type: integer title: Max Output Tokens description: The maximum number of tokens the model can generate. default: 4096 parallel_tool_calls: type: boolean title: Parallel Tool Calls description: Whether to enable parallel tool calling. default: true provider_type: type: string const: chatgpt_oauth title: Provider Type description: The type of the provider. default: chatgpt_oauth temperature: type: number title: Temperature description: The temperature of the model. default: 0.7 reasoning: $ref: '#/components/schemas/ChatGPTOAuthReasoning' description: The reasoning configuration for the model. default: reasoning_effort: medium type: object title: ChatGPTOAuthModelSettings description: ChatGPT OAuth model configuration (uses ChatGPT backend API). EventMessage: 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: event_message title: Message Type default: event_message otid: anyOf: - type: string - type: 'null' title: Otid description: The offline threading id (OTID). Set by the client to deduplicate requests. Used for idempotency in background streaming mode — each message in a request must have a unique OTID. Retries of the same request should reuse the same OTIDs. sender_id: anyOf: - type: string - type: 'null' title: Sender Id step_id: anyOf: - type: string - type: 'null' title: Step Id is_err: anyOf: - type: boolean - type: 'null' title: Is Err seq_id: anyOf: - type: integer - type: 'null' title: Seq Id run_id: anyOf: - type: string - type: 'null' title: Run Id event_type: type: string const: compaction title: Event Type event_data: additionalProperties: true type: object title: Event Data type: object required: - id - date - event_type - event_data title: EventMessage description: A message for notifying the developer that an event that has occured (e.g. a compaction). Events are NOT part of the context window. 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 ExportAgentRequest: properties: skills: items: $ref: '#/components/schemas/SkillSchema' type: array title: Skills description: Skills to include in the export. Each skill must have a name and files (including SKILL.md). conversation_id: anyOf: - type: string - type: 'null' title: Conversation Id description: Conversation ID to export. If provided, uses messages from this conversation instead of the agent's global message history. scrub_messages: type: boolean title: Scrub Messages description: If True, excludes all messages from the export. Useful for sharing agent configs without conversation history. default: false type: object title: ExportAgentRequest description: Request body for POST /export endpoint. 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: anyOf: - type: string format: date-time - type: 'null' 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 archive_id: anyOf: - type: string - type: 'null' title: Archive Id description: The unique identifier of the archive containing this passage. source_id: anyOf: - type: string - type: 'null' title: Source Id description: 'Deprecated: Use `folder_id` field instead. The data source of the passage.' deprecated: true file_id: anyOf: - type: string - type: 'null' title: File Id description: The unique identifier of the file associated with the passage. file_name: anyOf: - type: string - type: 'null' title: File Name description: The name of the file (only for source passages). metadata: anyOf: - additionalProperties: true type: object - type: 'null' title: Metadata description: The metadata of the passage. default: {} tags: anyOf: - items: type: string type: array - type: 'null' title: Tags description: Tags associated with this passage. 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. RunStatus: type: string enum: - created - running - completed - failed - cancelled title: RunStatus description: Status of the run. ToolReturnCreate: properties: type: type: string const: tool_return title: Type description: The message type to be created. default: tool_return otid: anyOf: - type: string - type: 'null' title: Otid description: The offline threading id (OTID). Set by the client to deduplicate requests. Used for idempotency in background streaming mode — each message in a request must have a unique OTID. Retries of the same request should reuse the same OTIDs. group_id: anyOf: - type: string - type: 'null' title: Group Id description: The multi-agent group that the message was sent in tool_returns: items: $ref: '#/components/schemas/letta__schemas__letta_message__ToolReturn' type: array title: Tool Returns description: List of tool returns from client-side execution type: object required: - tool_returns title: ToolReturnCreate description: 'Submit tool return(s) from client-side tool execution. This is the preferred way to send tool results back to the agent after client-side tool execution. It is equivalent to sending an ApprovalCreate with tool return approvals, but provides a cleaner API for the common case.' LettaMessageContentUnion: oneOf: - $ref: '#/components/schemas/TextContent' - $ref: '#/components/schemas/ImageContent' - $ref: '#/components/schemas/ToolCallContent' - $ref: '#/components/schemas/ToolReturnContent' - $ref: '#/components/schemas/ReasoningContent' - $ref: '#/components/schemas/RedactedReasoningContent' - $ref: '#/components/schemas/OmittedReasoningContent' discriminator: propertyName: type mapping: text: '#/components/schemas/TextContent' image: '#/components/schemas/ImageContent' tool_call: '#/components/schemas/ToolCallContent' tool_return: '#/components/schemas/ToolCallContent' reasoning: '#/components/schemas/ReasoningContent' redacted_reasoning: '#/components/schemas/RedactedReasoningContent' omitted_reasoning: '#/components/schemas/OmittedReasoningContent' openai__types__chat__chat_completion_message_function_tool_call__Function: properties: arguments: type: string title: Arguments name: type: string title: Name additionalProperties: true type: object required: - arguments - name title: Function description: The function that the model called. NpmRequirement: properties: name: type: string minLength: 1 title: Name description: Name of the npm package. version: anyOf: - type: string - type: 'null' title: Version description: Optional version of the package, following semantic versioning. type: object required: - name title: NpmRequirement HTTPValidationError: properties: detail: items: $ref: '#/components/schemas/ValidationError' type: array title: Detail type: object title: HTTPValidationError SkillSchema: properties: name: type: string title: Name description: Skill name, also serves as unique identifier (e.g., 'slack', 'pdf') files: anyOf: - additionalProperties: type: string type: object - type: 'null' title: Files description: Skill files as path -> content mapping. Must include 'SKILL.md' key if provided. source_url: anyOf: - type: string - type: 'null' title: Source Url description: Source URL for skill resolution (e.g., 'letta:slack', 'anthropic:pdf', 'owner/repo/path') type: object required: - name title: SkillSchema description: 'Skill schema for agent files. Skills are folders of instructions, scripts, and resources that agents can load. Either files (with SKILL.md) or source_url must be provided: - files with SKILL.md: inline skill content - source_url: reference to resolve later (e.g., ''letta:slack'') - both: inline content with provenance tracking' GoogleVertexModelSettings: properties: max_output_tokens: type: integer title: Max Output Tokens description: The maximum number of tokens the model can generate. default: 65536 parallel_tool_calls: type: boolean title: Parallel Tool Calls description: Whether to enable parallel tool calling. default: true provider_type: type: string const: google_vertex title: Provider Type description: The type of the provider. default: google_vertex temperature: type: number title: Temperature description: The temperature of the model. default: 0.7 thinking_config: $ref: '#/components/schemas/GeminiThinkingConfig' description: The thinking configuration for the model. default: include_thoughts: true thinking_budget: 1024 response_schema: anyOf: - oneOf: - $ref: '#/components/schemas/TextResponseFormat' - $ref: '#/components/schemas/JsonSchemaResponseFormat' - $ref: '#/components/schemas/JsonObjectResponseFormat' discriminator: propertyName: type mapping: json_object: '#/components/schemas/JsonObjectResponseFormat' json_schema: '#/components/schemas/JsonSchemaResponseFormat' text: '#/components/schemas/TextResponseFormat' - type: 'null' title: Response Schema description: The response schema for the model. type: object title: GoogleVertexModelSettings CreateBlock: properties: value: type: string title: Value description: Value of the block. limit: type: integer title: Limit description: Character limit of the block. default: 100000 project_id: anyOf: - type: string - type: 'null' title: Project Id description: The associated project id. template_name: anyOf: - type: string - type: 'null' title: Template Name description: Name of the block if it is a template. is_template: type: boolean title: Is Template default: false template_id: anyOf: - type: string - type: 'null' title: Template Id description: The id of the template. base_template_id: anyOf: - type: string - type: 'null' title: Base Template Id description: The base template id of the block. deployment_id: anyOf: - type: string - type: 'null' title: Deployment Id description: The id of the deployment. entity_id: anyOf: - type: string - type: 'null' title: Entity Id description: The id of the entity within the template. preserve_on_migration: anyOf: - type: boolean - type: 'null' title: Preserve On Migration description: Preserve the block on template migration. default: false label: type: string title: Label description: Label of the block. read_only: type: boolean title: Read Only description: Whether the agent has read-only access to the block. default: false 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: {} hidden: anyOf: - type: boolean - type: 'null' title: Hidden description: If set to True, the block will be hidden. tags: anyOf: - items: type: string type: array - type: 'null' title: Tags description: The tags to associate with the block. type: object required: - value - label title: CreateBlock description: Create a block GroqModelSettings: properties: max_output_tokens: type: integer title: Max Output Tokens description: The maximum number of tokens the model can generate. default: 4096 parallel_tool_calls: type: boolean title: Parallel Tool Calls description: Whether to enable parallel tool calling. default: true provider_type: type: string const: groq title: Provider Type description: The type of the provider. default: groq temperature: type: number title: Temperature description: The temperature of the model. default: 0.7 response_format: anyOf: - oneOf: - $ref: '#/components/schemas/TextResponseFormat' - $ref: '#/components/schemas/JsonSchemaResponseFormat' - $ref: '#/components/schemas/JsonObjectResponseFormat' discriminator: propertyName: type mapping: json_object: '#/components/schemas/JsonObjectResponseFormat' json_schema: '#/components/schemas/JsonSchemaResponseFormat' text: '#/components/schemas/TextResponseFormat' - type: 'null' title: Response Format description: The response format for the model. type: object title: GroqModelSettings description: Groq model configuration (OpenAI-compatible). SourceSchema: properties: 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. instructions: anyOf: - type: string - type: 'null' title: Instructions description: Instructions for how to use the source. metadata: anyOf: - additionalProperties: true type: object - type: 'null' title: Metadata description: Metadata associated with the source. embedding: anyOf: - type: string - type: 'null' title: Embedding description: The handle 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. id: type: string title: Id description: Human-readable identifier for this source in the file additionalProperties: false type: object required: - name - id title: SourceSchema description: Source with human-readable ID for agent file letta__serialize_schemas__pydantic_agent_schema__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 LLMConfig: properties: model: type: string title: Model description: 'LLM model name. ' display_name: anyOf: - type: string - type: 'null' title: Display Name description: A human-friendly display name for the model. model_endpoint_type: type: string enum: - openai - anthropic - google_ai - google_vertex - azure - groq - ollama - webui - webui-legacy - lmstudio - lmstudio-legacy - lmstudio-chatcompletions - llamacpp - koboldcpp - vllm - hugging-face - minimax - mistral - together - bedrock - deepseek - xai - zai - zai_coding - baseten - fireworks - openrouter - chatgpt_oauth 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. provider_name: anyOf: - type: string - type: 'null' title: Provider Name description: The provider name for the model. provider_category: anyOf: - $ref: '#/components/schemas/ProviderCategory' - type: 'null' description: The provider category 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: false 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: 1 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. 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: true reasoning_effort: anyOf: - type: string enum: - none - minimal - low - medium - high - xhigh - type: 'null' title: Reasoning Effort description: The reasoning effort to use when generating text reasoning models max_reasoning_tokens: type: integer title: Max Reasoning Tokens description: Configurable thinking budget for extended thinking. Used for enable_reasoner and also for Google Vertex models like Gemini 2.5 Flash. Minimum value is 1024 when used with enable_reasoner. default: 0 effort: anyOf: - type: string enum: - low - medium - high - max - type: 'null' title: Effort description: The effort level for Anthropic models that support it (Opus 4.5, Opus 4.6). Controls token spending and thinking behavior. Not setting this gives similar performance to 'high'. frequency_penalty: anyOf: - type: number - type: 'null' title: Frequency Penalty description: 'Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model''s likelihood to repeat the same line verbatim. From OpenAI: Number between -2.0 and 2.0.' compatibility_type: anyOf: - type: string enum: - gguf - mlx - type: 'null' title: Compatibility Type description: The framework compatibility type for the model. verbosity: anyOf: - type: string enum: - low - medium - high - type: 'null' title: Verbosity description: Soft control for how verbose model output should be, used for GPT-5 models. tier: anyOf: - type: string - type: 'null' title: Tier description: The cost tier for the model (cloud only). parallel_tool_calls: anyOf: - type: boolean - type: 'null' title: Parallel Tool Calls description: 'Deprecated: Use model_settings to configure parallel tool calls instead. If set to True, enables parallel tool calling. Defaults to False.' default: false deprecated: true response_format: anyOf: - oneOf: - $ref: '#/components/schemas/TextResponseFormat' - $ref: '#/components/schemas/JsonSchemaResponseFormat' - $ref: '#/components/schemas/JsonObjectResponseFormat' discriminator: propertyName: type mapping: json_object: '#/components/schemas/JsonObjectResponseFormat' json_schema: '#/components/schemas/JsonSchemaResponseFormat' text: '#/components/schemas/TextResponseFormat' - type: 'null' title: Response Format description: The response format for the model's output. Supports text, json_object, and json_schema (structured outputs). Can be set via model_settings. strict: type: boolean title: Strict description: 'Enable strict mode for tool calling. When true, tool schemas include strict: true and additionalProperties: false, guaranteeing tool outputs match JSON schemas.' default: false return_logprobs: type: boolean title: Return Logprobs description: Whether to return log probabilities of the output tokens. Useful for RL training. default: false top_logprobs: anyOf: - type: integer - type: 'null' title: Top Logprobs description: Number of most likely tokens to return at each position (0-20). Requires return_logprobs=True. return_token_ids: type: boolean title: Return Token Ids description: Whether to return token IDs for all LLM generations via SGLang native endpoint. Required for multi-turn RL training with loss masking. Only works with SGLang provider. default: false tool_call_parser: anyOf: - type: string - type: 'null' title: Tool Call Parser description: SGLang tool call parser name (e.g. 'glm47', 'qwen25', 'hermes'). Used by the SGLang native adapter to parse tool calls from raw model output. type: object required: - model - model_endpoint_type - context_window title: LLMConfig description: "Configuration for Language Model (LLM) connection and generation parameters.\n\n.. deprecated::\n LLMConfig is deprecated and should not be used as an input or return type in API calls.\n Use the schemas in letta.schemas.model (ModelSettings, OpenAIModelSettings, etc.) instead.\n For conversion, use the _to_model() method or Model._from_llm_config() method." MCPServerSchema: properties: id: type: string title: Id description: Human-readable MCP server ID server_type: type: string title: Server Type server_name: type: string title: Server Name server_url: anyOf: - type: string - type: 'null' title: Server Url stdio_config: anyOf: - additionalProperties: true type: object - type: 'null' title: Stdio Config metadata_: anyOf: - additionalProperties: true type: object - type: 'null' title: Metadata type: object required: - id - server_type - server_name title: MCPServerSchema description: MCP server schema for agent files with remapped ID. SleeptimeManagerSchema: properties: manager_type: type: string const: sleeptime title: Manager Type description: '' default: sleeptime manager_agent_id: type: string title: Manager Agent Id description: '' sleeptime_agent_frequency: anyOf: - type: integer - type: 'null' title: Sleeptime Agent Frequency description: '' type: object required: - manager_agent_id title: SleeptimeManagerSchema LettaRequest: properties: messages: anyOf: - items: anyOf: - $ref: '#/components/schemas/MessageCreate' - $ref: '#/components/schemas/ApprovalCreate' - $ref: '#/components/schemas/ToolReturnCreate' type: array - type: 'null' title: Messages description: The messages to be sent to the agent. input: anyOf: - type: string - items: oneOf: - $ref: '#/components/schemas/TextContent' - $ref: '#/components/schemas/ImageContent' - $ref: '#/components/schemas/ToolCallContent' - $ref: '#/components/schemas/ToolReturnContent' - $ref: '#/components/schemas/ReasoningContent' - $ref: '#/components/schemas/RedactedReasoningContent' - $ref: '#/components/schemas/OmittedReasoningContent' - $ref: '#/components/schemas/SummarizedReasoningContent' discriminator: propertyName: type mapping: image: '#/components/schemas/ImageContent' omitted_reasoning: '#/components/schemas/OmittedReasoningContent' reasoning: '#/components/schemas/ReasoningContent' redacted_reasoning: '#/components/schemas/RedactedReasoningContent' summarized_reasoning: '#/components/schemas/SummarizedReasoningContent' text: '#/components/schemas/TextContent' tool_call: '#/components/schemas/ToolCallContent' tool_return: '#/components/schemas/ToolReturnContent' type: array - type: 'null' title: Input description: 'Syntactic sugar for a single user message. Equivalent to messages=[{''role'': ''user'', ''content'': input}].' max_steps: type: integer title: Max Steps description: Maximum number of steps the agent should take to process the request. default: 50 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. Still supported for legacy agent types, but deprecated for letta_v1_agent onward. default: true deprecated: true assistant_message_tool_name: type: string title: Assistant Message Tool Name description: The name of the designated message tool. Still supported for legacy agent types, but deprecated for letta_v1_agent onward. default: send_message deprecated: true assistant_message_tool_kwarg: type: string title: Assistant Message Tool Kwarg description: The name of the message argument in the designated message tool. Still supported for legacy agent types, but deprecated for letta_v1_agent onward. default: message deprecated: true include_return_message_types: anyOf: - items: $ref: '#/components/schemas/MessageType' type: array - type: 'null' title: Include Return Message Types description: Only return specified message types in the response. If `None` (default) returns all messages. enable_thinking: type: string title: Enable Thinking description: If set to True, enables reasoning before responses or tool calls from the agent. default: true deprecated: true client_tools: anyOf: - items: $ref: '#/components/schemas/ClientToolSchema' type: array - type: 'null' title: Client Tools description: Client-side tools that the agent can call. When the agent calls a client-side tool, execution pauses and returns control to the client to execute the tool and provide the result via a ToolReturn. client_skills: anyOf: - items: $ref: '#/components/schemas/ClientSkillSchema' type: array - type: 'null' title: Client Skills description: Client-side skills available in the environment. These are rendered in the system prompt's available skills section alongside agent-scoped skills from MemFS. override_model: anyOf: - type: string - type: 'null' title: Override Model description: Model handle to use for this request instead of the agent's default model. This allows sending a message to a different model without changing the agent's configuration. include_compaction_messages: type: boolean title: Include Compaction Messages description: If True, compaction events emit structured `SummaryMessage` and `EventMessage` types. If False (default), compaction messages are not included in the response. default: false return_logprobs: type: boolean title: Return Logprobs description: If True, returns log probabilities of the output tokens in the response. Useful for RL training. Only supported for OpenAI-compatible providers (including SGLang). default: false top_logprobs: anyOf: - type: integer - type: 'null' title: Top Logprobs description: Number of most likely tokens to return at each position (0-20). Requires return_logprobs=True. return_token_ids: type: boolean title: Return Token Ids description: If True, returns token IDs and logprobs for ALL LLM generations in the agent step, not just the last one. Uses SGLang native /generate endpoint. Returns 'turns' field with TurnTokenData for each assistant/tool turn. Required for proper multi-turn RL training with loss masking. default: false override_system: anyOf: - type: string - type: 'null' title: Override System description: Optional per-request system prompt override. When set, this is passed directly to the underlying LLM request and bypasses the persisted/compiled system message for that request. type: object title: LettaRequest Body_export_agent: properties: spec: anyOf: - $ref: '#/components/schemas/AgentFileSchema' - type: 'null' legacy_spec: anyOf: - $ref: '#/components/schemas/letta__serialize_schemas__pydantic_agent_schema__AgentSchema' - type: 'null' type: object title: Body_export_agent LettaStopReason: properties: message_type: type: string const: stop_reason title: Message Type description: The type of the message. default: stop_reason stop_reason: $ref: '#/components/schemas/StopReasonType' description: The reason why execution stopped. type: object required: - stop_reason title: LettaStopReason description: The stop reason from Letta indicating why agent loop stopped execution. 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 UrlImage: properties: type: type: string const: url title: Type description: The source type for the image. default: url url: type: string title: Url description: The URL of the image. type: object required: - url title: UrlImage LettaMessageUnion: 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' - $ref: '#/components/schemas/ApprovalRequestMessage' - $ref: '#/components/schemas/ApprovalResponseMessage' - $ref: '#/components/schemas/SummaryMessage' - $ref: '#/components/schemas/EventMessage' 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' approval_request_message: '#/components/schemas/ApprovalRequestMessage' approval_response_message: '#/components/schemas/ApprovalResponseMessage' summary_message: '#/components/schemas/SummaryMessage' event_message: '#/components/schemas/EventMessage' TurnTokenData: properties: role: type: string enum: - assistant - tool title: Role description: 'Role of this turn: ''assistant'' for LLM generations (trainable), ''tool'' for tool results (non-trainable).' output_ids: anyOf: - items: type: integer type: array - type: 'null' title: Output Ids description: Token IDs from SGLang native endpoint. Only present for assistant turns. output_token_logprobs: anyOf: - items: items: {} type: array type: array - type: 'null' title: Output Token Logprobs description: 'Logprobs from SGLang: [[logprob, token_id, top_logprob_or_null], ...]. Only present for assistant turns.' content: anyOf: - type: string - type: 'null' title: Content description: Text content. For tool turns, client tokenizes this with loss_mask=0. tool_name: anyOf: - type: string - type: 'null' title: Tool Name description: Name of the tool called. Only present for tool turns. type: object required: - role title: TurnTokenData description: 'Token data for a single LLM generation turn in a multi-turn agent interaction. Used for RL training to track token IDs and logprobs across all LLM calls, not just the final one. Tool results are included so the client can tokenize them with loss_mask=0 (non-trainable).' OpenRouterModelSettings: properties: max_output_tokens: type: integer title: Max Output Tokens description: The maximum number of tokens the model can generate. default: 4096 parallel_tool_calls: type: boolean title: Parallel Tool Calls description: Whether to enable parallel tool calling. default: true provider_type: type: string const: openrouter title: Provider Type description: The type of the provider. default: openrouter temperature: type: number title: Temperature description: The temperature of the model. default: 0.7 response_format: anyOf: - oneOf: - $ref: '#/components/schemas/TextResponseFormat' - $ref: '#/components/schemas/JsonSchemaResponseFormat' - $ref: '#/components/schemas/JsonObjectResponseFormat' discriminator: propertyName: type mapping: json_object: '#/components/schemas/JsonObjectResponseFormat' json_schema: '#/components/schemas/JsonSchemaResponseFormat' text: '#/components/schemas/TextResponseFormat' - type: 'null' title: Response Format description: The response format for the model. type: object title: OpenRouterModelSettings description: OpenRouter model configuration (OpenAI-compatible). SummarizedReasoningContent: properties: type: type: string const: summarized_reasoning title: Type description: Indicates this is a summarized reasoning step. default: summarized_reasoning id: type: string title: Id description: The unique identifier for this reasoning step. summary: items: $ref: '#/components/schemas/SummarizedReasoningContentPart' type: array title: Summary description: Summaries of the reasoning content. encrypted_content: type: string title: Encrypted Content description: The encrypted reasoning content. type: object required: - id - summary title: SummarizedReasoningContent description: The style of reasoning content returned by the OpenAI Responses API 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 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 prompt_template: anyOf: - type: string - type: 'null' title: Prompt Template description: Optional template string (ignored). 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. ArchivalMemorySearchResult: properties: id: type: string title: Id description: Unique identifier of the archival memory passage timestamp: type: string title: Timestamp description: Timestamp of when the memory was created, formatted in agent's timezone content: type: string title: Content description: Text content of the archival memory passage tags: items: type: string type: array title: Tags description: List of tags associated with this memory type: object required: - id - timestamp - content title: ArchivalMemorySearchResult TagSchema: properties: tag: type: string title: Tag type: object required: - tag title: TagSchema ChatCompletionMessageFunctionToolCall-Output: 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: ChatCompletionMessageFunctionToolCall description: A call to a function tool created by the model. ChatGPTOAuthReasoning: properties: reasoning_effort: type: string enum: - none - low - medium - high - xhigh title: Reasoning Effort description: The reasoning effort level for GPT-5.x and o-series models. default: medium type: object title: ChatGPTOAuthReasoning description: Reasoning configuration for ChatGPT OAuth models (GPT-5.x, o-series). letta__schemas__openai__chat_completion_response__TopLogprob: properties: token: type: string title: Token bytes: anyOf: - items: type: integer type: array - type: 'null' title: Bytes logprob: type: number title: Logprob type: object required: - token - logprob title: TopLogprob TogetherModelSettings: properties: max_output_tokens: type: integer title: Max Output Tokens description: The maximum number of tokens the model can generate. default: 4096 parallel_tool_calls: type: boolean title: Parallel Tool Calls description: Whether to enable parallel tool calling. default: true provider_type: type: string const: together title: Provider Type description: The type of the provider. default: together temperature: type: number title: Temperature description: The temperature of the model. default: 0.7 response_format: anyOf: - oneOf: - $ref: '#/components/schemas/TextResponseFormat' - $ref: '#/components/schemas/JsonSchemaResponseFormat' - $ref: '#/components/schemas/JsonObjectResponseFormat' discriminator: propertyName: type mapping: json_object: '#/components/schemas/JsonObjectResponseFormat' json_schema: '#/components/schemas/JsonSchemaResponseFormat' text: '#/components/schemas/TextResponseFormat' - type: 'null' title: Response Format description: The response format for the model. type: object title: TogetherModelSettings description: Together AI model configuration (OpenAI-compatible). StopReasonType: type: string enum: - end_turn - error - llm_api_error - invalid_llm_response - invalid_tool_call - max_steps - max_tokens_exceeded - no_tool_call - tool_rule - cancelled - insufficient_credits - requires_approval - context_window_overflow_in_system_prompt title: StopReasonType FunctionTool: properties: function: $ref: '#/components/schemas/FunctionDefinition' type: type: string const: function title: Type additionalProperties: true type: object required: - function - type title: FunctionTool BlockResponse: properties: value: type: string title: Value description: Value of the block. limit: type: integer title: Limit description: Character limit of the block. default: 100000 project_id: anyOf: - type: string - type: 'null' title: Project Id description: The associated project id. template_name: anyOf: - type: string - type: 'null' title: Template Name description: (Deprecated) The name of the block template (if it is a template). deprecated: true is_template: type: boolean title: Is Template description: Whether the block is a template (e.g. saved human/persona options). default: false template_id: anyOf: - type: string - type: 'null' title: Template Id description: (Deprecated) The id of the template. deprecated: true base_template_id: anyOf: - type: string - type: 'null' title: Base Template Id description: (Deprecated) The base template id of the block. deprecated: true deployment_id: anyOf: - type: string - type: 'null' title: Deployment Id description: (Deprecated) The id of the deployment. deprecated: true entity_id: anyOf: - type: string - type: 'null' title: Entity Id description: (Deprecated) The id of the entity within the template. deprecated: true preserve_on_migration: anyOf: - type: boolean - type: 'null' title: Preserve On Migration description: (Deprecated) Preserve the block on template migration. default: false deprecated: true label: anyOf: - type: string - type: 'null' title: Label description: Label of the block (e.g. 'human', 'persona') in the context window. read_only: type: boolean title: Read Only description: (Deprecated) Whether the agent has read-only access to the block. default: false deprecated: true 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: {} hidden: anyOf: - type: boolean - type: 'null' title: Hidden description: (Deprecated) If set to True, the block will be hidden. deprecated: true id: type: string title: Id description: The id of 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. tags: anyOf: - items: type: string type: array - type: 'null' title: Tags description: The tags associated with the block. default: [] type: object required: - value - id title: BlockResponse FileSchema: properties: source_id: type: string title: Source Id description: 'Deprecated: Use `folder_id` field instead. The unique identifier of the source associated with the document.' deprecated: true file_name: anyOf: - type: string - type: 'null' title: File Name description: The name of the file. original_file_name: anyOf: - type: string - type: 'null' title: Original File Name description: The original name of the file as uploaded. 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. processing_status: $ref: '#/components/schemas/FileProcessingStatus' description: The current processing status of the file (e.g. pending, parsing, embedding, completed, error). default: pending error_message: anyOf: - type: string - type: 'null' title: Error Message description: Optional error message if the file failed processing. total_chunks: anyOf: - type: integer - type: 'null' title: Total Chunks description: Total number of chunks for the file. chunks_embedded: anyOf: - type: integer - type: 'null' title: Chunks Embedded description: Number of chunks that have been embedded. content: anyOf: - type: string - type: 'null' title: Content description: Optional full-text content of the file; only populated on demand due to its size. id: type: string title: Id description: Human-readable identifier for this file in the file additionalProperties: false type: object required: - source_id - id title: FileSchema description: File with human-readable ID for agent file ApprovalReturn: properties: type: type: string const: approval title: Type description: The message type to be created. default: approval tool_call_id: type: string title: Tool Call Id description: The ID of the tool call that corresponds to this approval approve: type: boolean title: Approve description: Whether the tool has been approved reason: anyOf: - type: string - type: 'null' title: Reason description: An optional explanation for the provided approval status type: object required: - tool_call_id - approve title: ApprovalReturn CompactionStats: properties: trigger: type: string title: Trigger description: What triggered the compaction (e.g., 'context_window_exceeded', 'post_step_context_check') context_tokens_before: anyOf: - type: integer - type: 'null' title: Context Tokens Before description: Token count before compaction (from LLM usage stats, includes full context sent to LLM) context_tokens_after: anyOf: - type: integer - type: 'null' title: Context Tokens After description: Token count after compaction (message tokens only, does not include tool definitions) context_window: type: integer title: Context Window description: The model's context window size messages_count_before: type: integer title: Messages Count Before description: Number of messages before compaction messages_count_after: type: integer title: Messages Count After description: Number of messages after compaction type: object required: - trigger - context_window - messages_count_before - messages_count_after title: CompactionStats description: Statistics about a memory compaction operation. 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 TextResponseFormat: properties: type: type: string const: text title: Type description: The type of the response format. default: text type: object title: TextResponseFormat description: Response format for plain text responses. 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 description: The type of the message. default: assistant_message otid: anyOf: - type: string - type: 'null' title: Otid description: The offline threading id (OTID). Set by the client to deduplicate requests. Used for idempotency in background streaming mode — each message in a request must have a unique OTID. Retries of the same request should reuse the same OTIDs. sender_id: anyOf: - type: string - type: 'null' title: Sender Id step_id: anyOf: - type: string - type: 'null' title: Step Id is_err: anyOf: - type: boolean - type: 'null' title: Is Err seq_id: anyOf: - type: integer - type: 'null' title: Seq Id run_id: anyOf: - type: string - type: 'null' title: Run Id 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)" LettaErrorMessage: properties: message_type: type: string const: error_message title: Message Type description: The type of the message. default: error_message run_id: type: string title: Run ID description: The ID of the run. error_type: type: string title: Error Type description: The type of error. message: type: string title: Message description: The error message. detail: type: string title: Detail description: An optional error detail. seq_id: type: integer title: Seq ID description: The sequence ID for cursor-based pagination. type: object required: - message_type - run_id - error_type - message title: LettaErrorMessage description: Error messages are used to notify the client of an error that occurred during the agent's execution. VoiceSleeptimeManagerSchema: properties: manager_type: type: string const: voice_sleeptime title: Manager Type description: '' default: voice_sleeptime manager_agent_id: type: string title: Manager Agent Id description: '' max_message_buffer_length: anyOf: - type: integer - type: 'null' title: Max Message Buffer Length description: '' min_message_buffer_length: anyOf: - type: integer - type: 'null' title: Min Message Buffer Length description: '' type: object required: - manager_agent_id title: VoiceSleeptimeManagerSchema 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 title: ToolCallDelta 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 prompt_template: anyOf: - type: string - type: 'null' title: Prompt Template description: Optional template string (ignored). 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. 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 description: The type of the message. default: hidden_reasoning_message otid: anyOf: - type: string - type: 'null' title: Otid description: The offline threading id (OTID). Set by the client to deduplicate requests. Used for idempotency in background streaming mode — each message in a request must have a unique OTID. Retries of the same request should reuse the same OTIDs. sender_id: anyOf: - type: string - type: 'null' title: Sender Id step_id: anyOf: - type: string - type: 'null' title: Step Id is_err: anyOf: - type: boolean - type: 'null' title: Is Err seq_id: anyOf: - type: integer - type: 'null' title: Seq Id run_id: anyOf: - type: string - type: 'null' title: Run Id 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" letta__schemas__agent_file__AgentSchema: 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. folder_ids: anyOf: - items: type: string type: array - type: 'null' title: Folder Ids description: The ids of the folders 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/RequiredBeforeExitToolRule' - $ref: '#/components/schemas/MaxCountPerStepToolRule' - $ref: '#/components/schemas/ParentToolRule' - $ref: '#/components/schemas/RequiresApprovalToolRule' 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' parent_last_tool: '#/components/schemas/ParentToolRule' required_before_exit: '#/components/schemas/RequiredBeforeExitToolRule' requires_approval: '#/components/schemas/RequiresApprovalToolRule' 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. 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. 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: anyOf: - type: boolean - type: 'null' title: Include Base Tool Rules description: If true, attaches the Letta base tool rules (e.g. deny all tools not explicitly allowed). include_default_source: type: boolean title: Include Default Source description: If true, automatically creates and attaches a default data source for this agent. default: false deprecated: 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. llm_config: anyOf: - $ref: '#/components/schemas/LLMConfig' - type: 'null' description: 'Deprecated: Use `model` field instead. The LLM configuration used by the agent.' deprecated: true embedding_config: anyOf: - $ref: '#/components/schemas/EmbeddingConfig' - type: 'null' description: 'Deprecated: Use `embedding` field instead. The embedding configuration used by the agent.' deprecated: true model: anyOf: - type: string - type: 'null' title: Model description: 'The model handle for the agent to use (format: provider/model-name).' embedding: anyOf: - type: string - type: 'null' title: Embedding description: 'The embedding model handle used by the agent (format: provider/model-name).' model_settings: anyOf: - oneOf: - $ref: '#/components/schemas/OpenAIModelSettings' - $ref: '#/components/schemas/SGLangModelSettings' - $ref: '#/components/schemas/AnthropicModelSettings' - $ref: '#/components/schemas/GoogleAIModelSettings' - $ref: '#/components/schemas/GoogleVertexModelSettings' - $ref: '#/components/schemas/AzureModelSettings' - $ref: '#/components/schemas/XAIModelSettings' - $ref: '#/components/schemas/ZAIModelSettings' - $ref: '#/components/schemas/GroqModelSettings' - $ref: '#/components/schemas/DeepseekModelSettings' - $ref: '#/components/schemas/TogetherModelSettings' - $ref: '#/components/schemas/BedrockModelSettings' - $ref: '#/components/schemas/BasetenModelSettings' - $ref: '#/components/schemas/OpenRouterModelSettings' - $ref: '#/components/schemas/ChatGPTOAuthModelSettings' discriminator: propertyName: provider_type mapping: anthropic: '#/components/schemas/AnthropicModelSettings' azure: '#/components/schemas/AzureModelSettings' baseten: '#/components/schemas/BasetenModelSettings' bedrock: '#/components/schemas/BedrockModelSettings' chatgpt_oauth: '#/components/schemas/ChatGPTOAuthModelSettings' deepseek: '#/components/schemas/DeepseekModelSettings' google_ai: '#/components/schemas/GoogleAIModelSettings' google_vertex: '#/components/schemas/GoogleVertexModelSettings' groq: '#/components/schemas/GroqModelSettings' openai: '#/components/schemas/OpenAIModelSettings' openrouter: '#/components/schemas/OpenRouterModelSettings' sglang: '#/components/schemas/SGLangModelSettings' together: '#/components/schemas/TogetherModelSettings' xai: '#/components/schemas/XAIModelSettings' zai: '#/components/schemas/ZAIModelSettings' - type: 'null' title: Model Settings description: The model settings for the agent. compaction_settings: anyOf: - $ref: '#/components/schemas/CompactionSettings-Input' - type: 'null' description: The compaction settings configuration used for compaction. 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: 'Deprecated: No longer used. The embedding chunk size used by the agent.' default: 300 deprecated: true max_tokens: anyOf: - type: integer - type: 'null' title: Max Tokens description: 'Deprecated: Use `model` field to configure max output tokens instead. The maximum number of tokens to generate, including reasoning step.' deprecated: true max_reasoning_tokens: anyOf: - type: integer - type: 'null' title: Max Reasoning Tokens description: 'Deprecated: Use `model` field to configure reasoning tokens instead. The maximum number of tokens to generate for reasoning step.' deprecated: true enable_reasoner: anyOf: - type: boolean - type: 'null' title: Enable Reasoner description: 'Deprecated: Use `model` field to configure reasoning instead. Whether to enable internal extended thinking step for a reasoner model.' default: true deprecated: true reasoning: anyOf: - type: boolean - type: 'null' title: Reasoning description: 'Deprecated: Use `model` field to configure reasoning instead. Whether to enable reasoning for this agent.' deprecated: true from_template: anyOf: - type: string - type: 'null' title: From Template description: 'Deprecated: please use the ''create agents from a template'' endpoint instead.' deprecated: true template: type: boolean title: Template description: 'Deprecated: No longer used.' default: false deprecated: true 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 x_project parameter.' deprecated: true tool_exec_environment_variables: anyOf: - additionalProperties: type: string type: object - type: 'null' title: Tool Exec Environment Variables description: 'Deprecated: Use `secrets` field instead. Environment variables for tool execution.' deprecated: true secrets: anyOf: - additionalProperties: type: string type: object - type: 'null' title: Secrets 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: 'Deprecated: Only relevant for creating agents from a template. Use the ''create agents from a template'' endpoint instead.' deprecated: true project_id: anyOf: - type: string - type: 'null' title: Project Id description: 'Deprecated: No longer used. The id of the project the agent belongs to.' deprecated: true template_id: anyOf: - type: string - type: 'null' title: Template Id description: 'Deprecated: No longer used. The id of the template the agent belongs to.' deprecated: true base_template_id: anyOf: - type: string - type: 'null' title: Base Template Id description: 'Deprecated: No longer used. The base template id of the agent.' deprecated: true 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 enable_sleeptime: anyOf: - type: boolean - type: 'null' title: Enable Sleeptime description: If set to True, memory management will move to a background agent thread. response_format: anyOf: - oneOf: - $ref: '#/components/schemas/TextResponseFormat' - $ref: '#/components/schemas/JsonSchemaResponseFormat' - $ref: '#/components/schemas/JsonObjectResponseFormat' discriminator: propertyName: type mapping: json_object: '#/components/schemas/JsonObjectResponseFormat' json_schema: '#/components/schemas/JsonSchemaResponseFormat' text: '#/components/schemas/TextResponseFormat' - type: 'null' title: Response Format description: 'Deprecated: Use `model_settings` field to configure response format instead. The response format for the agent.' deprecated: true timezone: anyOf: - type: string - type: 'null' title: Timezone description: The timezone of the agent (IANA format). max_files_open: anyOf: - type: integer - type: 'null' title: Max Files Open description: Maximum number of files that can be open at once for this agent. Setting this too high may exceed the context window, which will break the agent. per_file_view_window_char_limit: anyOf: - type: integer - type: 'null' title: Per File View Window Char Limit description: The per-file view window character limit for this agent. Setting this too high may exceed the context window, which will break the agent. hidden: anyOf: - type: boolean - type: 'null' title: Hidden description: 'Deprecated: No longer used. If set to True, the agent will be hidden.' deprecated: true parallel_tool_calls: anyOf: - type: boolean - type: 'null' title: Parallel Tool Calls description: 'Deprecated: Use `model_settings` to configure parallel tool calls instead. If set to True, enables parallel tool calling.' deprecated: true id: type: string title: Id description: Human-readable identifier for this agent in the file in_context_message_ids: items: type: string type: array title: In Context Message Ids description: List of message IDs that are currently in the agent's context messages: items: $ref: '#/components/schemas/letta__schemas__agent_file__MessageSchema' type: array title: Messages description: List of messages in the agent's conversation history files_agents: items: $ref: '#/components/schemas/FileAgentSchema' type: array title: Files Agents description: List of file-agent relationships for this agent group_ids: items: type: string type: array title: Group Ids description: List of groups that the agent manages type: object required: - id title: AgentSchema description: Agent with human-readable ID for agent file ImportedAgentsResponse: properties: agent_ids: items: type: string type: array title: Agent Ids description: List of IDs of the imported agents type: object required: - agent_ids title: ImportedAgentsResponse description: Response model for imported agents Body_import_agent: properties: file: type: string format: binary title: File override_existing_tools: type: boolean 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. default: true strip_messages: type: boolean title: Strip Messages description: If set to True, strips all messages from the agent before importing. default: false secrets: anyOf: - type: string - type: 'null' title: Secrets description: Secrets as a JSON string to pass to the agent for tool execution. name: anyOf: - type: string - type: 'null' title: Name description: If provided, overrides the agent name with this value. embedding: anyOf: - type: string - type: 'null' title: Embedding description: Embedding handle to override with. model: anyOf: - type: string - type: 'null' title: Model description: Model handle to override the agent's default model. This allows the imported agent to use a different model while keeping other defaults (e.g., context size) from the original configuration. append_copy_suffix: type: boolean title: Append Copy Suffix description: If set to True, appends "_copy" to the end of the agent name. default: true deprecated: true override_name: anyOf: - type: string - type: 'null' title: Override Name description: If provided, overrides the agent name with this value. Use 'name' instead. deprecated: true override_embedding_handle: anyOf: - type: string - type: 'null' title: Override Embedding Handle description: Override import with specific embedding handle. Use 'embedding' instead. deprecated: true override_model_handle: anyOf: - type: string - type: 'null' title: Override Model Handle description: Model handle to override the agent's default model. Use 'model' instead. deprecated: true project_id: anyOf: - type: string - type: 'null' title: Project Id description: The project ID to associate the uploaded agent with. This is now passed via headers. deprecated: true env_vars_json: anyOf: - type: string - type: 'null' title: Env Vars Json description: Environment variables as a JSON string to pass to the agent for tool execution. Use 'secrets' instead. deprecated: true type: object required: - file title: Body_import_agent 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 GenerateResponse: properties: content: type: string title: Content description: The LLM's response text model: type: string title: Model description: The model that generated this response usage: $ref: '#/components/schemas/LettaUsageStatistics' description: Token usage statistics type: object required: - content - model - usage title: GenerateResponse description: Response from direct LLM generation. 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 description: The type of the message. default: tool_return_message otid: anyOf: - type: string - type: 'null' title: Otid description: The offline threading id (OTID). Set by the client to deduplicate requests. Used for idempotency in background streaming mode — each message in a request must have a unique OTID. Retries of the same request should reuse the same OTIDs. sender_id: anyOf: - type: string - type: 'null' title: Sender Id step_id: anyOf: - type: string - type: 'null' title: Step Id is_err: anyOf: - type: boolean - type: 'null' title: Is Err seq_id: anyOf: - type: integer - type: 'null' title: Seq Id run_id: anyOf: - type: string - type: 'null' title: Run Id tool_return: type: string title: Tool Return deprecated: true status: type: string enum: - success - error title: Status deprecated: true tool_call_id: type: string title: Tool Call Id deprecated: true stdout: anyOf: - items: type: string type: array - type: 'null' title: Stdout deprecated: true stderr: anyOf: - items: type: string type: array - type: 'null' title: Stderr deprecated: true tool_returns: anyOf: - items: $ref: '#/components/schemas/letta__schemas__letta_message__ToolReturn' type: array - type: 'null' title: Tool Returns 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 (deprecated, use tool_returns)\n status (Literal[\"success\", \"error\"]): The status of the tool call (deprecated, use tool_returns)\n tool_call_id (str): A unique identifier for the tool call that generated this message (deprecated, use tool_returns)\n stdout (Optional[List(str)]): Captured stdout (e.g. prints, logs) from the tool invocation (deprecated, use tool_returns)\n stderr (Optional[List(str)]): Captured stderr from the tool invocation (deprecated, use tool_returns)\n tool_returns (Optional[List[ToolReturn]]): List of tool returns for multi-tool support" FileProcessingStatus: type: string enum: - pending - parsing - embedding - completed - error title: FileProcessingStatus 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 ProviderCategory: type: string enum: - base - byok title: ProviderCategory ApprovalResponseMessage: 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: approval_response_message title: Message Type description: The type of the message. default: approval_response_message otid: anyOf: - type: string - type: 'null' title: Otid description: The offline threading id (OTID). Set by the client to deduplicate requests. Used for idempotency in background streaming mode — each message in a request must have a unique OTID. Retries of the same request should reuse the same OTIDs. sender_id: anyOf: - type: string - type: 'null' title: Sender Id step_id: anyOf: - type: string - type: 'null' title: Step Id is_err: anyOf: - type: boolean - type: 'null' title: Is Err seq_id: anyOf: - type: integer - type: 'null' title: Seq Id run_id: anyOf: - type: string - type: 'null' title: Run Id approvals: anyOf: - items: oneOf: - $ref: '#/components/schemas/ApprovalReturn' - $ref: '#/components/schemas/letta__schemas__letta_message__ToolReturn' discriminator: propertyName: type mapping: approval: '#/components/schemas/ApprovalReturn' tool: '#/components/schemas/letta__schemas__letta_message__ToolReturn' type: array - type: 'null' title: Approvals description: The list of approval responses approve: anyOf: - type: boolean - type: 'null' title: Approve description: Whether the tool has been approved deprecated: true approval_request_id: anyOf: - type: string - type: 'null' title: Approval Request Id description: The message ID of the approval request deprecated: true reason: anyOf: - type: string - type: 'null' title: Reason description: An optional explanation for the provided approval status deprecated: true type: object required: - id - date title: ApprovalResponseMessage description: "A message representing a response form the user indicating whether a tool has been approved to run.\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 approve: (bool) Whether the tool has been approved\n approval_request_id: The ID of the approval request\n reason: (Optional[str]) An optional explanation for the provided approval status" MessageType: type: string enum: - system_message - user_message - assistant_message - reasoning_message - hidden_reasoning_message - tool_call_message - tool_return_message - approval_request_message - approval_response_message - summary_message - event_message title: MessageType 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. deprecated: true block_ids: items: type: string type: array title: Block Ids description: The IDs of the blocks associated with the identity. deprecated: true 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 BedrockModelSettings: properties: max_output_tokens: type: integer title: Max Output Tokens description: The maximum number of tokens the model can generate. default: 4096 parallel_tool_calls: type: boolean title: Parallel Tool Calls description: Whether to enable parallel tool calling. default: true provider_type: type: string const: bedrock title: Provider Type description: The type of the provider. default: bedrock temperature: type: number title: Temperature description: The temperature of the model. default: 0.7 response_format: anyOf: - oneOf: - $ref: '#/components/schemas/TextResponseFormat' - $ref: '#/components/schemas/JsonSchemaResponseFormat' - $ref: '#/components/schemas/JsonObjectResponseFormat' discriminator: propertyName: type mapping: json_object: '#/components/schemas/JsonObjectResponseFormat' json_schema: '#/components/schemas/JsonSchemaResponseFormat' text: '#/components/schemas/TextResponseFormat' - type: 'null' title: Response Format description: The response format for the model. type: object title: BedrockModelSettings description: AWS Bedrock model configuration. MessageSearchResult: properties: embedded_text: type: string title: Embedded Text description: The embedded content (LLM-friendly) message: $ref: '#/components/schemas/Message' description: The raw message object fts_rank: anyOf: - type: integer - type: 'null' title: Fts Rank description: Full-text search rank position if FTS was used vector_rank: anyOf: - type: integer - type: 'null' title: Vector Rank description: Vector search rank position if vector search was used rrf_score: type: number title: Rrf Score description: Reciprocal Rank Fusion combined score type: object required: - embedded_text - message - rrf_score title: MessageSearchResult description: Result from a message search operation with scoring details. ModifyApprovalRequest: properties: requires_approval: type: boolean title: Requires Approval description: Whether the tool requires approval before execution additionalProperties: false type: object required: - requires_approval title: ModifyApprovalRequest description: Request body for modifying tool approval requirements. 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 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 description: Sent via the Anthropic Messages API Base64Image: properties: type: type: string const: base64 title: Type description: The source type for the image. default: base64 media_type: type: string title: Media Type description: The media type for the image. data: type: string title: Data description: The base64 encoded image data. detail: anyOf: - type: string - type: 'null' title: Detail description: What level of detail to use when processing and understanding the image (low, high, or auto to let the model decide) type: object required: - media_type - data title: Base64Image AgentType: type: string enum: - memgpt_agent - memgpt_v2_agent - letta_v1_agent - react_agent - workflow_agent - split_thread_agent - sleeptime_agent - voice_convo_agent - voice_sleeptime_agent title: AgentType description: Enum to represent the type of agent. GenerateRequest: properties: prompt: type: string minLength: 1 title: Prompt description: The prompt/message to send to the LLM system_prompt: anyOf: - type: string - type: 'null' title: System Prompt description: Optional system prompt to prepend to the conversation override_model: anyOf: - type: string - type: 'null' title: Override Model description: Model handle to use instead of agent's default (e.g., 'openai/gpt-4', 'anthropic/claude-3-5-sonnet') response_schema: anyOf: - additionalProperties: true type: object - type: 'null' title: Response Schema description: JSON schema for structured output. When provided, the LLM will be forced to return a response matching this schema via tool calling. The schema should follow JSON Schema format with 'properties' and optionally 'required' fields. type: object required: - prompt title: GenerateRequest description: Request for direct LLM generation without agent processing. CompactionResponse: properties: summary: type: string title: Summary num_messages_before: type: integer title: Num Messages Before num_messages_after: type: integer title: Num Messages After type: object required: - summary - num_messages_before - num_messages_after title: CompactionResponse ClientToolSchema: properties: name: type: string title: Name description: The name of the tool function description: anyOf: - type: string - type: 'null' title: Description description: Description of what the tool does parameters: anyOf: - additionalProperties: true type: object - type: 'null' title: Parameters description: JSON Schema for the function parameters type: object required: - name title: ClientToolSchema description: 'Schema for a client-side tool passed in the request. Client-side tools are executed by the client, not the server. When the agent calls a client-side tool, execution pauses and returns control to the client to execute the tool and provide the result.' SummaryMessage: 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: summary_message title: Message Type default: summary_message otid: anyOf: - type: string - type: 'null' title: Otid description: The offline threading id (OTID). Set by the client to deduplicate requests. Used for idempotency in background streaming mode — each message in a request must have a unique OTID. Retries of the same request should reuse the same OTIDs. sender_id: anyOf: - type: string - type: 'null' title: Sender Id step_id: anyOf: - type: string - type: 'null' title: Step Id is_err: anyOf: - type: boolean - type: 'null' title: Is Err seq_id: anyOf: - type: integer - type: 'null' title: Seq Id run_id: anyOf: - type: string - type: 'null' title: Run Id summary: type: string title: Summary compaction_stats: anyOf: - $ref: '#/components/schemas/CompactionStats' - type: 'null' type: object required: - id - date - summary title: SummaryMessage description: A message representing a summary of the conversation. Sent to the LLM as a user or system message depending on the provider. MessageCreate: properties: type: anyOf: - type: string const: message - type: 'null' title: Type description: The message type to be created. default: message otid: anyOf: - type: string - type: 'null' title: Otid description: The offline threading id (OTID). Set by the client to deduplicate requests. Used for idempotency in background streaming mode — each message in a request must have a unique OTID. Retries of the same request should reuse the same OTIDs. group_id: anyOf: - type: string - type: 'null' title: Group Id description: The multi-agent group that the message was sent in role: type: string enum: - user - system - assistant 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. sender_id: anyOf: - type: string - type: 'null' title: Sender Id description: The id of the sender of the message, can be an identity id or agent id batch_item_id: anyOf: - type: string - type: 'null' title: Batch Item Id description: The id of the LLMBatchItem that this message is associated with type: object required: - role - content title: MessageCreate description: Request to create a message LettaAsyncRequest: properties: messages: anyOf: - items: anyOf: - $ref: '#/components/schemas/MessageCreate' - $ref: '#/components/schemas/ApprovalCreate' - $ref: '#/components/schemas/ToolReturnCreate' type: array - type: 'null' title: Messages description: The messages to be sent to the agent. input: anyOf: - type: string - items: oneOf: - $ref: '#/components/schemas/TextContent' - $ref: '#/components/schemas/ImageContent' - $ref: '#/components/schemas/ToolCallContent' - $ref: '#/components/schemas/ToolReturnContent' - $ref: '#/components/schemas/ReasoningContent' - $ref: '#/components/schemas/RedactedReasoningContent' - $ref: '#/components/schemas/OmittedReasoningContent' - $ref: '#/components/schemas/SummarizedReasoningContent' discriminator: propertyName: type mapping: image: '#/components/schemas/ImageContent' omitted_reasoning: '#/components/schemas/OmittedReasoningContent' reasoning: '#/components/schemas/ReasoningContent' redacted_reasoning: '#/components/schemas/RedactedReasoningContent' summarized_reasoning: '#/components/schemas/SummarizedReasoningContent' text: '#/components/schemas/TextContent' tool_call: '#/components/schemas/ToolCallContent' tool_return: '#/components/schemas/ToolReturnContent' type: array - type: 'null' title: Input description: 'Syntactic sugar for a single user message. Equivalent to messages=[{''role'': ''user'', ''content'': input}].' max_steps: type: integer title: Max Steps description: Maximum number of steps the agent should take to process the request. default: 50 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. Still supported for legacy agent types, but deprecated for letta_v1_agent onward. default: true deprecated: true assistant_message_tool_name: type: string title: Assistant Message Tool Name description: The name of the designated message tool. Still supported for legacy agent types, but deprecated for letta_v1_agent onward. default: send_message deprecated: true assistant_message_tool_kwarg: type: string title: Assistant Message Tool Kwarg description: The name of the message argument in the designated message tool. Still supported for legacy agent types, but deprecated for letta_v1_agent onward. default: message deprecated: true include_return_message_types: anyOf: - items: $ref: '#/components/schemas/MessageType' type: array - type: 'null' title: Include Return Message Types description: Only return specified message types in the response. If `None` (default) returns all messages. enable_thinking: type: string title: Enable Thinking description: If set to True, enables reasoning before responses or tool calls from the agent. default: true deprecated: true client_tools: anyOf: - items: $ref: '#/components/schemas/ClientToolSchema' type: array - type: 'null' title: Client Tools description: Client-side tools that the agent can call. When the agent calls a client-side tool, execution pauses and returns control to the client to execute the tool and provide the result via a ToolReturn. client_skills: anyOf: - items: $ref: '#/components/schemas/ClientSkillSchema' type: array - type: 'null' title: Client Skills description: Client-side skills available in the environment. These are rendered in the system prompt's available skills section alongside agent-scoped skills from MemFS. override_model: anyOf: - type: string - type: 'null' title: Override Model description: Model handle to use for this request instead of the agent's default model. This allows sending a message to a different model without changing the agent's configuration. include_compaction_messages: type: boolean title: Include Compaction Messages description: If True, compaction events emit structured `SummaryMessage` and `EventMessage` types. If False (default), compaction messages are not included in the response. default: false return_logprobs: type: boolean title: Return Logprobs description: If True, returns log probabilities of the output tokens in the response. Useful for RL training. Only supported for OpenAI-compatible providers (including SGLang). default: false top_logprobs: anyOf: - type: integer - type: 'null' title: Top Logprobs description: Number of most likely tokens to return at each position (0-20). Requires return_logprobs=True. return_token_ids: type: boolean title: Return Token Ids description: If True, returns token IDs and logprobs for ALL LLM generations in the agent step, not just the last one. Uses SGLang native /generate endpoint. Returns 'turns' field with TurnTokenData for each assistant/tool turn. Required for proper multi-turn RL training with loss masking. default: false override_system: anyOf: - type: string - type: 'null' title: Override System description: Optional per-request system prompt override. When set, this is passed directly to the underlying LLM request and bypasses the persisted/compiled system message for that request. callback_url: anyOf: - type: string - type: 'null' title: Callback Url description: Optional callback URL to POST to when the job completes type: object title: LettaAsyncRequest letta__serialize_schemas__pydantic_agent_schema__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/letta__serialize_schemas__pydantic_agent_schema__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/letta__serialize_schemas__pydantic_agent_schema__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 ArchivalMemorySearchResponse: properties: results: items: $ref: '#/components/schemas/ArchivalMemorySearchResult' type: array title: Results description: List of search results matching the query count: type: integer title: Count description: Total number of results returned type: object required: - results - count title: ArchivalMemorySearchResponse MessageSearchRequest: properties: query: anyOf: - type: string - type: 'null' title: Query description: Text query for full-text search search_mode: type: string enum: - vector - fts - hybrid title: Search Mode description: Search mode to use default: hybrid roles: anyOf: - items: $ref: '#/components/schemas/MessageRole' type: array - type: 'null' title: Roles description: Filter messages by role agent_id: anyOf: - type: string - type: 'null' title: Agent Id description: Filter messages by agent ID project_id: anyOf: - type: string - type: 'null' title: Project Id description: Filter messages by project ID template_id: anyOf: - type: string - type: 'null' title: Template Id description: Filter messages by template ID conversation_id: anyOf: - type: string - type: 'null' title: Conversation Id description: Filter messages by conversation ID limit: type: integer maximum: 100 minimum: 1 title: Limit description: Maximum number of results to return default: 50 start_date: anyOf: - type: string format: date-time - type: 'null' title: Start Date description: Filter messages created after this date end_date: anyOf: - type: string format: date-time - type: 'null' title: End Date description: Filter messages created on or before this date type: object title: MessageSearchRequest description: Request model for searching messages across the organization letta__server__rest_api__routers__v1__agents__CompactionRequest: properties: compaction_settings: anyOf: - $ref: '#/components/schemas/CompactionSettings-Input' - type: 'null' description: Optional compaction settings to use for this summarization request. If not provided, the agent's default settings will be used. type: object title: CompactionRequest CreateArchivalMemory: properties: text: type: string title: Text description: Text to write to archival memory. tags: anyOf: - items: type: string type: array - type: 'null' title: Tags description: Optional list of tags to attach to the memory. created_at: anyOf: - type: string format: date-time - type: 'null' title: Created At description: Optional timestamp for the memory (defaults to current UTC time). type: object required: - text title: CreateArchivalMemory ChatCompletionMessageFunctionToolCall-Input: properties: id: type: string title: Id function: $ref: '#/components/schemas/openai__types__chat__chat_completion_message_function_tool_call__Function' type: type: string const: function title: Type additionalProperties: true type: object required: - id - function - type title: ChatCompletionMessageFunctionToolCall description: A call to a function tool created by the model. letta__schemas__message__ToolReturn-Output: properties: tool_call_id: anyOf: - {} - type: 'null' title: Tool Call Id description: The ID for the tool call 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 func_response: anyOf: - type: string - items: oneOf: - $ref: '#/components/schemas/TextContent' - $ref: '#/components/schemas/ImageContent' discriminator: propertyName: type mapping: image: '#/components/schemas/ImageContent' text: '#/components/schemas/TextContent' type: array - type: 'null' title: Func Response description: The function response - either a string or list of content parts (text/image) type: object required: - status title: ToolReturn letta__schemas__agent_file__MessageSchema: properties: type: anyOf: - type: string const: message - type: 'null' title: Type description: The message type to be created. default: message otid: anyOf: - type: string - type: 'null' title: Otid description: The offline threading id (OTID). Set by the client to deduplicate requests. Used for idempotency in background streaming mode — each message in a request must have a unique OTID. Retries of the same request should reuse the same OTIDs. group_id: anyOf: - type: string - type: 'null' title: Group Id description: The multi-agent group that the message was sent in role: $ref: '#/components/schemas/MessageRole' 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. sender_id: anyOf: - type: string - type: 'null' title: Sender Id description: The id of the sender of the message, can be an identity id or agent id batch_item_id: anyOf: - type: string - type: 'null' title: Batch Item Id description: The id of the LLMBatchItem that this message is associated with id: type: string title: Id description: Human-readable identifier for this message in the file model: anyOf: - type: string - type: 'null' title: Model description: The model used to make the function call agent_id: anyOf: - type: string - type: 'null' title: Agent Id description: The unique identifier of the agent tool_calls: anyOf: - items: $ref: '#/components/schemas/ChatCompletionMessageFunctionToolCall-Input' type: array - type: 'null' title: Tool Calls description: The list of tool calls requested. Only applicable for role assistant. tool_call_id: anyOf: - type: string - type: 'null' title: Tool Call Id description: The ID of the tool call. Only applicable for role tool. tool_returns: anyOf: - items: $ref: '#/components/schemas/letta__schemas__message__ToolReturn-Input' type: array - type: 'null' title: Tool Returns description: Tool execution return information for prior tool calls created_at: type: string format: date-time title: Created At description: The timestamp when the object was created. approve: anyOf: - type: boolean - type: 'null' title: Approve description: Whether the tool has been approved approval_request_id: anyOf: - type: string - type: 'null' title: Approval Request Id description: The message ID of the approval request denial_reason: anyOf: - type: string - type: 'null' title: Denial Reason description: An optional explanation for the provided approval status approvals: anyOf: - items: anyOf: - $ref: '#/components/schemas/ApprovalReturn' - $ref: '#/components/schemas/letta__schemas__message__ToolReturn-Input' type: array - type: 'null' title: Approvals description: Approval returns for the message type: object required: - role - content - id title: MessageSchema description: Message with human-readable ID for agent file IdentityType: type: string enum: - org - user - other title: IdentityType description: Enum to represent the type of the identity. 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 prompt_template: anyOf: - type: string - type: 'null' title: Prompt Template description: Optional template string (ignored). Rendering uses fast built-in formatting for performance. args: anyOf: - additionalProperties: true type: object - type: 'null' title: Args description: Optional prefilled arguments for this tool. When present, these values will override any LLM-provided arguments with the same keys during invocation. Keys must match the tool's parameter names and values must satisfy the tool's JSON schema. Supports partial prefill; non-overlapping parameters are left to the model. additionalProperties: false type: object required: - tool_name title: InitToolRule description: Represents the initial tool rule configuration. Function-Output: properties: arguments: type: string title: Arguments name: type: string title: Name additionalProperties: true type: object required: - arguments - name title: Function description: The function that the model called. LettaStreamingRequest: properties: messages: anyOf: - items: anyOf: - $ref: '#/components/schemas/MessageCreate' - $ref: '#/components/schemas/ApprovalCreate' - $ref: '#/components/schemas/ToolReturnCreate' type: array - type: 'null' title: Messages description: The messages to be sent to the agent. input: anyOf: - type: string - items: oneOf: - $ref: '#/components/schemas/TextContent' - $ref: '#/components/schemas/ImageContent' - $ref: '#/components/schemas/ToolCallContent' - $ref: '#/components/schemas/ToolReturnContent' - $ref: '#/components/schemas/ReasoningContent' - $ref: '#/components/schemas/RedactedReasoningContent' - $ref: '#/components/schemas/OmittedReasoningContent' - $ref: '#/components/schemas/SummarizedReasoningContent' discriminator: propertyName: type mapping: image: '#/components/schemas/ImageContent' omitted_reasoning: '#/components/schemas/OmittedReasoningContent' reasoning: '#/components/schemas/ReasoningContent' redacted_reasoning: '#/components/schemas/RedactedReasoningContent' summarized_reasoning: '#/components/schemas/SummarizedReasoningContent' text: '#/components/schemas/TextContent' tool_call: '#/components/schemas/ToolCallContent' tool_return: '#/components/schemas/ToolReturnContent' type: array - type: 'null' title: Input description: 'Syntactic sugar for a single user message. Equivalent to messages=[{''role'': ''user'', ''content'': input}].' max_steps: type: integer title: Max Steps description: Maximum number of steps the agent should take to process the request. default: 50 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. Still supported for legacy agent types, but deprecated for letta_v1_agent onward. default: true deprecated: true assistant_message_tool_name: type: string title: Assistant Message Tool Name description: The name of the designated message tool. Still supported for legacy agent types, but deprecated for letta_v1_agent onward. default: send_message deprecated: true assistant_message_tool_kwarg: type: string title: Assistant Message Tool Kwarg description: The name of the message argument in the designated message tool. Still supported for legacy agent types, but deprecated for letta_v1_agent onward. default: message deprecated: true include_return_message_types: anyOf: - items: $ref: '#/components/schemas/MessageType' type: array - type: 'null' title: Include Return Message Types description: Only return specified message types in the response. If `None` (default) returns all messages. enable_thinking: type: string title: Enable Thinking description: If set to True, enables reasoning before responses or tool calls from the agent. default: true deprecated: true client_tools: anyOf: - items: $ref: '#/components/schemas/ClientToolSchema' type: array - type: 'null' title: Client Tools description: Client-side tools that the agent can call. When the agent calls a client-side tool, execution pauses and returns control to the client to execute the tool and provide the result via a ToolReturn. client_skills: anyOf: - items: $ref: '#/components/schemas/ClientSkillSchema' type: array - type: 'null' title: Client Skills description: Client-side skills available in the environment. These are rendered in the system prompt's available skills section alongside agent-scoped skills from MemFS. override_model: anyOf: - type: string - type: 'null' title: Override Model description: Model handle to use for this request instead of the agent's default model. This allows sending a message to a different model without changing the agent's configuration. include_compaction_messages: type: boolean title: Include Compaction Messages description: If True, compaction events emit structured `SummaryMessage` and `EventMessage` types. If False (default), compaction messages are not included in the response. default: false return_logprobs: type: boolean title: Return Logprobs description: If True, returns log probabilities of the output tokens in the response. Useful for RL training. Only supported for OpenAI-compatible providers (including SGLang). default: false top_logprobs: anyOf: - type: integer - type: 'null' title: Top Logprobs description: Number of most likely tokens to return at each position (0-20). Requires return_logprobs=True. return_token_ids: type: boolean title: Return Token Ids description: If True, returns token IDs and logprobs for ALL LLM generations in the agent step, not just the last one. Uses SGLang native /generate endpoint. Returns 'turns' field with TurnTokenData for each assistant/tool turn. Required for proper multi-turn RL training with loss masking. default: false override_system: anyOf: - type: string - type: 'null' title: Override System description: Optional per-request system prompt override. When set, this is passed directly to the underlying LLM request and bypasses the persisted/compiled system message for that request. streaming: type: boolean title: Streaming description: If True, returns a streaming response (Server-Sent Events). If False (default), returns a complete response. default: false stream_tokens: type: boolean title: Stream Tokens description: Flag to determine if individual tokens should be streamed, rather than streaming per step (only used when streaming=true). default: false include_pings: type: boolean title: Include Pings description: Whether to include periodic keepalive ping messages in the stream to prevent connection timeouts (only used when streaming=true). default: true background: type: boolean title: Background description: Whether to process the request in the background (only used when streaming=true). default: false type: object title: LettaStreamingRequest IdentityPropertyType: type: string enum: - string - number - boolean - json title: IdentityPropertyType description: Enum to represent the type of the identity property. letta__schemas__agent_file__ToolSchema: properties: id: type: string title: Id description: Human-readable identifier for this tool in the file 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. 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 maximum: 1000000 minimum: 1 title: Return Char Limit description: The maximum number of characters in the response. default: 50000 pip_requirements: anyOf: - items: $ref: '#/components/schemas/PipRequirement' type: array - type: 'null' title: Pip Requirements description: Optional list of pip packages required by this tool. npm_requirements: anyOf: - items: $ref: '#/components/schemas/NpmRequirement' type: array - type: 'null' title: Npm Requirements description: Optional list of npm packages required by this tool. default_requires_approval: anyOf: - type: boolean - type: 'null' title: Default Requires Approval description: Default value for whether or not executing this tool requires approval. enable_parallel_execution: anyOf: - type: boolean - type: 'null' title: Enable Parallel Execution description: If set to True, then this tool will potentially be executed concurrently with other tools. Default False. default: false 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. project_id: anyOf: - type: string - type: 'null' title: Project Id description: The project id of the tool. additionalProperties: false type: object required: - id title: ToolSchema description: Tool with human-readable ID for agent file SupervisorManagerSchema: 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: SupervisorManagerSchema 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. project_id: anyOf: - type: string - type: 'null' title: Project Id description: The associated project id. template_name: anyOf: - type: string - type: 'null' title: Template 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 template_id: anyOf: - type: string - type: 'null' title: Template Id description: The id of the template. base_template_id: anyOf: - type: string - type: 'null' title: Base Template Id description: The base template id of the block. deployment_id: anyOf: - type: string - type: 'null' title: Deployment Id description: The id of the deployment. entity_id: anyOf: - type: string - type: 'null' title: Entity Id description: The id of the entity within the template. preserve_on_migration: anyOf: - type: boolean - type: 'null' title: Preserve On Migration description: Preserve the block on template migration. default: false label: anyOf: - type: string - type: 'null' title: Label description: Label of the block (e.g. 'human', 'persona') in the context window. read_only: type: boolean title: Read Only description: Whether the agent has read-only access to the block. default: false 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: {} hidden: anyOf: - type: boolean - type: 'null' title: Hidden description: If set to True, the block will be hidden. tags: anyOf: - items: type: string type: array - type: 'null' title: Tags description: The tags to associate with the block. type: object title: BlockUpdate description: Update a block LettaResponse: properties: messages: items: $ref: '#/components/schemas/LettaMessageUnion' type: array title: Messages description: The messages returned by the agent. stop_reason: $ref: '#/components/schemas/LettaStopReason' usage: $ref: '#/components/schemas/LettaUsageStatistics' description: The usage statistics of the agent. logprobs: anyOf: - $ref: '#/components/schemas/letta__schemas__openai__chat_completion_response__ChoiceLogprobs' - type: 'null' description: Log probabilities of the output tokens from the last LLM call. Only present if return_logprobs was enabled. turns: anyOf: - items: $ref: '#/components/schemas/TurnTokenData' type: array - type: 'null' title: Turns description: Token data for all LLM generations in multi-turn agent interaction. Includes token IDs and logprobs for each assistant turn, plus tool result content. Only present if return_token_ids was enabled. Used for RL training with loss masking. type: object required: - messages - stop_reason - 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" 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 AgentFileAttachment: properties: id: type: string title: Id description: Unique identifier of the file-agent relationship file_id: type: string title: File Id description: Unique identifier of the file file_name: type: string title: File Name description: Name of the file folder_id: type: string title: Folder Id description: Unique identifier of the folder/source folder_name: type: string title: Folder Name description: Name of the folder/source is_open: type: boolean title: Is Open description: Whether the file is currently open in the agent's context last_accessed_at: anyOf: - type: string format: date-time - type: 'null' title: Last Accessed At description: Timestamp of last access by the agent visible_content: anyOf: - type: string - type: 'null' title: Visible Content description: Portion of the file visible to the agent if open start_line: anyOf: - type: integer - type: 'null' title: Start Line description: Starting line number if file was opened with line range end_line: anyOf: - type: integer - type: 'null' title: End Line description: Ending line number if file was opened with line range additionalProperties: false type: object required: - id - file_id - file_name - folder_id - folder_name - is_open title: AgentFileAttachment description: Response model for agent file attachments showing file status in agent context AgentFileSchema: properties: agents: items: $ref: '#/components/schemas/letta__schemas__agent_file__AgentSchema' type: array title: Agents description: List of agents in this agent file groups: items: $ref: '#/components/schemas/GroupSchema' type: array title: Groups description: List of groups in this agent file blocks: items: $ref: '#/components/schemas/BlockSchema' type: array title: Blocks description: List of memory blocks in this agent file files: items: $ref: '#/components/schemas/FileSchema' type: array title: Files description: List of files in this agent file sources: items: $ref: '#/components/schemas/SourceSchema' type: array title: Sources description: List of sources in this agent file tools: items: $ref: '#/components/schemas/letta__schemas__agent_file__ToolSchema' type: array title: Tools description: List of tools in this agent file mcp_servers: items: $ref: '#/components/schemas/MCPServerSchema' type: array title: Mcp Servers description: List of MCP servers in this agent file skills: items: $ref: '#/components/schemas/SkillSchema' type: array title: Skills description: List of skills in this agent file metadata: additionalProperties: type: string type: object title: Metadata description: Metadata for this agent file, including revision_id and other export information. created_at: anyOf: - type: string format: date-time - type: 'null' title: Created At description: The timestamp when the object was created. type: object required: - agents - groups - blocks - files - sources - tools - mcp_servers title: AgentFileSchema description: Schema for serialized agent file that can be exported to JSON and imported into agent server. 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_memory_filesystem: type: integer title: Num Tokens Memory Filesystem description: The number of tokens in the memory filesystem section (git-enabled agents only). default: 0 memory_filesystem: anyOf: - type: string - type: 'null' title: Memory Filesystem description: The content of the memory filesystem section. num_tokens_tool_usage_rules: type: integer title: Num Tokens Tool Usage Rules description: The number of tokens in the tool usage rules section. default: 0 tool_usage_rules: anyOf: - type: string - type: 'null' title: Tool Usage Rules description: The content of the tool usage rules section. num_tokens_directories: type: integer title: Num Tokens Directories description: The number of tokens in the directories section (attached sources). default: 0 directories: anyOf: - type: string - type: 'null' title: Directories description: The content of the directories section. 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. JsonSchemaResponseFormat: properties: type: type: string const: json_schema title: Type description: The type of the response format. default: json_schema json_schema: additionalProperties: true type: object title: Json Schema description: The JSON schema of the response. type: object required: - json_schema title: JsonSchemaResponseFormat description: Response format for JSON schema-based responses. JsonObjectResponseFormat: properties: type: type: string const: json_object title: Type description: The type of the response format. default: json_object type: object title: JsonObjectResponseFormat description: Response format for JSON object responses. 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 description: The type of the message. default: system_message otid: anyOf: - type: string - type: 'null' title: Otid description: The offline threading id (OTID). Set by the client to deduplicate requests. Used for idempotency in background streaming mode — each message in a request must have a unique OTID. Retries of the same request should reuse the same OTIDs. sender_id: anyOf: - type: string - type: 'null' title: Sender Id step_id: anyOf: - type: string - type: 'null' title: Step Id is_err: anyOf: - type: boolean - type: 'null' title: Is Err seq_id: anyOf: - type: integer - type: 'null' title: Seq Id run_id: anyOf: - type: string - type: 'null' title: Run Id 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" UpdateAgent: properties: name: anyOf: - type: string - type: 'null' title: Name description: The name of the agent. tool_ids: anyOf: - items: type: string maxLength: 41 minLength: 41 pattern: ^tool-[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ description: The ID of the tool in the format 'tool-' examples: - tool-123e4567-e89b-42d3-8456-426614174000 type: array - type: 'null' title: Tool Ids description: The ids of the tools used by the agent. source_ids: anyOf: - items: type: string maxLength: 43 minLength: 43 pattern: ^source-[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ description: The ID of the source in the format 'source-' examples: - source-123e4567-e89b-42d3-8456-426614174000 type: array - type: 'null' title: Source Ids description: 'Deprecated: Use `folder_ids` field instead. The ids of the sources used by the agent.' deprecated: true folder_ids: anyOf: - items: type: string maxLength: 43 minLength: 43 pattern: ^source-[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ description: The ID of the source in the format 'source-' examples: - source-123e4567-e89b-42d3-8456-426614174000 type: array - type: 'null' title: Folder Ids description: The ids of the folders used by the agent. block_ids: anyOf: - items: type: string maxLength: 42 minLength: 42 pattern: ^block-[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ description: The ID of the block in the format 'block-' examples: - block-123e4567-e89b-42d3-8456-426614174000 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/RequiredBeforeExitToolRule' - $ref: '#/components/schemas/MaxCountPerStepToolRule' - $ref: '#/components/schemas/ParentToolRule' - $ref: '#/components/schemas/RequiresApprovalToolRule' 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' parent_last_tool: '#/components/schemas/ParentToolRule' required_before_exit: '#/components/schemas/RequiredBeforeExitToolRule' requires_approval: '#/components/schemas/RequiresApprovalToolRule' run_first: '#/components/schemas/InitToolRule' type: array - type: 'null' title: Tool Rules description: The tool rules governing the agent. message_ids: anyOf: - items: type: string maxLength: 44 minLength: 44 pattern: ^message-[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ description: The ID of the message in the format 'message-' examples: - message-123e4567-e89b-42d3-8456-426614174000 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: 'Deprecated: use `secrets` field instead' secrets: anyOf: - additionalProperties: type: string type: object - type: 'null' title: Secrets 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 maxLength: 45 minLength: 45 pattern: ^identity-[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ description: The ID of the identity in the format 'identity-' examples: - identity-123e4567-e89b-42d3-8456-426614174000 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 model handle used by the agent (format: provider/model-name).' embedding: anyOf: - type: string - type: 'null' title: Embedding description: 'The embedding model handle used by the agent (format: provider/model-name).' model_settings: anyOf: - oneOf: - $ref: '#/components/schemas/OpenAIModelSettings' - $ref: '#/components/schemas/SGLangModelSettings' - $ref: '#/components/schemas/AnthropicModelSettings' - $ref: '#/components/schemas/GoogleAIModelSettings' - $ref: '#/components/schemas/GoogleVertexModelSettings' - $ref: '#/components/schemas/AzureModelSettings' - $ref: '#/components/schemas/XAIModelSettings' - $ref: '#/components/schemas/ZAIModelSettings' - $ref: '#/components/schemas/GroqModelSettings' - $ref: '#/components/schemas/DeepseekModelSettings' - $ref: '#/components/schemas/TogetherModelSettings' - $ref: '#/components/schemas/BedrockModelSettings' - $ref: '#/components/schemas/BasetenModelSettings' - $ref: '#/components/schemas/OpenRouterModelSettings' - $ref: '#/components/schemas/ChatGPTOAuthModelSettings' discriminator: propertyName: provider_type mapping: anthropic: '#/components/schemas/AnthropicModelSettings' azure: '#/components/schemas/AzureModelSettings' baseten: '#/components/schemas/BasetenModelSettings' bedrock: '#/components/schemas/BedrockModelSettings' chatgpt_oauth: '#/components/schemas/ChatGPTOAuthModelSettings' deepseek: '#/components/schemas/DeepseekModelSettings' google_ai: '#/components/schemas/GoogleAIModelSettings' google_vertex: '#/components/schemas/GoogleVertexModelSettings' groq: '#/components/schemas/GroqModelSettings' openai: '#/components/schemas/OpenAIModelSettings' openrouter: '#/components/schemas/OpenRouterModelSettings' sglang: '#/components/schemas/SGLangModelSettings' together: '#/components/schemas/TogetherModelSettings' xai: '#/components/schemas/XAIModelSettings' zai: '#/components/schemas/ZAIModelSettings' - type: 'null' title: Model Settings description: The model settings for the agent. compaction_settings: anyOf: - $ref: '#/components/schemas/CompactionSettings-Input' - type: 'null' description: The compaction settings configuration used for compaction. context_window_limit: anyOf: - type: integer - type: 'null' title: Context Window Limit description: The context window limit used by the agent. reasoning: anyOf: - type: boolean - type: 'null' title: Reasoning description: 'Deprecated: Use `model` field to configure reasoning instead. Whether to enable reasoning for this agent.' deprecated: true llm_config: anyOf: - $ref: '#/components/schemas/LLMConfig' - type: 'null' description: 'Deprecated: Use `model` field instead. The LLM configuration used by the agent.' deprecated: true embedding_config: anyOf: - $ref: '#/components/schemas/EmbeddingConfig' - type: 'null' description: The embedding configuration used by the agent. parallel_tool_calls: anyOf: - type: boolean - type: 'null' title: Parallel Tool Calls description: 'Deprecated: Use `model_settings` to configure parallel tool calls instead. If set to True, enables parallel tool calling.' deprecated: true response_format: anyOf: - oneOf: - $ref: '#/components/schemas/TextResponseFormat' - $ref: '#/components/schemas/JsonSchemaResponseFormat' - $ref: '#/components/schemas/JsonObjectResponseFormat' discriminator: propertyName: type mapping: json_object: '#/components/schemas/JsonObjectResponseFormat' json_schema: '#/components/schemas/JsonSchemaResponseFormat' text: '#/components/schemas/TextResponseFormat' - type: 'null' title: Response Format description: 'Deprecated: Use `model_settings` field to configure response format instead. The response format for the agent.' deprecated: true max_tokens: anyOf: - type: integer - type: 'null' title: Max Tokens description: 'Deprecated: Use `model` field to configure max output tokens instead. The maximum number of tokens to generate, including reasoning step.' deprecated: true enable_sleeptime: anyOf: - type: boolean - type: 'null' title: Enable Sleeptime description: If set to True, memory management will move to a background agent thread. last_run_completion: anyOf: - type: string format: date-time - type: 'null' title: Last Run Completion description: The timestamp when the agent last completed a run. last_run_duration_ms: anyOf: - type: integer - type: 'null' title: Last Run Duration Ms description: The duration in milliseconds of the agent's last run. last_stop_reason: anyOf: - $ref: '#/components/schemas/StopReasonType' - type: 'null' description: The stop reason from the agent's last run. timezone: anyOf: - type: string - type: 'null' title: Timezone description: The timezone of the agent (IANA format). max_files_open: anyOf: - type: integer - type: 'null' title: Max Files Open description: Maximum number of files that can be open at once for this agent. Setting this too high may exceed the context window, which will break the agent. per_file_view_window_char_limit: anyOf: - type: integer - type: 'null' title: Per File View Window Char Limit description: The per-file view window character limit for this agent. Setting this too high may exceed the context window, which will break the agent. hidden: anyOf: - type: boolean - type: 'null' title: Hidden description: If set to True, the agent will be hidden. type: object title: UpdateAgent MessageRole: type: string enum: - assistant - user - tool - function - system - approval - summary title: MessageRole ImageContent: properties: type: type: string const: image title: Type description: The type of the message. default: image source: oneOf: - $ref: '#/components/schemas/UrlImage' - $ref: '#/components/schemas/Base64Image' - $ref: '#/components/schemas/LettaImage' title: Source description: The source of the image. discriminator: propertyName: type mapping: base64: '#/components/schemas/Base64Image' letta: '#/components/schemas/LettaImage' url: '#/components/schemas/UrlImage' type: object required: - source title: ImageContent 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 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. role: $ref: '#/components/schemas/MessageRole' description: The role of the participant. content: anyOf: - items: oneOf: - $ref: '#/components/schemas/TextContent' - $ref: '#/components/schemas/ImageContent' - $ref: '#/components/schemas/ToolCallContent' - $ref: '#/components/schemas/ToolReturnContent' - $ref: '#/components/schemas/ReasoningContent' - $ref: '#/components/schemas/RedactedReasoningContent' - $ref: '#/components/schemas/OmittedReasoningContent' - $ref: '#/components/schemas/SummarizedReasoningContent' discriminator: propertyName: type mapping: image: '#/components/schemas/ImageContent' omitted_reasoning: '#/components/schemas/OmittedReasoningContent' reasoning: '#/components/schemas/ReasoningContent' redacted_reasoning: '#/components/schemas/RedactedReasoningContent' summarized_reasoning: '#/components/schemas/SummarizedReasoningContent' 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. name: anyOf: - type: string - type: 'null' title: Name description: 'For role user/assistant: the (optional) name of the participant. For role tool/function: the name of the function called.' tool_calls: anyOf: - items: $ref: '#/components/schemas/ChatCompletionMessageFunctionToolCall-Output' type: array - type: 'null' title: Tool Calls description: The list of tool calls requested. Only applicable for role assistant. tool_call_id: anyOf: - type: string - type: 'null' title: Tool Call Id description: The ID of the tool call. Only applicable for role tool. step_id: anyOf: - type: string - type: 'null' title: Step Id description: The id of the step that this message was created in. run_id: anyOf: - type: string - type: 'null' title: Run Id description: The id of the run 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/letta__schemas__message__ToolReturn-Output' 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 sender_id: anyOf: - type: string - type: 'null' title: Sender Id description: The id of the sender of the message, can be an identity id or agent id batch_item_id: anyOf: - type: string - type: 'null' title: Batch Item Id description: The id of the LLMBatchItem that this message is associated with conversation_id: anyOf: - type: string - type: 'null' title: Conversation Id description: The conversation this message belongs to is_err: anyOf: - type: boolean - type: 'null' title: Is Err description: Whether this message is part of an error step. Used only for debugging purposes. approval_request_id: anyOf: - type: string - type: 'null' title: Approval Request Id description: The id of the approval request if this message is associated with a tool call request. approve: anyOf: - type: boolean - type: 'null' title: Approve description: Whether tool call is approved. denial_reason: anyOf: - type: string - type: 'null' title: Denial Reason description: The reason the tool call request was denied. approvals: anyOf: - items: anyOf: - $ref: '#/components/schemas/ApprovalReturn' - $ref: '#/components/schemas/letta__schemas__message__ToolReturn-Output' type: array - type: 'null' title: Approvals description: The list of approvals for this message. 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\n Attributes:\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.\n step_id (str): The id of the step that this message was created in.\n otid (str): The offline threading id associated with this message.\n tool_returns (List[ToolReturn]): The list of tool returns requested.\n group_id (str): The multi-agent group that the message was sent in.\n sender_id (str): The id of the sender of the message, can be an identity id or agent id.\n conversation_id (str): The conversation this message belongs to.\nt" 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 letta__schemas__letta_message__ToolReturn: properties: type: type: string const: tool title: Type description: The message type to be created. default: tool tool_return: anyOf: - items: $ref: '#/components/schemas/LettaToolReturnContentUnion' type: array - type: string title: Tool Return description: The tool return value - either a string or list of content parts (text/image) 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: - tool_return - status - tool_call_id title: ToolReturn 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 prompt_template: anyOf: - type: string - type: 'null' title: Prompt Template description: Optional template string (ignored). 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. LettaUserMessageContentUnion: oneOf: - $ref: '#/components/schemas/TextContent' - $ref: '#/components/schemas/ImageContent' discriminator: propertyName: type mapping: text: '#/components/schemas/TextContent' image: '#/components/schemas/ImageContent' 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 ParameterProperties: properties: type: type: string title: Type description: anyOf: - type: string - type: 'null' title: Description type: object required: - type title: ParameterProperties OmittedReasoningContent: properties: type: type: string const: omitted_reasoning title: Type description: Indicates this is an omitted reasoning step. default: omitted_reasoning signature: anyOf: - type: string - type: 'null' title: Signature description: A unique identifier for this reasoning step. type: object title: OmittedReasoningContent description: A placeholder for reasoning content we know is present, but isn't returned by the provider (e.g. OpenAI GPT-5 on ChatCompletions) SGLangModelSettings: properties: max_output_tokens: type: integer title: Max Output Tokens description: The maximum number of tokens the model can generate. default: 4096 parallel_tool_calls: type: boolean title: Parallel Tool Calls description: Whether to enable parallel tool calling. default: true provider_type: type: string const: sglang title: Provider Type description: The type of the provider. default: sglang temperature: type: number title: Temperature description: The temperature of the model. default: 0.7 reasoning: $ref: '#/components/schemas/OpenAIReasoning' description: The reasoning configuration for the model. default: reasoning_effort: high response_format: anyOf: - oneOf: - $ref: '#/components/schemas/TextResponseFormat' - $ref: '#/components/schemas/JsonSchemaResponseFormat' - $ref: '#/components/schemas/JsonObjectResponseFormat' discriminator: propertyName: type mapping: json_object: '#/components/schemas/JsonObjectResponseFormat' json_schema: '#/components/schemas/JsonSchemaResponseFormat' text: '#/components/schemas/TextResponseFormat' - type: 'null' title: Response Format description: The response format for the model. strict: type: boolean title: Strict description: Enable strict mode for tool calling. When true, tool outputs are guaranteed to match JSON schemas. default: true tool_call_parser: anyOf: - type: string - type: 'null' title: Tool Call Parser description: SGLang tool call parser name (for example 'glm47', 'qwen25', or 'hermes'). type: object title: SGLangModelSettings description: SGLang model configuration (OpenAI-compatible runtime with SGLang-specific parsing). BaseToolRuleSchema: properties: tool_name: type: string title: Tool Name type: type: string title: Type type: object required: - tool_name - type title: BaseToolRuleSchema letta__schemas__openai__chat_completion_response__ChatCompletionTokenLogprob: properties: token: type: string title: Token bytes: anyOf: - items: type: integer type: array - type: 'null' title: Bytes logprob: type: number title: Logprob top_logprobs: items: $ref: '#/components/schemas/letta__schemas__openai__chat_completion_response__TopLogprob' type: array title: Top Logprobs type: object required: - token - logprob - top_logprobs title: ChatCompletionTokenLogprob 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 run_ids: anyOf: - items: type: string type: array - type: 'null' title: Run Ids description: The background task run IDs associated with the agent interaction cached_input_tokens: anyOf: - type: integer - type: 'null' title: Cached Input Tokens description: The number of input tokens served from cache. None if not reported by provider. cache_write_tokens: anyOf: - type: integer - type: 'null' title: Cache Write Tokens description: The number of input tokens written to cache (Anthropic only). None if not reported by provider. reasoning_tokens: anyOf: - type: integer - type: 'null' title: Reasoning Tokens description: The number of reasoning/thinking tokens generated. None if not reported by provider. context_tokens: anyOf: - type: integer - type: 'null' title: Context Tokens description: Estimate of tokens currently in the context window. 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.\n cached_input_tokens (Optional[int]): The number of input tokens served from cache. None if not reported.\n cache_write_tokens (Optional[int]): The number of input tokens written to cache. None if not reported.\n reasoning_tokens (Optional[int]): The number of reasoning/thinking tokens generated. None if not reported." VectorDBProvider: type: string enum: - native - tpuf - pinecone title: VectorDBProvider description: Supported vector database providers for archival memory 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/RequiredBeforeExitToolRule' - $ref: '#/components/schemas/MaxCountPerStepToolRule' - $ref: '#/components/schemas/ParentToolRule' - $ref: '#/components/schemas/RequiresApprovalToolRule' 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' parent_last_tool: '#/components/schemas/ParentToolRule' required_before_exit: '#/components/schemas/RequiredBeforeExitToolRule' requires_approval: '#/components/schemas/RequiresApprovalToolRule' 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: 'Deprecated: Use `model` field instead. The LLM configuration used by the agent.' deprecated: true embedding_config: anyOf: - $ref: '#/components/schemas/EmbeddingConfig' - type: 'null' description: 'Deprecated: Use `embedding` field instead. The embedding configuration used by the agent.' deprecated: true model: anyOf: - type: string - type: 'null' title: Model description: 'The model handle used by the agent (format: provider/model-name).' embedding: anyOf: - type: string - type: 'null' title: Embedding description: 'The embedding model handle used by the agent (format: provider/model-name).' model_settings: anyOf: - oneOf: - $ref: '#/components/schemas/OpenAIModelSettings' - $ref: '#/components/schemas/SGLangModelSettings' - $ref: '#/components/schemas/AnthropicModelSettings' - $ref: '#/components/schemas/GoogleAIModelSettings' - $ref: '#/components/schemas/GoogleVertexModelSettings' - $ref: '#/components/schemas/AzureModelSettings' - $ref: '#/components/schemas/XAIModelSettings' - $ref: '#/components/schemas/ZAIModelSettings' - $ref: '#/components/schemas/GroqModelSettings' - $ref: '#/components/schemas/DeepseekModelSettings' - $ref: '#/components/schemas/TogetherModelSettings' - $ref: '#/components/schemas/BedrockModelSettings' - $ref: '#/components/schemas/BasetenModelSettings' - $ref: '#/components/schemas/OpenRouterModelSettings' - $ref: '#/components/schemas/ChatGPTOAuthModelSettings' discriminator: propertyName: provider_type mapping: anthropic: '#/components/schemas/AnthropicModelSettings' azure: '#/components/schemas/AzureModelSettings' baseten: '#/components/schemas/BasetenModelSettings' bedrock: '#/components/schemas/BedrockModelSettings' chatgpt_oauth: '#/components/schemas/ChatGPTOAuthModelSettings' deepseek: '#/components/schemas/DeepseekModelSettings' google_ai: '#/components/schemas/GoogleAIModelSettings' google_vertex: '#/components/schemas/GoogleVertexModelSettings' groq: '#/components/schemas/GroqModelSettings' openai: '#/components/schemas/OpenAIModelSettings' openrouter: '#/components/schemas/OpenRouterModelSettings' sglang: '#/components/schemas/SGLangModelSettings' together: '#/components/schemas/TogetherModelSettings' xai: '#/components/schemas/XAIModelSettings' zai: '#/components/schemas/ZAIModelSettings' - type: 'null' title: Model Settings description: The model settings used by the agent. compaction_settings: anyOf: - $ref: '#/components/schemas/CompactionSettings-Output' - type: 'null' description: The compaction settings configuration used for compaction. response_format: anyOf: - oneOf: - $ref: '#/components/schemas/TextResponseFormat' - $ref: '#/components/schemas/JsonSchemaResponseFormat' - $ref: '#/components/schemas/JsonObjectResponseFormat' discriminator: propertyName: type mapping: json_object: '#/components/schemas/JsonObjectResponseFormat' json_schema: '#/components/schemas/JsonSchemaResponseFormat' text: '#/components/schemas/TextResponseFormat' - type: 'null' title: Response Format description: The response format used by 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: 'Deprecated: Use `blocks` field instead. The in-context memory of the agent.' deprecated: true blocks: items: $ref: '#/components/schemas/Block' type: array title: Blocks description: The memory blocks used by 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: 'Deprecated: Use `folders` field instead. The sources used by the agent.' deprecated: true 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: 'Deprecated: use `secrets` field instead.' deprecated: true secrets: items: $ref: '#/components/schemas/AgentEnvironmentVariable' type: array title: Secrets 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. deployment_id: anyOf: - type: string - type: 'null' title: Deployment Id description: The id of the deployment. entity_id: anyOf: - type: string - type: 'null' title: Entity Id description: The id of the entity within the template. identity_ids: items: type: string type: array title: Identity Ids description: 'Deprecated: Use `identities` field instead. The ids of the identities associated with this agent.' default: [] deprecated: true identities: items: $ref: '#/components/schemas/Identity' type: array title: Identities description: The identities associated with this agent. default: [] pending_approval: anyOf: - $ref: '#/components/schemas/ApprovalRequestMessage' - type: 'null' description: The latest approval request message pending for this agent, if any. 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 enable_sleeptime: anyOf: - type: boolean - type: 'null' title: Enable Sleeptime description: If set to True, memory management will move to a background agent thread. multi_agent_group: anyOf: - $ref: '#/components/schemas/Group' - type: 'null' description: 'Deprecated: Use `managed_group` field instead. The multi-agent group that this agent manages.' deprecated: true managed_group: anyOf: - $ref: '#/components/schemas/Group' - type: 'null' description: The multi-agent group that this agent manages last_run_completion: anyOf: - type: string format: date-time - type: 'null' title: Last Run Completion description: The timestamp when the agent last completed a run. last_run_duration_ms: anyOf: - type: integer - type: 'null' title: Last Run Duration Ms description: The duration in milliseconds of the agent's last run. last_stop_reason: anyOf: - $ref: '#/components/schemas/StopReasonType' - type: 'null' description: The stop reason from the agent's last run. timezone: anyOf: - type: string - type: 'null' title: Timezone description: The timezone of the agent (IANA format). max_files_open: anyOf: - type: integer - type: 'null' title: Max Files Open description: Maximum number of files that can be open at once for this agent. Setting this too high may exceed the context window, which will break the agent. per_file_view_window_char_limit: anyOf: - type: integer - type: 'null' title: Per File View Window Char Limit description: The per-file view window character limit for this agent. Setting this too high may exceed the context window, which will break the agent. hidden: anyOf: - type: boolean - type: 'null' title: Hidden description: If set to True, the agent will be hidden. additionalProperties: false type: object required: - id - name - system - agent_type - llm_config - memory - blocks - 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. 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 letta__schemas__openai__chat_completion_response__ChoiceLogprobs: properties: content: anyOf: - items: $ref: '#/components/schemas/letta__schemas__openai__chat_completion_response__ChatCompletionTokenLogprob' type: array - type: 'null' title: Content refusal: anyOf: - items: $ref: '#/components/schemas/letta__schemas__openai__chat_completion_response__ChatCompletionTokenLogprob' type: array - type: 'null' title: Refusal type: object title: ChoiceLogprobs 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 description: The type of the message. default: reasoning_message otid: anyOf: - type: string - type: 'null' title: Otid description: The offline threading id (OTID). Set by the client to deduplicate requests. Used for idempotency in background streaming mode — each message in a request must have a unique OTID. Retries of the same request should reuse the same OTIDs. sender_id: anyOf: - type: string - type: 'null' title: Sender Id step_id: anyOf: - type: string - type: 'null' title: Step Id is_err: anyOf: - type: boolean - type: 'null' title: Is Err seq_id: anyOf: - type: integer - type: 'null' title: Seq Id run_id: anyOf: - type: string - type: 'null' title: Run Id 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" Run: properties: 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 status: $ref: '#/components/schemas/RunStatus' description: The current status of the run. default: created created_at: type: string format: date-time title: Created At description: The timestamp when the run was created. completed_at: anyOf: - type: string format: date-time - type: 'null' title: Completed At description: The timestamp when the run was completed. agent_id: type: string title: Agent Id description: The unique identifier of the agent associated with the run. conversation_id: anyOf: - type: string - type: 'null' title: Conversation Id description: The unique identifier of the conversation associated with the run. base_template_id: anyOf: - type: string - type: 'null' title: Base Template Id description: The base template ID that the run belongs to. background: anyOf: - type: boolean - type: 'null' title: Background description: Whether the run was created in background mode. metadata: anyOf: - additionalProperties: true type: object - type: 'null' title: Metadata description: Additional metadata for the run. request_config: anyOf: - $ref: '#/components/schemas/LettaRequestConfig' - type: 'null' description: The request configuration for the run. stop_reason: anyOf: - $ref: '#/components/schemas/StopReasonType' - type: 'null' description: The reason why the run was stopped. callback_url: anyOf: - type: string - type: 'null' title: Callback Url description: If set, POST to this URL when the run completes. callback_sent_at: anyOf: - type: string format: date-time - type: 'null' title: Callback Sent At description: Timestamp when the callback was last attempted. callback_status_code: anyOf: - type: integer - type: 'null' title: Callback Status Code description: HTTP status code returned by the callback endpoint. callback_error: anyOf: - type: string - type: 'null' title: Callback Error description: Optional error message from attempting to POST the callback endpoint. ttft_ns: anyOf: - type: integer - type: 'null' title: Ttft Ns description: Time to first token for a run in nanoseconds total_duration_ns: anyOf: - type: integer - type: 'null' title: Total Duration Ns description: Total run duration in nanoseconds additionalProperties: false type: object required: - agent_id title: Run description: Representation of a run - a conversation or processing session for an agent. Runs track when agents process messages and maintain the relationship between agents, steps, and messages. letta__schemas__message__ToolReturn-Input: properties: tool_call_id: anyOf: - {} - type: 'null' title: Tool Call Id description: The ID for the tool call 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 func_response: anyOf: - type: string - items: oneOf: - $ref: '#/components/schemas/TextContent' - $ref: '#/components/schemas/ImageContent' discriminator: propertyName: type mapping: image: '#/components/schemas/ImageContent' text: '#/components/schemas/TextContent' type: array - type: 'null' title: Func Response description: The function response - either a string or list of content parts (text/image) type: object required: - status title: ToolReturn ToolCallNode: properties: name: type: string title: Name description: The name of the child tool to invoke next. args: anyOf: - additionalProperties: true type: object - type: 'null' title: Args description: Optional prefilled arguments for this child tool. Keys must match the tool's parameter names and values must satisfy the tool's JSON schema. Supports partial prefill; non-overlapping parameters are left to the model. type: object required: - name title: ToolCallNode description: 'Typed child override for prefilled arguments. When used in a ChildToolRule, if this child is selected next, its `args` will be applied as prefilled arguments (overriding overlapping LLM-provided values).' Source: properties: 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. instructions: anyOf: - type: string - type: 'null' title: Instructions description: Instructions for how to use the source. metadata: anyOf: - additionalProperties: true type: object - type: 'null' title: Metadata description: Metadata associated with the source. 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 embedding_config: $ref: '#/components/schemas/EmbeddingConfig' description: The embedding configuration used by the source. vector_db_provider: $ref: '#/components/schemas/VectorDBProvider' description: The vector database provider used for this source's passages default: native 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: '(Deprecated: Use Folder) Representation of a source, which is a collection of files and passages.' Block: properties: value: type: string title: Value description: Value of the block. limit: type: integer title: Limit description: Character limit of the block. default: 100000 project_id: anyOf: - type: string - type: 'null' title: Project Id description: The associated project id. template_name: anyOf: - type: string - type: 'null' title: Template 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 template_id: anyOf: - type: string - type: 'null' title: Template Id description: The id of the template. base_template_id: anyOf: - type: string - type: 'null' title: Base Template Id description: The base template id of the block. deployment_id: anyOf: - type: string - type: 'null' title: Deployment Id description: The id of the deployment. entity_id: anyOf: - type: string - type: 'null' title: Entity Id description: The id of the entity within the template. preserve_on_migration: anyOf: - type: boolean - type: 'null' title: Preserve On Migration description: Preserve the block on template migration. default: false label: anyOf: - type: string - type: 'null' title: Label description: Label of the block (e.g. 'human', 'persona') in the context window. read_only: type: boolean title: Read Only description: Whether the agent has read-only access to the block. default: false 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: {} hidden: anyOf: - type: boolean - type: 'null' title: Hidden description: If set to True, the block will be hidden. 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 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. tags: anyOf: - items: type: string type: array - type: 'null' title: Tags description: The tags associated with the block. default: [] type: object required: - value title: Block description: A Block represents a reserved section of the LLM's context window. RequiredBeforeExitToolRule: 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: required_before_exit title: Type default: required_before_exit prompt_template: anyOf: - type: string - type: 'null' title: Prompt Template description: Optional template string (ignored). additionalProperties: false type: object required: - tool_name title: RequiredBeforeExitToolRule description: Represents a tool rule configuration where this tool must be called before the agent loop can exit. ZAIModelSettings: properties: max_output_tokens: type: integer title: Max Output Tokens description: The maximum number of tokens the model can generate. default: 4096 parallel_tool_calls: type: boolean title: Parallel Tool Calls description: Whether to enable parallel tool calling. default: true provider_type: type: string const: zai title: Provider Type description: The type of the provider. default: zai temperature: type: number title: Temperature description: The temperature of the model. default: 0.7 response_format: anyOf: - oneOf: - $ref: '#/components/schemas/TextResponseFormat' - $ref: '#/components/schemas/JsonSchemaResponseFormat' - $ref: '#/components/schemas/JsonObjectResponseFormat' discriminator: propertyName: type mapping: json_object: '#/components/schemas/JsonObjectResponseFormat' json_schema: '#/components/schemas/JsonSchemaResponseFormat' text: '#/components/schemas/TextResponseFormat' - type: 'null' title: Response Format description: The response format for the model. thinking: $ref: '#/components/schemas/ZAIThinking' description: The thinking configuration for GLM-4.5+ models. default: type: enabled clear_thinking: false type: object title: ZAIModelSettings description: Z.ai (ZhipuAI) model configuration (OpenAI-compatible). 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 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 include_return_message_types: anyOf: - items: $ref: '#/components/schemas/MessageType' type: array - type: 'null' title: Include Return Message Types description: Only return specified message types in the response. If `None` (default) returns all messages. type: object title: LettaRequestConfig ResetMessagesRequest: properties: add_default_initial_messages: type: boolean title: Add Default Initial Messages description: If true, adds the default initial messages after resetting. default: false type: object title: ResetMessagesRequest description: Request body for resetting messages on an agent. AnthropicModelSettings: properties: max_output_tokens: type: integer title: Max Output Tokens description: The maximum number of tokens the model can generate. default: 4096 parallel_tool_calls: type: boolean title: Parallel Tool Calls description: Whether to enable parallel tool calling. default: true provider_type: type: string const: anthropic title: Provider Type description: The type of the provider. default: anthropic temperature: type: number title: Temperature description: The temperature of the model. default: 1 thinking: $ref: '#/components/schemas/AnthropicThinking' description: The thinking configuration for the model. default: type: enabled budget_tokens: 1024 response_format: anyOf: - oneOf: - $ref: '#/components/schemas/TextResponseFormat' - $ref: '#/components/schemas/JsonSchemaResponseFormat' - $ref: '#/components/schemas/JsonObjectResponseFormat' discriminator: propertyName: type mapping: json_object: '#/components/schemas/JsonObjectResponseFormat' json_schema: '#/components/schemas/JsonSchemaResponseFormat' text: '#/components/schemas/TextResponseFormat' - type: 'null' title: Response Format description: The response format for the model. verbosity: anyOf: - type: string enum: - low - medium - high - type: 'null' title: Verbosity description: Soft control for how verbose model output should be, used for GPT-5 models. effort: anyOf: - type: string enum: - low - medium - high - max - type: 'null' title: Effort description: Effort level for supported Anthropic models (controls token spending). 'max' is only available on Opus 4.6. Not setting this gives similar performance to 'high'. strict: type: boolean title: Strict description: Enable strict mode for tool calling. When true, tool outputs are guaranteed to match JSON schemas. default: false type: object title: AnthropicModelSettings ApprovalRequestMessage: 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: approval_request_message title: Message Type description: The type of the message. default: approval_request_message otid: anyOf: - type: string - type: 'null' title: Otid description: The offline threading id (OTID). Set by the client to deduplicate requests. Used for idempotency in background streaming mode — each message in a request must have a unique OTID. Retries of the same request should reuse the same OTIDs. sender_id: anyOf: - type: string - type: 'null' title: Sender Id step_id: anyOf: - type: string - type: 'null' title: Step Id is_err: anyOf: - type: boolean - type: 'null' title: Is Err seq_id: anyOf: - type: integer - type: 'null' title: Seq Id run_id: anyOf: - type: string - type: 'null' title: Run Id tool_call: anyOf: - $ref: '#/components/schemas/ToolCall' - $ref: '#/components/schemas/ToolCallDelta' title: Tool Call description: The tool call that has been requested by the llm to run deprecated: true tool_calls: anyOf: - items: $ref: '#/components/schemas/ToolCall' type: array - $ref: '#/components/schemas/ToolCallDelta' - type: 'null' title: Tool Calls description: The tool calls that have been requested by the llm to run, which are pending approval type: object required: - id - date - tool_call title: ApprovalRequestMessage description: "A message representing a request for approval 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 (ToolCall): The tool call" Memory: properties: agent_type: anyOf: - $ref: '#/components/schemas/AgentType' - type: string - type: 'null' title: Agent Type description: Agent type controlling prompt rendering. git_enabled: type: boolean title: Git Enabled description: Whether this agent uses git-backed memory with structured labels. default: false blocks: items: $ref: '#/components/schemas/Block' type: array title: Blocks description: Memory blocks contained in the agent's in-context memory file_blocks: items: $ref: '#/components/schemas/FileBlock' type: array title: File Blocks description: Special blocks representing the agent's in-context memory of an attached file prompt_template: type: string title: Prompt Template description: Deprecated. Ignored for performance. default: '' 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. BasetenModelSettings: properties: max_output_tokens: type: integer title: Max Output Tokens description: The maximum number of tokens the model can generate. default: 4096 parallel_tool_calls: type: boolean title: Parallel Tool Calls description: Whether to enable parallel tool calling. default: true provider_type: type: string const: baseten title: Provider Type description: The type of the provider. default: baseten temperature: type: number title: Temperature description: The temperature of the model. default: 0.7 type: object title: BasetenModelSettings description: Baseten model configuration (OpenAI-compatible). FunctionDefinition: 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 ClientSkillSchema: properties: name: type: string title: Name description: The name of the skill description: type: string title: Description description: Description of what the skill does location: type: string title: Location description: Path or location hint for the skill (e.g. skills/my-skill/SKILL.md) type: object required: - name - description - location title: ClientSkillSchema description: 'Schema for a client-side skill passed in the request. Client-side skills represent environment-provided capabilities (e.g. project-scoped skills) that are not stored in the agent''s MemFS but should appear in the system prompt''s available skills section.' 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 prompt_template: anyOf: - type: string - type: 'null' title: Prompt Template description: Optional template string (ignored). children: items: type: string type: array title: Children description: The children tools that can be invoked. child_arg_nodes: anyOf: - items: $ref: '#/components/schemas/ToolCallNode' type: array - type: 'null' title: Child Arg Nodes description: Optional list of typed child argument overrides. Each node must reference a child in 'children'. additionalProperties: false type: object required: - tool_name - children title: ChildToolRule description: A ToolRule represents a tool that can be invoked by the agent. AnthropicThinking: properties: type: type: string enum: - enabled - disabled title: Type description: The type of thinking to use. default: enabled budget_tokens: type: integer title: Budget Tokens description: The maximum number of tokens the model can use for extended thinking. default: 1024 type: object title: AnthropicThinking LettaStreamingResponse: 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' - $ref: '#/components/schemas/ApprovalRequestMessage' - $ref: '#/components/schemas/ApprovalResponseMessage' - $ref: '#/components/schemas/LettaPing' - $ref: '#/components/schemas/LettaErrorMessage' - $ref: '#/components/schemas/LettaStopReason' - $ref: '#/components/schemas/LettaUsageStatistics' title: LettaStreamingResponse description: 'Streaming response type for Server-Sent Events (SSE) endpoints. Each event in the stream will be one of these types.' discriminator: propertyName: message_type mapping: approval_request_message: '#/components/schemas/ApprovalRequestMessage' approval_response_message: '#/components/schemas/ApprovalResponseMessage' assistant_message: '#/components/schemas/AssistantMessage' error_message: '#/components/schemas/LettaErrorMessage' hidden_reasoning_message: '#/components/schemas/HiddenReasoningMessage' ping: '#/components/schemas/LettaPing' reasoning_message: '#/components/schemas/ReasoningMessage' stop_reason: '#/components/schemas/LettaStopReason' system_message: '#/components/schemas/SystemMessage' tool_call_message: '#/components/schemas/ToolCallMessage' tool_return_message: '#/components/schemas/ToolReturnMessage' usage_statistics: '#/components/schemas/LettaUsageStatistics' user_message: '#/components/schemas/UserMessage' 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 maxLength: 41 minLength: 41 pattern: ^tool-[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ description: The ID of the tool in the format 'tool-' examples: - tool-123e4567-e89b-42d3-8456-426614174000 type: array - type: 'null' title: Tool Ids description: The ids of the tools used by the agent. source_ids: anyOf: - items: type: string maxLength: 43 minLength: 43 pattern: ^source-[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ description: The ID of the source in the format 'source-' examples: - source-123e4567-e89b-42d3-8456-426614174000 type: array - type: 'null' title: Source Ids description: 'Deprecated: Use `folder_ids` field instead. The ids of the sources used by the agent.' deprecated: true folder_ids: anyOf: - items: type: string maxLength: 43 minLength: 43 pattern: ^source-[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ description: The ID of the source in the format 'source-' examples: - source-123e4567-e89b-42d3-8456-426614174000 type: array - type: 'null' title: Folder Ids description: The ids of the folders used by the agent. block_ids: anyOf: - items: type: string maxLength: 42 minLength: 42 pattern: ^block-[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ description: The ID of the block in the format 'block-' examples: - block-123e4567-e89b-42d3-8456-426614174000 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/RequiredBeforeExitToolRule' - $ref: '#/components/schemas/MaxCountPerStepToolRule' - $ref: '#/components/schemas/ParentToolRule' - $ref: '#/components/schemas/RequiresApprovalToolRule' 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' parent_last_tool: '#/components/schemas/ParentToolRule' required_before_exit: '#/components/schemas/RequiredBeforeExitToolRule' requires_approval: '#/components/schemas/RequiresApprovalToolRule' 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. 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. 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: anyOf: - type: boolean - type: 'null' title: Include Base Tool Rules description: If true, attaches the Letta base tool rules (e.g. deny all tools not explicitly allowed). include_default_source: type: boolean title: Include Default Source description: If true, automatically creates and attaches a default data source for this agent. default: false deprecated: 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. llm_config: anyOf: - $ref: '#/components/schemas/LLMConfig' - type: 'null' description: 'Deprecated: Use `model` field instead. The LLM configuration used by the agent.' deprecated: true embedding_config: anyOf: - $ref: '#/components/schemas/EmbeddingConfig' - type: 'null' description: 'Deprecated: Use `embedding` field instead. The embedding configuration used by the agent.' deprecated: true model: anyOf: - type: string - type: 'null' title: Model description: 'The model handle for the agent to use (format: provider/model-name).' embedding: anyOf: - type: string - type: 'null' title: Embedding description: 'The embedding model handle used by the agent (format: provider/model-name).' model_settings: anyOf: - oneOf: - $ref: '#/components/schemas/OpenAIModelSettings' - $ref: '#/components/schemas/SGLangModelSettings' - $ref: '#/components/schemas/AnthropicModelSettings' - $ref: '#/components/schemas/GoogleAIModelSettings' - $ref: '#/components/schemas/GoogleVertexModelSettings' - $ref: '#/components/schemas/AzureModelSettings' - $ref: '#/components/schemas/XAIModelSettings' - $ref: '#/components/schemas/ZAIModelSettings' - $ref: '#/components/schemas/GroqModelSettings' - $ref: '#/components/schemas/DeepseekModelSettings' - $ref: '#/components/schemas/TogetherModelSettings' - $ref: '#/components/schemas/BedrockModelSettings' - $ref: '#/components/schemas/BasetenModelSettings' - $ref: '#/components/schemas/OpenRouterModelSettings' - $ref: '#/components/schemas/ChatGPTOAuthModelSettings' discriminator: propertyName: provider_type mapping: anthropic: '#/components/schemas/AnthropicModelSettings' azure: '#/components/schemas/AzureModelSettings' baseten: '#/components/schemas/BasetenModelSettings' bedrock: '#/components/schemas/BedrockModelSettings' chatgpt_oauth: '#/components/schemas/ChatGPTOAuthModelSettings' deepseek: '#/components/schemas/DeepseekModelSettings' google_ai: '#/components/schemas/GoogleAIModelSettings' google_vertex: '#/components/schemas/GoogleVertexModelSettings' groq: '#/components/schemas/GroqModelSettings' openai: '#/components/schemas/OpenAIModelSettings' openrouter: '#/components/schemas/OpenRouterModelSettings' sglang: '#/components/schemas/SGLangModelSettings' together: '#/components/schemas/TogetherModelSettings' xai: '#/components/schemas/XAIModelSettings' zai: '#/components/schemas/ZAIModelSettings' - type: 'null' title: Model Settings description: The model settings for the agent. compaction_settings: anyOf: - $ref: '#/components/schemas/CompactionSettings-Input' - type: 'null' description: The compaction settings configuration used for compaction. 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: 'Deprecated: No longer used. The embedding chunk size used by the agent.' default: 300 deprecated: true max_tokens: anyOf: - type: integer - type: 'null' title: Max Tokens description: 'Deprecated: Use `model` field to configure max output tokens instead. The maximum number of tokens to generate, including reasoning step.' deprecated: true max_reasoning_tokens: anyOf: - type: integer - type: 'null' title: Max Reasoning Tokens description: 'Deprecated: Use `model` field to configure reasoning tokens instead. The maximum number of tokens to generate for reasoning step.' deprecated: true enable_reasoner: anyOf: - type: boolean - type: 'null' title: Enable Reasoner description: 'Deprecated: Use `model` field to configure reasoning instead. Whether to enable internal extended thinking step for a reasoner model.' default: true deprecated: true reasoning: anyOf: - type: boolean - type: 'null' title: Reasoning description: 'Deprecated: Use `model` field to configure reasoning instead. Whether to enable reasoning for this agent.' deprecated: true from_template: anyOf: - type: string - type: 'null' title: From Template description: 'Deprecated: please use the ''create agents from a template'' endpoint instead.' deprecated: true template: type: boolean title: Template description: 'Deprecated: No longer used.' default: false deprecated: true 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 x_project parameter.' deprecated: true tool_exec_environment_variables: anyOf: - additionalProperties: type: string type: object - type: 'null' title: Tool Exec Environment Variables description: 'Deprecated: Use `secrets` field instead. Environment variables for tool execution.' deprecated: true secrets: anyOf: - additionalProperties: type: string type: object - type: 'null' title: Secrets 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: 'Deprecated: Only relevant for creating agents from a template. Use the ''create agents from a template'' endpoint instead.' deprecated: true project_id: anyOf: - type: string - type: 'null' title: Project Id description: 'Deprecated: No longer used. The id of the project the agent belongs to.' deprecated: true template_id: anyOf: - type: string - type: 'null' title: Template Id description: 'Deprecated: No longer used. The id of the template the agent belongs to.' deprecated: true base_template_id: anyOf: - type: string - type: 'null' title: Base Template Id description: 'Deprecated: No longer used. The base template id of the agent.' deprecated: true identity_ids: anyOf: - items: type: string maxLength: 45 minLength: 45 pattern: ^identity-[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ description: The ID of the identity in the format 'identity-' examples: - identity-123e4567-e89b-42d3-8456-426614174000 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 enable_sleeptime: anyOf: - type: boolean - type: 'null' title: Enable Sleeptime description: If set to True, memory management will move to a background agent thread. response_format: anyOf: - oneOf: - $ref: '#/components/schemas/TextResponseFormat' - $ref: '#/components/schemas/JsonSchemaResponseFormat' - $ref: '#/components/schemas/JsonObjectResponseFormat' discriminator: propertyName: type mapping: json_object: '#/components/schemas/JsonObjectResponseFormat' json_schema: '#/components/schemas/JsonSchemaResponseFormat' text: '#/components/schemas/TextResponseFormat' - type: 'null' title: Response Format description: 'Deprecated: Use `model_settings` field to configure response format instead. The response format for the agent.' deprecated: true timezone: anyOf: - type: string - type: 'null' title: Timezone description: The timezone of the agent (IANA format). max_files_open: anyOf: - type: integer - type: 'null' title: Max Files Open description: Maximum number of files that can be open at once for this agent. Setting this too high may exceed the context window, which will break the agent. per_file_view_window_char_limit: anyOf: - type: integer - type: 'null' title: Per File View Window Char Limit description: The per-file view window character limit for this agent. Setting this too high may exceed the context window, which will break the agent. hidden: anyOf: - type: boolean - type: 'null' title: Hidden description: 'Deprecated: No longer used. If set to True, the agent will be hidden.' deprecated: true parallel_tool_calls: anyOf: - type: boolean - type: 'null' title: Parallel Tool Calls description: 'Deprecated: Use `model_settings` to configure parallel tool calls instead. If set to True, enables parallel tool calling.' deprecated: true type: object title: CreateAgentRequest description: CreateAgent model specifically for POST request body, excluding user_id which comes from headers DeepseekModelSettings: properties: max_output_tokens: type: integer title: Max Output Tokens description: The maximum number of tokens the model can generate. default: 4096 parallel_tool_calls: type: boolean title: Parallel Tool Calls description: Whether to enable parallel tool calling. default: true provider_type: type: string const: deepseek title: Provider Type description: The type of the provider. default: deepseek temperature: type: number title: Temperature description: The temperature of the model. default: 0.7 response_format: anyOf: - oneOf: - $ref: '#/components/schemas/TextResponseFormat' - $ref: '#/components/schemas/JsonSchemaResponseFormat' - $ref: '#/components/schemas/JsonObjectResponseFormat' discriminator: propertyName: type mapping: json_object: '#/components/schemas/JsonObjectResponseFormat' json_schema: '#/components/schemas/JsonSchemaResponseFormat' text: '#/components/schemas/TextResponseFormat' - type: 'null' title: Response Format description: The response format for the model. type: object title: DeepseekModelSettings description: Deepseek model configuration (OpenAI-compatible). ApprovalCreate: properties: type: type: string const: approval title: Type description: The message type to be created. default: approval otid: anyOf: - type: string - type: 'null' title: Otid description: The offline threading id (OTID). Set by the client to deduplicate requests. Used for idempotency in background streaming mode — each message in a request must have a unique OTID. Retries of the same request should reuse the same OTIDs. group_id: anyOf: - type: string - type: 'null' title: Group Id description: The multi-agent group that the message was sent in approvals: anyOf: - items: oneOf: - $ref: '#/components/schemas/ApprovalReturn' - $ref: '#/components/schemas/letta__schemas__letta_message__ToolReturn' discriminator: propertyName: type mapping: approval: '#/components/schemas/ApprovalReturn' tool: '#/components/schemas/letta__schemas__letta_message__ToolReturn' type: array - type: 'null' title: Approvals description: The list of approval responses approve: anyOf: - type: boolean - type: 'null' title: Approve description: Whether the tool has been approved deprecated: true approval_request_id: anyOf: - type: string - type: 'null' title: Approval Request Id description: The message ID of the approval request deprecated: true reason: anyOf: - type: string - type: 'null' title: Reason description: An optional explanation for the provided approval status deprecated: true type: object title: ApprovalCreate description: Input to approve or deny a tool call request 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 description: The type of the message. default: tool_call_message otid: anyOf: - type: string - type: 'null' title: Otid description: The offline threading id (OTID). Set by the client to deduplicate requests. Used for idempotency in background streaming mode — each message in a request must have a unique OTID. Retries of the same request should reuse the same OTIDs. sender_id: anyOf: - type: string - type: 'null' title: Sender Id step_id: anyOf: - type: string - type: 'null' title: Step Id is_err: anyOf: - type: boolean - type: 'null' title: Is Err seq_id: anyOf: - type: integer - type: 'null' title: Seq Id run_id: anyOf: - type: string - type: 'null' title: Run Id tool_call: anyOf: - $ref: '#/components/schemas/ToolCall' - $ref: '#/components/schemas/ToolCallDelta' title: Tool Call deprecated: true tool_calls: anyOf: - items: $ref: '#/components/schemas/ToolCall' type: array - $ref: '#/components/schemas/ToolCallDelta' - type: 'null' title: Tool Calls 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" SummarizedReasoningContentPart: properties: index: type: integer title: Index description: The index of the summary part. text: type: string title: Text description: The text of the summary part. type: object required: - index - text title: SummarizedReasoningContentPart securitySchemes: bearerAuth: type: http scheme: bearer