OpenClaw

Give your OpenClaw agent a real phone number. Make calls, receive calls, send and read SMS — all through natural language or the AgentPhone API.

OpenClaw supports MCP servers natively. This is the fastest path — one config block and your agent has full phone capabilities.

Add to your OpenClaw MCP configuration:

MCP config
1{
2 "mcpServers": {
3 "agentphone": {
4 "command": "npx",
5 "args": ["-y", "agentphone-mcp"],
6 "env": {
7 "AGENTPHONE_API_KEY": "your_api_key_here"
8 }
9 }
10 }
11}

That’s it. Your OpenClaw agent now has 26 phone tools. Try:

“Buy me a US phone number and create a voice agent that answers calls as my personal assistant.”

“Call +14155551234 and ask if they have availability this Thursday.”

“Show me my recent SMS conversations.”

Get your API key from agentphone.to/settings. No Twilio account, no ngrok, no server needed.

Option 2: Webhook (handle inbound calls with OpenClaw)

If you want OpenClaw to control how inbound calls are handled, point AgentPhone’s webhook at your OpenClaw instance.

1. Expose OpenClaw’s API

Make your OpenClaw API server publicly reachable. If running locally, use a tunnel:

$# ngrok
$ngrok http 3210
$
$# or tailscale funnel
$tailscale funnel 3210

2. Set the webhook

$curl -X POST https://api.agentphone.to/v1/webhooks \
> -H "Authorization: Bearer $AGENTPHONE_API_KEY" \
> -H "Content-Type: application/json" \
> -d '{
> "url": "https://your-openclaw-url.ngrok.app/webhook/agentphone",
> "contextLimit": 10
> }'

3. Handle the webhook in OpenClaw

Create a skill or plugin that receives AgentPhone webhook events:

~/.openclaw/skills/agentphone-inbound.md
1# AgentPhone Inbound Handler
2
3When you receive a POST to /webhook/agentphone, it contains a phone call
4transcript or SMS message. The payload looks like:
5
6- event: "agent.message"
7- data.message: the caller/sender's message
8- data.from: their phone number
9- data.conversationId: thread ID
10- recentHistory: past messages in this conversation
11
12Respond with a JSON body containing your reply:
13{ "response": "your message here" }
14
15Use your knowledge and tools to craft a helpful response.

Webhook payload

Every inbound call transcript or SMS arrives as:

1{
2 "event": "agent.message",
3 "channel": "voice",
4 "data": {
5 "conversationId": "conv_abc123",
6 "from": "+15559876543",
7 "to": "+15551234567",
8 "message": "Hi, I'd like to schedule an appointment"
9 },
10 "recentHistory": [
11 { "role": "agent", "content": "Hello! How can I help?" },
12 { "role": "user", "content": "Hi, I'd like to schedule an appointment" }
13 ]
14}

Option 3: API from OpenClaw tools

Use the AgentPhone API directly from an OpenClaw tool or plugin:

openclaw_agentphone_tool.py
1import httpx
2import os
3
4API_KEY = os.environ["AGENTPHONE_API_KEY"]
5BASE = "https://api.agentphone.to/v1"
6headers = {"Authorization": f"Bearer {API_KEY}"}
7
8# Make an outbound call
9def make_call(agent_id: str, to_number: str, topic: str):
10 return httpx.post(f"{BASE}/calls/conversation", headers=headers, json={
11 "agentId": agent_id,
12 "toNumber": to_number,
13 "topic": topic,
14 }).json()
15
16# Read SMS messages for a number
17def read_messages(number_id: str):
18 return httpx.get(f"{BASE}/numbers/{number_id}/messages", headers=headers).json()

Replacing @openclaw/voice-call

If you’re currently using the @openclaw/voice-call plugin with Twilio, AgentPhone replaces that entire stack:

@openclaw/voice-call + TwilioAgentPhone MCP
SetupInstall plugin, create Twilio account, configure SID/auth/number, set up ngrokOne JSON config block
Inbound callsConfigure webhook URL, ngrok tunnel, allowlistAutomatic with hosted AI
Outbound callsopenclaw voicecall call --to ...”Call +1234567890 and…”
Voice AIBring your own (Deepgram, OpenAI, etc.)Built-in hosted mode
SMSNot includedFull SMS support
CostTwilio fees + Deepgram/OpenAI feesSingle usage-based bill

What you can do

Once connected, your OpenClaw agent can:

  • Buy and manage phone numbers (buy_number, list_numbers)
  • Make AI-powered outbound calls (make_conversation_call)
  • Receive and handle inbound calls (webhook or hosted AI)
  • Read SMS conversations (list_conversations, get_messages)
  • Set up per-agent webhooks for routing
  • Check call transcripts and recordings
  • Monitor usage and billing