Twilio voice AI

Twilio voice AI, without writing the voice stack.

Twilio gives you the numbers and the phone network. Turning a Twilio number into an AI voice agent is the part left to you, usually on Media Streams or ConversationRelay, with a server of your own in the middle.

Or connect the Twilio account to VocalLabs. Import your DIDs, assign a published agent for inbound, and place outbound calls one at a time or as a scheduled batch. Twilio stays your carrier and keeps the PSTN billing; you build the agent without code.

Keep your Twilio numbers · Import your DIDs · Inbound and outbound · PSTN billing stays with Twilio · Your own model keys

Live call · transcript
  1. Caller00:00

    Hi, I was charged twice for my subscription this month.

  2. System00:02

    Tool call · billing lookup · two charges found

  3. AI agent00:03

    Sorry about that. I can see two charges of $29 on 3 November. Refunds need a person to approve, so I’m putting you through to billing now.

  4. System00:10

    Transfer to a human · billing team

  5. Human00:16

    Hi, this is Sam in billing. I can see the duplicate charge, and I’m refunding it now.

Three ways to build voice AI on Twilio.

Options

Twilio documents two routes of its own. Media Streams hands you the raw call audio; ConversationRelay handles the speech and hands you text. Connecting the account to VocalLabs is a third: the agent is built and run for you, and Twilio stays the carrier.

Building voice AI on Twilio with Media Streams, with ConversationRelay, or with a VocalLabs agent on your Twilio numbers
Media StreamsConversationRelayVocalLabs agent
What Twilio doesStreams the call’s raw audio to your WebSocket server and, with a bidirectional stream, plays back the audio you sendHandles speech recognition and text-to-speech, and sends the caller’s words to your application as textCarries the call on your Twilio numbers, as your carrier
What you buildSpeech-to-text, the LLM, text-to-speech, turn-taking and transfers, and the server between themThe application that generates each reply, and the WebSocket server it runs behindThe agent’s prompt, tools and models, in a no-code editor
ModelsWhichever vendors you contract and connectTwilio-managed speech; your own LLMYour own keys: OpenAI, Gemini, xAI, OpenRouter, Deepgram, ElevenLabs, Soniox, Sarvam, Raya
Where the logic runsYour serversYour serversVocalLabs runs the realtime session

Twilio columns describe Media Streams and ConversationRelay as documented on twilio.com, as of Nov 2026. To replace the voice layer under an agent you already run, see our Twilio alternative page. · Source: Twilio ConversationRelay docs

Your Twilio number, answered by a published agent.

Connection

Nothing of yours to host between Twilio and the models. The number stays on Twilio; the conversation runs on VocalLabs.

  1. 01Your Twilio accountNumbers and PSTN billing stay here.
  2. 02Imported DIDConnected under Phone Numbers in VocalLabs.
  3. 03Assigned agentA published voice agent answers inbound.
  4. 04Mid-callHTTP tools, MCP servers, transfer to a person.
  5. 05Session recordRecording, transcript, tool calls, webhooks.
Inbound
Each imported number is assigned a published voice agent, which answers the calls it receives.
Outbound
The same agent places calls from the dashboard or the API, one at a time or as a scheduled batch.
Post-call
Post-call analysis runs once the call ends, and signed webhooks push the session’s events to your systems.

Twilio keeps the line. VocalLabs runs the agent.

Who does what
01NumbersStay on your Twilio account. You import them into VocalLabs as DIDs.
02PSTN billingStays with Twilio.
03Inbound routingEach imported number is assigned a published voice agent.
04Outbound callsPlaced from the dashboard or the API, one at a time or as a scheduled batch.
05ModelsYour own OpenAI, Gemini, xAI, OpenRouter, Deepgram, ElevenLabs, Soniox, Sarvam or Raya accounts, billed to you directly.
06The realtime sessionVocalLabs compiles your agent definition into a LiveKit AgentSession and runs it. You write no LiveKit code.
07RecordsRecording, transcript, tool calls and post-call analysis for each session, plus signed webhooks to your systems.

From Twilio number to live agent.

Setup
  1. 01

    Build the agent

    In the dashboard, with Copilot, or over MCP from Claude Code or Codex: the prompt, a speech pipeline or a single realtime model, FAQs and tools.

  2. 02

    Add the handoff

    Decide when the agent transfers to a person, hands off to another agent or ends the call, and wire the tools it needs mid-call.

  3. 03

    Test in the browser

    Run voice test sessions before publishing, and read the transcript, tool calls, captured fields and provider usage for each.

  4. 04

    Connect Twilio

    Under Phone Numbers, connect your Twilio account, import your DIDs and assign the published agent for inbound.

  5. 05

    Go outbound when ready

    Place calls one at a time or as a scheduled batch, from the dashboard or the API.

Twilio voice AI or a Twilio alternative?

Which page

Two different jobs. This page puts an agent on top of your Twilio numbers. The Twilio alternative page is about replacing the DIY voice pipeline beneath an agent with VocalStack Voice.

Building an AI voice agent on Twilio with VocalLabs compared with moving to VocalStack Voice as a Twilio alternative
Agent on your Twilio numbersVocalStack Voice, the Twilio alternative
What changesYou add a no-code agent to the numbers you haveThe voice layer under your agent: SIP, WebRTC, PSTN, speech and models under one API
Twilio’s roleYour carrier: numbers and PSTN billingOne carrier among Twilio, Exotel, Ozonetel, Airtel IQ, Plivo, Kaleyra and SIP trunks
Who buildsAnyone on the team: dashboard, Copilot or MCPDevelopers, through the REST API and webhooks
Call controlsTools, handoff to a human or another agent, end-callBarge-in, DTMF, and handoff with the full conversation state and transcript

Questions buyers ask first.

FAQ

Same Twilio numbers. An agent on every one.

Tell us which Twilio numbers should be answered, what callers ask for and where calls go when a person is needed. We will help you connect the account and build the agent, and you can test it in the browser before it takes a real call.

Inbound and outbound · Tools and human handoff · Your own model keys · PSTN billing stays with Twilio

Ready to launch your own voice AI brand?

Book a partner demo and see the platform you'll resell

Become a Partner

Enterprise & Security

Your data security is our top priority. We maintain the highest standards of compliance and security certifications.

  • VAPT badgeVAPT
  • GDPR badgeGDPR
  • CERT-In badgeCERT-In
  • AICPA SOC badgeAICPA SOC
  • ISO 27001:2022 badgeISO 27001:2022
  • HIPAA badgeHIPAA
  • CCPA badgeCCPA