Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Gateway

5. Gateway — One Agent, Twenty-Plus Entry Points

This is the foundation for the entire “living with an agent” experience described in chapter 19: the gateway is a single background process, connecting in parallel to every configured chat platform — not multiple separate bots running independently. Starting 2026 with 7 platforms, that number has grown to 20+ in just over a year — but the core architecture has not changed: each platform adapter normalizes its platform’s own message format, handles media and authentication, and then hands everything over to the same AIAgent for processing.

The foundational principle: shared state, but per-user sessions

All platforms share MEMORY.md, USER.md, and the SQLite session store — switch platforms mid-task and the new session automatically restores the relevant context via situational memory search. But this is the easy-to-misunderstand point: by default Hermes creates sessions per user ID, not per channel — meaning if Alice and Bob both message in the #research channel on Discord, Hermes treats them as two separate conversations even though they look at the same channel, exactly by design to protect privacy and isolate context.

Per-platform circuit breakers — one broken adapter does not bring down the whole gateway

Each platform has its own circuit breaker plus the /platform command to check — if Telegram gets rate-limited, the Slack token expires, or the WeCom webhook errors out, the other platforms keep working normally, unaffected.

The setup wizard — no need to configure each platform by hand

hermes setup

The wizard lists which platforms are already configured and which are not, and walks you through the correct OAuth/paste-token flow for each type — paste the bot token from BotFather (Telegram) or the Discord developer page, scan a QR code (WhatsApp), link a device (Signal). Only select the platforms you actually need — the rest stay dormant, consuming no resources.