Skip to main content

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_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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

hermes_imessage-0.1.2.tar.gz (22.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

hermes_imessage-0.1.2-py3-none-any.whl (19.5 kB view details)

Uploaded Python 3

File details

Details for the file hermes_imessage-0.1.2.tar.gz.

File metadata

  • Download URL: hermes_imessage-0.1.2.tar.gz
  • Upload date:
  • Size: 22.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.14

File hashes

Hashes for hermes_imessage-0.1.2.tar.gz
Algorithm Hash digest
SHA256 af09d66cc5cc78d0d44d941b3dff7580941a3931e1a9bfa444140a4c4b5115de
MD5 0b37f15fc8b3df418824e93a9fff4ea0
BLAKE2b-256 38cf08cc0574a2e478d8b5dc8f5d34190eca36307d680519de1e168d08b9f6bf

See more details on using hashes here.

File details

Details for the file hermes_imessage-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for hermes_imessage-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 af6edad04ace6c5fb1ae4820cf8634be32ed30926adbedce309840ff57fe6fc3
MD5 24e20a87234fcc112cb1c697fae2dad4
BLAKE2b-256 9b66c66782dd685081eb8d99bd46ab04c586f087402e7506e9dc71d5b525e1ce

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page