2.2 KiB
Twilio Agentic Service
Intro
Twilio allows software developers to programmatically make and receive phone calls, send and receive text messages, and perform other communication functions using its web service APIs. Agentic provides a simple interface to Twilio's APIs for sending text messages (SMS) and optionally waiting for a reply from the recipient as part of an agentic workflow.
Twilio offers a free trial account with a small balance that you can use to test out the service. However, you will need to upgrade to a paid plan to use this service in production. Among other restrictions, the trial requires to verify any non-Twilio phone number before you can send text messages to it.
Pre-requisites
Ensure the following environment variables are set:
TWILIO_ACCOUNT_SID
: Your Twilio account SIDTWILIO_AUTH_TOKEN
: Your Twilio auth tokenTWILIO_PHONE_NUMBER
: Your Twilio phone number from which the Agentic service will send text messagesTWILIO_DEFAULT_RECIPIENT_PHONE_NUMBER
: The default recipient phone number to use if none is specified in the workflow
Otherwise, these can be passed directly to the TwilioConversationClient
constructor.
How to get your Twilio credentials
-
Open the Twilio console and log in or create an account.
-
In the "Account Info" box, click on the "Copy to clipboard" buttons next to the "Account SID", "Auth Token", and "My Twilio phone number" fields to copy the respective value to your clipboard.