Skip to Content
bpms.ai
ReferenceAgent

Send a message to the agent

POST
/api/v1/agent/conversations/{conversationId}/messages

Sends the user's text in the conversation and streams the answer as server-sent events: message events with JSON data {"text": "<chunk>"}, then one done event with data {}. An error during the stream is one error event whose data is the problem, and the stream ends. The agent uses only the tools of the caller's authorities, as the caller in the caller's tenant. Errors before the stream starts answer a problem.

Authorization

bearer
headerAuthorizationBearer <token>

The token of a session that createSession opened

Path Parameters

conversationId*string

Id of the conversation, a UUID the client chooses

Formatuuid

Request Body

The user's text

application/json
  1. body

What the user says to the agent

text*string

The user's text, at most 10000 characters

Response Body

The answer as server-sent events; it is not cached

response?stringtext/event-stream
Example Request
curl -X POST 'https://bpms.bpms.work/api/v1/agent/conversations/497f6eca-6276-4993-bfeb-53cbbbba6f08/messages' \  -H 'Content-Type: application/json' \  -d '{  "text": "string"}'
Example Response
"string"