Skip to main content

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_group tool.
  • 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

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

Metadata

Release files for hermes-imessage 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for hermes-imessage 0.1.2
File Size Uploaded
hermes_imessage-0.1.2.tar.gz 22.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for hermes-imessage 0.1.2
File Interpreter ABI Platform
hermes_imessage-0.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 41.5 kB

Release files / hermes_imessage-0.1.2.tar.gz

Download URL hermes_imessage-0.1.2.tar.gz
Size 22.0 kB
Tags Source
SHA-256 checksum
How to use checksums
af09d66cc5cc78d0d44d941b3dff7580941a3931e1a9bfa444140a4c4b5115de
BLAKE2b-256 checksum
How to use checksums
38cf08cc0574a2e478d8b5dc8f5d34190eca36307d680519de1e168d08b9f6bf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.14

Release files / hermes_imessage-0.1.2-py3-none-any.whl

Download URL hermes_imessage-0.1.2-py3-none-any.whl
Size 19.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
af6edad04ace6c5fb1ae4820cf8634be32ed30926adbedce309840ff57fe6fc3
BLAKE2b-256 checksum
How to use checksums
9b66c66782dd685081eb8d99bd46ab04c586f087402e7506e9dc71d5b525e1ce
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.14

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 release files

0.1.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page