v21

latestOpenAPI 3.1.0raw.githubusercontent.com2026-01-1340148239.5 KB
/agents/{id}/query

Query

Start a conversation with an Agent and receive its generated response, along with relevant retrieved data and attributions.

post/agents/{agent_id}/query

Path parameters

agent_idstring uuid required

Agent ID of the agent to query

Agent ID of the agent to query

Query parameters

retrievals_onlyboolean

Set to true to fetch retrieval content and metadata, and then skip generation of the response.

Set to true to fetch retrieval content and metadata, and then skip generation of the response.

include_retrieval_content_textboolean

Set to true to include the text of the retrieved contents in the response. If false, only metadata about the retrieved contents will be included, not content text. This parameter is ignored if retrievals_only is true, in which case content_text will always be returned. Content text and other metadata can also be fetched separately using the /agents/{agent_id}/query/{message_id}/retrieval/info endpoint.

Set to true to include the text of the retrieved contents in the response. If false, only metadata about the retrieved contents will be included, not content text. This parameter is ignored if retrievals_only is true, in which case content_text will always be returned. Content text and other metadata can also be fetched separately using the /agents/{agent_id}/query/{message_id}/retrieval/info endpoint.

Request body

streamboolean

Set to true to receive a streamed response

conversation_idstring uuid

An optional alternative to providing message history in the messages field. If provided, all messages in the messages list prior to the latest user-sent query will be ignored.

llm_model_idstring

Model ID of the specific fine-tuned or aligned LLM model to use. Defaults to base model if not specified.

Response

Successful Response

conversation_idstring uuid required

A unique identifier for the conversation. Can be passed to future /query calls to continue a conversation with the same message history.

message_idstring uuid

A unique identifier for this specific message