SMS Sending Agent
Overview
The SMS Sending Agent is an out-of-the-box tool within the ai12z Copilot suite that enables your applications to send SMS (Short Message Service) messages to users' mobile phones. By integrating with Twilio—a leading cloud communications platform—the agent simplifies the process of sending SMS notifications, alerts, and messages directly from your applications. With straightforward configuration and minimal setup, you can enhance user engagement and communication without extensive development effort. The agent operates at a minimal cost—a fraction of a penny per use—making it an economical choice for your messaging needs.
Key Features
- Twilio Integration: Seamlessly integrates with Twilio for reliable SMS delivery.
- Multiple Recipients: Send SMS messages to one or more phone numbers in a single operation.
- Customizable Messages: Craft personalized messages to suit your application's needs.
- Easy Configuration: Simple setup process within the ai12z Copilot platform.
- Cost-Effective: Utilize this agent at a minimal cost, making it an affordable option for frequent use.
Purpose
The agent is designed to:
- Enhance Communication: Enable your application to send SMS notifications, alerts, or any text messages to users' mobile phones.
- Simplify Integration: Eliminate the need for complex SMS gateway integrations and handling of SMS protocols.
- Save Time: Automate the process of sending SMS messages, allowing you to focus on core application features.
How It Works
- SMS Configuration: Set up your Twilio account credentials within the ai12z Copilot platform.
- Input Parameters: Provide the recipients' phone numbers and the message content.
- SMS Sending: The agent sends the SMS messages using Twilio's API.
- Status Reporting: Returns a success message upon successful sending or an error message if the sending fails.
SMS Provider Configuration
Using Twilio as the SMS Provider
The SMS Sending Agent exclusively supports Twilio as the SMS provider. To use this agent, you need to have a Twilio account with an active phone number capable of sending SMS messages.
Step-by-Step Instructions
-
Access SMS Settings:
- Navigate to your ai12z Copilot portal.
- Go to Project Settings.
- Select the SMS tab to configure your SMS provider.
-
Fields to Configure:
- SMS Provider: Select Twilio from the dropdown menu.
- From Number: Enter your Twilio phone number from which the SMS messages will be sent. Ensure that this number is SMS-capable and verified in your Twilio account.
- Account SID: Enter your Twilio Account SID, which you can find on your Twilio dashboard under the Account section.
- Auth Token: Enter your Twilio Auth Token, also available in your Twilio dashboard. This token is required to authenticate your API requests.
-
Example Configuration with Twilio:
- SMS Provider: Twilio
- From Number:
+1XXXYYYZZZZ
(Replace with your Twilio phone number) - Account SID:
ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
- Auth Token:
your_auth_token
-
Saving the Settings:
- Click Save to apply your settings.
- Ensure that the From Number, Account SID, and Auth Token are correct to enable successful SMS sending.
-
Testing the SMS Configuration:
- After saving the configuration, it's recommended to send a test SMS to verify that the settings are correct.
- Use a test feature in the portal or trigger an SMS action (e.g., sending a notification) to confirm that SMS messages are being sent correctly.
-
Troubleshooting:
- If SMS messages are not being sent, check the following:
- Verify that the From Number is correct and has been validated by Twilio.
- Double-check the Account SID and Auth Token for any errors.
- Ensure that your Twilio account has sufficient balance or credits to send SMS messages.
- Check for any API restrictions or settings in your Twilio account that could be blocking SMS messages.
- If SMS messages are not being sent, check the following:
Parameters
When invoking the SMS Sending Agent, The LLM can specify the following parameters:
- to_number (array of strings, required): A list of recipient phone numbers in E.164 format (e.g.,
["+12345678901", "+19876543210"]
). - message (string, required): The text message content to be sent via SMS.
Enabling the Agent
To enable the SMS Sending Agent in your ai12z Copilot:
-
Access the Agent Settings:
- Log in to your ai12z Copilot dashboard.
- Navigate to the Agents section.
-
Locate the Agent:
- Find the SMS Sending agent in the list of available agents.
-
Enable the Agent:
- Click on the agent and select Enable to activate it for your projects.
-
Configure SMS Provider:
- Follow the SMS Provider Configuration steps outlined above to set up your Twilio settings.
-
Set Parameters:
- When using the agent, specify the
to_number
andmessage
parameters as needed for your application.
- When using the agent, specify the
Usage Example
LLM Sending an SMS to Multiple Recipients, send this to the SMS agent
{
"function": "send_sms",
"parameters": {
"to_number": ["+12345678901", "+19876543210"],
"message": "Your verification code is 123456."
}
}
In this example, the agent will:
- Send an SMS with the message "Your verification code is 123456." to
+12345678901
and+19876543210
.
Benefits
- Enhanced Communication: Reach users instantly on their mobile devices through SMS notifications and alerts.
- Time Savings: Reduce development time by leveraging a ready-made SMS solution.
- Improved Functionality: Add SMS-based features like two-factor authentication, appointment reminders, or marketing messages without extensive coding.
Cost
Using the SMS Sending Agent is highly cost-effective. Each invocation incurs a minimal charge—a fraction of a penny—making it an affordable option for frequent use. Note that Twilio may also charge fees for sending SMS messages; please refer to Twilio's pricing for details.
Limitations
- Twilio Exclusivity: Currently, the agent only supports Twilio as the SMS provider.
- Compliance: Ensure that your use of this agent complies with relevant laws and regulations regarding SMS messaging, such as obtaining user consent and adhering to anti-spam laws.
- Message Length: Standard SMS messages have a character limit (usually 160 characters). Longer messages may be split into multiple segments, which could incur additional costs.
- Delivery Reliability: While Twilio provides robust SMS delivery, factors like carrier restrictions and recipient device issues can affect message delivery.
Best Practices
- User Consent: Always obtain explicit consent from users before sending them SMS messages.
- Clear Messaging: Keep messages concise and ensure that they convey essential information.
- Opt-Out Mechanism: Provide an option for users to opt out of receiving SMS messages if required by law.
- Monitor Usage: Keep an eye on your Twilio usage and account balance to prevent service interruptions.
Support
If you need assistance or have questions about the agent:
- Documentation: Refer to the ai12z Copilot documentation for more detailed information.
- Contact Us: Reach out to our support team at support@ai12z.com for personalized help.
By enabling the SMS Sending Agent, you can effortlessly integrate SMS communication capabilities into your applications, enhancing user engagement and streamlining interactions—all with minimal effort and cost.