Accepts a user message, stores it in the chat session, routes it to the specified agent, streams back the agent’s response, and automatically saves the assistant’s response when streaming completes. Use X-Stream-Mode header to control stream format: ‘text’ for simple text stream (default) or ‘uimessage’ for UI message stream with progress updates.
The chat session ID
Stream mode: 'text' for simple text stream, 'uimessage' for UI message stream with custom data parts
text, uimessage The UIMessages from the AI SDK representing the user's message
The agent ID (UUID) to route this message to. Takes priority over agentName.
The agent name/ref to route this message to. Used as fallback when agentId is not provided.
Filenames of org uploads attached to this message. When provided, the csv_upload skill is automatically added.
Message received and agent stream started successfully
Server-sent events stream of the agent's response