Skip to main content

Agent mode: List 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. Items that the API does not return are left out of the list, including the raw output of MCP connector calls and answers to prompts.

API scopes: genie

Path parameters​

agent_idstringRequiredpath

The ID of the Genie agent.

conversation_idstringRequiredpath

The conversation ID.

Query parameters​

limitinteger1 to 100query

Maximum number of items to return. Counts returned items only.

Default: 100

afterstringquery

Pagination cursor. Pass the previous response's last_id. Also accepts the id of any returned item.

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.

mcp_callobject

A call to an MCP connector tool, with the same fields as the mcp_call item in the create response. The same call and its approval_request_id are returned on every page that includes it. See MCP connectors.

elicitationobject

A prompt that waits for the caller, with the same fields as the elicitation item in the create response. See MCP connectors.

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 returned items follow this page. first_id, last_id, and has_more describe only the items in data.

statusstring

Status of the latest response in the conversation. incomplete means the latest turn is waiting for the caller. See MCP connectors.

Values:

  • in_progress
  • completed
  • incomplete
  • failed

Errors​

HTTP statusError codeDescription
400INVALID_PARAMETER_VALUEA query parameter is invalid, such as a limit outside the allowed range or an unknown order value.
400BAD_REQUESTafter does not match an item in the conversation (error class INVALID_CURSOR).
403PERMISSION_DENIEDThe caller lacks CAN QUERY on the Genie agent.
404NOT_FOUNDThe Genie agent or conversation does not exist.
429RATE_LIMIT_EXCEEDEDThe request was rate limited due to detected non-organic usage patterns or resource limitations.
500INTERNAL_ERRORAn unexpected server error occurred.