Agent

Get session messages

Changed on

Get all messages in an agent session.

get/api/v0/agent/sessions/{session_id}/messages

Request

Path parameters

session_idstring uuid required

Query parameters

after_sequenceinteger nullable

Only return messages with sequence_number greater than this value.

Response

Successful Response

idstring uuid required

The ID of the message.

run_idstring uuid nullable

The run that emitted this message, when known.

rolestring required

The role of the message sender. Options: 'user', 'assistant', 'tool'.

contentstring nullable

The content of the message.

tool_callsobject[] nullable

Tool calls for assistant messages.

tool_call_idstring nullable

Tool call ID for tool result messages.

model_namesstring[] nullable

Models whose calls completed in the run that emitted this message, in order of first call. Null on user messages, on messages with no known run, and on a reply whose run's recorded calls all failed; a run with no recorded calls names the model it was dispatched with.

sequence_numberinteger required

Ordering sequence number.

created_atstring date-time required

When the message was created.

Changes

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status