iMessage, RCS & SMS for Hermes Agent — no Mac required (powered by Claw Messenger)
Project description
hermes-imessage
iMessage, RCS, and SMS for Hermes Agent. No Mac required, no SIM required. Powered by the Claw Messenger relay.
Your Hermes agent can:
- Receive iMessages / RCS / SMS sent to your Claw Messenger number.
- Reply back as your number.
- Send to one-on-one chats (DMs) and existing group chats.
- Create new group chats by calling the
claw_messenger_create_grouptool. - Receive image / video / audio / document attachments — they land as cached local files the agent's vision tools can read.
Quick start
# 1. Install
pip install hermes-imessage
# 2. Enable the plugin in ~/.hermes/config.yaml
# NOTE: `hermes plugins enable` cannot currently see entry-point plugins
# (Hermes UX bug). Add the line manually under a top-level `plugins:` key,
# or run the one-liner below.
python -c "
from pathlib import Path
p = Path.home() / '.hermes' / 'config.yaml'
text = p.read_text() if p.exists() else ''
if 'imessage' not in text:
p.write_text(text.rstrip() + '\n\nplugins:\n enabled:\n - imessage\n')
"
# 3. Enable the agent toolset so the create-group tool is reachable
hermes tools enable hermes-claw-messenger
# 4. Configure the API key (from https://clawmessenger.com/dashboard)
echo 'CLAW_MESSENGER_API_KEY=cm_live_…' >> ~/.hermes/.env
# 5. Start the gateway
hermes gateway start
Then register one or more phone numbers on the Claw Messenger dashboard so inbound messages reach your tenant.
Configuration
All settings can be supplied via environment variables (preferred) or ~/.hermes/config.yaml.
| Env var | Default | Purpose |
|---|---|---|
CLAW_MESSENGER_API_KEY |
— | Required. From clawmessenger.com/dashboard. |
CLAW_MESSENGER_SERVER_URL |
wss://claw-messenger.onrender.com |
WebSocket URL of the relay. |
CLAW_MESSENGER_PREFERRED_SERVICE |
iMessage |
iMessage / RCS / SMS. |
CLAW_MESSENGER_ALLOWED_USERS |
— | Comma-separated allowlist (E.164 phones or group chatIds). |
CLAW_MESSENGER_ALLOW_ALL_USERS |
false |
If true, any sender can talk to the bot. |
CLAW_MESSENGER_HOME_CHANNEL |
— | Default phone or chatId for cron jobs with deliver=claw_messenger. |
YAML equivalent:
gateway:
platforms:
claw_messenger:
enabled: true
extra:
api_key: cm_live_… # also accepts CLAW_MESSENGER_API_KEY env
preferred_service: iMessage
home_channel: "+15551234567"
plugins:
enabled:
- imessage
How it works
iPhone / Android → Linq → Claw Messenger server → WebSocket → Hermes
│
▼
Hermes agent
│
▼
Reply via WS
│
▼
iPhone / Android receives
The plugin holds one persistent WebSocket connection per gateway run, with automatic reconnection, 30-second app-level ping/pong, and resync of missed messages after a disconnect.
Agent tools
| Tool | Use |
|---|---|
claw_messenger_create_group |
Create a new iMessage/RCS/SMS group with two or more E.164 phones and send the first message. Returns the chat_id to use for follow-up sends. |
Outbound DMs and replies to existing groups don't need a tool — Hermes routes them through the standard messaging flow.
Cron delivery (out-of-process)
cron:
jobs:
- name: morning-summary
schedule: "0 9 * * 1-5"
prompt: "Send me the day's calendar"
deliver: claw_messenger # → CLAW_MESSENGER_HOME_CHANNEL
When hermes cron run executes in a separate process from hermes gateway, the plugin's standalone_sender_fn opens a one-shot WebSocket connection, delivers the message, and closes. No gateway dependency.
Development
git clone https://github.com/emotion-machine-org/hermes-imessage.git
cd hermes-imessage
pip install -e ".[dev]"
pytest tests/ # 41 unit tests, ~7s
Live smoke test against the production relay (needs a real API key):
CLAW_MESSENGER_API_KEY=cm_live_… python -c "
import asyncio
from gateway.config import PlatformConfig
from hermes_claw_messenger.standalone import standalone_send
asyncio.run(standalone_send(PlatformConfig(enabled=True, extra={}),
'+15551234567', 'live test'))
"
Naming note
The PyPI package is hermes-imessage for discoverability. The internal Python module
is hermes_claw_messenger (matching the underlying Claw Messenger relay's brand) and
the Hermes platform identifier is claw_messenger. Both can appear in logs and config —
they are the same plugin.
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file hermes_imessage-0.1.1.tar.gz.
File metadata
- Download URL: hermes_imessage-0.1.1.tar.gz
- Upload date:
- Size: 22.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5b2702d924e9b6e92449be7edfc331afa1b3bc039110e3211b83ec1a40f2dad3
|
|
| MD5 |
2df0ddd19437f5fdd5e30601f4775f27
|
|
| BLAKE2b-256 |
d8501d32841a5864141b154ddff97ad9a6651b02bc34573652015d83b11e9d22
|
File details
Details for the file hermes_imessage-0.1.1-py3-none-any.whl.
File metadata
- Download URL: hermes_imessage-0.1.1-py3-none-any.whl
- Upload date:
- Size: 19.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8f4e46588bedf77cc7e06c12ad08d2c1f29d5f5ec551ed4d40ec13e691994628
|
|
| MD5 |
ad08cc8d8d886d28e8adbeb4510ba2ef
|
|
| BLAKE2b-256 |
058f5620277465da875290ada1ca2bb5c91f989595ff240512994d853b56e2b9
|