Query
Start a conversation with an Agent and receive its generated response, along with relevant retrieved data and attributions.
Authorizations
Query Parameters
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.
Body
Request body for a POST /agents/{agent_id}/query request
Defines a custom metadata filter. The expected input is a dict which can have different operators, fields and values. For example:
Use lowercase for value when not using equals operator. For document_id and date_created the query is built using direct query without nesting.
- BaseMetadataFilter
- CompositeMetadataFilter
Response
Successful Response
Response body for POST /query to Agent Composer
RL training context for multi-turn training. Automatically included when policy_output is provided. Contains: full_message_history (complete conversation for next turn), message_history (original input), research_items (tool calls + results), tool_calls_summary (simplified), chunks_info (retrieved content).