Skip to main content

List agent mode conversation items

GET /api/2.0/genie/agents/{agent_id}/conversations/{conversation_id}/items

Lists a conversation's items in chronological order, with cursor pagination.

API scopes: genie

Path parameters

agent_idstringRequiredpath

The ID of the Genie agent.

conversation_idstringRequiredpath

The conversation ID.

Query parameters

limitintegerquery

Maximum number of items to return.

Default: 100

Constraints: 1 to 100

afterstringquery

Pagination cursor. Pass the previous response's last_id.

orderstringquery

Sort order. Use asc for oldest first or desc for newest first.

Default: asc

Values: asc, desc

Response

The response uses the application/json content type.

objectstring

Always "list".

Values: list

dataarray of object

The conversation's output items in chronological order. User input appears as a message whose ID has an _input suffix. Each item is polymorphic on type.

Show child attributesHide child attributes
reasoningobject

The agent's reasoning. Contains reasoning_text content items and a status.

function_callobject

An SQL query the agent ran. Contains call_id, the name "execute_sql", and arguments encoded as a JSON string. It is paired with function_call_output by call_id.

function_call_outputobject

The query result. Its ID is always {call_id}_output; when completed, output contains the query title followed by a Markdown table.

messageobject

A user question, assistant report, or system error. Assistant content contains output_text chunks; table chunks include metadata for columns, preview rows, total row count, status, and SQL.

first_idstring

ID of the first item in the page. Absent when data is empty.

last_idstring

ID of the last item in the page. Pass it as after for the next page. Absent when data is empty.

has_moreboolean

Whether more items follow this page.

statusstring

Status of the latest response in the conversation.

Errors

HTTP statusError codeDescription
400INVALID_PARAMETER_VALUEA query parameter is invalid, such as a limit outside the allowed range or an unknown order value.
403PERMISSION_DENIEDThe caller lacks CAN QUERY on the Genie agent.
404NOT_FOUNDThe Genie agent or conversation does not exist.
429RATE_LIMIT_EXCEEDEDThe per-workspace rate limit was exceeded.
500INTERNAL_ERRORAn unexpected server error occurred.