Running OpenClaw + Hermes in parallel
You have OpenClaw and Hermes Agent installed. Both can connect to the same messengers β and if you're not careful, they share the same Telegram bot, respond in an uncoordinated fashion, or compete for ports, workspaces and long-polling slots. This guide shows you how to run both agents in a clearly separated way, so you always know which one you're chatting with.
1. Why it collidesβ
Telegram β only one long-poller per botβ
Telegram's Bot API allows only one active getUpdates consumer per bot token. As soon as OpenClaw and Hermes use the same token, one of two things happens:
- HTTP 409 Conflict β one of them stops receiving updates entirely
- Race condition β updates get "snatched" alternately, replies come randomly from one or the other
Even if you've created two different bots, you'll quickly get confused in a group containing both, because they have similar response styles.
Gateway portsβ
- OpenClaw gateway: defaults to
127.0.0.1:18789 - Hermes gateway: its own process (
gateway.pidin~/.hermes/)
Both can run in parallel β but if you also configure Hermes on 18789, it will collide.
Daemonsβ
On Linux, both tools install systemd units. An unintended restart can affect the other service if toolsets/skills operate on the same workspace.
2. Target state β the golden rulesβ
| Rule | OpenClaw | Hermes |
|---|---|---|
| Dedicated Telegram bot | @JayDee_Claw_bot | @JayDee_Hermes_bot |
| Unique bot name in Telegram | "Claw β Coding" | "Hermes β Personal" |
| Unique identity emoji | π¦ | πͺ½ |
| Reply prefix | π¦ Claw: | πͺ½ Hermes: |
| Gateway port | 18789 | 18790 (pick freely) |
| Workspace | ~/.openclaw/workspace | ~/.hermes/ |
| Domain of work | Coding, repo operations | Personal, memory, voice |
If both do "everything", both will learn from contradictory skills/memory snippets. A clear domain split makes Hermes's learning more valuable and reduces OpenClaw's tool surface (less prompt-injection risk).
3. Step by step β clean setupβ
Step 1 β Back up your current configurationsβ
cp ~/.openclaw/openclaw.json ~/.openclaw/openclaw.json.before-split
cp ~/.hermes/config.yaml ~/.hermes/config.yaml.before-split
cp ~/.hermes/.env ~/.hermes/.env.before-split
Step 2 β Stop both gatewaysβ
openclaw gateway stop
# Hermes:
hermes gateway stop || pkill -F ~/.hermes/gateway.pid
Step 3 β Create two separate Telegram botsβ
In Telegram, go to @BotFather:
/newbot
β Name: JayDee Claw (Coding)
β Username: JayDee_Claw_bot
β Token kopieren β TOKEN_CLAW
/newbot
β Name: JayDee Hermes (Personal)
β Username: JayDee_Hermes_bot
β Token kopieren β TOKEN_HERMES
Then, for each bot in BotFather:
/setdescription β kurz beschreiben (βCoding-Agent" / βPersonal-Agent")
/setuserpic β unterschiedliche Avatare!
/setcommands β unterschiedliche Slash-Commands
If you've been using the same token for both up to now, revoke it now in BotFather (/revoke) and reassign it to only one agent. The other gets a fresh token.
Step 4 β Configure OpenClawβ
openclaw config edit
{
"channels": {
"telegram": {
"enabled": true,
"botToken": "<TOKEN_CLAW>",
"dmPolicy": "pairing",
"groupPolicy": "allowlist",
"groups": { "*": { "requireMention": true } }
}
},
"gateway": {
"port": 18789,
"bind": "loopback"
}
}
Set the identity (included with every reply):
$EDITOR ~/.openclaw/identity/IDENTITY.md
# Identity
- Name: Claw
- Emoji: π¦
- DomΓ€ne: Coding, Repo-Operationen, Shell, Browser-Automation
- Antwort-Stil: prΓ€zise, knapp, immer mit PrΓ€fix `π¦ Claw:` beginnen.
- Wenn nach βbist du Hermes?" gefragt: klarstellen, dass du Claw (OpenClaw) bist.
Step 5 β Configure Hermesβ
~/.hermes/.env:
TELEGRAM_BOT_TOKEN=<TOKEN_HERMES>
ANTHROPIC_API_KEY=<dein-key>
HERMES_GATEWAY_TOKEN=<eigener-token>
~/.hermes/config.yaml β Telegram-specific channel prompt:
telegram:
channel_prompts:
default: |
Du bist Hermes (πͺ½). Beginne JEDE Antwort mit `πͺ½ Hermes:`.
DomΓ€ne: persΓΆnliche Assistenz, Memory, Voice, Skills, Cron.
Wenn nach βbist du Claw/OpenClaw?" gefragt: klarstellen, dass du Hermes bist.
Extend ~/.hermes/SOUL.md:
Du bist **Hermes**, der persΓΆnliche Agent von JayDee.
- Emoji: πͺ½
- Klare Trennung von Claw (π¦ OpenClaw): Claw macht Coding, du machst Personal.
- Beginne jede externe Antwort mit `πͺ½ Hermes:` β auch in Voice-Transkripten.
If you want the Hermes gateway on a different port (to avoid port collisions):
# ~/.hermes/config.yaml
gateway:
port: 18790
Step 6 β Restart both gatewaysβ
openclaw gateway start
hermes gateway start
Check the status:
openclaw gateway status
hermes gateway status
Step 7 β Verificationβ
In Telegram:
- Message
@JayDee_Claw_bot: "Who are you?" β reply starts withπ¦ Claw: - Message
@JayDee_Hermes_bot: "Who are you?" β reply starts withπͺ½ Hermes: - Add both bots to one test group β mention each one explicitly with
@β¦and verify that only the mentioned one responds.
4. Reinforce the visual separationβ
| Measure | Effect |
|---|---|
| Different bot avatars in BotFather | instant recognition in the chat header |
Emoji prefix in every reply (π¦/πͺ½) | recognisable in notifications |
| Pinned message per bot with domain description | onboarding for yourself |
| Telegram folders β Claw and Hermes in their own folders | separation inside the Telegram app |
Different slash command sets (/setcommands) | autocomplete makes it clear who can do what |
Example /setcommands for Claw:
build - Repo bauen
test - Tests ausfΓΌhren
deploy - Deployment auslΓΆsen
For Hermes:
remind - Erinnerung anlegen
note - Notiz speichern
voice - Voice-Mode aktivieren
5. Domain separation via tools/toolsetsβ
OpenClaw: coding profile, restrictive for Telegramβ
{
"tools": { "profile": "coding" },
"agents": {
"telegram-default": {
"tools": {
"deny": ["camera.snap", "screen.record", "sms.send", "calendar.add"]
}
}
}
}
You're already using tools.profile: coding β fitting for Claw.
Hermes: personal toolsets only on Telegramβ
# ~/.hermes/config.yaml
platform_toolsets:
cli: [hermes-cli, skills, code_execution]
telegram: [hermes-telegram, memory, session_search, cronjob, tts]
That way, on Telegram, Hermes has no repo/code-execution tools β Claw's domain won't be inadvertently taken over.
6. Cleanly separating memory & skillsβ
| Path | Belongs to | Contents |
|---|---|---|
~/.openclaw/workspace/ | Claw | AGENTS.md, SOUL.md, IDENTITY.md, coding notes |
~/.openclaw/workspace/skills/ | Claw | coding skills only |
~/.hermes/memories/MEMORY.md | Hermes | personal facts |
~/.hermes/memories/USER.md | Hermes | your profile |
~/.hermes/skills/ | Hermes | personal skills |
Don't be tempted to symlink skills/ between the two β the formats are similar but not identical (Hermes uses progressive disclosure with reference files, OpenClaw doesn't). On conflict, copy a skill and adapt it manually.
7. Conflict avoidance β checklistβ
[ ] Zwei separate Telegram-Bots mit eindeutigen Usernames
[ ] Avatare und Beschreibungen unterschiedlich
[ ] OpenClaw-Gateway-Port β Hermes-Gateway-Port
[ ] IDENTITY.md (Claw) und SOUL.md (Hermes) gesetzt
[ ] Antwort-PrΓ€fix mit Emoji konfiguriert
[ ] platform_toolsets in Hermes setzt Telegram-Werkzeuge ein
[ ] tools.profile / tools.deny in OpenClaw begrenzt Channel-Rechte
[ ] Pairing-/Allowlist auf beiden Seiten aktiv (kein Wildcard)
[ ] Beide Bots in Test-Gruppe verifiziert (mention-only)
[ ] Secrets rotiert, falls je geteilt
8. Diagnostics when something does collideβ
"Telegram isn't responding / 409 Conflict"β
Most likely both are still using the same token, or an old process is stuck:
# alle laufenden Polling-Prozesse finden
ps -ef | grep -E "openclaw|hermes" | grep -v grep
# zombie-Polling killen
pkill -F ~/.openclaw/gateway.pid 2>/dev/null
pkill -F ~/.hermes/gateway.pid 2>/dev/null
# sauberer Neustart
openclaw gateway start
hermes gateway start
"The reply comes from the wrong agent"β
- Open BotFather to check which username owns the token:
/mybotsβ show token - Cross-check with the correct tool (
grep botToken ~/.openclaw/openclaw.json,grep TELEGRAM_BOT_TOKEN ~/.hermes/.env)
"Both bots reply in a group at the same time"β
requireMention: true(OpenClaw) is set β β- Hermes counterpart:
discord.require_mention: trueexists; for Telegram there's analogous behaviour via channel prompts and pairing. Set this explicitly in the Hermes config:
telegram:
channel_prompts:
"*": |
Antworte in Gruppen NUR, wenn du explizit per @-Mention adressiert wurdest.
"Which daemon is currently running?"β
systemctl --user status openclaw-gateway 2>/dev/null
systemctl --user status hermes-gateway 2>/dev/null
ss -ltnp | grep -E "1878[0-9]" # Ports
9. Operations β daily hygieneβ
- View logs together:
tail -F ~/.openclaw/logs/*.log ~/.hermes/logs/*.log - Keep backups separate β two private repos:
openclaw-workspaceandhermes-workspace. Don't mix them. - Run updates separately:
npm i -g openclaw@latest
curl -fsSL https://raw.githubusercontent.com/NousResearch/hermes-agent/main/scripts/install.sh | bash - Secret hygiene: never share the Telegram token in Slack/issues/pastebins. If in doubt:
@BotFatherβ/revoke.
10. Advanced strategiesβ
Variant A β Deliberate division of dutiesβ
| Channel | Responsible |
|---|---|
| Telegram DM with the Claw bot | Coding, repo, deployments |
| Telegram DM with the Hermes bot | Reminders, cron, memory, voice |
| Discord server | Hermes only (hobby/personal) |
| iMessage/Signal | Hermes only (private) |
| Slack (work) | Claw only (repo bots, CI) |
Variant B β Router bot in frontβ
If you really want one Telegram bot:
- Create a third bot (
@JayDee_Router_bot) - Build a small piece of webhook logic (e.g. a Cloudflare Worker) that routes messages based on a prefix (
/c β¦β Claw,/h β¦β Hermes) to the corresponding internal bot - Claw and Hermes use their own bots, reachable only internally
More effort, but one point of contact in Telegram.
Variant C β Only one active, depending on contextβ
# Morgens / Coding-Tag
hermes gateway stop && openclaw gateway start
# Abends / Personal
openclaw gateway stop && hermes gateway start
A simple ~/bin/agent-mode coding|personal script flips between them. Saves RAM, structurally eliminates the conflict.
11. Further readingβ
- OpenClaw guide: openclaw
- Hermes guide: hermes
- OpenClaw multi-agent routing: docs.openclaw.ai/concepts/multi-agent
- Hermes messaging platforms: hermes-agent.nousresearch.com/docs/user-guide/messaging
- Telegram BotFather: t.me/BotFather
Two agents on one machine isn't a problem β two agents on one bot is. Separate the channel, not just the config.