Send a message and get the answer
Spaces method and path for this operation:
<div><span class="operation-verb post">post</span> <span class="operation-path">/s/{space_id}/api/chat/message</span></div>Refer to Spaces for more information.
Send a message to an agent and get its text answer. Use this synchronous endpoint in scripts and command-line tools. The response contains only the answer and the conversation ID. To continue the conversation, include the returned conversation_id in the next request.
The agent runs without a user, so the endpoint declines every prompt that the agent raises, such as a tool confirmation, a question, or a destructive API approval. The declined_prompts property lists these prompts. This endpoint does not support attachments.
The agentBuilder:experimentalFeatures advanced setting must be enabled. If it is disabled, the endpoint returns a 404 response.<br/><br/>[Required authorization] Route required privileges: agentBuilder:read.
Request
- Base URLhttps://localhost:5601
- URLhttps://localhost:5601/api/chat/message
- Auth
- API key in header Authorization
- or HTTP basic
Headers
A required header to protect against CSRF attacks
Request body
Response
The agent answered. The response contains the answer and the ID of the conversation that stores the exchange.
Changes
No operation changes recorded.