In this video, you'll learn how to create omnichannel voice agents using Vapi's new native SMS capabilities. This feature allows your AI voice agent to switch between voice and text mid-conversation, enabling it to collect and send accurate information via SMS. This is a game-changer for real-world interactions where precise details like phone numbers, addresses, or confirmation codes are needed.
The video explains that this bidirectional SMS communication is currently supported only for US-based Twilio numbers that have been approved through the A2P compliance campaign registration process.
The tutorial walks you through setting up this functionality and includes three practical demos:
- Verification Code Demo: The AI agent sends a user a verification code via SMS and then asks them to repeat it over the phone to confirm their identity. This showcases the agent's ability to handle secure, two-factor authentication.
- Email Capture Demo: The AI agent asks a user to provide their email address by replying to an SMS. This demonstrates how to use the text modality for accurate data collection, which is often difficult to do with a voice-only interface.
- Complete Bi-Directional SMS Demo: The most advanced demo shows the AI agent collecting a user's full name, date of birth, and email address over a series of back-and-forth SMS messages. This data is then accurately captured and sent to a CRM, proving the power of combining voice and text for structured data collection.
To implement this, you'll need to follow these steps in the Vapi dashboard:
- Import a Twilio Number: Use your verified Twilio account to import a US phone number into Vapi.
- Create an SMS Tool: Create a new tool in Vapi called "Send Text" and assign your Twilio number to it. It's recommended to leave the tool's description blank so the AI can use it for various purposes.
- Configure the AI Agent: In your agent's prompt, explicitly instruct it to use the "Send Text" tool when it needs to send or receive information via SMS.
- Data Capture & Integration: The video shows how to use Vapi's advanced structured data schema to capture information from a conversation and send it to a webhook for integration with a CRM.
This feature is just the beginning of Vapi's push for more versatile and responsive AI agents, with future updates planned to include rich media messaging, conversation history across channels, and support for more telephony providers.