Letta Steps API

Per-step traces of an agent run.

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-steps-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Letta Admin Steps 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: Steps
  description: Per-step traces of an agent run.
paths:
  /v1/steps/:
    get:
      tags:
      - Steps
      summary: List Steps
      description: List steps with optional pagination and date filters.
      operationId: list_steps
      parameters:
      - name: before
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          description: Return steps before this step ID
          title: Before
        description: Return steps before this step ID
      - name: after
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          description: Return steps after this step ID
          title: After
        description: Return steps after this step ID
      - name: limit
        in: query
        required: false
        schema:
          anyOf:
          - type: integer
          - type: 'null'
          description: Maximum number of steps to return
          default: 50
          title: Limit
        description: Maximum number of steps to return
      - name: order
        in: query
        required: false
        schema:
          enum:
          - asc
          - desc
          type: string
          description: Sort order for steps by creation time. 'asc' for oldest first, 'desc' for newest first
          default: desc
          title: Order
        description: Sort order for steps 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: start_date
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          description: Return steps after this ISO datetime (e.g. "2025-01-29T15:01:19-08:00")
          title: Start Date
        description: Return steps after this ISO datetime (e.g. "2025-01-29T15:01:19-08:00")
      - name: end_date
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          description: Return steps before this ISO datetime (e.g. "2025-01-29T15:01:19-08:00")
          title: End Date
        description: Return steps before this ISO datetime (e.g. "2025-01-29T15:01:19-08:00")
      - name: model
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          description: Filter by the name of the model used for the step
          title: Model
        description: Filter by the name of the model used for the step
      - name: agent_id
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          description: Filter by the ID of the agent that performed the step
          title: Agent Id
        description: Filter by the ID of the agent that performed the step
      - name: trace_ids
        in: query
        required: false
        schema:
          anyOf:
          - type: array
            items:
              type: string
          - type: 'null'
          description: Filter by trace ids returned by the server
          title: Trace Ids
        description: Filter by trace ids returned by the server
      - name: feedback
        in: query
        required: false
        schema:
          anyOf:
          - enum:
            - positive
            - negative
            type: string
          - type: 'null'
          description: Filter by feedback
          title: Feedback
        description: Filter by feedback
      - name: has_feedback
        in: query
        required: false
        schema:
          anyOf:
          - type: boolean
          - type: 'null'
          description: Filter by whether steps have feedback (true) or not (false)
          title: Has Feedback
        description: Filter by whether steps have feedback (true) or not (false)
      - name: tags
        in: query
        required: false
        schema:
          anyOf:
          - type: array
            items:
              type: string
          - type: 'null'
          description: Filter by tags
          title: Tags
        description: Filter by tags
      - name: project_id
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          description: Filter by the project ID that is associated with the step (cloud only).
          title: Project Id
        description: Filter by the project ID that is associated with the step (cloud only).
      - name: X-Project
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          description: Filter by project slug to associate with the group (cloud only).
          title: X-Project
        description: Filter by project slug to associate with the group (cloud only).
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Step'
                title: Response List Steps
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /v1/steps/{step_id}:
    get:
      tags:
      - Steps
      summary: Retrieve Step
      description: Get a step by ID.
      operationId: retrieve_step
      parameters:
      - name: step_id
        in: path
        required: true
        schema:
          type: string
          minLength: 41
          maxLength: 41
          pattern: ^step-[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 step in the format 'step-<uuid4>'
          examples:
          - step-123e4567-e89b-42d3-8456-426614174000
          title: Step Id
        description: The ID of the step in the format 'step-<uuid4>'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Step'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /v1/steps/{step_id}/metrics:
    get:
      tags:
      - Steps
      summary: Retrieve Metrics for Step
      description: Get step metrics by step ID.
      operationId: retrieve_metrics_for_step
      parameters:
      - name: step_id
        in: path
        required: true
        schema:
          type: string
          minLength: 41
          maxLength: 41
          pattern: ^step-[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 step in the format 'step-<uuid4>'
          examples:
          - step-123e4567-e89b-42d3-8456-426614174000
          title: Step Id
        description: The ID of the step in the format 'step-<uuid4>'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StepMetrics'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /v1/steps/{step_id}/trace:
    get:
      tags:
      - Steps
      summary: Retrieve Trace for Step
      operationId: retrieve_trace_for_step
      parameters:
      - name: step_id
        in: path
        required: true
        schema:
          type: string
          minLength: 41
          maxLength: 41
          pattern: ^step-[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 step in the format 'step-<uuid4>'
          examples:
          - step-123e4567-e89b-42d3-8456-426614174000
          title: Step Id
        description: The ID of the step in the format 'step-<uuid4>'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                anyOf:
                - $ref: '#/components/schemas/ProviderTrace'
                - type: 'null'
                title: Response Retrieve Trace For Step
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /v1/steps/{step_id}/feedback:
    patch:
      tags:
      - Steps
      summary: Modify Feedback for Step
      description: Modify feedback for a given step.
      operationId: modify_feedback_for_step
      parameters:
      - name: step_id
        in: path
        required: true
        schema:
          type: string
          minLength: 41
          maxLength: 41
          pattern: ^step-[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 step in the format 'step-<uuid4>'
          examples:
          - step-123e4567-e89b-42d3-8456-426614174000
          title: Step Id
        description: The ID of the step in the format 'step-<uuid4>'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ModifyFeedbackRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Step'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /v1/steps/{step_id}/messages:
    get:
      tags:
      - Steps
      summary: List Messages for Step
      description: List messages for a given step.
      operationId: list_messages_for_step
      parameters:
      - name: step_id
        in: path
        required: true
        schema:
          type: string
          minLength: 41
          maxLength: 41
          pattern: ^step-[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 step in the format 'step-<uuid4>'
          examples:
          - step-123e4567-e89b-42d3-8456-426614174000
          title: Step Id
        description: The ID of the step in the format 'step-<uuid4>'
      - name: before
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          description: Message ID cursor for pagination. Returns messages that come before this message ID in the specified sort order
          title: Before
        description: Message ID cursor for pagination. Returns messages that come before this message ID in the specified sort order
      - name: after
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          description: Message ID cursor for pagination. Returns messages that come after this message ID in the specified sort order
          title: After
        description: Message ID cursor for pagination. Returns messages that come after this message ID in the specified sort order
      - name: limit
        in: query
        required: false
        schema:
          anyOf:
          - type: integer
          - type: 'null'
          description: Maximum number of messages to return
          default: 100
          title: Limit
        description: Maximum number of messages to return
      - name: order
        in: query
        required: false
        schema:
          enum:
          - asc
          - desc
          type: string
          description: Sort order for messages by creation time. 'asc' for oldest first, 'desc' for newest first
          default: asc
          title: Order
        description: Sort order for messages by creation time. 'asc' for oldest first, 'desc' for newest first
      - name: order_by
        in: query
        required: false
        schema:
          const: created_at
          type: string
          description: Sort by field
          default: created_at
          title: Order By
        description: Sort by field
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  oneOf:
                  - $ref: '#/components/schemas/SystemMessage'
                  - $ref: '#/components/schemas/UserMessage'
                  - $ref: '#/components/schemas/ReasoningMessage'
                  - $ref: '#/components/schemas/HiddenReasoningMessage'
                  - $ref: '#/components/schemas/ToolCallMessage'
                  - $ref: '#/components/schemas/ToolReturnMessage'
                  - $ref: '#/components/schemas/AssistantMessage'
                  - $ref: '#/components/schemas/ApprovalRequestMessage'
                  - $ref: '#/components/schemas/ApprovalResponseMessage'
                  - $ref: '#/components/schemas/SummaryMessage'
                  - $ref: '#/components/schemas/EventMessage'
                  discriminator:
                    propertyName: message_type
                    mapping:
                      system_message: '#/components/schemas/SystemMessage'
                      user_message: '#/components/schemas/UserMessage'
                      reasoning_message: '#/components/schemas/ReasoningMessage'
                      hidden_reasoning_message: '#/components/schemas/HiddenReasoningMessage'
                      tool_call_message: '#/components/schemas/ToolCallMessage'
                      tool_return_message: '#/components/schemas/ToolReturnMessage'
                      assistant_message: '#/components/schemas/AssistantMessage'
                      approval_request_message: '#/components/schemas/ApprovalRequestMessage'
                      approval_response_message: '#/components/schemas/ApprovalResponseMessage'
                      summary_message: '#/components/schemas/SummaryMessage'
                      event_message: '#/components/schemas/EventMessage'
                title: Response List Messages For Step
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    ApprovalReturn:
      properties:
        type:
          type: string
          const: approval
          title: Type
          description: The message type to be created.
          default: approval
        tool_call_id:
          type: string
          title: Tool Call Id
          description: The ID of the tool call that corresponds to this approval
        approve:
          type: boolean
          title: Approve
          description: Whether the tool has been approved
        reason:
          anyOf:
          - type: string
          - type: 'null'
          title: Reason
          description: An optional explanation for the provided approval status
      type: object
      required:
      - tool_call_id
      - approve
      title: ApprovalReturn
    SystemMessage:
      properties:
        id:
          type: string
          title: Id
        date:
          type: string
          format: date-time
          title: Date
        name:
          anyOf:
          - type: string
          - type: 'null'
          title: Name
        message_type:
          type: string
          const: system_message
          title: Message Type
          description: The type of the message.
          default: system_message
        otid:
          anyOf:
          - type: string
          - type: 'null'
          title: Otid
          description: The offline threading id (OTID). Set by the client to deduplicate requests. Used for idempotency in background streaming mode — each message in a request must have a unique OTID. Retries of the same request should reuse the same OTIDs.
        sender_id:
          anyOf:
          - type: string
          - type: 'null'
          title: Sender Id
        step_id:
          anyOf:
          - type: string
          - type: 'null'
          title: Step Id
        is_err:
          anyOf:
          - type: boolean
          - type: 'null'
          title: Is Err
        seq_id:
          anyOf:
          - type: integer
          - type: 'null'
          title: Seq Id
        run_id:
          anyOf:
          - type: string
          - type: 'null'
          title: Run Id
        content:
          type: string
          title: Content
          description: The message content sent by the system
      type: object
      required:
      - id
      - date
      - content
      title: SystemMessage
      description: "A message generated by the system. Never streamed back on a response, only used for cursor pagination.\n\nArgs:\n    id (str): The ID of the message\n    date (datetime): The date the message was created in ISO format\n    name (Optional[str]): The name of the sender of the message\n    content (str): The message content sent by the system"
    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
    CompactionStats:
      properties:
        trigger:
          type: string
          title: Trigger
          description: What triggered the compaction (e.g., 'context_window_exceeded', 'post_step_context_check')
        context_tokens_before:
          anyOf:
          - type: integer
          - type: 'null'
          title: Context Tokens Before
          description: Token count before compaction (from LLM usage stats, includes full context sent to LLM)
        context_tokens_after:
          anyOf:
          - type: integer
          - type: 'null'
          title: Context Tokens After
          description: Token count after compaction (message tokens only, does not include tool definitions)
        context_window:
          type: integer
          title: Context Window
          description: The model's context window size
        messages_count_before:
          type: integer
          title: Messages Count Before
          description: Number of messages before compaction
        messages_count_after:
          type: integer
          title: Messages Count After
          description: Number of messages after compaction
      type: object
      required:
      - trigger
      - context_window
      - messages_count_before
      - messages_count_after
      title: CompactionStats
      description: Statistics about a memory compaction operation.
    BillingContext:
      properties:
        plan_type:
          anyOf:
          - type: string
          - type: 'null'
          title: Plan Type
          description: Subscription tier
        cost_source:
          anyOf:
          - type: string
          - type: 'null'
          title: Cost Source
          description: 'Cost source: ''quota'' or ''credits'''
        customer_id:
          anyOf:
          - type: string
          - type: 'null'
          title: Customer Id
          description: Customer ID for billing records
      type: object
      title: BillingContext
      description: Billing context for LLM request cost tracking.
    EventMessage:
      properties:
        id:
          type: string
          title: Id
        date:
          type: string
          format: date-time
          title: Date
        name:
          anyOf:
          - type: string
          - type: 'null'
          title: Name
        message_type:
          type: string
          const: event_message
          title: Message Type
          default: event_message
        otid:
          anyOf:
          - type: string
          - type: 'null'
          title: Otid
          description: The offline threading id (OTID). Set by the client to deduplicate requests. Used for idempotency in background streaming mode — each message in a request must have a unique OTID. Retries of the same request should reuse the same OTIDs.
        sender_id:
          anyOf:
          - type: string
          - type: 'null'
          title: Sender Id
        step_id:
          anyOf:
          - type: string
          - type: 'null'
          title: Step Id
        is_err:
          anyOf:
          - type: boolean
          - type: 'null'
          title: Is Err
        seq_id:
          anyOf:
          - type: integer
          - type: 'null'
          title: Seq Id
        run_id:
          anyOf:
          - type: string
          - type: 'null'
          title: Run Id
        event_type:
          type: string
          const: compaction
          title: Event Type
        event_data:
          additionalProperties: true
          type: object
          title: Event Data
      type: object
      required:
      - id
      - date
      - event_type
      - event_data
      title: EventMessage
      description: A message for notifying the developer that an event that has occured (e.g. a compaction). Events are NOT part of the context window.
    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
    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
    MessageRole:
      type: string
      enum:
      - assistant
      - user
      - tool
      - function
      - system
      - approval
      - summary
      title: MessageRole
    AssistantMessage:
      properties:
        id:
          type: string
          title: Id
        date:
          type: string
          format: date-time
          title: Date
        name:
          anyOf:
          - type: string
          - type: 'null'
          title: Name
        message_type:
          type: string
          const: assistant_message
          title: Message Type
          description: The type of the message.
          default: assistant_message
        otid:
          anyOf:
          - type: string
          - type: 'null'
          title: Otid
          description: The offline threading id (OTID). Set by the client to deduplicate requests. Used for idempotency in background streaming mode — each message in a request must have a unique OTID. Retries of the same request should reuse the same OTIDs.
        sender_id:
          anyOf:
          - type: string
          - type: 'null'
          title: Sender Id
        step_id:
          anyOf:
          - type: string
          - type: 'null'
          title: Step Id
        is_err:
          anyOf:
          - type: boolean
          - type: 'null'
          title: Is Err
        seq_id:
          anyOf:
          - type: integer
          - type: 'null'
          title: Seq Id
        run_id:
          anyOf:
          - type: string
          - type: 'null'
          title: Run Id
        content:
          anyOf:
          - items:
              $ref: '#/components/schemas/LettaAssistantMessageContentUnion'
            type: array
          - type: string
          title: Content
          description: The message content sent by the agent (can be a string or an array of content parts)
      type: object
      required:
      - id
      - date
      - content
      title: AssistantMessage
      description: "A message sent by the LLM in response to user input. Used in the LLM context.\n\nArgs:\n    id (str): The ID of the message\n    date (datetime): The date the message was created in ISO format\n    name (Optional[str]): The name of the sender of the message\n    content (Union[str, List[LettaAssistantMessageContentUnion]]): The message content sent by the agent (can be a string or an array of content parts)"
    StepStatus:
      type: string
      enum:
      - pending
      - success
      - failed
      - cancelled
      title: StepStatus
      description: Status of a step execution
    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
    Message:
      properties:
        created_by_id:
          anyOf:
          - type: string
          - type: 'null'
          title: Created By Id
          description: The id of the user that made this object.
        last_updated_by_id:
          anyOf:
          - type: string
          - type: 'null'
          title: Last Updated By Id
          description: The id of the user that made this object.
        created_at:
          type: string
          format: date-time
          title: Created At
          description: The timestamp when the object was created.
        updated_at:
          anyOf:
          - type: string
            format: date-time
          - type: 'null'
          title: Updated At
          description: The timestamp when the object was last updated.
        id:
          type: string
          pattern: ^message-[a-fA-F0-9]{8}
          title: Id
          description: The human-friendly ID of the Message
          examples:
          - message-123e4567-e89b-12d3-a456-426614174000
        agent_id:
          anyOf:
          - type: string
          - type: 'null'
          title: Agent Id
          description: The unique identifier of the agent.
        model:
          anyOf:
          - type: string
          - type: 'null'
          title: Model
          description: The model used to make the function call.
        role:
          $ref: '#/components/schemas/MessageRole'
          description: The role of the participant.
        content:
          anyOf:
          - items:
              oneOf:
              - $ref: '#/components/schemas/TextContent'
              - $ref: '#/components/schemas/ImageContent'
              - $ref: '#/components/schemas/ToolCallContent'
              - $ref: '#/components/schemas/ToolReturnContent'
              - $ref: '#/components/schemas/ReasoningContent'
              - $ref: '#/components/schemas/RedactedReasoningContent'
              - $ref: '#/components/schemas/OmittedReasoningContent'
              - $ref: '#/components/schemas/SummarizedReasoningContent'
              discriminator:
                propertyName: type
                mapping:
                  image: '#/components/schemas/ImageContent'
                  omitted_reasoning: '#/components/schemas/OmittedReasoningContent'
                  reasoning: '#/components/schemas/ReasoningContent'
                  redacted_reasoning: '#/components/schemas/RedactedReasoningContent'
                  summarized_reasoning: '#/components/schemas/SummarizedReasoningContent'
                  text: '#/components/schemas/TextContent'
                  tool_call: '#/components/schemas/ToolCallContent'
                  tool_return: '#/components/schemas/ToolReturnContent'
            type: array
          - type: 'null'
          title: Content
          description: The content of the message.
        name:
          anyOf:
          - type: string
          - type: 'null'
          title: Name
          description: 'For role user/assistant: the (optional) name of the participant. For role tool/function: the name of the function called.'
        tool_calls:
          anyOf:
          - items:
              $ref: '#/components/schemas/ChatCompletionMessageFunctionToolCall-Output'
            type: array
          - type: 'null'
          title: Tool Calls
          description: The list of tool calls requested. Only applicable for role assistant.
        tool_call_id:
          anyOf:
          - type: string
          - type: 'null'
          title: Tool Call Id
          description: The ID of the tool call. Only applicable for role tool.
        step_id:
          anyOf:
          - type: string
          - type: 'null'
          title: Step Id
          description: The id of the step that this message was created in.
        run_id:
          anyOf:
          - type: string
          - type: 'null'
          title: Run Id
          description: The id of the run that this message was created in.
        otid:
          anyOf:
          - type: string
          - type: 'null'
          title: Otid
          description: The offline threading id associated with this message
        tool_returns:
          anyOf:
          - items:
              $ref: '#/components/schemas/letta__schemas__message__ToolReturn-Output'
            type: array
          - type: 'null'
          title: Tool Returns
          description: Tool execution return information for prior tool calls
        group_id:
          anyOf:
          - type: string
          - type: 'null'
          title: Group Id
          description: The multi-agent group that the message was sent in
        sender_id:
          anyOf:
          - type: string
          - type: 'null'
          title: Sender Id
          description: The id of the sender of the message, can be an identity id or agent id
        batch_item_id:
          anyOf:
          - type: string
          - type: 'null'
          title: Batch Item Id
          description: The id of the LLMBatchItem that this message is associated with
        conversation_id:
          anyOf:
          - type: string
          - type: 'null'
          title: Conversation Id
          description: The conversation th

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