agents
Get Agent Messages
Retrieve message history for an agent.
GET
/
v1
/
agents
/
{agent_id}
/
messages
Authorizations
Authorization
string
headerrequiredBearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Path Parameters
agent_id
string
requiredQuery Parameters
before
string | null
Message before which to retrieve the returned messages.
limit
integer
default: 10Maximum number of messages to retrieve.
msg_object
boolean
default: falseIf true, returns Message objects. If false, return LettaMessage objects.
assistant_message_tool_name
string
default: send_messageThe name of the designated message tool.
assistant_message_tool_kwarg
string
default: messageThe name of the message argument in the designated message tool.
Response
200 - application/json
id
string
The human-friendly ID of the Message
role
enum<string>
requiredThe role of the participant.
Available options:
assistant
, user
, tool
, function
, system
text
string | null
The text of the message.
user_id
string | null
The unique identifier of the user.
agent_id
string | null
The unique identifier of the agent.
model
string | null
The model used to make the function call.
name
string | null
The name of the participant.
created_at
string
The time the message was created.
tool_calls
object[] | null
The list of tool calls requested.
tool_call_id
string | null
The id of the tool call.