Skip to contentSkip to navigationSkip to topbar

AI Phone Agent with Twilio Conversation Relay

Created by: Twilio
  • Twilio VoiceVoice
  • JavaScript
  • Python
  • PHP
  • .NET

This application demonstrates how to build an AI-powered phone agent using Twilio Conversation Relay. Inbound callers are connected to an AI agent that can understand natural language and carry on a conversation, enabling automated handling of customer calls without human intervention.

Twilio Conversation Relay bridges the gap between Twilio Voice and AI language models, handling the real-time audio streaming, speech-to-text, and text-to-speech so your application only needs to process and respond to conversation turns.

Report this template(link takes you to an external page)
Download the code from GitHub to customize and self-host or share with your developer
  1. Choose a language

    This project is available in multiple programming languages.

    Select language
  2. Get the code for this project

    The code for this sample is available on GitHub to view.

    View on GitHub(link takes you to an external page)
  3. Get Twilio credentials

    You will need an Account SID and Auth Token in order to run this code.

    Checking for existing account...

  4. Set up the code sample locally

Need some help?

We all do sometimes; code is hard. Get help now from our support team(link takes you to an external page), or lean on the wisdom of the crowd by browsing the Twilio tag(link takes you to an external page)on Stack Overflow.

Terms of servicePrivacy Policy

Copyright © 2026 Twilio Inc.