Twilio SMS
Integrate Druid AI Agents with Twilio SMS to enable customers to start and conduct conversations with AI Agents through standard SMS text messaging.
Prerequisites
Before configuring the Twilio SMS channel, ensure the following requirements are met:
- A valid Twilio account (Trial or Paid) with permissions to manage phone numbers and TwiML applications. If you are new to Twilio create a free account now. You can review the features and limitations of a free Twilio account.
-
An active, published AI Agent built within the Druid Portal
Integration procedure
To integrate an AI Agent with Twillio SMS, follow these steps:
Step 1. Configure a Twilio Phone Number
Log into the Twilio Console and obtain or select an SMS-enabled phone number:
- Trial Accounts: Click Get a Twilio phone number on the console dashboard to generate an active phone number automatically.
- Paid Accounts: Navigate to Phone Numbers > Manage > Buy a number. Filter by country, select SMS under capabilities, and choose an available phone number. If you’d like to request a number from your region, you can enter your area code in the Number field. Click the Search button to see what numbers are available, and then click Buy for the number that you like from the results.
A phone number becomes automatically active for the AI Agent to use.
Complete the purchase and close the dialog.
Step 2. Retrieve Twilio Account Details
-
In the Twilio Console dashboard, scroll down to the Account Info section.
-
Copy and securely store the following values as you need them to configure the channel in the Druid Portal:
-
Account SID
-
Auth Token
-
Twilio Phone Number (My Twillio phone number)
Step 3. Activate the Twillio SMS channel in the Druid Portal
- In the Druid Portal go to your AI Agent settings.
- Click the Channels tab, then search for SMS and click on the SMS (by Twillio) card.
- Enter the Phone number, Account SID, and Access Token (Auth Token) retrieved from the Twilio Console.
- Turn on the Enable operational message status endpoint toggle to receive real-time message delivery status callbacks from Twilio. This allows DRUID to log whether outbound messages were successfully delivered, queued, or failed.
- Optionally, customize channel display settings as follows:
- Alias: Enter a clear, business-friendly display name (e.g., Interactive Messaging). This value is stored in[[ChatUser]].ChannelDisplayName, which appears in reporting tools like AI Agent Summary dashboard - Engagement KPIs and can also be referenced in flow business logic.
- Description: Enter a brief description. This is particularly helpful when using an alias, as it helps identify the channel's specific purpose within the Druid Portal.
- Channel Icon: Upload a custom icon to display on the channel card within the Druid Portal.
- Click Publish to activate the channel.
The channel configuration modal appears.
After the channel activates, the following fields are available in Druid:
- [[ChatUser]].ChannelId = “sms”. It identifies the channel.
- [[ChatUser]].Phone – Stores the user’s phone number.
- [[ChatUser]].CalleePhoneNumber – Stores the AI Agent phone number.
- [[ChatUser]].ChannelDisplayName - Stores the Alias which is used in AI Agent Summary Dashboard > Engagement KPIs > Channel chart.
Step 4. Create a TwiML App
- Return to the Twilio Console.
- Navigate to Phone Numbers > Manage > TwiML apps.
- Click Create new TwiML App.
- Enter a friendly app name (for example, DRUID App).
- Under Messaging Configuration, enter the following endpoint in the Request URL field:
- Click Create.
Step 5. Configure the TwiML App on your Twilio Phone Number
- Navigate to Phone Numbers > Manage > Active numbers and select the active phone number.
- Scroll to Messaging Configuration.
- Set Configure with to TwiML app.
- Set TwiML App to the application created in Step 4.
- Click Save configuration.






