list_messages
Retrieve paginated conversation history from Letta agents to review interactions, debug behavior, or analyze message flow.
Instructions
Retrieve messages from an agent's conversation history. Returns paginated message history including user messages, assistant responses, tool calls, and system messages. Use for reviewing past conversations or debugging agent behavior.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"agent_id": "<agent_id>"
},
"name": "list_messages"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| agent_id | Yes | ID of the agent whose messages to retrieve | |
| limit | No | Maximum number of messages to return | |
| order | No | Sort order: "asc" for oldest first, "desc" for newest first | |
| before | No | Pagination cursor - get messages before this message ID | |
| after | No | Pagination cursor - get messages after this message ID | |
| group_id | No | Filter messages by group ID |