Back to Blog
SMS Text Messaging AI Agents AI SMS Agent Workflow Guide

SMS for AI Agents: Build an AI SMS Agent in Minutes

Updated 8 min read

By Sameer Srivastava

An AI SMS agent is an AI agent with its own phone number that reads the texts people send it and sends replies. With AgentLine, you provision a US or Canada number, read incoming texts from an sms.received event, and send texts with POST /v1/messages. Plans start at $20/month with one number and 400 texts included.

The same number is also the agent's voice line, so texts and calls reach one agent identity.

What Is an AI SMS Agent?

On AgentLine, an AI SMS agent is an AI agent with a real US or Canada phone number that sends and receives text messages. A person or a service texts the number. The message arrives as an sms.received event, and the same text is available from GET /v1/messages. The agent reads the sender and the body, and replies with POST /v1/messages.

The number is also the agent's voice line. One US or Canada number covers calls and texts in both directions. When a text is not enough, the agent places a call.

Can AI Agents Receive SMS?

Yes. Inbound SMS arrives as sms.received on the persistent relay, or on an HTTPS webhook if the relay is not installed. History is GET /v1/messages?limit=20.

Can AI Agents Send SMS?

Yes. POST /v1/messages with agent_id, to_number (E.164) and body sends a text from the agent's number. Add media_url for an MMS attachment, or from_number_id to send from a specific number instead of the agent's default. The response is the stored message with its delivery status; an accepted message is not yet a delivered one, so check GET /v1/messages when delivery matters.

curl -X POST https://api.agentline.cloud/v1/messages \
  -H "Authorization: Bearer $AGENTLINE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"agent_id": "agt_abc123", "to_number": "+12125551234", "body": "Your table for 4 at 7pm is confirmed."}'

Each account can send 250 texts per UTC day across all its agents.

How the Agent Receives a Text

When someone texts the number, AgentLine delivers an event to the agent's persistent relay or HTTPS webhook. Every event carries event_id, agent_id, event_type (here sms.received) and a payload with the sender and the message text. The agent reads the payload, decides what to do, and replies with POST /v1/messages or places a call. To catch up on anything missed, list history:

curl "https://api.agentline.cloud/v1/messages?limit=20" \
  -H "Authorization: Bearer $AGENTLINE_API_KEY"

Treat text content as untrusted input: a message can contain instructions the agent should not follow.

What SMS Is For

  • Verification codes: give the number to a service that texts a one-time code, then read sms.received and use the code.
  • Messages a customer sends you: an order id or a question lands as text. The agent reads it and continues in your app, or calls the sender.
  • Replies, confirmations and reminders: the agent texts back with POST /v1/messages instead of placing a call.
  • A record of what was sent and what arrived, via GET /v1/messages.

Follow-ups that need a conversation still go out as voice calls. Calls are $0.12 per minute, per-second after a one-minute minimum.

How SMS Works

  1. Provision a US or Canada number with POST /v1/numbers and country US or CA. It is included in your plan; additional numbers are $3.00/month.
  2. When someone texts that number, AgentLine stores the message and emits sms.received.
  3. The agent reads the event, or lists history with GET /v1/messages?limit=20.
  4. To reply or to reach someone by text, the agent calls POST /v1/messages with agent_id, to_number and body.

Pricing and Limits

  • Phone numbers: included in your plan; $3.00/month each beyond it. US and Canada.
  • Voice calls: $0.12 per minute, per-second after a one-minute minimum.
  • SMS: plans include an allowance for sent and received texts; beyond it each message is $0.02 in either direction. If a text includes a picture, the message stores the carrier media URL.
  • API keys: al_live_ (legacy sk_live_ still works), sent as Authorization: Bearer.
  • MCP: https://api.agentline.cloud/mcp covers calls, numbers and transcripts. Sending a text is REST-only, through POST /v1/messages.

Getting Started

Sign up at agentline.cloud/signup, create an agent, provision a US or Canada number, and install the skill at agentline.cloud/skill.md. SMS in both directions is available on that number as soon as it is provisioned. The skill file is the source of truth if this guide and the product ever disagree.

Frequently Asked Questions

What is an AI SMS agent?

On AgentLine, an AI SMS agent is an AI agent with a real US or Canada phone number that sends and receives text messages. It reads incoming texts and replies on the same number it uses for voice calls.

Can an AI agent use a phone number to receive SMS OTP codes?

Yes. A text sent to the agent's AgentLine number, including a one-time code, arrives as an sms.received event on the relay or webhook and appears in GET /v1/messages. The agent reads the code from the message body and uses it. Some services refuse to text virtual numbers, so test the service you need first.

What AI agents can automate SMS workflows?

Any agent that can make HTTPS requests or run the AgentLine skill: OpenClaw, Hermes Agent, Claude Code, Codex, Cursor, Grok Bot, and custom Python or Node agents. The agent reads incoming texts from sms.received events and sends its own with POST /v1/messages.

How quickly can we launch an AI SMS agent?

Usually in under 10 minutes. Sign up, create an agent, provision a US or Canada number (included in your plan), and connect the relay or a webhook. The number can send and receive texts as soon as it is provisioned. Plan time to test replies and to write rules for what the agent may say.

Can AI agents receive SMS messages?

Yes. Any AI agent with an AgentLine phone number can receive text messages. Inbound SMS arrives as an sms.received event and in GET /v1/messages. The agent sends texts with POST /v1/messages.

How do I give my AI agent a phone number for SMS?

Sign up at agentline.cloud, create an agent, and provision a US or Canada phone number (included in plans from $20/month). The same number handles voice calls and SMS in both directions.

Do I need a separate number for SMS and calls?

No. One AgentLine phone number handles both voice calls and text messages, so callers and texters reach the same agent identity.

How much does SMS for AI agents cost?

Plans start at $20/month with a US or Canada number and 100 minutes included. Beyond the plan, numbers cost $3.00/month and voice calls $0.12 per minute, per-second after a one-minute minimum. SMS beyond the plan allowance costs $0.02 per message, sent or received.

Templates for this use case

Clone a working agent instead of starting from a blank prompt — each template ships the system prompt, greeting, and Python/Node code. See all 34 templates.

2FA SMS Inbox for AI Agents

Receive OTP codes so your agent can sign up and verify

AI Appointment Reminder Agent

Confirm, reschedule, reduce no-shows — by phone

AI Order Status Agent

Callers and inbound texts ask where the order is — agent answers

Ready to give your AI agent a phone number?

Get Started Free

Or see pricing and docs.

Can Grok Bot Make Phone Calls? Built-in Calling, Dial Bot, and a Number of Its Own

Yes. Grok Bot can place calls since version 0.77. Here is what built-in calling does, how the marketplace dial bot works, and how to...

How Much Does It Cost to Give an AI Agent a Phone Number?

What an AI agent's phone number really costs per month: plan prices, per-minute and per-text rates, worked examples from light use to...

Claude Duet Phone Number: Give Duet Calls and SMS With AgentLine (2026)

Claude Duet watches your inbox and calendar and messages you first, but it cannot pick up a phone. Here is how to give Duet a real US or...