Skip to Content
The Makinari API repo now includes an MCP Server — connect your AI models directly. View on GitHub →
AgentsChat

WebSocket (SSE)

Establishes a Server-Sent Events (SSE) connection for real-time updates. Despite the name “WebSocket”, this endpoint uses the SSE standard for unidirectional real-time data flow from server to client.

GET /api/agents/chat/websocket

Query Parameters

ParameterTypeRequiredDescription
visitor_idstringYesUUID of the visitor.
site_idstringYesUUID of the site.
agent_idstringNoUUID of the agent (optional).
conversation_idstringNoUUID of an existing conversation to resume.

Response

Returns a text/event-stream connection. Events sent include:

  • connected: Connection established.
  • history: Conversation history.
  • new_message: New message added to the conversation.
  • ping: Keep-alive heartbeat.
Last updated on