# Hermes Agent × Rocket.Chat — Your AI Assistant, Now in Every Room **Connect your Hermes Agent to a self-hosted Rocket.Chat server and talk to it from any channel, group, or DM — with native buttons, smart room routing, and file sharing.** --- ## What This Plugin Does You run [Hermes Agent](https://github.com/NousResearch/hermes-agent) — a personal AI agent that remembers across sessions, delegates to subagents, and drives a real terminal and browser. Normally you talk to it through a CLI or TUI. This plugin connects Hermes to **Rocket.Chat**, so you can talk to your agent from **any room** on your self-hosted chat server. One agent, all rooms, one memory. ### The Experience ``` You (in #devops): "What's the status of the BAT stack?" Agent (in #devops): "5/5 containers UP. API :3001, Web :3003, DB healthy. Gateway connected to rocketchat.thomander.de." You (in DM): "StartObsidian" Agent (in DM): "Vault clean. No new FAKT files. Last daily: 08.06. BAT: 5/5 UP, RC-Plugin: Archivar v3 deployed." You (in #general): "Deploy the new adapter fix" Agent (in #general): "Dein Auftrag passt thematisch besser in #rocketchat-plugin." [✅Ja] [📍Hier] [📌Generell] ``` The agent knows what happened in ALL rooms. It routes tasks to the right room. It asks before moving things. And you always click buttons — never type numbers. --- ## Key Features ### 🎯 Button-Garantie (Button Guarantee) **Every user interaction uses native Rocket.Chat buttons.** No raw text input, no "type 1/2/3", no confusion. - Built-in templates: Yes/No, Confirm/Cancel, OK, Multi-Choice - Custom buttons with emoji labels: `✅Ja`, `❌Nein`, `🟡Später` - Structured payloads: `question_id::choice` — the agent always knows what you clicked - REST-first: native buttons always tried first; text fallback only on HTTP error ### 🧭 Smart Room Routing (Archivar v4) The agent understands **where messages belong** — and routes them there, with your permission. - **2-stage pipeline:** Embedding pre-filter (nomic-embed-text, <100ms) → LLM room router (qwen2.5:7b, ~2.4s) - **LLM-based room router** — The LLM receives the full message + room list with keywords and returns the target room ID directly. No intent categories, no fuzzy matching. - **Keywords as anchors** — Room-specific keywords in the LLM prompt give precise hints. "RC" at the end of a sentence is recognized. - **Move-Requests with buttons:** When a task belongs elsewhere, you get ✅Ja / 📍Hier — clickable options, never text prompts - **Zero token cost for routing** — The entire routing process runs on local models. Your primary LLM never spends tokens on figuring out where to reply. - **Timeout & fallback:** 10s LLM timeout → automatic CATCH_ALL. **No answer is not an option.** - **Butler principle:** The agent suggests, you decide. Nothing is silently rerouted. ### 🆕 Auto-Onboarding Add the bot to a new room and it introduces itself, asks for a room name and topic, and configures routing automatically. No manual config files. ### 📚 Knowledge Integration Pure facts and documentation are automatically saved to your Obsidian Vault — not dumped in chat rooms. Your morning `StartObsidian` routine processes them into themed documents. ### 📎 File Attachments Upload files to rooms, download files users attach, browse room file lists — all with native Rocket.Chat rendering. ### 🌐 Multi-Room, One Memory The agent maintains a single context across all rooms. Knowledge from `#devops` is available in `#general`. You never have to re-explain. --- ## Quick Start ```bash git clone https://gitea.myowntools.org/andreas/Hermes_rocket.chat_Plugin.git cd Hermes_rocket.chat_Plugin ./install.sh ``` The installer walks you through: 1. Rocket.Chat server URL 2. Bot username and password 3. Home channel **That's it.** The gateway restarts, the bot appears online (green dot), and you can start talking. ```bash # Update without reconfiguring ./install.sh --update-only # Non-interactive (CI/CD, scripts) ./install.sh --non-interactive ``` --- ## Requirements - **Hermes Agent** installed and running - **Self-hosted Rocket.Chat** (v5+) - A **bot user account** on your Rocket.Chat server - Python 3.10+ (comes with Hermes) **Optional but recommended:** - `nomic-embed-text` via Ollama — enables embedding-based room routing - `qwen2.5:7b` via Ollama — enables LLM-based routing for borderline cases --- ## Why This Exists Hermes Agent is powerful — but the CLI isn't where conversations happen. Teams live in Rocket.Chat. This plugin brings your AI assistant to where you already are. **Use cases:** - **DevOps team:** Ask the agent for container status, deploy fixes, check logs — from your team channel - **Personal assistant:** Morning briefing (`StartObsidian`), knowledge capture, task routing - **Project management:** Multi-room coordination — the agent knows what's happening across all project channels - **Self-hosted everything:** No cloud dependencies. Your agent, your chat server, your data. --- ## Current Status **Active development — production-ready core, expanding features.** | Feature | Status | |---------|--------| | Real-time DDP messaging | ✅ Stable | | 7 REST API tools | ✅ Stable | | Interactive buttons | ✅ Stable | | Button-Garantie | ✅ Enforced | | Archivar v4 room routing | ✅ Deployed (2026-06-14) | | Auto-onboarding | ✅ Stable | | FAKT → Obsidian Vault | ✅ Stable | | File upload/download/list | ✅ Stable | | `install.sh` one-click setup | ✅ Stable | **In progress:** `install.sh` deployment path alignment. --- ## Links - **Repository:** [gitea.myowntools.org/andreas/Hermes_rocket.chat_Plugin](https://gitea.myowntools.org/andreas/Hermes_rocket.chat_Plugin) - **Hermes Agent:** [github.com/NousResearch/hermes-agent](https://github.com/NousResearch/hermes-agent) - **Rocket.Chat:** [rocket.chat](https://rocket.chat) - **License:** Public Domain (Unlicense) --- ## FAQ **Q: Does this work with Rocket.Chat SaaS (cloud.rocket.chat)?** A: It's designed for self-hosted instances. SaaS may work but hasn't been tested — the plugin needs WebSocket/DDP access which SaaS tiers may restrict. **Q: Can multiple users talk to the same bot?** A: Yes — the bot listens in all subscribed rooms. One agent session handles all users. Each user's rooms are collapsed into a virtual `user:username` session so the agent maintains per-user context. **Q: Does the bot need admin permissions?** A: No. A regular user with `bot` role is sufficient. The bot needs `create-d`, `create-p`, and `upload-file` permissions (standard for bot role). **Q: What happens if the gateway restarts?** A: The bot reconnects automatically. The room-map.json persists. There's a known Discovery Bug where Rocket.Chat may not reconnect after SIGTERM — workaround is clearing state files before restart. The Archivar v4 initializes immediately after reconnect with the operating stage log: `Archivar Stufe 1: Embedding-Vorfilter + LLM-Raum-Router aktiv (5 Räume)`. **Q: Is this an official Nous Research product?** A: No — it's a community plugin maintained independently. Public Domain license. --- *Built with ❤️ for the self-hosting community. Zero external dependencies. Pure Python + WebSocket.*