Letta · Schema

MessageSchema

Message with human-readable ID for agent file

Artificial IntelligenceAgentsStateful AgentsMemoryMemGPTContinual LearningMCPMulti-AgentRAGOpen-Source

Properties

Name Type Description
type object The message type to be created.
otid object 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 r
group_id object The multi-agent group that the message was sent in
role object The role of the participant.
content object The content of the message.
name object The name of the participant.
sender_id object The id of the sender of the message, can be an identity id or agent id
batch_item_id object The id of the LLMBatchItem that this message is associated with
id string Human-readable identifier for this message in the file
model object The model used to make the function call
agent_id object The unique identifier of the agent
tool_calls object The list of tool calls requested. Only applicable for role assistant.
tool_call_id object The ID of the tool call. Only applicable for role tool.
tool_returns object Tool execution return information for prior tool calls
created_at string The timestamp when the object was created.
approve object Whether the tool has been approved
approval_request_id object The message ID of the approval request
denial_reason object An optional explanation for the provided approval status
approvals object Approval returns for the message
View JSON Schema on GitHub

JSON Schema

letta-letta-schemas-agent-file-messageschema-schema.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "#/components/schemas/letta__schemas__agent_file__MessageSchema",
  "title": "MessageSchema",
  "properties": {
    "type": {
      "anyOf": [
        {
          "type": "string",
          "const": "message"
        },
        {
          "type": "null"
        }
      ],
      "title": "Type",
      "description": "The message type to be created.",
      "default": "message"
    },
    "otid": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Otid",
      "description": "The offline threading id (OTID). Set by the client to deduplicate requests. Used for idempotency in background streaming mode \u2014 each message in a request must have a unique OTID. Retries of the same request should reuse the same OTIDs."
    },
    "group_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Group Id",
      "description": "The multi-agent group that the message was sent in"
    },
    "role": {
      "$ref": "#/components/schemas/MessageRole",
      "description": "The role of the participant."
    },
    "content": {
      "anyOf": [
        {
          "items": {
            "$ref": "#/components/schemas/LettaMessageContentUnion"
          },
          "type": "array"
        },
        {
          "type": "string"
        }
      ],
      "title": "Content",
      "description": "The content of the message."
    },
    "name": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Name",
      "description": "The name of the participant."
    },
    "sender_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Sender Id",
      "description": "The id of the sender of the message, can be an identity id or agent id"
    },
    "batch_item_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Batch Item Id",
      "description": "The id of the LLMBatchItem that this message is associated with"
    },
    "id": {
      "type": "string",
      "title": "Id",
      "description": "Human-readable identifier for this message in the file"
    },
    "model": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Model",
      "description": "The model used to make the function call"
    },
    "agent_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Agent Id",
      "description": "The unique identifier of the agent"
    },
    "tool_calls": {
      "anyOf": [
        {
          "items": {
            "$ref": "#/components/schemas/ChatCompletionMessageFunctionToolCall-Input"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "title": "Tool Calls",
      "description": "The list of tool calls requested. Only applicable for role assistant."
    },
    "tool_call_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Tool Call Id",
      "description": "The ID of the tool call. Only applicable for role tool."
    },
    "tool_returns": {
      "anyOf": [
        {
          "items": {
            "$ref": "#/components/schemas/letta__schemas__message__ToolReturn-Input"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "title": "Tool Returns",
      "description": "Tool execution return information for prior tool calls"
    },
    "created_at": {
      "type": "string",
      "format": "date-time",
      "title": "Created At",
      "description": "The timestamp when the object was created."
    },
    "approve": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "title": "Approve",
      "description": "Whether the tool has been approved"
    },
    "approval_request_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Approval Request Id",
      "description": "The message ID of the approval request"
    },
    "denial_reason": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Denial Reason",
      "description": "An optional explanation for the provided approval status"
    },
    "approvals": {
      "anyOf": [
        {
          "items": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ApprovalReturn"
              },
              {
                "$ref": "#/components/schemas/letta__schemas__message__ToolReturn-Input"
              }
            ]
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "title": "Approvals",
      "description": "Approval returns for the message"
    }
  },
  "type": "object",
  "required": [
    "role",
    "content",
    "id"
  ],
  "description": "Message with human-readable ID for agent file"
}

Work with this as data

Every JSON Schema here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for schemas

4 MCP tools reach this
  • find_json_schemasBrowse and filter every JSON Schema in the catalog.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This JSON Schema
curl "https://apis.io/api/v1/json-schemas/letta-letta-schemas-agent-file-messageschema"
All schemas
curl "https://apis.io/api/v1/json-schemas?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.