openapi: 3.1.0 info: title: Letta Admin Internal Templates 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: Internal Templates description: Internal Templates operations. paths: /v1/_internal_templates/groups: post: tags: - Internal Templates summary: Create Group description: Create a new multi-agent group with the specified configuration. operationId: create_internal_template_group parameters: [] requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/InternalTemplateGroupCreate' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/Group' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /v1/_internal_templates/agents: post: tags: - Internal Templates summary: Create Agent description: Create a new agent with template-related fields. operationId: create_internal_template_agent parameters: [] requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/InternalTemplateAgentCreate' 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/_internal_templates/blocks: post: tags: - Internal Templates summary: Create Block description: Create a new block with template-related fields. operationId: create_internal_template_block parameters: [] requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/InternalTemplateBlockCreate' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/Block' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /v1/_internal_templates/blocks/batch: post: tags: - Internal Templates summary: Create Blocks Batch description: Create multiple blocks with template-related fields. operationId: create_internal_template_blocks_batch parameters: [] requestBody: required: true content: application/json: schema: type: array items: $ref: '#/components/schemas/InternalTemplateBlockCreate' title: Blocks responses: '200': description: Successful Response content: application/json: schema: type: array items: $ref: '#/components/schemas/Block' title: Response Create Internal Template Blocks Batch '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /v1/_internal_templates/deployment/{deployment_id}: get: tags: - Internal Templates summary: List Deployment Entities description: 'List all entities (blocks, agents, groups) with the specified deployment_id. Optionally filter by entity types.' operationId: list_deployment_entities parameters: - name: deployment_id in: path required: true schema: type: string title: Deployment Id - name: entity_types in: query required: false schema: anyOf: - type: array items: type: string - type: 'null' description: Filter by entity types (block, agent, group) title: Entity Types description: Filter by entity types (block, agent, group) responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/ListDeploymentEntitiesResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' delete: tags: - Internal Templates summary: Delete Deployment description: 'Delete all entities (blocks, agents, groups) with the specified deployment_id. Deletion order: blocks -> agents -> groups to maintain referential integrity.' operationId: delete_deployment parameters: - name: deployment_id in: path required: true schema: type: string title: Deployment Id responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/DeleteDeploymentResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' components: schemas: 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 InternalTemplateBlockCreate: 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: type: string title: Template Id description: The id of the template. base_template_id: type: string title: Base Template Id description: The id of the base template. deployment_id: type: string title: Deployment Id description: The id of the deployment. entity_id: type: string 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 - template_id - base_template_id - deployment_id - entity_id - label title: InternalTemplateBlockCreate description: Used for Letta Cloud 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. 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 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 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. ManagerType: type: string enum: - round_robin - supervisor - dynamic - sleeptime - voice_sleeptime - swarm title: ManagerType 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.' DeleteDeploymentResponse: properties: deleted_blocks: items: type: string type: array title: Deleted Blocks default: [] deleted_agents: items: type: string type: array title: Deleted Agents default: [] deleted_groups: items: type: string type: array title: Deleted Groups default: [] message: type: string title: Message type: object required: - message title: DeleteDeploymentResponse description: Response model for delete deployment operation. 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 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 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). VoiceSleeptimeManager: properties: manager_type: type: string const: voice_sleeptime title: Manager Type description: '' default: voice_sleeptime manager_agent_id: type: string maxLength: 42 minLength: 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}$ title: Manager Agent Id description: '' examples: - agent-123e4567-e89b-42d3-8456-426614174000 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. type: object required: - manager_agent_id title: VoiceSleeptimeManager 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. 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 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 SupervisorManager: properties: manager_type: type: string const: supervisor title: Manager Type description: '' default: supervisor manager_agent_id: type: string maxLength: 42 minLength: 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}$ title: Manager Agent Id description: '' examples: - agent-123e4567-e89b-42d3-8456-426614174000 type: object required: - manager_agent_id title: SupervisorManager 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). 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 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 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. 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). 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 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 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' 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). 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." 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 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). DeploymentEntity: properties: id: type: string title: Id type: type: string title: Type name: anyOf: - type: string - type: 'null' title: Name description: anyOf: - type: string - type: 'null' title: Description entity_id: anyOf: - type: string - type: 'null' title: Entity Id project_id: anyOf: - type: string - type: 'null' title: Project Id type: object required: - id - type title: DeploymentEntity description: A deployment entity. 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. 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). DynamicManager: properties: manager_type: type: string const: dynamic title: Manager Type description: '' default: dynamic manager_agent_id: type: string maxLength: 42 minLength: 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}$ title: Manager Agent Id description: '' examples: - agent-123e4567-e89b-42d3-8456-426614174000 termination_token: anyOf: - type: string - type: 'null' title: Termination Token description: '' default: DONE! max_turns: anyOf: - type: integer - type: 'null' title: Max Turns description: '' type: object required: - manager_agent_id title: DynamicManager 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 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. 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. 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 ProviderCategory: type: string enum: - base - byok title: ProviderCategory 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. 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. 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 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 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. IdentityPropertyType: type: string enum: - string - number - boolean - json title: IdentityPropertyType description: Enum to represent the type of the identity property. 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 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. 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 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. 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). 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) 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. InternalTemplateGroupCreate: properties: agent_ids: items: type: string maxLength: 42 minLength: 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 type: array title: Agent Ids description: '' description: type: string title: Description description: '' manager_config: oneOf: - $ref: '#/components/schemas/RoundRobinManager' - $ref: '#/components/schemas/SupervisorManager' - $ref: '#/components/schemas/DynamicManager' - $ref: '#/components/schemas/SleeptimeManager' - $ref: '#/components/schemas/VoiceSleeptimeManager' title: Manager Config description: '' default: manager_type: round_robin discriminator: propertyName: manager_type mapping: dynamic: '#/components/schemas/DynamicManager' round_robin: '#/components/schemas/RoundRobinManager' sleeptime: '#/components/schemas/SleeptimeManager' supervisor: '#/components/schemas/SupervisorManager' voice_sleeptime: '#/components/schemas/VoiceSleeptimeManager' project_id: anyOf: - type: string - type: 'null' title: Project Id description: The associated project id. shared_block_ids: 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 title: Shared Block Ids description: '' default: [] deprecated: true hidden: anyOf: - type: boolean - type: 'null' title: Hidden description: If set to True, the group will be hidden. base_template_id: type: string title: Base Template Id description: The id of the base template. template_id: type: string title: Template Id description: The id of the template. deployment_id: type: string title: Deployment Id description: The id of the deployment. type: object required: - agent_ids - description - base_template_id - template_id - deployment_id title: InternalTemplateGroupCreate description: Used for Letta Cloud InternalTemplateAgentCreate: 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: type: string title: Template Id description: The id of the template. base_template_id: type: string title: Base Template Id description: The id of the base template. 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 deployment_id: type: string title: Deployment Id description: The id of the deployment. entity_id: type: string title: Entity Id description: The id of the entity within the template. type: object required: - template_id - base_template_id - deployment_id - entity_id title: InternalTemplateAgentCreate description: Used for Letta Cloud 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 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" 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 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). 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 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). SleeptimeManager: properties: manager_type: type: string const: sleeptime title: Manager Type description: '' default: sleeptime manager_agent_id: type: string maxLength: 42 minLength: 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}$ title: Manager Agent Id description: '' examples: - agent-123e4567-e89b-42d3-8456-426614174000 sleeptime_agent_frequency: anyOf: - type: integer - type: 'null' title: Sleeptime Agent Frequency description: '' type: object required: - manager_agent_id title: SleeptimeManager ListDeploymentEntitiesResponse: properties: entities: items: $ref: '#/components/schemas/DeploymentEntity' type: array title: Entities default: [] total_count: type: integer title: Total Count deployment_id: type: string title: Deployment Id message: type: string title: Message type: object required: - total_count - deployment_id - message title: ListDeploymentEntitiesResponse description: Response model for listing deployment entities. securitySchemes: bearerAuth: type: http scheme: bearer