HermesClaw
Share one WeChat iLink account across Hermes, OpenClaw, and OpenCode.
What does this agent do, and when should you use it?
HermesClaw is a self-hosted Python routing proxy that lets Hermes Agent, OpenClaw, and optionally OpenCode share one WeChat iLink account. It acts as the sole iLink poller and token owner, avoiding the token conflict and 403 failures described when native gateways connect to the same account concurrently. The service exposes two local proxy endpoints for the OpenClaw and Hermes gateways, while an ACP subprocess bridge connects OpenCode. WeChat commands such as /hermes, /openclaw, /opencode, /both, and /three select where messages go; multi-agent replies are labeled by source. It does not decrypt media, call the agents' APIs, or manage their memory: it forwards raw iLink protocol messages so each gateway retains its native media and conversation handling. The installer configures a background service through systemd on Linux or launchd on macOS.
hermesclaw.py polls the iLink API and queues raw iLink messages to local proxies connected by the Hermes and OpenClaw gateways. The installer changes openclaw-weixin baseUrl to http://127.0.0.1:19999 and Hermes WEIXIN_BASE_URL to http://127.0.0.1:19998; the proxies forward gateway sendmessage requests back to iLink. For OpenCode, OpenCodeBridge and ACPSession create per-user sessions through an opencode acp subprocess using JSON-RPC 2.0 over NDJSON, then return text with send_text_ilink. Text is forwarded unchanged; voice uses the transcription included by iLink; images, video, and files are passed as raw messages containing CDN URLs and AES keys for each gateway to download and decrypt. /whoami reports the active route and status.
- A person who already runs the Hermes Agent WeChat gateway and wants to add OpenClaw without using another WeChat account.
- An OpenClaw clawbot user who wants to send the same WeChat message to Hermes as well, using /both for two attributed replies.
- A developer with the OpenCode CLI installed locally who wants to start OpenCode ACP coding sessions from WeChat text or voice messages.
- A user who needs to switch among Hermes, OpenClaw, and OpenCode per conversation, or broadcast one message to all three with /three.
- A WeChat bot operator handling images, videos, files, or voice who wants existing gateways to keep their native media download and decryption behavior.
What are this agent's strengths and limitations?
- Uses HermesClaw as the only iLink poller, directly addressing the same-account connection conflict between native Hermes and OpenClaw gateways.
- Keeps native gateway media behavior because it forwards raw iLink messages instead of performing CDN downloads or AES decryption itself.
- Provides parallel /both and /three routing, with Hermes Agent, OpenClaw, or OpenCode labels on multi-target replies.
- Connects OpenCode through its native ACP subprocess protocol without another proxy port, with per-user sessions and subprocess recovery handling.
- The installer detects configured gateways and supports systemd on Linux and launchd on macOS.
- Its core operation depends on the WeChat iLink ecosystem and on a configured Hermes gateway or OpenClaw clawbot; it is not a standalone chat agent.
- Deployment changes openclaw-weixin baseUrl and Hermes WEIXIN_BASE_URL, so uninstalling or migrating requires restoring backed-up configuration.
- OpenCode routing is optional but requires a separate opencode-ai installation, OPENCODE_CMD configuration, and a local ACP subprocess.
- Installation and background operation depend on shell access, Python, network access, local account files, and host facilities such as systemd or launchd.
- The README presents iLink account acquisition and initial upstream gateway setup as prerequisites rather than providing a complete new-account setup procedure.
How do you install or deploy this agent?
Prerequisites: a configured, logged-in Hermes Agent WeChat gateway or OpenClaw with clawbot (at least one), plus Python 3, network access, and an available iLink account configuration. Run:
curl -fsSL https://raw.githubusercontent.com/AaronWong1999/hermesclaw/main/install.sh | bash
For unattended installation, run:
curl -fsSL https://raw.githubusercontent.com/AaronWong1999/hermesclaw/main/install.sh | HERMESCLAW_YES=1 bash
or: bash install.sh -y. The installer detects gateways, extracts an iLink token from an available account file, writes proxy addresses, installs Python dependencies, and sets up systemd on Linux or launchd on macOS. To enable OpenCode, first run npm install -g opencode-ai and set OPENCODE_CMD in .env; the README states that OPENCODE_MODEL defaults to opencode/minimax-m2.5-free. Restart the gateways after installation.
How do you use this agent?
In WeChat, send /whoami first to confirm the service and active route. Send /hermes, /openclaw, or /opencode to select one target; send /both for Hermes and OpenClaw, or /three for all three. Ordinary messages are then delivered to the active target or targets, and voice is forwarded using iLink's transcription text. If OpenCode is not installed, /opencode and /three display an installation hint rather than establishing a working OpenCode session.
How does this agent compare with similar options?
Compared with running the native Hermes and OpenClaw WeChat gateways independently, HermesClaw centralizes the iLink connection and dispatches messages through two local proxies, enabling /both on one account. Compared with OpenCode without this bridge, which the README says has no WeChat support, it adds /opencode and /three through an opencode acp subprocess; it does not replace any of the three upstream projects.