Chat with AI Agent
POST /api/v3/organizations/{organisation}/ai/agents/{agentId}/chat
Initiates a chat session with a specific AI agent. The agent’s configuration (system prompt, temperature, model, allowed tools) is automatically applied.
*
* Key Features:
* - Session Management: Automatic session creation and state tracking
* - Multi-turn Conversations: Full conversation history maintained server-side
* - Agent’s system prompt is prepended to conversation
* - Only agent’s allowed tools are available
* - All tools are auto-executed (no client confirmation)
* - Temperature and model from agent config
*
* Session Support:
* - Omit sessionId to create a new session automatically
* - Include sessionId to continue an existing conversation
* - Sessions expire after 60 minutes of inactivity
* - Use /sessions/{sessionId} to retrieve full conversation history
Authorizations
Parameters
Path Parameters
The organisation ID
The agent ID
Request Body required
object
The user’s message to the agent
Optional session ID to continue a conversation
Optional user identifier for session isolation
Whether to stream the response (SSE)
Responses
200
Agent response generated successfully
object
object
object
object
400
Invalid request parameters
403
Access denied
404
Agent not found
500
Failed to chat with agent