Agent Query
This endpoint processes a query (Ask something) through the specified agent.
Example of how to ask something to your agent via programming
Tip: On the first request, you don’t need to provide the conversationId parameter. A new ID will be generated, which you can then save and use in subsequent requests for the same conversation. This will group the messages into a single conversation.
Authorizations
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Path Parameters
ID of the agent to be queried.
Body
Text of the question or command to be sent to the agent.
ID of the existing conversation. If not provided or invalid, a new conversation will be created.
ID of an existing contact in the system. If provided, associates the conversation with this contact. Alternative to the contact
object.
Contact details. Used to find an existing contact (by email, phoneNumber, or userId) or create a new one if not found.
ID of the visitor/participant who is sending the query. If not provided, a new ID will be generated.
Model temperature (min 0.0, max 1.0). Controls the randomness of the response.
Allows overriding the LLM model configured in the agent for this specific query. Use valid model names.
Presence penalty (between -2.0 and 2.0). Positive values encourage the model to talk about new topics.
Frequency penalty (between -2.0 and 2.0). Positive values discourage the model from repeating textual lines.
Nucleus sampling (alternative to temperature). Considers tokens with accumulated probability mass top_p. (Ex: 0.1 considers the top 10%). It is recommended to change topP
or temperature
, not both.
Allows overriding the system prompt configured in the agent for this specific query.
Object to pass additional context data that can be used by tools or in the prompt.
Optional URL. If provided, the API will return 202 immediately and will deliver the response to the Agent via a POST request to this URL when it is ready.
Response
The agent's textual response.
ID of the conversation (existing or new).
ID of the visitor/participant.
ID of the agent's response message in the database.
Datasource chunks used to generate the response (if applicable).
Additional metadata returned (may vary).
Was this page helpful?