---
title: "Export Agent"
method: GET
path: "/v1/agents/{agent_id}/export"
tags: ["agents"]
---

# Export Agent

`GET /v1/agents/{agent_id}/export`

Export the serialized JSON representation of an agent, formatted with indentation.

Supports two export formats:
- Legacy format (use_legacy_format=true): Single agent with inline tools/blocks
- New format (default): Multi-entity format with separate agents, tools, blocks, files, etc.

## Path parameters

- `agent_id` string, required

## Query parameters

- `max_steps` integer
- `use_legacy_format` boolean — If true, exports using the legacy single-agent format (v1). If false, exports using the new multi-entity format (v2).

## Request body

- BodyExportAgent
  - `spec` AgentFileSchema — Schema for serialized agent file that can be exported to JSON and imported into agent server.
    - `agents` LettaSchemasAgentFileAgentSchema[], required — List of agents in this agent file
      - `name` string — The name of the agent.
      - `memory_blocks` CreateBlock[], nullable — The blocks to create in the agent's in-context memory.
        - `value` string, required — Value of the block.
        - `limit` integer — Character limit of the block.
        - `project_id` string, nullable — The associated project id.
        - `name` string, nullable — The id of the template.
        - `is_template` boolean
        - `base_template_id` string, nullable — The base template id of the block.
        - `deployment_id` string, nullable — The id of the deployment.
        - `entity_id` string, nullable — The id of the entity within the template.
        - `preserve_on_migration` boolean, nullable — Preserve the block on template migration.
        - `label` string, required — Label of the block.
        - `read_only` boolean — Whether the agent has read-only access to the block.
        - `description` string, nullable — Description of the block.
        - `metadata` object, nullable — Metadata of the block.
        - `hidden` boolean, nullable — If set to True, the block will be hidden.
      - `tools` string[], nullable — The tools used by the agent.
      - `tool_ids` string[], nullable — The ids of the tools used by the agent.
      - `source_ids` string[], nullable — The ids of the sources used by the agent.
      - `block_ids` string[], nullable — The ids of the blocks used by the agent.
      - `tool_rules` union[], nullable — The tool rules governing the agent.
        - union
          - ChildToolRule — A ToolRule represents a tool that can be invoked by the agent.
            - `tool_name` string, required — The name of the tool. Must exist in the database for the user's organization.
            - `type` 'constrain_child_tools'
            - `prompt_template` string, nullable — Optional template string (ignored).
            - `children` string[], required — The children tools that can be invoked.
            - `child_arg_nodes` ToolCallNode[], nullable — Optional list of typed child argument overrides. Each node must reference a child in 'children'.
              - …
          - InitToolRule — Represents the initial tool rule configuration.
            - `tool_name` string, required — The name of the tool. Must exist in the database for the user's organization.
            - `type` 'run_first'
            - `prompt_template` string, nullable — Optional template string (ignored). Rendering uses fast built-in formatting for performance.
            - `args` object, nullable — 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.
          - TerminalToolRule — Represents a terminal tool rule configuration where if this tool gets called, it must end the agent loop.
            - `tool_name` string, required — The name of the tool. Must exist in the database for the user's organization.
            - `type` 'exit_loop'
            - `prompt_template` string, nullable — Optional template string (ignored).
          - ConditionalToolRule — A ToolRule that conditionally maps to different child tools based on the output.
            - `tool_name` string, required — The name of the tool. Must exist in the database for the user's organization.
            - `type` 'conditional'
            - `prompt_template` string, nullable — Optional template string (ignored).
            - `default_child` string, nullable — The default child tool to be called. If None, any tool can be called.
            - `child_output_mapping` object, required — The output case to check for mapping
            - `require_output_mapping` boolean — Whether to throw an error when output doesn't match any case
          - ContinueToolRule — Represents a tool rule configuration where if this tool gets called, it must continue the agent loop.
            - `tool_name` string, required — The name of the tool. Must exist in the database for the user's organization.
            - `type` 'continue_loop'
            - `prompt_template` string, nullable — Optional template string (ignored).
          - RequiredBeforeExitToolRule — Represents a tool rule configuration where this tool must be called before the agent loop can exit.
            - `tool_name` string, required — The name of the tool. Must exist in the database for the user's organization.
            - `type` 'required_before_exit'
            - `prompt_template` string, nullable — Optional template string (ignored).
          - MaxCountPerStepToolRule — Represents a tool rule configuration which constrains the total number of times this tool can be invoked in a single step.
            - `tool_name` string, required — The name of the tool. Must exist in the database for the user's organization.
            - `type` 'max_count_per_step'
            - `prompt_template` string, nullable — Optional template string (ignored).
            - `max_count_limit` integer, required — The max limit for the total number of times this tool can be invoked in a single step.
          - ParentToolRule — A ToolRule that only allows a child tool to be called if the parent has been called.
            - `tool_name` string, required — The name of the tool. Must exist in the database for the user's organization.
            - `type` 'parent_last_tool'
            - `prompt_template` string, nullable — Optional template string (ignored).
            - `children` string[], required — The children tools that can be invoked.
          - RequiresApprovalToolRule — Represents a tool rule configuration which requires approval before the tool can be invoked.
            - `tool_name` string, required — The name of the tool. Must exist in the database for the user's organization.
            - `type` 'requires_approval'
            - `prompt_template` string, nullable — Optional template string (ignored). Rendering uses fast built-in formatting for performance.
      - `tags` string[], nullable — The tags associated with the agent.
      - `system` string, nullable — The system prompt used by the agent.
      - `agent_type` 'memgpt_agent' | 'memgpt_v2_agent' | 'letta_v1_agent' | 'react_agent' | 'workflow_agent' | 'split_thread_agent' | 'sleeptime_agent' | 'voice_convo_agent' | 'voice_sleeptime_agent' — Enum to represent the type of agent.
      - `llm_config` LLMConfig — Configuration for Language Model (LLM) connection and generation parameters.
        - `model` string, required — LLM model name.
        - `model_endpoint_type` 'openai' | 'anthropic' | 'google_ai' | 'google_vertex' | 'azure' | 'groq' | 'ollama' | 'webui' | 'webui-legacy' | 'lmstudio' | 'lmstudio-legacy' | 'lmstudio-chatcompletions' | 'llamacpp' | 'koboldcpp' | 'vllm' | 'hugging-face' | 'mistral' | 'together' | 'bedrock' | 'deepseek' | 'xai', required — The endpoint type for the model.
        - `model_endpoint` string, nullable — The endpoint for the model.
        - `provider_name` string, nullable — The provider name for the model.
        - `provider_category` 'base' | 'byok'
        - `model_wrapper` string, nullable — The wrapper for the model.
        - `context_window` integer, required — The context window size for the model.
        - `put_inner_thoughts_in_kwargs` boolean, nullable — 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.
        - `handle` string, nullable — The handle for this config, in the format provider/model-name.
        - `temperature` number — The temperature to use when generating text with the model. A higher temperature will result in more random text.
        - `max_tokens` integer, nullable — The maximum number of tokens to generate. If not set, the model will use its default value.
        - `enable_reasoner` boolean — Whether or not the model should use extended thinking if it is a 'reasoning' style model
        - `reasoning_effort` 'minimal' | 'low' | 'medium' | 'high', nullable — The reasoning effort to use when generating text reasoning models
        - `max_reasoning_tokens` integer — 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.
        - `frequency_penalty` number, nullable — 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` 'gguf' | 'mlx', nullable — The framework compatibility type for the model.
        - `verbosity` 'low' | 'medium' | 'high', nullable — Soft control for how verbose model output should be, used for GPT-5 models.
        - `tier` string, nullable — The cost tier for the model (cloud only).
      - `embedding_config` EmbeddingConfig — Configuration for embedding model connection and processing parameters.
        - `embedding_endpoint_type` 'openai' | 'anthropic' | 'bedrock' | 'google_ai' | 'google_vertex' | 'azure' | 'groq' | 'ollama' | 'webui' | 'webui-legacy' | 'lmstudio' | 'lmstudio-legacy' | 'llamacpp' | 'koboldcpp' | 'vllm' | 'hugging-face' | 'mistral' | 'together' | 'pinecone', required — The endpoint type for the model.
        - `embedding_endpoint` string, nullable — The endpoint for the model (`None` if local).
        - `embedding_model` string, required — The model for the embedding.
        - `embedding_dim` integer, required — The dimension of the embedding.
        - `embedding_chunk_size` integer, nullable — The chunk size of the embedding.
        - `handle` string, nullable — The handle for this config, in the format provider/model-name.
        - `batch_size` integer — The maximum batch size for processing embeddings.
        - `azure_endpoint` string, nullable — The Azure endpoint for the model.
        - `azure_version` string, nullable — The Azure version for the model.
        - `azure_deployment` string, nullable — The Azure deployment for the model.
      - `initial_message_sequence` MessageCreate[], nullable — The initial set of messages to put in the agent's in-context memory.
        - `type` 'message', nullable — The message type to be created.
        - `role` 'user' | 'system' | 'assistant', required — The role of the participant.
        - `content` union, required — The content of the message.
          - LettaMessageContentUnion[]
            - union
              - …
          - string
        - `name` string, nullable — The name of the participant.
        - `otid` string, nullable — The offline threading id associated with this message
        - `sender_id` string, nullable — The id of the sender of the message, can be an identity id or agent id
        - `batch_item_id` string, nullable — The id of the LLMBatchItem that this message is associated with
        - `group_id` string, nullable — The multi-agent group that the message was sent in
      - `include_base_tools` boolean — If true, attaches the Letta core tools (e.g. core_memory related functions).
      - `include_multi_agent_tools` boolean — If true, attaches the Letta multi-agent tools (e.g. sending a message to another agent).
      - `include_base_tool_rules` boolean, nullable — If true, attaches the Letta base tool rules (e.g. deny all tools not explicitly allowed).
      - `include_default_source` boolean — If true, automatically creates and attaches a default data source for this agent.
      - `description` string, nullable — The description of the agent.
      - `metadata` object, nullable — The metadata of the agent.
      - `model` string, nullable — The LLM configuration handle used by the agent, specified in the format provider/model-name, as an alternative to specifying llm_config.
      - `embedding` string, nullable — The embedding configuration handle used by the agent, specified in the format provider/model-name.
      - `context_window_limit` integer, nullable — The context window limit used by the agent.
      - `embedding_chunk_size` integer, nullable — The embedding chunk size used by the agent.
      - `max_tokens` integer, nullable — The maximum number of tokens to generate, including reasoning step. If not set, the model will use its default value.
      - `max_reasoning_tokens` integer, nullable — The maximum number of tokens to generate for reasoning step. If not set, the model will use its default value.
      - `enable_reasoner` boolean, nullable — Whether to enable internal extended thinking step for a reasoner model.
      - `reasoning` boolean, nullable — Whether to enable reasoning for this agent.
      - `from_template` string, nullable — Deprecated: please use the 'create agents from a template' endpoint instead.
      - `template` boolean — Deprecated: No longer used
      - `project` string, nullable — Deprecated: Project should now be passed via the X-Project header instead of in the request body. If using the sdk, this can be done via the new x_project field below.
      - `tool_exec_environment_variables` object, nullable — Deprecated: use `secrets` field instead.
      - `secrets` object, nullable — The environment variables for tool execution specific to this agent.
      - `memory_variables` object, nullable — The variables that should be set for the agent.
      - `project_id` string, nullable — The id of the project the agent belongs to.
      - `template_id` string, nullable — The id of the template the agent belongs to.
      - `base_template_id` string, nullable — The base template id of the agent.
      - `identity_ids` string[], nullable — The ids of the identities associated with this agent.
      - `message_buffer_autoclear` boolean — 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.
      - `enable_sleeptime` boolean, nullable — If set to True, memory management will move to a background agent thread.
      - `response_format` union — The response format for the agent.
        - TextResponseFormat — Response format for plain text responses.
          - `type` 'text' — The type of the response format.
        - JsonSchemaResponseFormat — Response format for JSON schema-based responses.
          - `type` 'json_schema' — The type of the response format.
          - `json_schema` object, required — The JSON schema of the response.
        - JsonObjectResponseFormat — Response format for JSON object responses.
          - `type` 'json_object' — The type of the response format.
      - `timezone` string, nullable — The timezone of the agent (IANA format).
      - `max_files_open` integer, nullable — 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` integer, nullable — 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` boolean, nullable — If set to True, the agent will be hidden.
      - `id` string, required — Human-readable identifier for this agent in the file
      - `in_context_message_ids` string[] — List of message IDs that are currently in the agent's context
      - `messages` LettaSchemasAgentFileMessageSchema[] — List of messages in the agent's conversation history
        - `type` 'message', nullable — The message type to be created.
        - `role` 'assistant' | 'user' | 'tool' | 'function' | 'system' | 'approval', required
        - `content` union, required — The content of the message.
          - LettaMessageContentUnion[]
            - union
              - …
          - string
        - `name` string, nullable — The name of the participant.
        - `otid` string, nullable — The offline threading id associated with this message
        - `sender_id` string, nullable — The id of the sender of the message, can be an identity id or agent id
        - `batch_item_id` string, nullable — The id of the LLMBatchItem that this message is associated with
        - `group_id` string, nullable — The multi-agent group that the message was sent in
        - `id` string, required — Human-readable identifier for this message in the file
        - `model` string, nullable — The model used to make the function call
        - `agent_id` string, nullable — The unique identifier of the agent
        - `tool_calls` ChatCompletionMessageFunctionToolCall[], nullable — The list of tool calls requested. Only applicable for role assistant.
          - `id` string, required
          - `function` Function, required
            - `arguments` string, required
            - `name` string, required
          - `type` 'function', required
        - `tool_call_id` string, nullable — The ID of the tool call. Only applicable for role tool.
        - `tool_returns` ToolReturnInput[], nullable — Tool execution return information for prior tool calls
          - `tool_call_id` unknown
          - `status` 'success' | 'error', required — The status of the tool call
          - `stdout` string[], nullable — Captured stdout (e.g. prints, logs) from the tool invocation
          - `stderr` string[], nullable — Captured stderr from the tool invocation
          - `func_response` string, nullable — The function response string
        - `created_at` string, date-time — The timestamp when the object was created.
        - `approve` boolean, nullable — Whether the tool has been approved
        - `approval_request_id` string, nullable — The message ID of the approval request
        - `denial_reason` string, nullable — An optional explanation for the provided approval status
      - `files_agents` FileAgentSchema[] — List of file-agent relationships for this agent
        - `agent_id` string, required — Unique identifier of the agent.
        - `file_id` string, required — Unique identifier of the file.
        - `source_id` string, required — Unique identifier of the source.
        - `file_name` string, required — Name of the file.
        - `is_open` boolean — True if the agent currently has the file open.
        - `visible_content` string, nullable — Portion of the file the agent is focused on (may be large).
        - `last_accessed_at` string, date-time, nullable — UTC timestamp of the agent's most recent access to this file.
        - `start_line` integer, nullable — Starting line number (1-indexed) when file was opened with line range.
        - `end_line` integer, nullable — Ending line number (exclusive) when file was opened with line range.
        - `id` string, required — Human-readable identifier for this file-agent relationship in the file
      - `group_ids` string[] — List of groups that the agent manages
    - `groups` GroupSchema[], required — List of groups in this agent file
      - `agent_ids` string[], required
      - `description` string, required
      - `manager_config` union
        - RoundRobinManager
          - `manager_type` 'round_robin'
          - `max_turns` integer, nullable
        - SupervisorManager
          - `manager_type` 'supervisor'
          - `manager_agent_id` string, required
        - DynamicManager
          - `manager_type` 'dynamic'
          - `manager_agent_id` string, required
          - `termination_token` string, nullable
          - `max_turns` integer, nullable
        - SleeptimeManager
          - `manager_type` 'sleeptime'
          - `manager_agent_id` string, required
          - `sleeptime_agent_frequency` integer, nullable
        - VoiceSleeptimeManager
          - `manager_type` 'voice_sleeptime'
          - `manager_agent_id` string, required
          - `max_message_buffer_length` integer, nullable — 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` integer, nullable — 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.
      - `project_id` string, nullable — The associated project id.
      - `shared_block_ids` string[]
      - `hidden` boolean, nullable — If set to True, the group will be hidden.
      - `id` string, required — Human-readable identifier for this group in the file
    - `blocks` BlockSchema[], required — List of memory blocks in this agent file
      - `value` string, required — Value of the block.
      - `limit` integer — Character limit of the block.
      - `project_id` string, nullable — The associated project id.
      - `name` string, nullable — The id of the template.
      - `is_template` boolean
      - `base_template_id` string, nullable — The base template id of the block.
      - `deployment_id` string, nullable — The id of the deployment.
      - `entity_id` string, nullable — The id of the entity within the template.
      - `preserve_on_migration` boolean, nullable — Preserve the block on template migration.
      - `label` string, required — Label of the block.
      - `read_only` boolean — Whether the agent has read-only access to the block.
      - `description` string, nullable — Description of the block.
      - `metadata` object, nullable — Metadata of the block.
      - `hidden` boolean, nullable — If set to True, the block will be hidden.
      - `id` string, required — Human-readable identifier for this block in the file
    - `files` FileSchema[], required — List of files in this agent file
      - `source_id` string, required — The unique identifier of the source associated with the document.
      - `file_name` string, nullable — The name of the file.
      - `original_file_name` string, nullable — The original name of the file as uploaded.
      - `file_path` string, nullable — The path to the file.
      - `file_type` string, nullable — The type of the file (MIME type).
      - `file_size` integer, nullable — The size of the file in bytes.
      - `file_creation_date` string, nullable — The creation date of the file.
      - `file_last_modified_date` string, nullable — The last modified date of the file.
      - `processing_status` 'pending' | 'parsing' | 'embedding' | 'completed' | 'error'
      - `error_message` string, nullable — Optional error message if the file failed processing.
      - `total_chunks` integer, nullable — Total number of chunks for the file.
      - `chunks_embedded` integer, nullable — Number of chunks that have been embedded.
      - `content` string, nullable — Optional full-text content of the file; only populated on demand due to its size.
      - `id` string, required — Human-readable identifier for this file in the file
    - `sources` SourceSchema[], required — List of sources in this agent file
      - `name` string, required — The name of the source.
      - `description` string, nullable — The description of the source.
      - `instructions` string, nullable — Instructions for how to use the source.
      - `metadata` object, nullable — Metadata associated with the source.
      - `embedding` string, nullable — The handle for the embedding config used by the source.
      - `embedding_chunk_size` integer, nullable — The chunk size of the embedding.
      - `embedding_config` EmbeddingConfig — Configuration for embedding model connection and processing parameters.
        - `embedding_endpoint_type` 'openai' | 'anthropic' | 'bedrock' | 'google_ai' | 'google_vertex' | 'azure' | 'groq' | 'ollama' | 'webui' | 'webui-legacy' | 'lmstudio' | 'lmstudio-legacy' | 'llamacpp' | 'koboldcpp' | 'vllm' | 'hugging-face' | 'mistral' | 'together' | 'pinecone', required — The endpoint type for the model.
        - `embedding_endpoint` string, nullable — The endpoint for the model (`None` if local).
        - `embedding_model` string, required — The model for the embedding.
        - `embedding_dim` integer, required — The dimension of the embedding.
        - `embedding_chunk_size` integer, nullable — The chunk size of the embedding.
        - `handle` string, nullable — The handle for this config, in the format provider/model-name.
        - `batch_size` integer — The maximum batch size for processing embeddings.
        - `azure_endpoint` string, nullable — The Azure endpoint for the model.
        - `azure_version` string, nullable — The Azure version for the model.
        - `azure_deployment` string, nullable — The Azure deployment for the model.
      - `id` string, required — Human-readable identifier for this source in the file
    - `tools` LettaSchemasAgentFileToolSchema[], required — List of tools in this agent file
      - `id` string, required — Human-readable identifier for this tool in the file
      - `tool_type` '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'
      - `description` string, nullable — The description of the tool.
      - `source_type` string, nullable — The type of the source code.
      - `name` string, nullable — The name of the function.
      - `tags` string[] — Metadata tags.
      - `source_code` string, nullable — The source code of the function.
      - `json_schema` object, nullable — The JSON schema of the function.
      - `args_json_schema` object, nullable — The args JSON schema of the function.
      - `return_char_limit` integer — The maximum number of characters in the response.
      - `pip_requirements` PipRequirement[], nullable — Optional list of pip packages required by this tool.
        - `name` string, required — Name of the pip package.
        - `version` string, nullable — Optional version of the package, following semantic versioning.
      - `npm_requirements` NpmRequirement[], nullable — Optional list of npm packages required by this tool.
        - `name` string, required — Name of the npm package.
        - `version` string, nullable — Optional version of the package, following semantic versioning.
      - `default_requires_approval` boolean, nullable — Default value for whether or not executing this tool requires approval.
      - `created_by_id` string, nullable — The id of the user that made this Tool.
      - `last_updated_by_id` string, nullable — The id of the user that made this Tool.
      - `metadata_` object, nullable — A dictionary of additional metadata for the tool.
    - `mcp_servers` MCPServerSchema[], required — List of MCP servers in this agent file
      - `id` string, required — Human-readable MCP server ID
      - `server_type` string, required
      - `server_name` string, required
      - `server_url` string, nullable
      - `stdio_config` object, nullable
      - `metadata_` object, nullable
    - `metadata` object — Metadata for this agent file, including revision_id and other export information.
    - `created_at` string, date-time, nullable — The timestamp when the object was created.
  - `legacy_spec` LettaSerializeSchemasPydanticAgentSchemaAgentSchema
    - `agent_type` string, required
    - `core_memory` CoreMemoryBlockSchema[], required
      - `created_at` string, required
      - `description` string, nullable, required
      - `is_template` boolean, required
      - `label` string, required
      - `limit` integer, required
      - `metadata_` object, nullable
      - `template_name` string, nullable, required
      - `updated_at` string, required
      - `value` string, required
    - `created_at` string, required
    - `description` string, nullable, required
    - `embedding_config` EmbeddingConfig, required — Configuration for embedding model connection and processing parameters.
      - `embedding_endpoint_type` 'openai' | 'anthropic' | 'bedrock' | 'google_ai' | 'google_vertex' | 'azure' | 'groq' | 'ollama' | 'webui' | 'webui-legacy' | 'lmstudio' | 'lmstudio-legacy' | 'llamacpp' | 'koboldcpp' | 'vllm' | 'hugging-face' | 'mistral' | 'together' | 'pinecone', required — The endpoint type for the model.
      - `embedding_endpoint` string, nullable — The endpoint for the model (`None` if local).
      - `embedding_model` string, required — The model for the embedding.
      - `embedding_dim` integer, required — The dimension of the embedding.
      - `embedding_chunk_size` integer, nullable — The chunk size of the embedding.
      - `handle` string, nullable — The handle for this config, in the format provider/model-name.
      - `batch_size` integer — The maximum batch size for processing embeddings.
      - `azure_endpoint` string, nullable — The Azure endpoint for the model.
      - `azure_version` string, nullable — The Azure version for the model.
      - `azure_deployment` string, nullable — The Azure deployment for the model.
    - `llm_config` LLMConfig, required — Configuration for Language Model (LLM) connection and generation parameters.
      - `model` string, required — LLM model name.
      - `model_endpoint_type` 'openai' | 'anthropic' | 'google_ai' | 'google_vertex' | 'azure' | 'groq' | 'ollama' | 'webui' | 'webui-legacy' | 'lmstudio' | 'lmstudio-legacy' | 'lmstudio-chatcompletions' | 'llamacpp' | 'koboldcpp' | 'vllm' | 'hugging-face' | 'mistral' | 'together' | 'bedrock' | 'deepseek' | 'xai', required — The endpoint type for the model.
      - `model_endpoint` string, nullable — The endpoint for the model.
      - `provider_name` string, nullable — The provider name for the model.
      - `provider_category` 'base' | 'byok'
      - `model_wrapper` string, nullable — The wrapper for the model.
      - `context_window` integer, required — The context window size for the model.
      - `put_inner_thoughts_in_kwargs` boolean, nullable — 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.
      - `handle` string, nullable — The handle for this config, in the format provider/model-name.
      - `temperature` number — The temperature to use when generating text with the model. A higher temperature will result in more random text.
      - `max_tokens` integer, nullable — The maximum number of tokens to generate. If not set, the model will use its default value.
      - `enable_reasoner` boolean — Whether or not the model should use extended thinking if it is a 'reasoning' style model
      - `reasoning_effort` 'minimal' | 'low' | 'medium' | 'high', nullable — The reasoning effort to use when generating text reasoning models
      - `max_reasoning_tokens` integer — 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.
      - `frequency_penalty` number, nullable — 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` 'gguf' | 'mlx', nullable — The framework compatibility type for the model.
      - `verbosity` 'low' | 'medium' | 'high', nullable — Soft control for how verbose model output should be, used for GPT-5 models.
      - `tier` string, nullable — The cost tier for the model (cloud only).
    - `message_buffer_autoclear` boolean, required
    - `in_context_message_indices` integer[], required
    - `messages` LettaSerializeSchemasPydanticAgentSchemaMessageSchema[], required
      - `created_at` string, required
      - `group_id` string, nullable, required
      - `model` string, nullable, required
      - `name` string, nullable, required
      - `role` string, required
      - `content` LettaMessageContentUnion[], required
        - union
          - TextContent
            - `type` 'text' — The type of the message.
            - `text` string, required — The text content of the message.
            - `signature` string, nullable — Stores a unique identifier for any reasoning associated with this text content.
          - ImageContent
            - `type` 'image' — The type of the message.
            - `source` union, required — The source of the image.
              - …
          - ToolCallContent
            - `type` 'tool_call' — Indicates this content represents a tool call event.
            - `id` string, required — A unique identifier for this specific tool call instance.
            - `name` string, required — The name of the tool being called.
            - `input` object, required — The parameters being passed to the tool, structured as a dictionary of parameter names to values.
            - `signature` string, nullable — Stores a unique identifier for any reasoning associated with this tool call.
          - ToolReturnContent
            - `type` 'tool_return' — Indicates this content represents a tool return event.
            - `tool_call_id` string, required — References the ID of the ToolCallContent that initiated this tool call.
            - `content` string, required — The content returned by the tool execution.
            - `is_error` boolean, required — Indicates whether the tool execution resulted in an error.
          - ReasoningContent — Sent via the Anthropic Messages API
            - `type` 'reasoning' — Indicates this is a reasoning/intermediate step.
            - `is_native` boolean, required — Whether the reasoning content was generated by a reasoner model that processed this step.
            - `reasoning` string, required — The intermediate reasoning or thought process content.
            - `signature` string, nullable — A unique identifier for this reasoning step.
          - RedactedReasoningContent — Sent via the Anthropic Messages API
            - `type` 'redacted_reasoning' — Indicates this is a redacted thinking step.
            - `data` string, required — The redacted or filtered intermediate reasoning content.
          - OmittedReasoningContent — A placeholder for reasoning content we know is present, but isn't returned by the provider (e.g. OpenAI GPT-5 on ChatCompletions)
            - `type` 'omitted_reasoning' — Indicates this is an omitted reasoning step.
            - `signature` string, nullable — A unique identifier for this reasoning step.
      - `tool_call_id` string, nullable, required
      - `tool_calls` unknown[], required
        - unknown
      - `tool_returns` unknown[], required
        - unknown
      - `updated_at` string, required
    - `metadata_` object, nullable
    - `multi_agent_group` unknown, required
    - `name` string, required
    - `system` string, required
    - `tags` TagSchema[], required
      - `tag` string, required
    - `tool_exec_environment_variables` ToolEnvVarSchema[], required
      - `created_at` string, required
      - `description` string, nullable, required
      - `key` string, required
      - `updated_at` string, required
      - `value` string, required
    - `tool_rules` union[], required
      - union
        - BaseToolRuleSchema
          - `tool_name` string, required
          - `type` string, required
        - ChildToolRuleSchema
          - `tool_name` string, required
          - `type` string, required
          - `children` string[], required
        - MaxCountPerStepToolRuleSchema
          - `tool_name` string, required
          - `type` string, required
          - `max_count_limit` integer, required
        - ConditionalToolRuleSchema
          - `tool_name` string, required
          - `type` string, required
          - `default_child` string, nullable, required
          - `child_output_mapping` object, required
          - `require_output_mapping` boolean, required
    - `tools` LettaSerializeSchemasPydanticAgentSchemaToolSchema[], required
      - `args_json_schema` unknown, required
      - `created_at` string, required
      - `description` string, required
      - `json_schema` ToolJSONSchema, required
        - `name` string, required
        - `description` string, required
        - `parameters` ParametersSchema, required
          - `type` string, nullable
          - `properties` object, required
          - `required` string[]
        - `type` string, nullable
        - `required` string[], nullable
      - `name` string, required
      - `return_char_limit` integer, required
      - `source_code` string, nullable, required
      - `source_type` string, required
      - `tags` string[], required
      - `tool_type` string, required
      - `updated_at` string, required
      - `metadata_` object, nullable
    - `updated_at` string, required
    - `version` string, required

## Response `200`

Successful Response

- string

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/yu-code666/apis/letta-api.md) · [All operations](https://skmtc.net/yu-code666/apis/letta-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/yu-code666/letta-api/versions/6cec99480c13/schema)
