How a turn is coordinated
When a visitor sends a text turn or speaks into their microphone, the main agent classifies intent and dispatches background sub-agents in parallel — a knowledge search, an AI Form write, a product lookup, or a connected-app call. Those sub-agents return structured payloads, and the main agent composes a grounded response that cites what was found.
Streaming with WebRTC and SSE
Text chat responses stream progressively over Server-Sent Events so visitors see words as they're generated. Voice sessions run speech-to-speech over low-latency WebRTC directly in the browser — no SIP trunk, no PSTN, no mobile app.
Durable Objects for live state
Each live conversation is backed by a Cloudflare Durable Object that holds session state, buffers turns, and brokers the handoff signal between the agent and any human operator. When the session ends, the full transcript is flushed to the per-org database.
Per-organisation data boundary
Knowledge, conversations, AI Form records, and connection credentials live inside the organisation's isolated database. No cross-tenant joins, no shared tables, no accidental leaks between customers.
Related docs