v36

latestOpenAPI 3.1.0raw.githubusercontent.com2025-10-091882241.2 MB
agents

List Messages

Retrieve message history for an agent.

get/v1/agents/{agent_id}/messages

Path parameters

agent_idstring required

Query parameters

beforestring nullable

Message ID cursor for pagination. Returns messages that come before this message ID in the specified sort order

Message ID cursor for pagination. Returns messages that come before this message ID in the specified sort order

afterstring nullable

Message ID cursor for pagination. Returns messages that come after this message ID in the specified sort order

Message ID cursor for pagination. Returns messages that come after this message ID in the specified sort order

limitinteger nullable

Maximum number of messages to return

Maximum number of messages to return

order'asc' | 'desc'

Sort order for messages by creation time. 'asc' for oldest first, 'desc' for newest first

Sort order for messages by creation time. 'asc' for oldest first, 'desc' for newest first

order_by'created_at'

Field to sort by

Field to sort by

group_idstring nullable

Group ID to filter messages by.

Group ID to filter messages by.

use_assistant_messageboolean

Whether to use assistant messages

Whether to use assistant messages

assistant_message_tool_namestring

The name of the designated message tool.

The name of the designated message tool.

assistant_message_tool_kwargstring

The name of the message argument.

The name of the message argument.

include_errboolean nullable

Whether to include error messages and error statuses. For debugging purposes only.

Whether to include error messages and error statuses. For debugging purposes only.

Response

Successful Response