Connect Hermes to Telegram + configure topics
BotFather → Hermes gateway → home channel → choose fixed topics or user-created /topic sessions
1. Create the bot
Use @BotFather → /newbot
Save TELEGRAM_BOT_TOKEN
Optional: set description, icon, commands
2. Configure Hermes
Add TELEGRAM_BOT_TOKEN to ~/.hermes/.env
Set TELEGRAM_ALLOWED_USERS
Optional: TELEGRAM_WEBHOOK_URL for cloud
3. Start the gateway
hermes gateway setup
hermes gateway start
Verify bot replies in Telegram
4. Set the delivery target
DM the bot or open a group/topic
Run /sethome where results should land
Cron + send_message can now target Telegram
Choose your topic model
Hermes supports two different ways to isolate Telegram conversations into parallel contexts.
A. Operator-defined topics in config
Use when you want stable named workspaces like Ops, Research, Sales.
DM topics
extra.dm_topics
Hermes can create private DM topics
Group forum topics
extra.group_topics
Admin creates topics, Hermes binds thread_id
Result
• Fixed topic names controlled in config.yaml
• Optional skill binding per topic
• Each topic gets its own isolated session + history
• Best for permanent workspaces
B. User-driven multi-session DM mode
Use when the user wants to create and manage ad-hoc threads directly from Telegram.
Enable /topic mode
Run /topic in the bot DM
Root DM becomes a lobby
Create new work threads
Open “All Messages” / create topic
Each thread binds to its own session
Result
• Users create/delete topics themselves
• Hermes auto-binds each topic to a session ID
• /new inside a topic resets only that thread
• Best for ad-hoc parallel conversations
Group caveat
Disable privacy mode or make bot admin
Docs sources: Hermes Telegram messaging docs, /topic docs, and environment variable reference.