The client POSTs { "message": "...", "conversation_id"?: <id> } and
receives SSE frames:
event: status — one up-front frame with the resolved conversation_idevent: token — zero or more incremental text chunksevent: error — on failureevent: done — terminal frame ([DONE])Mirrors the Python POST /api/hyper-ai/chat SSE contract so the existing
React client can consume it unchanged. Provider streaming is handled by
[crate::services::ai_shared_tools::stream_llm], which falls back to
buffered output for providers without native SSE.
Session token issued by POST /api/users/login, transported as Authorization: Bearer <token>.
Server-Sent Events stream. The stream emits one of four event kinds: event: status (handshake + keepalives), event: token (incremental text chunks), event: tool_call (tool call metadata the agent invoked), event: done (final marker), or event: error (stream failed). Each event's data: line is a JSON object.