Skip to main content
POST
Send Message

Description

Send a message to an agent and receive a response.

Authentication

Required (API key or JWT token)

Path Parameters

string
required
The ID of the agent to chat with

Request Body

string
required
The message to send to the agent
string
Optional thread ID for conversation continuity
boolean
Whether to stream the response (default: false)
array
Optional file attachments

Response

string
The agent’s response message
string
The AI model used
object
Token usage statistics (prompt, completion, total)
number
Number of knowledge base chunks used

Example Request

Example Response

Streaming Response

When stream: true, the response is sent as Server-Sent Events (SSE):

Error Responses

object
Bad Request - Missing message or invalid parameters
object
Unauthorized - Invalid or missing authentication
object
Forbidden - No access to this agent
object
Not Found - Agent not found