Send chat message
Technical Preview
Spaces method and path for this operation:
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.
[Required authorization] Route required privileges: read_onechat.
Body
-
The ID of the agent to chat with. Defaults to the default Elastic AI agent.
Default value is
elastic-ai-agent. -
Optional attachments to send with the message.
-
Optional browser API tools to be registered as LLM tools with browser.* namespace. These tools execute on the client side.
-
Controls agent capabilities during conversation. Currently supports visualization rendering for tabular tool results.
Additional properties are NOT allowed.
-
Optional connector ID for the agent to use for external integrations.
-
Optional existing conversation ID to continue a previous conversation.
-
The user input message to send to the agent.
curl \
--request POST 'https://<KIBANA_URL>/api/agent_builder/converse' \
--header "Authorization: $API_KEY" \
--header "Content-Type: application/json" \
--header "kbn-xsrf: true" \
--data '{"input":"What is Elasticsearch?","agent_id":"elastic-ai-agent","connector_id":"my-connector-id"}'
{
"input": "What is Elasticsearch?",
"agent_id": "elastic-ai-agent",
"connector_id": "my-connector-id"
}
{
"steps": [
{
"type": "reasoning",
"reasoning": "Searching for official documentation or content that explains what Elasticsearch is"
},
{
"type": "tool_call",
"params": {
"query": "what is elasticsearch definition overview introduction"
},
"results": [
{
"data": {
"message": "Could not figure out which index to use"
},
"type": "error"
}
],
"tool_id": "platform.core.search",
"progression": [
{
"message": "Selecting the best target for this query"
}
],
"tool_call_id": "tooluse_shOdUwKIRwC9YhqGzeg0cQ"
}
],
"response": {
"message": "Elasticsearch is a distributed, RESTful search and analytics engine capable of addressing a growing number of use cases. As the heart of the Elastic Stack, it centrally stores your data for lightning fast search, fine‑tuned relevancy, and powerful analytics that scale with ease."
},
"conversation_id": "696ccd6d-4bff-4b26-a62e-522ccf2dcd16"
}