https://retellai.com/?utm_source=discord&utm_medium=seo logo
how can i make and agent send SMS
# ❓・ai-evy-support
k
@AI Evy how can i make and agent send SMS?
a
Thanks for tagging me @krudy. I'll look through relevant sources and get back to you shortly.
### Answer There are several ways to make a Retell AI agent send SMS messages: ## For Voice Agents (Send SMS During Calls) Option 1: SMS Node in Conversation Flow You can add an SMS node to send one-way SMS from the agent's number to the user's number during phone calls [(1) ]() . The SMS will be sent when entering this node, and the agent won't speak while in this node . Option 2: Send SMS Tool You can add the Send SMS tool to your agent, which allows the LLM to decide when to send SMS messages [(2) ]() . The agent will tell the user that the SMS is being sent when invoking this tool . ## For Standalone SMS Agents You can create dedicated SMS/chat agents that conduct fully automated SMS conversations [(3) ]() . To set this up: 1. Open the Retell Agent Builder 2. Select "Create an Agent" and choose Chat Agent 3. Build out your conversation flow just like voice agents 4. Test using Manual Chat or AI Simulated Chat ## Using the API You can also send outbound SMS programmatically:
Copy code
javascript
import Retell from 'retell-sdk';
const client = new Retell({
 apiKey: 'YOUR_RETELL_API_KEY',
}) ;
const chatResponse = await client.chat.createSMSChat({
 from_number: '+12137771234',
 to_number: '+14155551234',
}) ;
console.log(chatResponse.agent_id) ;
[(4) ]() ## Prerequisites SMS functionality only works for phone numbers that have SMS enabled [(1) ]() [(2) ]() . Currently only Retell Twilio numbers can enable SMS . You can use variables like
{{first_name}}
,
{{email}}
,
{{booking_time}}
to personalize messages [(3) ]() .
​ To learn more, see the sources I considered: [[1] SMS Node](https://docs.retellai.com/build/conversation-flow/sms-node) [[2] Send SMS](https://docs.retellai.com/build/single-multi-prompt/send-sms) [[3] Unlock AI Texting, SMS, & Chatbots with Retell AI Agents | Retell AI | Retell AI](https://www.retellai.com/blog/unlock-ai-texting-with-retell-ai-voice-agents) [[4] Create Outbound SMS](https://docs.retellai.com/api-references/create-sms-chat) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.