memcode docs
Agents

SMS

Run your memcode agent from a phone number over SMS via Twilio.

Text your agent from any phone. Memcode receives SMS through a Twilio number, so this channel needs a Twilio account and a public address that reaches your gateway.

Step 1: Get a Twilio number

Create a Twilio account and buy a phone number with SMS capability.

Step 2: Point the number at your gateway

In the Twilio console, open the number's configuration and set its messaging webhook to:

https://<your-gateway-host>/webhook/sms

The gateway serves this path on port 8787; put it behind HTTPS with a tunnel or reverse proxy and use that public address here.

Step 3: Configure

memcode gateway setup

Choose sms and enter your Account SID, auth token, your Twilio number, and the webhook address from Step 2. The address must match what Twilio calls, byte for byte: a trailing slash or a different host makes the gateway reject Twilio's deliveries. When prompted for allowed users, enter the phone numbers that may text the agent.

Step 4: Run

memcode gateway

then text your Twilio number. Each text runs as an agent job and the reply comes back as a text.

What SMS is good for

SMS shines for alerts, approvals, and short tasks: "deploy it", "what broke", "yes, go ahead". Photos texted to the number are understood. Long answers arrive as a few messages, since SMS keeps each one short.

If you are texting from a US business context, note that Twilio requires A2P registration for business texting in the US; without it, messages to US numbers may be filtered.

On this page