# Hermes Rocket.Chat Plugin > Bidirectional real-time messaging between Hermes Agent and self-hosted Rocket.Chat servers. > Zero external dependencies β€” uses WebSocket/DDP + REST API. **⚠️ Community Add-on β€” not an official Nous Research product.** This plugin is maintained independently. Use at your own risk. See [LICENSE](LICENSE). ## Features - 🟒 **Real-time messaging** via DDP/WebSocket (`stream-room-messages`) - πŸ’¬ **Interactive buttons** β€” Native Rocket.Chat attachments with `question_id::choice` correlation - πŸ”Œ **7 REST tools** β€” `rocketchat_rooms`, `rocketchat_users`, `rocketchat_dm`, `rocketchat_send`, `rocketchat_upload`, `rocketchat_download`, `rocketchat_files` - πŸ“‹ **Room Topic Discipline** β€” Automatische Thementrennung fΓΌr omniprΓ€sente Agenten. Interaktive Room-Topic-Map mit Catch-All-Raum - πŸ“Ž **Attachment Support** β€” Upload, Download, File-Listing mit 2-Step-Flow (`rooms.media` β†’ `chat.postMessage`) - 🟒 **Online presence** β€” Green dot via DDP `UserPresence` - ♻️ **Auto-reconnect** with exponential backoff - 🌍 **Bilingual installer** β€” German & English (`--lang de|en`) ## Quick Install ```bash git clone https://gitea.myowntools.org/andreas/Hermes_rocket.chat_Plugin.git cd Hermes_rocket.chat_Plugin ./install.sh ``` The installer will ask for: - Rocket.Chat server URL - Bot username (the bot account on your Rocket.Chat server) - Bot password - Home channel (name or room ID) **After installation:** The gateway will output a pairing code β€” enter it in your home channel to activate the bot. ### Options ``` ./install.sh --help # Show all options ./install.sh --lang en # English ./install.sh --lang de # German (default) ./install.sh --non-interactive # Batch mode (reads from env vars) ``` ## Architecture ``` Rocket.Chat Server ↕ WebSocket/DDP + REST Hermes Gateway (plugin) ↕ Hermes Agent ← β†’ LLM inference ``` The plugin registers as `rocketchat-platform` in Hermes' bundled plugin path (`hermes-agent/plugins/platforms/rocketchat/`). ## Interactive Buttons The plugin supports native Rocket.Chat buttons. The agent sends them via `send_message` with metadata: ```python send_message( target="rocketchat:protonbridge", text="Proceed?", metadata={ "template": "custom", "question_id": "confirm_42", "button_title": "Choose:", "custom_buttons": ["βœ… Yes", "❌ No"] } ) ``` User click returns: `confirm_42::βœ… Yes` **Button label rules:** - Max ~7 visible characters on desktop (mobile shows full text) - **NO underscores** β€” breaks Rocket.Chat rendering - Spaces allowed: `1. Left`, `2. Right` - Prefix with number/keyword for distinguishability See [docs/BUTTON_GUIDE.md](docs/BUTTON_GUIDE.md) for full details. ## Environment Variables Set in `~/.config/hermes/rocketchat.env` (generated by install.sh): ```bash ROCKETCHAT_BASE_URL=https://rocketchat.example.com ROCKETCHAT_USER=botuser ROCKETCHAT_PASSWORD=... ROCKETCHAT_ROOM_NAME=ki-assistent ROCKETCHAT_ALLOW_ALL_USERS=true GATEWAY_ALLOW_ALL_USERS=true ``` ## Requirements - Hermes Agent installed - Self-hosted Rocket.Chat server (V5+) - Bot user account on the Rocket.Chat server - Python 3.10+ (hermes-agent venv) ## License [Unlicense](LICENSE) β€” Public Domain. See [LICENSE](LICENSE).