hermesclaw
Run Hermes Agent and OpenClaw on the same WeChat account
Overview
HermesClaw is an integration bridge that enables Hermes Agent and OpenClaw to operate simultaneously on a single WeChat account. It functions as a central iLink poller that creates two local proxy servers, allowing both gateways to receive messages without the 403 errors typically caused by token conflicts. Users can toggle between agents or receive responses from both simultaneously using commands like /hermes, /openclaw, and /both. The tool is a lightweight Python proxy that forwards raw protocol messages, ensuring native handling of media and voice transcriptions by each respective gateway.
- Enables dual-agent operation on one WeChat iLink account
- Routes messages via /hermes, /openclaw, or /both commands
- Automated installation script patches existing gateway configurations
Full README from GitHub
HermesClaw
Dual-open Hermes Agent and OpenClaw on the same WeChat account. One command to install.
ๅจๅไธไธชๅพฎไฟก่ดฆๅทไธๅๆถๅๅผ Hermes Agent ๅ OpenClawใไธๆกๅฝไปคๅฎ่ฃ ใ
One iLink account. Two AI brains. Switch with /hermes, /openclaw, /both.
ไธไธช iLink ่ดฆๅท๏ผไธคไธช AI ๅคง่ใ/hermesใ/openclawใ/both ไธๅฅ่ฏๅๆขใ
Why HermesClaw
Both Hermes Agent and OpenClaw now support WeChat natively โ but you can't run both on the same account. Each gateway exclusively locks the iLink connection. If you start both, one gets 403 errors and drops messages.
HermesClaw solves this by becoming the sole iLink poller, then running two local proxy servers โ one for each gateway. Each gateway believes it's talking to the real iLink API.
็ฐๅจ Hermes ๅ OpenClaw ้ฝๅ็ๆฏๆๅพฎไฟกไบโโไฝไฝ ไธ่ฝๅจๅไธไธช่ดฆๅทไธๅๅผใ ๆฏไธช Gateway ไผ็ฌๅ iLink ่ฟๆฅใHermesClaw ่งฃๅณ่ฟไธช้ฎ้ข๏ผๅฎไฝไธบๅฏไธ็ iLink ่ฝฎ่ฏข่ ๏ผ่ฟ่กไธคไธชๆฌๅฐไปฃ็๏ผ่ฎฉไธคไธช Gateway ๅ่ฟๅ็ใ
Special Thanks
Special thanks to the Hermes Agent team at Nous Research for recognizing and recommending HermesClaw in the Community section of their official GitHub README.
็นๅซๆ่ฐข Nous Research ็ Hermes Agent ๅข้๏ผๅจๅ
ถ GitHub ๅฎๆน README ็ Community ๅบๆถๅฝๅนถๆจ่ HermesClawใ
Official reference: Hermes Agent README - Community
Before / After
| Without HermesClaw | With HermesClaw | |
|---|---|---|
| Hermes on WeChat | โ Works (native gateway) | โ Works |
| OpenClaw on WeChat | โ Works (clawbot) | โ Works |
| Both on same account | โ Token conflict / 403 | โ
/both mode |
| Voice messages | โ Each handles natively | โ Transcription forwarded |
| Images / video / files | โ Each handles natively | โ Raw iLink msg forwarded |
| Switching agents | โ | /hermes, /openclaw, /both |
Architecture
โโโโโโโโโโโ iLink API โโโโโโโโโโโ
โ ilinkai.weixin.qq.com โ
โโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโ
โ
(sole poller / token owner)
โ
โโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโ
โ HermesClaw v2 โ
โ routes by /hermes /openclaw โ
โ queues raw iLink messages โ
โโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโค
โ โ โ
Proxy A (:19999) Proxy B (:19998) โ
for openclaw-weixin for hermes-gw โ
โ โ โ
โผ โผ โ
โโโโโโโโโโโโ โโโโโโโโโโโโ โ
โ openclaw โ โ hermes โ โ
โ gateway โ โ gateway โ โ
โ polls โ โ polls โ โ
โ proxy A โ โ proxy B โ โ
โโโโโโฌโโโโโโ โโโโโโฌโโโโโโ โ
โ โ โ
sendmessage sendmessage โ
โโโโโโโฌโโโโโโโ โ
โ (proxy forwards to iLink)โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโ
HermesClaw is a thin Python proxy (~500 lines). It does not process media, call agent APIs, or touch agent memory. It just queues and forwards raw iLink protocol messages. Each gateway handles its own media decryption, markdown formatting, and AI interaction natively.
HermesClaw ๅชๆฏไธไธช่ฝป้่ฝฌๅไปฃ็๏ผ~500 ่ก๏ผ๏ผไธๅค็ๅชไฝใไธ่ฐ Agent APIใไธๅจ่ฎฐๅฟใๆฏไธช Gateway ๅ็ๅค็่ชๅทฑ็ๅชไฝ่งฃๅฏๅ AI ไบคไบใ
Prerequisites
Before installing HermesClaw, you need at least one of:
- OpenClaw + clawbot (
openclaw-weixin) โ installed and logged into WeChat - Hermes Agent + WeChat gateway โ installed with
hermes gatewayconfigured
Both installed = full dual-open. One installed = single-agent mode with the option to add the other later.
ๅฎ่ฃ HermesClaw ๅ๏ผ้่ฆ่ณๅฐๅฎ่ฃ ไปฅไธๅ ถไธญไธไธช๏ผOpenClaw ็ clawbot๏ผๆ่ Hermes ็ๅพฎไฟก Gatewayใ
Quick Install
curl -fsSL https://raw.githubusercontent.com/AaronWong1999/hermesclaw/main/install.sh | bash
The installer will:
- Detect which gateways are installed and configured
- Extract the iLink token from gateway account files
- Patch openclaw-weixin
baseUrlโhttp://127.0.0.1:19999(proxy A) - Patch Hermes
WEIXIN_BASE_URLโhttp://127.0.0.1:19998(proxy B) - Install Python deps (
requests,python-dotenv) - Create OpenClaw media symlink (workaround for media path mismatch)
- Set up the
hermesclawsystemd service
After install, restart your gateways and send /whoami in WeChat.
AI-assisted install
Drop this into any AI agent on the target machine:
Run: curl -fsSL https://raw.githubusercontent.com/AaronWong1999/hermesclaw/main/install.sh | bash
Then read README.md and install.sh from the installed HermesClaw directory.
Detect whether Hermes Agent, OpenClaw, their WeChat gateways, python3, pip3,
and systemd are present. At least one gateway must be configured. Extract
the iLink token from the first available gateway account file. Patch
openclaw-weixin baseUrl to http://127.0.0.1:19999 and Hermes WEIXIN_BASE_URL
to http://127.0.0.1:19998. Install dependencies and systemd service.
If Hermes Agent WeChat gateway is detected, the installer will offer to patch
weixin.py to disable newline-based message splitting (recommended). Accept
this patch so long replies are sent as single messages instead of being split
by paragraphs. The fix script is at fix_hermes_splitting.sh.
Restart gateways. Verify /whoami works in WeChat.
Commands
| Command | Action |
|---|---|
/hermes |
Route to Hermes only |
/openclaw |
Route to OpenClaw only |
/both |
Route to Hermes + OpenClaw (reply from both) |
/whoami |
Show current route and status |
| anything else | Forward to the active agent(s) |
Default route is Hermes. In /both mode, replies are prefixed with [Hermes Agent] / [OpenClaw] for attribution.
Project layout
hermesclaw.py # ~500 lines. Dual-proxy router.
install.sh # Smart auto-detecting installer.
fix_hermes_splitting.sh # Patch Hermes weixin.py (optional, recommended).
tests/ # 59 pytest tests (core, proxy, recovery).
README.md
LICENSE
docs/ # Screenshots and media.
Media handling
HermesClaw forwards raw iLink protocol messages to each gateway. This means:
- Text โ forwarded as-is
- Voice โ iLink includes a transcription; HermesClaw forwards the transcription text
- Images / video / files โ the raw iLink message (with CDN URLs and AES keys) is forwarded; each gateway downloads and decrypts natively
HermesClaw does not do AES decryption, CDN downloads, or media re-encoding. That's each gateway's job.
Uninstall
AI-assisted
Stop and disable the hermesclaw systemd service. Restore openclaw-weixin
account .bak files. Remove WEIXIN_BASE_URL override from ~/.hermes/.env
(or restore .bak). Optionally remove ~/hermesclaw directory.
Manual
sudo systemctl stop hermesclaw
sudo systemctl disable hermesclaw
sudo rm -f /etc/systemd/system/hermesclaw.service
sudo systemctl daemon-reload
# Restore openclaw-weixin configs:
find "$HOME" -maxdepth 5 -name "*.json.bak" -path "*/openclaw-weixin/accounts/*" \
-exec sh -c 'for f; do cp "$f" "${f%.bak}"; done' sh {} +
# Restore Hermes .env:
[ -f "$HOME/.hermes/.env.bak" ] && cp "$HOME/.hermes/.env.bak" "$HOME/.hermes/.env"
rm -rf "$HOME/hermesclaw"
Star History
Changelog
v0.2.1 (2026-04-12)
- Fix: Hermes message splitting โ The installer now offers to patch Hermes Agent's
weixin.pyto disable newline-based message splitting during installation (recommended, default Yes). This ensures long replies are sent as single messages instead of being split by paragraphs. Existing users can runbash fix_hermes_splitting.shmanually.
v0.2.0
- Complete rewrite: dual-proxy gateway architecture.
- Removed ~400 lines of AES/CDN media processing.
- 59 pytest tests (core, proxy, recovery).
- Smart 8-case detection installer.
- Fix: Hermes "Response formatting failed" โ Proxy servers now use
ThreadingHTTPServerinstead of single-threadedHTTPServer. - Fix: OpenClaw ENOENT on media files โ Installer now creates symlink for media path mismatch.
- Improved error handling โ
BrokenPipeErrornow caught and logged as DEBUG.
License
MIT โ by @AaronWong1999 ยท X @AaronYonW
Credits
- NousResearch/hermes-agent โ the agent that grows with you.
- openclaw/openclaw โ your own personal AI assistant. The lobster way. ๐ฆ
- The Clawbot / openclaw-weixin maintainers for the iLink WeChat bridge.
HermesClaw is a community bridge. It is not affiliated with NousResearch or OpenClaw.