Chat with agent (streaming)
/agent/stream-chatSend a message to an agent and receive the response as a Server-Sent Events (SSE) stream. Events include message_start, content_delta, tool_use, tool_result, message_end, and error.
Header parameters
Optional header for on-behalf-of authentication. Used when making requests on behalf of another user or entity. Must be in the format: Patient/{uuid} or Practitioner/{uuid}
Optional header for FHIR provider authentication. Contains credentials in the format {fhir_provider_id}:{oauth2_token}. Multiple FHIR provider integrations can be provided as comma-separated values.
Body parameters
The message to send to the agent
Optional context for the conversation
Optional session ID for conversation continuity. Only one request may be active for a session at a time; overlapping turns for the same session return 409 Conflict.
The ID of the agent to chat with
Enable enhanced reasoning capabilities. Increases latency but improves response quality and reliability.
Streaming chat response. Each frame is a standard SSE record
(event: line + data: JSON line). The example shows a single
content_delta payload — multiple frames stream until message_end.
Response fields
Chat session ID
Incremental text content (present in content_delta events)
Whether the operation was successful
Status message
Tool/function name (present in tool_use and tool_result events)
Tool arguments (present in tool_use events)
Tool execution result (present in tool_result events)