Skip to main content

Twilio_sms

Send SMS via Twilio from an agent. Provide Twilio credentials and the message payload.

Required fields

  • to (recipient phone number, E.164 format)
  • from_ (Twilio phone number)
  • body (message text)
  • TWILIO_SID and TWILIO_AUTH_TOKEN (in tool config or environment)

Example payload

{ "to": "+1234567890", "from_": "+1098765432", "body": "Alert: stock moved" }

Notes

  • The tool uses the Twilio Python SDK to send messages. Errors from Twilio are returned as exceptions.

YAML usage

Assign Twilio SMS to an agent and include credential placeholders in config:

tools:
tool_assigned:
- name: Twilio_sms
config:
TWILIO_SID: ${TWILIO_SID}
TWILIO_AUTH_TOKEN: ${TWILIO_AUTH_TOKEN}
to: +91xxxxxxxxxxx
from_: +91xxxxxxxxxx

Invocation payload example:

payload:
to: +1234567890
from_: +1098765432
body: Alert: stock moved

More details

Provide live Twilio credentials via environment variables or a secure secrets manager. The tool returns the Twilio message SID on success.