How exotel/agent-stream works
Agent-Stream is a collection of Exotel AgentStream voice bridges, from provider-specific realtime integrations to composable STT/LLM/TTS recipes and a Dograh telephony adapter. The principal workflow is to start a bridge, have Exotel connect a call’s bidirectional audio stream, process it through the selected voice stack, and return audio to the caller. The README documents the integration choices and call setup; sampled source confirms several bridge-to-provider and shared-session paths. Other unsampled integrations are represented at their documented directory level.
Main entry points: agents Voice stack recipes · server.py Sarvam pipeline bridge · exotel Dograh Exotel adapter · wss_server.py Recipe WebSocket host
Components 19
Call setup
- Connect Voice AI API
- Call placer
shared/place_connect_call.py
Realtime bridges
- OpenAI Realtime bridge
integrations/openai-realtime/core/bot.py - Gemini Live bridge
integrations/gemini-live/server.js - ElevenLabs bridge
integrations/elevenlabs/exotel/bridge.py
Agent recipes
- Sarvam pipeline bridge
integrations/sarvam/server.py - Sarvam STT/TTS
integrations/sarvam/sarvam_agentstream_pipeline.py - Pipecat bridge
integrations/pipecat/server.py - Pipecat voice bot
integrations/pipecat/bot.py - Voice stack recipes
integrations/agents
Platform adapters
- Dograh Exotel adapter
integrations/dograh/providers/exotel - Provider integration
integrations/dograh/providers/exotel/provider.py - WebSocket transport
integrations/dograh/providers/exotel/transport.py
Shared runtime
- Recipe WebSocket host
integrations/agents/_shared/wss_server.py - Turn pipeline session
integrations/agents/_shared/pipeline_agent.py - Recipe providers
integrations/agents/_shared/providers.py - Audio media helpers
integrations/agents/_shared/media.py
Other components
- Caller
- Exotel AgentStream
Connections 23
- Caller → Exotel AgentStream: places call
- Call placer → Connect Voice AI API: requests call
- Connect Voice AI API → Exotel AgentStream: starts call
- Exotel AgentStream → OpenAI Realtime bridge: streams audio
- OpenAI Realtime bridge → Exotel AgentStream: returns audio
- Exotel AgentStream → Gemini Live bridge: streams audio
- Gemini Live bridge → Exotel AgentStream: returns audio
integrations/gemini-live/server.js - Exotel AgentStream → ElevenLabs bridge: streams audio
- ElevenLabs bridge → Exotel AgentStream: returns audio
- Exotel AgentStream → Sarvam pipeline bridge: streams audio
- Sarvam pipeline bridge → Exotel AgentStream: returns audio
integrations/sarvam/server.py - Sarvam pipeline bridge → Sarvam STT/TTS: calls STT/TTS
integrations/sarvam/server.py - Exotel AgentStream → Pipecat bridge: streams audio
- Pipecat bridge → Pipecat voice bot: runs bot
integrations/pipecat/server.py - Exotel AgentStream → Recipe WebSocket host: opens WebSocket
integrations/agents/_shared/wss_server.py - Recipe WebSocket host → Turn pipeline session: creates session
integrations/agents/_shared/pipeline_agent.py - Turn pipeline session → Audio media helpers: uses audio helpers
- Voice stack recipes → Recipe WebSocket host: uses shared host
integrations/agents/cartesia-line-native/server.py - Voice stack recipes → Turn pipeline session: uses turn pipeline
integrations/sarvam/server.py - Voice stack recipes → Recipe providers: uses provider adapters
integrations/agents/speechmatics-gpt-elevenlabs-native/agent.py - Exotel AgentStream → Dograh Exotel adapter: telephony integration
- Dograh Exotel adapter → Provider integration: provides integration
integrations/dograh/providers/exotel/__init__.py - Dograh Exotel adapter → WebSocket transport: uses transport
integrations/dograh/providers/exotel/__init__.py