Letta Archives API

Manage archival memory archives and passages (RAG-style long-term store).

Documentation

Specifications

Schemas & Data

📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/letta/refs/heads/main/json-schema/letta-agent-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/letta/refs/heads/main/json-schema/letta-block-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/letta/refs/heads/main/json-schema/letta-tool-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/letta/refs/heads/main/json-schema/letta-source-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/letta/refs/heads/main/json-schema/letta-run-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/letta/refs/heads/main/json-schema/letta-group-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/letta/refs/heads/main/json-schema/letta-identity-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/letta/refs/heads/main/json-schema/letta-message-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/letta/refs/heads/main/json-schema/letta-passage-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/letta/refs/heads/main/json-schema/letta-archive-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/letta/refs/heads/main/json-schema/letta-job-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/letta/refs/heads/main/json-schema/letta-llm-config-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/letta/refs/heads/main/json-schema/letta-embedding-config-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/letta/refs/heads/main/json-schema/letta-provider-schema.json

Other Resources

OpenAPI Specification

letta-archives-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Letta Admin Archives 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: Archives
  description: Manage archival memory archives and passages (RAG-style long-term store).
paths:
  /v1/archives/:
    post:
      tags:
      - Archives
      summary: Create Archive
      description: Create a new archive.
      operationId: create_archive
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ArchiveCreateRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Archive'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    get:
      tags:
      - Archives
      summary: List Archives
      description: Get a list of all archives for the current organization with optional filters and pagination.
      operationId: list_archives
      parameters:
      - name: before
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          description: Archive ID cursor for pagination. Returns archives that come before this archive ID in the specified sort order
          title: Before
        description: Archive ID cursor for pagination. Returns archives that come before this archive ID in the specified sort order
      - name: after
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          description: Archive ID cursor for pagination. Returns archives that come after this archive ID in the specified sort order
          title: After
        description: Archive ID cursor for pagination. Returns archives that come after this archive ID in the specified sort order
      - name: limit
        in: query
        required: false
        schema:
          anyOf:
          - type: integer
          - type: 'null'
          description: Maximum number of archives to return
          default: 50
          title: Limit
        description: Maximum number of archives to return
      - name: order
        in: query
        required: false
        schema:
          enum:
          - asc
          - desc
          type: string
          description: Sort order for archives by creation time. 'asc' for oldest first, 'desc' for newest first
          default: desc
          title: Order
        description: Sort order for archives by creation time. 'asc' for oldest first, 'desc' for newest first
      - name: order_by
        in: query
        required: false
        schema:
          const: created_at
          type: string
          description: Field to sort by
          default: created_at
          title: Order By
        description: Field to sort by
      - name: name
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          description: Filter by archive name (exact match)
          title: Name
        description: Filter by archive name (exact match)
      - name: agent_id
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          description: Only archives attached to this agent ID
          title: Agent Id
        description: Only archives attached to this agent ID
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Archive'
                title: Response List Archives
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /v1/archives/{archive_id}:
    get:
      tags:
      - Archives
      summary: Retrieve Archive
      description: Get a single archive by its ID.
      operationId: retrieve_archive
      parameters:
      - name: archive_id
        in: path
        required: true
        schema:
          type: string
          minLength: 44
          maxLength: 44
          pattern: ^archive-[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 archive in the format 'archive-<uuid4>'
          examples:
          - archive-123e4567-e89b-42d3-8456-426614174000
          title: Archive Id
        description: The ID of the archive in the format 'archive-<uuid4>'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Archive'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    patch:
      tags:
      - Archives
      summary: Modify Archive
      description: Update an existing archive's name and/or description.
      operationId: modify_archive
      parameters:
      - name: archive_id
        in: path
        required: true
        schema:
          type: string
          minLength: 44
          maxLength: 44
          pattern: ^archive-[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 archive in the format 'archive-<uuid4>'
          examples:
          - archive-123e4567-e89b-42d3-8456-426614174000
          title: Archive Id
        description: The ID of the archive in the format 'archive-<uuid4>'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ArchiveUpdateRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Archive'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    delete:
      tags:
      - Archives
      summary: Delete Archive
      description: Delete an archive by its ID.
      operationId: delete_archive
      parameters:
      - name: archive_id
        in: path
        required: true
        schema:
          type: string
          minLength: 44
          maxLength: 44
          pattern: ^archive-[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 archive in the format 'archive-<uuid4>'
          examples:
          - archive-123e4567-e89b-42d3-8456-426614174000
          title: Archive Id
        description: The ID of the archive in the format 'archive-<uuid4>'
      responses:
        '204':
          description: Successful Response
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /v1/archives/{archive_id}/agents:
    get:
      tags:
      - Archives
      summary: List Agents for Archive
      description: Get a list of agents that have access to an archive with pagination support.
      operationId: list_agents_for_archive
      parameters:
      - name: archive_id
        in: path
        required: true
        schema:
          type: string
          minLength: 44
          maxLength: 44
          pattern: ^archive-[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 archive in the format 'archive-<uuid4>'
          examples:
          - archive-123e4567-e89b-42d3-8456-426614174000
          title: Archive Id
        description: The ID of the archive in the format 'archive-<uuid4>'
      - name: before
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          description: Agent ID cursor for pagination. Returns agents that come before this agent ID in the specified sort order
          title: Before
        description: Agent ID cursor for pagination. Returns agents that come before this agent ID in the specified sort order
      - name: after
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          description: Agent ID cursor for pagination. Returns agents that come after this agent ID in the specified sort order
          title: After
        description: Agent ID cursor for pagination. Returns agents that come after this agent ID in the specified sort order
      - name: limit
        in: query
        required: false
        schema:
          anyOf:
          - type: integer
          - type: 'null'
          description: Maximum number of agents to return
          default: 50
          title: Limit
        description: Maximum number of agents to return
      - name: order
        in: query
        required: false
        schema:
          enum:
          - asc
          - desc
          type: string
          description: Sort order for agents by creation time. 'asc' for oldest first, 'desc' for newest first
          default: desc
          title: Order
        description: Sort order for agents by creation time. 'asc' for oldest first, 'desc' for newest first
      - name: include
        in: query
        required: false
        schema:
          type: array
          items:
            enum:
            - agent.blocks
            - agent.identities
            - agent.managed_group
            - agent.pending_approval
            - agent.secrets
            - agent.sources
            - agent.tags
            - agent.tools
            type: string
          description: Specify which relational fields to include in the response. No relationships are included by default.
          default: []
          title: Include
        description: Specify which relational fields to include in the response. No relationships are included by default.
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/AgentState'
                title: Response List Agents For Archive
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /v1/archives/{archive_id}/passages:
    post:
      tags:
      - Archives
      summary: Create Passage in Archive
      description: 'Create a new passage in an archive.


        This adds a passage to the archive and creates embeddings for vector storage.'
      operationId: create_passage_in_archive
      parameters:
      - name: archive_id
        in: path
        required: true
        schema:
          type: string
          minLength: 44
          maxLength: 44
          pattern: ^archive-[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 archive in the format 'archive-<uuid4>'
          examples:
          - archive-123e4567-e89b-42d3-8456-426614174000
          title: Archive Id
        description: The ID of the archive in the format 'archive-<uuid4>'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PassageCreateRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Passage'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /v1/archives/{archive_id}/passages/batch:
    post:
      tags:
      - Archives
      summary: Create Passages in Archive
      description: 'Create multiple passages in an archive.


        This adds passages to the archive and creates embeddings for vector storage.'
      operationId: create_passages_in_archive
      parameters:
      - name: archive_id
        in: path
        required: true
        schema:
          type: string
          minLength: 44
          maxLength: 44
          pattern: ^archive-[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 archive in the format 'archive-<uuid4>'
          examples:
          - archive-123e4567-e89b-42d3-8456-426614174000
          title: Archive Id
        description: The ID of the archive in the format 'archive-<uuid4>'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PassageBatchCreateRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Passage'
                title: Response Create Passages In Archive
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /v1/archives/{archive_id}/passages/{passage_id}:
    delete:
      tags:
      - Archives
      summary: Delete Passage from Archive
      description: 'Delete a passage from an archive.


        This permanently removes the passage from both the database and vector storage (if applicable).'
      operationId: delete_passage_from_archive
      parameters:
      - name: archive_id
        in: path
        required: true
        schema:
          type: string
          minLength: 44
          maxLength: 44
          pattern: ^archive-[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 archive in the format 'archive-<uuid4>'
          examples:
          - archive-123e4567-e89b-42d3-8456-426614174000
          title: Archive Id
        description: The ID of the archive in the format 'archive-<uuid4>'
      - name: passage_id
        in: path
        required: true
        schema:
          type: string
          minLength: 44
          maxLength: 44
          pattern: ^passage-[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 passage in the format 'passage-<uuid4>'
          examples:
          - passage-123e4567-e89b-42d3-8456-426614174000
          title: Passage Id
        description: The ID of the passage in the format 'passage-<uuid4>'
      responses:
        '204':
          description: Successful Response
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    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.
    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
    PassageBatchCreateRequest:
      properties:
        passages:
          items:
            $ref: '#/components/schemas/PassageCreateRequest'
          type: array
          title: Passages
          description: Passages to create in the archive
      type: object
      required:
      - passages
      title: PassageBatchCreateRequest
      description: Request model for creating multiple passages in an archive.
    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
    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.
    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
    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).
    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.
    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
    Passage:
      properties:
        created_by_id:
          anyOf:
          - type: string
          - type: 'null'
          title: Created By Id
          description: The id of the user that made this object.
        last_updated_by_id:
          anyOf:
          - type: string
          - type: 'null'
          title: Last Updated By Id
          description: The id of the user that made this object.
        created_at:
          anyOf:
          - type: string
            format: date-time
          - type: 'null'
          title: Created At
          description: The creation date of the passage.
        updated_at:
          anyOf:
          - type: string
            format: date-time
          - type: 'null'
          title: Updated At
          description: The timestamp when the object was last updated.
        is_deleted:
          type: boolean
          title: Is Deleted
          description: Whether this passage is deleted or not.
          default: false
        archive_id:
          anyOf:
          - type: string
          - type: 'null'
          title: Archive Id
          description: The unique identifier of the archive containing this passage.
        source_id:
          anyOf:
          - type: string
          - type: 'null'
          title: Source Id
          description: 'Deprecated: Use `folder_id` field instead. The data source of the passage.'
          deprecated: true
        file_id:
          anyOf:
          - type: string
          - type: 'null'
          title: File Id
          description: The unique identifier of the file associated with the passage.
        file_name:
          anyOf:
          - type: string
          - type: 'null'
          title: File Name
          description: The name of the file (only for source passages).
        metadata:
          anyOf:
          - additionalProperties: true
            type: object
          - type: 'null'
          title: Metadata
          description: The metadata of the passage.
          default: {}
        tags:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Tags
          description: Tags associated with this passage.
        id:
          type: string
          pattern: ^passage-[a-fA-F0-9]{8}
          title: Id
          description: The human-friendly ID of the Passage
          examples:
          - passage-123e4567-e89b-12d3-a456-426614174000
        text:
          type: string
          title: Text
          description: The text of the passage.
        embedding:
          anyOf:
          - items:
              type: number
            type: array
          - type: 'null'
          title: Embedding
          description: The embedding of the passage.
        embedding_config:
          anyOf:
          - $ref: '#/components/schemas/EmbeddingConfig'
          - type: 'null'
          description: The embedding configuration used by the passage.
      additionalProperties: false
      type: object
      required:
      - text
      - embedding
      - embedding_config
      title: Passage
      description: Representation of a passage, which is stored in archival memory.
    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
    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.
    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.
      additionalP

# --- truncated at 32 KB (118 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/letta/refs/heads/main/openapi/letta-archives-api-openapi.yml