feros
Runtime

Voice Session Lifecycle

Lifecycle from session registration through runtime teardown.

Voice Session Lifecycle

Browser Session Flow

  1. Client creates a session via POST /voice/session/{agent_id} on voice/server.
  2. Server loads active agent config and registers a runtime session.
  3. Server returns {session_id, ws_url, token}.
  4. Client connects to ws_url.
  5. Runtime executes turn loop until session end.

Telephony Session Flow

  1. Twilio/Telnyx sends inbound webhook with agent ID in path.
  2. voice/server resolves config and signs a session token.
  3. TwiML/TeXML response points to stream endpoint.
  4. 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

On this page