Watch the video tutorial here: https://youtu.be/_BxzbGh9uvk
ElevenLabs recently released their Conversational AI Agent, a tool for building interactive voice conversations.
This repository provides the backend code to connect Twilio to your ElevenLabs Conversational AI Agent. With this setup, you can:
This system is ideal for businesses looking to automate customer interactions, enhance call workflows, and create tailored user experiences at a low cost.
In the 'forTheLegends' folder I inclulde 7x different scripts:
When I was coding out the final scripts that I demo in the above video ('inbound-calls.js' & 'outbound-calls.js'), I had to incrementally build out all of the scripts in the 'forTheLegends' folder.
They were difficult to build and get right, and so I thought they could hold some inherent value for other people who are also looking to build custom code solutions for their Elevenlabs agent.
I decided to include them in the repo as they might be good checkpoints/ starting points for other projects.
Here's what each script accomplishes:
This breakdown provides all the flexibility you need to handle various call workflows while leveraging the full power of ElevenLabs' Conversational AI.
You need to use authenticated requests in order to pass custom variables into the agent.
Make sure to follow these settings to configure your AI agent (from within ElevenLabs) to:
Settings for Twilio: https://elevenlabs.io/docs/conversational-ai/guides/conversational-ai-twilio
Settings for authenticated requests: https://elevenlabs.io/docs/conversational-ai/customization/conversation-configuration
Note: Make sure to also turn on "Enable Authentication."
We can pass in custom values from Make.com when triggering the call. For example, you can use a Google Sheet with customer details (e.g., name, company, custom prompts) to dynamically feed data into the AI agent.
.env FileELEVENLABS_AGENT_ID=your-elevenlabs-agent-id
ELEVENLABS_API_KEY=your-elevenlabs-api-key
TWILIO_ACCOUNT_SID=your-twilio-account-sid
TWILIO_AUTH_TOKEN=your-twilio-auth-token
TWILIO_PHONE_NUMBER=your-twilio-phone-number
npm install
npm start
Here are useful resources for setting up and understanding the project:
Star ⭐ this repository if you find it helpful!
Want to donate? https://bartslodyczka.gumroad.com/l/potvn
$ claude mcp add elevenlabs-twilio-ai-caller \
-- python -m otcore.mcp_server <graph>