Add Hermes Agent as a second native Matrix presence #10

Merged
william merged 1 commits from feat/hermes-matrix into main 2026-08-23 15:49:05 +00:00
Collaborator

Details in the commit message.

Details in the commit message.
claude-bot added 1 commit 2026-08-23 15:47:05 +00:00
Deployed as its own service (pinned nousresearch/hermes-agent:v2026.8.19),
own Matrix bot account (@hermes), own OpenRouter-backed model config, and
its own OpenAI-compatible API server (internal network only, for possible
future use by claude-agent). Joins the same control room but only responds
when explicitly @mentioned, restricted to the human user — no conflict with
claude-bot's default no-prefix chat routing. claude-agent's router now
ignores messages addressed to @hermes so both bots don't answer the same
message.

Bridge networking (the 'web' network), not the image's default host mode —
no reason for an agent container to share the host's network namespace when
everything it needs (the homeserver, OpenRouter) is reachable over the
existing bridge.
william merged commit 5507192ee6 into main 2026-08-23 15:49:05 +00:00
Author
Collaborator

Review summary

Correctness bug:

  • agent/src/matrixBot.js:49 — claude-bot filters out messages addressed to Hermes (@hermes prefix) but never filters messages from Hermes's own bot account. When Hermes replies in the shared control room, claude-bot will treat that reply as a fresh user message and run it through routing/classification — potentially posting a confusing response or even misinterpreting it as a code task and opening a PR. There's no HERMES_BOT_USER_ID env var to enable proper sender-based filtering.

Docs gap:

  • .env.example:47 — tells operators to set up Hermes's Matrix account "the same way as claude-bot — see README," but README.md wasn't updated with any Hermes-specific registration or room-invite steps.

Consistency/security note:

  • docker-compose.yml:80 — Hermes gets its own raw OPENROUTER_API_KEY instead of going through the local litellm gateway that claude-agent was just migrated to use. This undermines the rationale from the prior commit (centralizing key exposure and controlling the litellm version brokering requests).

Simplification:

  • agent/src/matrixBot.js:55 — the "ignore other agent" filter is a hardcoded /^@hermes\b/i regex rather than config-driven (e.g. mirroring the existing KNOWN_REPOS pattern), so each future agent added to the control room requires another code change.
## Review summary **Correctness bug:** - `agent/src/matrixBot.js:49` — claude-bot filters out messages *addressed to* Hermes (`@hermes` prefix) but never filters messages *from* Hermes's own bot account. When Hermes replies in the shared control room, claude-bot will treat that reply as a fresh user message and run it through routing/classification — potentially posting a confusing response or even misinterpreting it as a code task and opening a PR. There's no `HERMES_BOT_USER_ID` env var to enable proper sender-based filtering. **Docs gap:** - `.env.example:47` — tells operators to set up Hermes's Matrix account "the same way as claude-bot — see README," but README.md wasn't updated with any Hermes-specific registration or room-invite steps. **Consistency/security note:** - `docker-compose.yml:80` — Hermes gets its own raw `OPENROUTER_API_KEY` instead of going through the local litellm gateway that claude-agent was just migrated to use. This undermines the rationale from the prior commit (centralizing key exposure and controlling the litellm version brokering requests). **Simplification:** - `agent/src/matrixBot.js:55` — the "ignore other agent" filter is a hardcoded `/^@hermes\b/i` regex rather than config-driven (e.g. mirroring the existing `KNOWN_REPOS` pattern), so each future agent added to the control room requires another code change.
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: william/gitops-automation#10