Back to Blog
Developer ResourcesAugust 9, 2026Updated August 10, 20268 min read

How to Text Your Own AI Agent on a Real Phone Number [2026]

Point a real US or Canada number at your own agent with relay mode. AgentCall runs no AI of its own: it signs every inbound text to your webhook and delivers your agent's reply, with no timeout to fight on slow turns. One API call on our side, and one command installs the open-source relay next to your agent.

Short answer: provision a number, set its smsMode to "relay", and point agentWebhook at a URL your agent hosts. From then on every text you send to that number is signed and pushed to your agent, your agent thinks with its own model and its own tools, and it replies whenever it is ready. AgentCall runs no AI on this path at all. It is the phone number, the threading, and the opt-out layer. Your agent is the brain.

The AgentCall side is one API call, and it works on the free tier: 20 outbound texts a month to spend however you like, then $19.99/month for unlimited.

Why Text an AI Agent Instead of Opening the App

Most people already have an agent they talk to daily, whether that is Claude Desktop, a Hermes build, OpenClaw, or something they wrote themselves. The friction is not the model. It is that reaching it means unlocking a laptop, opening an app, and waiting for a session to load.

SMS has none of that. It is on every phone, it works on a bad connection, it survives a dead laptop battery, and the thread is already the interface you use for everything else in your life. Texting "what is critical this week" from a checkout line and getting a real answer back is a different product experience from opening a chat window, even though the model on the other end is identical.

The reason this is not more common is that wiring SMS to an agent normally means becoming a telecom developer first: registering with carriers, handling delivery webhooks, threading messages into conversations, and honoring opt-out keywords correctly. Relay mode exists so you can skip all of that and keep writing agent code.

How Relay Mode Works

A number in relay mode never touches an AgentCall model. The flow is deliberately boring:

  1. You text the number.
  2. AgentCall checks for STOP first, threads the message into a conversation, then HMAC-signs the payload and POSTs it to your agentWebhook.
  3. Your agent does whatever it does. Reads email, queries a database, calls three tools, takes ninety seconds. Nobody is waiting on a connection.
  4. When it has an answer, your agent calls the reply endpoint and the text lands in your thread.

That third step is the part people usually get wrong when they build this themselves. If the reply has to come back inside the HTTP response, you are fighting a webhook timeout, and any agent turn that involves real tool calls will blow through it. Relay is asynchronous by design: the push and the reply are separate requests, so a slow turn is simply a slow turn.

You Do Not Have to Build the Relay Yourself

There is an honest gap in the sentence "point a webhook at your agent." Most agents run on a laptop or a VPS with no public HTTPS endpoint, so that sentence really means: write a public endpoint, host it somewhere always-on, then write the service that drains it, asks your agent, sends the reply, and does not lose a text when it crashes. That is a weekend, not a config change.

Both halves are now open source and MIT licensed, and one command sets up the whole thing:

git clone https://github.com/Kintupercy/agentcall-hermes-bridge.git
cd agentcall-hermes-bridge && npm install && npx wrangler login

./bootstrap.sh --install-consumer \
  --number-id num_abc123 \
  --allow +13145551234

That creates the always-on HTTPS endpoint your agent lacks, generates the signing secrets and installs them on both sides, installs a service next to your agent that restarts forever, puts your number into relay mode, and runs a signed self-test. It refuses to print READY unless that self-test passes. It defaults to a hosted subdomain, so you need no domain and no DNS.

If you run Hermes, you write nothing at all: the official adapter is detected automatically, and it defaults to a restricted tool profile so a text cannot reach your shell, your files, or your agent's permanent memory. For any other agent you write one script that takes the text on stdin and prints the reply on stdout. Exit 0 to reply, exit 64 to deliberately say nothing.

It ships with three levels of proof, which matters because the failure mode here is silence. preflight checks your config, the bridge, your API key, and your agent without sending anything. selftest signs a synthetic text and pushes it through the real loop, covering every hop except the carrier, and it cannot text anyone because the conversation it uses does not exist. verify is the live one: you text the number, and it watches the message land and the reply go out, then tells you how long it took.

Texts are not lost while you are debugging. Each one is claimed rather than deleted, and only acknowledged once your agent's reply has actually been sent, so a crash, a restart, or an agent that errors mid thought means the text comes back a few minutes later instead of vanishing. Source and threat model: github.com/Kintupercy/agentcall-hermes-bridge. There is a skill file in there too, so an agent that already has your AgentCall MCP server connected can run the whole setup from "connect this number to you for two-way SMS."

Decide What Your Agent Is Allowed to Do Over SMS

Before you connect anything, one uncomfortable sentence: a number in relay mode gives a text message the ability to type into your agent. Whatever that agent can do, a text can now attempt. If it can run shell commands, spend money, or read your files, a stranger who guesses the number gets to try, and prompt injection over SMS costs them less than a cent per attempt.

allowedSenders is the first control and you should use it, but be clear about what it is: a caller-ID check, not a password. Numbers get ported, recycled, and SIM-swapped. For an agent that can take irreversible actions, put a narrower agent on the SMS channel, one that reads and summarizes but does not act, and keep the dangerous tools on a channel you actually authenticate. That is a five-minute decision now and an incident later.

