GET
/
v1
/
agents
/
{agent_id}
/
messages

Authorizations

Authorization
string
headerrequired

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

agent_id
string
required

Query Parameters

before
string | null

Message before which to retrieve the returned messages.

limit
integer
default: 10

Maximum number of messages to retrieve.

msg_object
boolean
default: false

If true, returns Message objects. If false, return LettaMessage objects.

assistant_message_tool_name
string
default: send_message

The name of the designated message tool.

assistant_message_tool_kwarg
string
default: message

The 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>
required

The 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.