Runtime
Voice Session Lifecycle
Lifecycle from session registration through runtime teardown.
Voice Session Lifecycle
Browser Session Flow
- Client creates a session via
POST /voice/session/{agent_id}onvoice/server. - Server loads active agent config and registers a runtime session.
- Server returns
{session_id, ws_url, token}. - Client connects to
ws_url. - Runtime executes turn loop until session end.
Telephony Session Flow
- Twilio/Telnyx sends inbound webhook with agent ID in path.
voice/serverresolves config and signs a session token.- TwiML/TeXML response points to stream endpoint.
- Telephony websocket connects and runtime starts.
Session State Inputs
- Agent graph snapshot
- Provider configuration (STT/LLM/TTS)
- Optional vault-scoped secrets
- Recording and observability settings