Setting It Up

Point the number at your agent. This is the only AgentCall-side configuration step, and it is the same whether you installed the open-source relay above or wrote your own endpoint:

curl -X POST https://api.agentcall.co/v1/numbers/num_abc123/inbound-config \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "smsMode": "relay",
    "agentWebhook": {
      "url": "https://your-agent.com/agentcall/relay",
      "signingSecret": "whsec_your_shared_secret_min16"
    },
    "allowedSenders": ["+13145551234"]
  }'

Every inbound text now arrives at your webhook in this shape:

{
  "message": {
    "id": "msg_01J8XKQ",
    "from": "+13145551234",
    "to": "+14702878599",
    "body": "what's critical this week?",
    "receivedAt": "2026-08-09T14:02:11.000Z"
  },
  "conversation": { "id": "conv_01J8XKR", "contactPhone": "+13145551234" },
  "context": { "channel": "sms", "numberId": "num_abc123", "agentId": "agt_xyz" }
}

Verify the HMAC signature against your signingSecret, return a 200 immediately, and hand the message to your agent. When the agent finishes, reply on the conversation:

curl -X POST https://api.agentcall.co/v1/sms-conversations/conv_01J8XKR/reply \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "body": "3 emails need you today. The lease renewal is the urgent one.",
    "idempotencyKey": "conv_01J8XKR:msg_01J8XKQ"
  }'

Pass an idempotencyKey. Agents crash and retry, and it is the difference between a retried turn being free and it double-texting you at 6am.

If your agent is connected over MCP, it can skip the REST call entirely and use the reply_to_sms_conversation tool instead. See the MCP setup guide for connecting Claude Desktop, Cursor, or Windsurf.

Lock It to Yourself

A personal agent on a public phone number is reachable by wrong numbers, spam, and anyone who guesses. allowedSenders takes a list of up to 20 numbers in E.164 format, and when it is set, texts from anyone else are silently dropped. They are never forwarded to your agent, so they cost you nothing and leak nothing.

Set it on day one. It is one line, and the failure mode without it is a stranger having a conversation with an agent that has access to your email.

One Number, Both Channels

The number you use for relay stays fully callable. You can point the same number at an inbound AI voice receptionist for people who ring it, while texts route to your own agent. Your agent ends up with a single phone identity that behaves correctly whether someone calls or texts, which is what people actually mean when they say an agent should have a phone number.

Callers also get remembered across conversations through cross-call memory, so the voice side is not starting from zero every time either.

Your Agent Can Text First

Relay is not only reactive. Your agent can open a thread whenever it wants with send_sms, or schedule one to fire later or on a recurring cadence. A morning brief at 7am, a nudge when a deploy fails, a Friday summary. When you reply to any of those, the reply relays back to your webhook as a normal inbound message and the conversation continues.

What It Costs

Relay is billed as plain text messages: $0.015 each, with no relay fee and no surcharge, because AgentCall never invokes a model here. What you pay on top is whatever your own model costs, which is between you and your model provider.

The free tier is a real trial, not a demo: 20 outbound texts a month, and you decide how to spend them. Send all 20 to your agent, or split them between your agent and everything else you are testing. Enough to wire it up, text it for a few days, and decide. Pro at $19.99/month lifts the cap.

Relay is not gated behind Pro the way two-way AI SMS is, and the reason is worth stating plainly: on this path AgentCall runs no model. It is a pipe. The only cost is the text itself, so there is nothing to recover by holding it back. Two-way AI SMS, where our model writes the reply, stays on Pro because every reply costs us inference.

Full pricing is on the product page.

Relay Mode vs Two-Way AI SMS

AgentCall has two different SMS behaviors and it is worth being clear about which one you want:

  • Two-way AI SMS (smsMode: "ai") means a stranger texts your number and AgentCall's AI answers on your behalf. This is the one for customer support, appointment questions, and after-hours triage. You write a system prompt and optionally give it tools to call.
  • Relay mode (smsMode: "relay") means you text your own agent and AgentCall runs no AI at all. This is the one for a personal agent, an internal ops bot, or anything where you already have a model and just need a phone number in front of it.

Different numbers on the same account can use different modes, so a customer-facing line and a private agent line can live side by side.

Things That Are Handled For You

STOP, UNSUBSCRIBE, CANCEL, END, and QUIT are processed before any relay logic runs, on every path. An opted-out contact is skipped on every future send, including scheduled ones. You do not implement opt-out yourself and you cannot accidentally text someone who opted out, because the reply endpoint refuses it.

Threading is handled too. Messages are grouped into conversations automatically, so your webhook always receives a conversation ID and you never have to reconstruct who said what from a stream of raw messages.

Getting Started

Provision a number, set the config above, install the relay, and text it. The full setup reference, including the reverse direction where your agent texts customers first and reads their replies, is in SMS for AI Agents. If you want your agent to place and answer calls as well as texts, start with why AI agents need phone numbers, or go straight to connecting over MCP so your agent can configure all of this itself.

Ready to get started?

Give your AI agents their own phone numbers in minutes.

Start Building