Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Agent ID of the agent to query
Query Parameters
Set to true to fetch retrieval content and metadata, and then skip generation of the response.
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
Messages sent so far in the conversation, ending in the latest user message. Add multiple objects to provide conversation history. Last message in the list must be a user-sent message (i.e. role equals "user").
Set to true to receive a streamed response
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.
Model ID of the specific fine-tuned or aligned LLM model to use. Defaults to base model if not specified.
Custom output structure format.
Defines an Optional custom metadata filter, which can be a list of filters or nested filters. Use lowercase for value and/or field.keyword for field when not using equals operator.The expected input is a nested JSON object that can represent a single filter or a composite (logical) combination of filters.
Unnested Example:
{
"operator": "AND",
"filters": [
{"field": "status", "operator": "equals", "value": "active"},
]
}Nested example:
{
"operator": "AND",
"filters": [
{"field": "status", "operator": "equals", "value": "active"},
{
"operator": "OR",
"filters": [
{"field": "category", "operator": "containsany", "value": ["policy", "HR"]},
{"field": "tags", "operator": "exists"}
]
}
]
}Defines a custom metadata filter. The expected input is a dict which can have different operators, fields and values. For example:
{"field": "title", "operator": "startswith", "value": "hr-"}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
{
"filters": [
{
"field": "field1",
"operator": "equals",
"value": "value1"
}
],
"operator": "AND"
}{
"filters": [
{
"field": "field1",
"operator": "equals",
"value": "value1"
},
{
"filters": [
{
"field": "filed1",
"operator": "containsany",
"value": ["value1", "value2"]
},
{ "field": "field2", "operator": "exists" }
],
"operator": "OR"
}
],
"operator": "AND"
}This will modify select configuration parameters for the agent during the response generation.
Response
Successful Response
Response body for POST /query
A unique identifier for the conversation. Can be passed to future /query calls to continue a conversation with the same message history.
Relevant content retrieved to answer the query
A unique identifier for this specific message
Response to the query request
Attributions for the response
Groundedness scores for the response