List agent mode conversation items
GET
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.
- afterstringquery
Pagination cursor. Pass the previous response's
last_id.
- orderstringquery
Sort order. Use
ascfor oldest first ordescfor newest first.
Response
The response uses the application/json content type.
- objectstring
Always
"list".
- dataarray of object
The conversation's output items in chronological order. User input appears as a
messagewhose ID has an_inputsuffix. Each item is polymorphic ontype.Show child attributesHide child attributes
- reasoningobject
The agent's reasoning. Contains
reasoning_textcontent 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 withfunction_call_outputbycall_id.
- function_call_outputobject
The query result. Its ID is always
{call_id}_output; when completed,outputcontains the query title followed by a Markdown table.
- messageobject
A user question, assistant report, or system error. Assistant content contains
output_textchunks; 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
datais empty.
- last_idstring
ID of the last item in the page. Pass it as
afterfor the next page. Absent whendatais empty.
- has_moreboolean
Whether more items follow this page.
- statusstring
Status of the latest response in the conversation.
Errors
| HTTP status | Error code | Description |
|---|---|---|
400 | INVALID_PARAMETER_VALUE | A query parameter is invalid, such as a limit outside the allowed range or an unknown order value. |
403 | PERMISSION_DENIED | The caller lacks CAN QUERY on the Genie agent. |
404 | NOT_FOUND | The Genie agent or conversation does not exist. |
429 | RATE_LIMIT_EXCEEDED | The per-workspace rate limit was exceeded. |
500 | INTERNAL_ERROR | An unexpected server error occurred. |