# HermesClaw

> A thin Python proxy that enables running both Hermes Agent and OpenClaw simultaneously on the same WeChat account via a dual-proxy gateway architecture.

HermesClaw is an open-source Python proxy (~500 lines) that solves the iLink token conflict preventing Hermes Agent and OpenClaw from running on the same WeChat account. It acts as the sole iLink poller and spins up two local proxy servers — one for each gateway — so both agents can operate concurrently. Recognized by the Nous Research Hermes Agent team in their official GitHub README community section, HermesClaw is a lightweight community bridge with no media processing or agent API calls of its own.

- **Dual-agent routing** — *Send `/hermes`, `/openclaw`, or `/both` in WeChat to switch which AI agent handles your messages in real time.*
- **Single-command install** — *Run one `curl` command; the smart installer auto-detects installed gateways, extracts the iLink token, patches config files, installs Python deps, and sets up a systemd service.*
- **AI-assisted install** — *Drop a text prompt into any AI agent on the target machine to fully automate detection, patching, and service setup.*
- **Raw iLink message forwarding** — *HermesClaw forwards raw protocol messages including text, voice transcriptions, and media CDN payloads; each gateway handles its own decryption and AI interaction natively.*
- **ThreadingHTTPServer proxies** — *Proxy servers use `ThreadingHTTPServer` to prevent "Response formatting failed" errors under concurrent load.*
- **Media symlink fix** — *Installer creates an OpenClaw media symlink to resolve path mismatches between gateways.*
- **Hermes message-splitting patch** — *Optional `fix_hermes_splitting.sh` patches Hermes Agent's `weixin.py` to send long replies as single messages instead of paragraph-split chunks.*
- **59 pytest tests** — *Core, proxy, and recovery test suites ship with the project for reliability validation.*
- **Clean uninstall** — *Supports both AI-assisted and manual uninstall, restoring all patched config files and removing the systemd service.*
- **MIT licensed** — *Free to use, modify, and distribute; not affiliated with NousResearch or OpenClaw.*

## Features
- Dual-proxy gateway architecture for simultaneous Hermes Agent and OpenClaw on one WeChat account
- Single-command curl installer with smart 8-case gateway detection
- AI-assisted install via natural language prompt
- In-chat routing commands: /hermes, /openclaw, /both, /whoami
- Raw iLink protocol message forwarding (text, voice, images, video, files)
- ThreadingHTTPServer proxies to prevent concurrent request failures
- OpenClaw media symlink creation for path mismatch fix
- Optional Hermes weixin.py patch to disable newline-based message splitting
- systemd service setup and management
- 59 pytest tests covering core, proxy, and recovery scenarios
- Clean uninstall with config restoration

## Integrations
Hermes Agent (NousResearch), OpenClaw, openclaw-weixin (clawbot), WeChat (via iLink API), iLink (ilinkai.weixin.qq.com), systemd

## Platforms
CLI, API

## Pricing
Open Source

## Version
v0.1.0

## Links
- Website: https://github.com/AaronWong1999/hermesclaw
- Documentation: https://github.com/AaronWong1999/hermesclaw#readme
- Repository: https://github.com/AaronWong1999/hermesclaw
- EveryDev.ai: https://www.everydev.ai/tools/hermesclaw
