Hermes Agent

Give your Hermes Agent a real phone number. Make calls, receive calls, and send SMS — no Twilio, no ngrok, no extra server.

Hermes supports MCP servers for tool connectivity. Add AgentPhone and your agent gets 26 phone tools instantly.

Add to your Hermes config.yaml:

config.yaml
1mcp:
2 servers:
3 agentphone:
4 command: npx
5 args: ["-y", "agentphone-mcp"]
6 env:
7 AGENTPHONE_API_KEY: your_api_key_here

Restart Hermes. Now try:

“Buy me a phone number and create a voice agent. Then call +14155551234 and schedule a dentist appointment for Thursday.”

“Check my recent calls and summarize any voicemails.”

“Set up a webhook so I get notified when someone texts my agent’s number.”

Get your API key from agentphone.to/settings. No Twilio account needed.

Option 2: Webhook (handle inbound calls with Hermes)

Route inbound calls and SMS to your Hermes agent’s API server so it controls every response.

1. Expose Hermes API

Hermes includes an OpenAI-compatible API server. Make it publicly reachable:

$# If running locally, use a tunnel
$ngrok http 8080

2. Create a webhook handler

Add a route in your Hermes plugin that receives AgentPhone events:

plugins/agentphone_webhook.py
1from flask import Flask, request, jsonify
2import httpx
3
4app = Flask(__name__)
5
6HERMES_API = "http://localhost:8080/v1/chat/completions"
7
8@app.route("/webhook/agentphone", methods=["POST"])
9def handle_webhook():
10 payload = request.json
11 caller_message = payload["data"]["message"]
12 history = payload.get("recentHistory", [])
13
14 # Convert to Hermes chat format
15 messages = [{"role": h["role"], "content": h["content"]} for h in history]
16
17 # Get Hermes response
18 resp = httpx.post(HERMES_API, json={
19 "model": "hermes",
20 "messages": messages,
21 })
22 reply = resp.json()["choices"][0]["message"]["content"]
23
24 return jsonify({"response": reply})

3. 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-hermes-url.ngrok.app/webhook/agentphone",
> "contextLimit": 10
> }'

Now when someone calls your AgentPhone number, the transcript goes to Hermes, and Hermes’s response is spoken back to the caller.

Option 3: Hermes plugin (API client)

Create a Hermes plugin that wraps the AgentPhone API:

~/.hermes/plugins/agentphone/tools.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
8def make_call(agent_id: str, to_number: str, topic: str) -> dict:
9 """Place an AI phone call that holds a conversation about the given topic."""
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
16def list_calls(limit: int = 20) -> dict:
17 """List recent phone calls with transcripts."""
18 return httpx.get(f"{BASE}/calls", headers=headers, params={"limit": limit}).json()
19
20def buy_number(country: str = "US", area_code: str = None) -> dict:
21 """Buy a new phone number."""
22 body = {"country": country}
23 if area_code:
24 body["areaCode"] = area_code
25 return httpx.post(f"{BASE}/numbers", headers=headers, json=body).json()

Register these as tools in your plugin manifest and Hermes can use them autonomously.

Hermes voice channels vs AgentPhone

Hermes has built-in voice support across messaging platforms (Telegram voice memos, Discord voice, etc.). AgentPhone adds real phone calls — actual phone numbers that work on the telephone network:

Hermes voice channelsAgentPhone
MediumMessaging platforms (Telegram, Discord, etc.)Real phone numbers (PSTN)
InboundVoice memos transcribed per-platformAnyone calls your number, AI picks up
OutboundTTS replies in chatAI dials a real phone number and talks
SMSNot availableFull SMS send/receive
Phone numberN/ABuy numbers via API
Use caseChat-based voice interactionBusiness calls, personal assistant, support

They’re complementary — Hermes handles messaging platforms, AgentPhone handles the phone network.

What you can do

Once connected, your Hermes agent can:

  • Buy and manage phone numbers
  • Make AI-powered outbound calls to any phone number
  • Receive inbound calls with automatic AI handling
  • Read and manage SMS conversations
  • Route different agents to different backends with per-agent webhooks
  • Access call transcripts and recordings
  • Monitor usage and billing