Vision Agents uses Stream Video for real-time WebRTC transport by default. External WebRTC transports are supported as well. Most AI providers offer free tiers to get started.
Choose a provider
Twilio
Media Streams, TwiML, built-in webhook helpers — default in our examples
Telnyx
Call Control API, bidirectional media streaming
How phone agents work
Every phone integration follows the same pattern, regardless of provider:- Webhook — the provider notifies your server of an incoming call (or you initiate an outbound call via REST API)
- Register — create a call entry in a provider registry with a secret token
- Stream URL — tell the provider to open a WebSocket media stream to your server
- Bridge —
attach_phone_to_callconnects phone audio ↔ a Stream call where your agent listens and responds
Shared building blocks
Both telephony plugins expose the same core primitives:
Provider-specific differences:
Prerequisites
Before starting any phone example:- Stream API key and secret
- A telephony provider account with at least one phone number
- ngrok (or another HTTPS tunnel) for local development
- A public webhook URL pointing at your FastAPI server
Learning path
Follow this order:- Twilio Phone Agent — get your first inbound and outbound call working
- Phone Support Agent (RAG) — add knowledge retrieval on top
- Twilio or Telnyx integration pages — API reference when building your own server
Twilio Phone Agent
Step-by-step phone tutorial
Phone Support Agent (RAG)
Add knowledge retrieval to calls
Quick orientation
Expose your local server
Run
ngrok http 8000 and note the HTTPS hostname for NGROK_URL.Point webhooks at your server
Configure your provider to send call events to your FastAPI endpoints (e.g.
https://<NGROK_URL>/twilio/voice for Twilio).Run an example and call your number
Follow the Twilio Phone Agent tutorial for full commands. Dial your Twilio number to verify end-to-end audio.
Next Steps
Twilio Integration
Plugin API reference
Telnyx Integration
Alternative provider
RAG for Agents
Knowledge retrieval backends
Stream Video RTC
Default edge transport
Build a Voice Agent
Voice agent fundamentals