MonoClaw

SMS Setup

Deploy Mona as an SMS bot using Twilio.

Prerequisites

  • A working MonoClaw installation
  • A Twilio account
  • A Twilio phone number

1. Set up Twilio

  1. Sign up at twilio.com
  2. Buy a phone number (or use a trial number)
  3. Go to Account Info and copy:
    • Account SID
    • Auth Token

2. Configure webhooks

  1. In your Twilio phone number settings, set:
    • A MESSAGE COMES IN → Webhook → https://your-domain.com/webhooks/sms
    • HTTP POST
  2. Ensure your MonoClaw instance is publicly accessible

For local development, use ngrok:

ngrok http 3000

Then use the ngrok URL as your webhook.

3. Configure MonoClaw

monoclaw gateway setup

Choose SMS and enter:

  • Twilio Account SID
  • Twilio Auth Token
  • Twilio phone number

Or manually:

monoclaw config set TWILIO_ACCOUNT_SID "ACxxx"
monoclaw config set TWILIO_AUTH_TOKEN "your-token"
monoclaw config set TWILIO_PHONE_NUMBER "+1234567890"

4. Start the gateway

monoclaw gateway start

Interaction

Text your Twilio number:

What's the weather like today?

Mona replies via SMS.

Configuration

# ~/.monoclaw/config.yaml
gateway:
  sms:
    phone_number: "+1234567890"
    max_message_length: 1600   # Twilio max
    allowlist:
      - "+0987654321"

Costs

  • Twilio charges per SMS sent/received
  • Inbound SMS: ~$0.0075/message
  • Outbound SMS: ~$0.0079/message (US)
  • Rates vary by country

Limitations

  • 160 character segments — Long messages are split into multiple SMS
  • No media — SMS doesn't support images or files
  • No group chats — One-to-one only

Troubleshooting

ProblemFix
"Webhook failed"Ensure your webhook URL is publicly accessible
Messages not arrivingCheck Twilio logs for delivery errors
"Authentication failed"Verify Account SID and Auth Token
Long messages splitThis is expected SMS behavior