Blog / channel guide

Hermes Agent SMS Setup with Twilio

Hermes Agent can answer text messages through Twilio, which turns an ordinary phone number into another interface for the assistant. SMS is the most universal channel you can add, and also the one with the most outside dependencies: a Twilio account, an SMS-capable number, and a publicly reachable webhook so Twilio can deliver incoming messages.

Updated Sep 15, 20268 min read
Deployment route
  1. 01

    Create a Twilio account and buy a number

    Sign up, then buy a phone number that has SMS capability. Number capabilities vary by country, so confirm SMS is listed before purchasing.

  2. 02

    Collect the account credentials

    Copy the account SID, the auth token, and the phone number in international format. Treat the auth token as a password, because it can send and receive on your account.

  3. 03

    Expose a public HTTPS endpoint

    Twilio delivers incoming messages by calling your gateway, so the assistant needs a reachable URL. A tunnel is enough for testing, and a real hostname with TLS is what you want for production.

  4. 04

    Point the number's messaging webhook at the gateway

    Set the number's incoming-message webhook to the gateway's Twilio endpoint using POST, and make sure the public URL you configured matches exactly.

  5. 05

    Restrict who can text the assistant

    Limit the allowed numbers before going live. Without an allowlist, anyone who learns the number can spend your model budget.

  6. 06

    Send two test messages

    Text the number from an allowed phone and confirm a reply, then text from a number that is not on the list and confirm the assistant ignores it.

Four-step path

How do you connect Hermes Agent to SMS?

Five checkpoints: create the Twilio account and number, collect the credentials, expose an HTTPS endpoint, point Twilio at it, then lock the bot down to known numbers.

  1. Step 01

    Create a Twilio account and buy a number

    Sign up, then buy a phone number that has SMS capability. Number capabilities vary by country, so confirm SMS is listed before purchasing.

  2. Step 02

    Collect the account credentials

    Copy the account SID, the auth token, and the phone number in international format. Treat the auth token as a password, because it can send and receive on your account.

  3. Step 03

    Expose a public HTTPS endpoint

    Twilio delivers incoming messages by calling your gateway, so the assistant needs a reachable URL. A tunnel is enough for testing, and a real hostname with TLS is what you want for production.

  4. Step 04

    Point the number's messaging webhook at the gateway

    Set the number's incoming-message webhook to the gateway's Twilio endpoint using POST, and make sure the public URL you configured matches exactly.

  5. Step 05

    Restrict who can text the assistant

    Limit the allowed numbers before going live. Without an allowlist, anyone who learns the number can spend your model budget.

  6. Step 06

    Send two test messages

    Text the number from an allowed phone and confirm a reply, then text from a number that is not on the list and confirm the assistant ignores it.

Why does SMS need a public endpoint?

Because the direction of the traffic is reversed: Twilio pushes incoming messages to your gateway, so something has to be reachable from the internet.

This is the main difference from chat platforms that keep an outbound connection. If you cannot expose an endpoint at all, prefer a channel that keeps the connection outbound and treat SMS as unavailable rather than fighting the constraint.

How do you control who can text the assistant?

Use an explicit allowlist of phone numbers. Restricting access is the single most important configuration step on an SMS deployment, because a phone number is trivially discoverable.

  • Restrict to the numbers that genuinely need access.
  • Review the list when someone changes role or leaves.
  • Treat an unknown sender as untrusted input, not as a customer.
  • Keep a separate number for experiments so production access stays clean.

How do scheduled results reach a phone?

Scheduled work delivers to a configured home number, which is how a daily briefing or an alert reaches someone without them asking for it first.

Set the home number deliberately. A scheduled job that delivers to the wrong place either goes nowhere useful or spams a colleague every morning.

What does an SMS assistant cost?

Two separate bills: Twilio charges per message and for the number, while the model provider charges for the tokens behind each reply.

  • Inbound and outbound messages are billed per segment by the carrier.
  • Long replies are split into multiple segments, which multiplies cost.
  • Carrier fees differ by destination country.
  • The model cost usually dominates once conversations get long.

What breaks SMS delivery?

Usually one of four things: a webhook URL that does not match what Twilio was given, an endpoint that is not reachable, a number without SMS capability, or a sender who is not allowed.

  • A signature check that fails means the configured URL and the Twilio URL differ.
  • A tunnel that restarted has a new URL until you update Twilio.
  • A trial account can only message verified numbers.
  • A silent reply from an unlisted sender is the allowlist working as intended.

Which primary sources support this page?

Product behavior is checked against the current deployment flow. These external links provide the upstream project or channel documentation used for setup details.

Direct answers

Frequently asked questions

Can I use SMS without a public server?

Not with Twilio, because it delivers messages by calling your endpoint. If that is a hard constraint, use a channel that connects outbound instead.

Do I need a toll-free or short code?

Not to get started. A local number with SMS capability is enough for a small team, though high-volume sending to US numbers has extra registration rules.

Can the same Twilio credentials power voice features too?

Yes. The SMS gateway shares its credentials with the optional telephony features, so one Twilio setup can cover both.

How do I stop the assistant answering at night?

Either restrict the allowlist to on-call numbers, or route the number to a person out of hours. The assistant answers whenever a message arrives.

Key takeaways

  • Hermes Agent can answer text messages through Twilio, which turns an ordinary phone number into another interface for the assistant. SMS is the most universal channel you can add, and also the one with the most outside dependencies: a Twilio account, an SMS-capable number, and a publicly reachable webhook so Twilio can deliver incoming messages.
  • Start with one model, one channel, and one controlled test conversation.
  • Use managed hosting when deployment speed matters more than operating the server yourself.

Put Hermes Agent in the channel where the work already happens.