Send chat message
- Base URL
-
https://{kibana_url}
- POST /api/agent_builder/converse
- POST /s/{space_id}/api/agent_builder/converse
Refer to Spaces for more information.
Send a message to an agent and receive a complete response. This synchronous endpoint waits for the agent to fully process your request before returning the final result. Use this for simple chat interactions where you need the complete response. To learn more about agent chat, refer to the agent chat documentation.
Required authorization
- Privileges agentBuilder:read
Request body
-
_execution_mode -
define how to execute the agent (local execution or via task_manager)
-
Values:
localtask_manager -
actiondeprecated -
Deprecated and ignored. The "regenerate" action has been removed; the field is still accepted for backward compatibility.
-
Values:
regenerate -
agent_idstring · default: elastic-ai-agent -
The ID of the agent to chat with. Defaults to the default Elastic AI agent.
-
attachmentsobject -
Optional attachments to send with the message.
-
datamap string to object -
Payload of the attachment. Required unless
originis provided (content is resolved once at send time). -
group_idstring · max length: 256 -
Stable identifier for the logical group this attachment belongs to. Attachments sharing the same group_id were submitted together as a single logical entity.
-
When true, the attachment will not be displayed in the UI.
-
browser_api_toolsobject -
Optional browser API tools to be registered as LLM tools with browser.* namespace. These tools execute on the client side.
-
configuration_overridesobject -
Runtime configuration overrides. These override the stored agent configuration for this execution only.
-
connector_idstringnullable -
Optional connector ID for the agent to use for model routing. Mutually exclusive with
inference_id; omit or use only one. -
conversation_idstring · max length: 256 -
Optional existing conversation ID to continue a previous conversation.
-
execution_idstring -
Optional client-generated execution ID. Provide it to address this execution later (for example, to abort it). Must be unique; defaults to a server-generated ID.
-
inference_idstringnullable -
Optional inference endpoint ID for model routing (public alias for the same internal identifier as
connector_id). Mutually exclusive withconnector_id. -
project_routingstring · max length: 2048 -
Cross-project search routing expression resolved from the header project picker, applied to the run's searches. Serverless (CPS) only; ignored elsewhere.
-
promptsmap string to anyOf -
Use this field to respond to a
confirmation,authorization, orask_user_questionprompt. Send anallowboolean to answer aconfirmationprompt, anauthorizedboolean to answer anauthorizationprompt, or ananswersarray (one entry per question) to answer anask_user_questionprompt. -
read_onlyboolean -
When true, the created conversation is presented as read-only in the UI: its history is shown but no message input is offered. This carries no authorization meaning — the conversation can still be continued through the API. This setting is ignored when continuing an existing conversation.
Response
Indicates a successful response