agentos.guide › blog
Hermes agent telegram threads turn your bot chat into a set of separate workspaces: every Telegram topic becomes its own Hermes session, and your Agent OS can organise those topics for you.
This guide explains how topic sessions behave, which mode to choose, and then gives you three prompts to paste into your Agent OS so the agent prepares the config, maps your group and checks the result.
The behaviour described here follows the Hermes Telegram documentation. To plan the lanes with my team first, book a free SEO strategy session.
Without topics, your whole DM with the bot is one long session.
With topics, Hermes adds the Telegram thread ID to the session key, so each topic has its own history, memory flush and context window.
Long jobs stop bleeding into short ones, and a /new in one topic leaves the rest alone.
Only people on your Telegram allowlist can use these topics or switch the mode on, so the same access rules still apply.
The profile underneath stays the same. Every topic shares its memory files, skills, SOUL.md and bot token.
| Mode | Lives in | Topics made by | Key or command |
|---|---|---|---|
| Threaded DMs | Bot DM | Your Telegram client | dm_threads |
| Declared topics | Bot DM | Hermes, from config | dm_topics |
| Multi-session | Bot DM | You, on the fly | /topic |
| Forum topics | Supergroup | A group admin | group_topics |
If you've not yet linked Hermes to Telegram, our Hermes Agent Telegram guide for the Agent OS covers the bot itself.
DM topics only work once Threaded Mode is on for your bot.
Open BotFather as a Mini App (search botfather, tap Open), then My bots, your bot, Bot Settings, Threads Settings. Switch Threaded Mode on and keep user-created topics allowed.
The typed /mybots menu doesn't carry this option. If it's off, Hermes logs that the chat is not a forum and makes no topics.
Your Agent OS can't flip this for you, because it lives in Telegram, so do it by hand first.
Paste this into your Agent OS chat. It asks Hermes to read the docs and write the block, rather than you typing YAML.
Read the Hermes Telegram docs section "Private Chat Topics".
Then add a platforms.telegram.extra.dm_topics block to my
~/.hermes/config.yaml for my Telegram user ID with these topics:
General, Clients, Content (load my content-writing skill), Admin.
Do not set thread_id. Show me the diff before saving,
back up the file first, then restart the gateway and tell me
which topics were created.
Hermes creates each topic with createForumTopic on start-up and writes its thread_id back into config.yaml, so restarts don't make duplicates.
Prefer topics you name on the fly? Skip the prompt and send /topic in the bot DM instead. Every topic you then make from All Messages is a fresh session.
🔥 Want an Agent OS that already knows your Telegram lanes?
Boardroom members download the installable Agent OS, learn every gateway through step-by-step video trainings, and get help on four live coaching calls a week alongside 3,400+ members.
Send /topic in the root DM and Hermes checks your BotFather flags. If one is off, it sends a screenshot of the settings page rather than activating.
Once active, the root DM is a lobby for commands like /status and /help, and plain prompts are pointed towards All Messages.
Topics rename themselves after the first exchange; disable_topic_auto_rename stops that.
By default, a message typed in the lobby is answered in your most recently active topic. Since v0.23.0, dm_topic_auto_transfer can open a new topic for it instead, called Hermes Chat until it is renamed.
A /bg task started inside a topic reports back to that same topic, which keeps background results next to the work they belong to.
/topic followed by a session ID, sent inside a topic, restores an earlier Telegram session there. /topic off in the root turns the mode off and clears the bindings.
If the DM splits into too many sessions because your client opens a thread per message, dm_threads: shared folds them into one, a key the v0.23.2 release made available.
For a team supergroup with Topics on, sessions are already isolated per topic. This prompt adds skills and a fence.
My Telegram supergroup chat_id is -100XXXXXXXXXX. Its topics are
Sales (thread 4), Support (thread 9) and General (thread 1).
Using the Hermes Telegram docs, add a group_topics block that
binds my sales skill to Sales and my support skill to Support,
and set telegram.allowed_topics so the bot only answers in
1, 4 and 9. Keep require_mention on. Show the diff, back up
config.yaml, restart the gateway and summarise the change.
Find each thread number by opening the topic in Telegram Web: it is the last number in the t.me/c link. The group's chat_id is its number with -100 in front.
allowed_topics runs before ignored_threads, the General topic counts as 1, and DMs are never filtered.
Picture a freelance designer who runs everything through one bot DM.
Before topics, a logo brief, an invoice reminder and a portfolio caption all sat in one history, and the agent kept mixing clients up.
After Prompt 1 she has four lanes. Clients holds briefs and feedback, Content loads her caption skill on every fresh session, Admin handles invoices, and General takes quick questions.
When a client job ends she types /new in Clients, and the other three lanes carry on untouched.
When she brings on a part-time assistant, she moves Clients into a small supergroup so both of them share that session, and keeps the rest in her DM.
Topics don't give you separate agents. For a sales agent and a support agent with their own memory, create two profiles, each with its own BotFather bot and gateway.
The Hermes FAQ rules out two profiles sharing one token.
Keep require_mention and exclusive_bot_mentions on so a message opening with one bot's handle only reaches that bot, and turn on bots_require_mention if they start answering each other.
A single multiplexed gateway can also route chats, and threads, to profiles with gateway.profile_routes. The multi-profile guide has the details.
📞 Want your team's topic layout mapped for you?
Book a free strategy session and my team will plan your groups, topics and profiles with you.
Check my Hermes Telegram topic setup. Read config.yaml and
list every dm_topics and group_topics entry with its thread_id.
Tail the gateway log for "The chat is not a forum" or topic
drop lines. Then send a short test message with send_message
to each named topic and report which ones failed and why.
Named topics with a thread_id are listed in channel_directory.json, which is why send_message can reach them by name.
Mismatched unread markers between a DM topic and All Messages are a Telegram read-state limitation, not a fault.
Topics make a tidy inbox for cron output. The cron docs accept a Telegram target written as chat ID, a colon and thread ID, and the forum's General topic is thread 1.
When /topic mode makes your root DM a lobby, set TELEGRAM_CRON_THREAD_ID in your .env to a topic called Cron. Replies to those posts then continue that topic's own session.
/branch on Telegram opens a copy of the conversation in a sibling thread, so you can try a different direction without losing the original.
A model, toolset or working folder per topic isn't a config option. Those are open GitHub requests, such as issue 57664.
Binding a topic to a separate runtime like Codex or Claude Code is issue 5394, still open.
Today, run /model inside a topic. A plain switch is session-only, so the other topics keep the default.
Start with /topic for your own work, add declared topics for lanes that need a skill, and move your team into a forum supergroup with allowed_topics.
Let the Agent OS write and check the config with the prompts above, and keep your BotFather settings as the one manual step.
If you want the gateway, skills and topic lanes taught on video, the AI Profit Boardroom walks through each piece and includes the installable Agent OS.
No. Threaded Mode lives in the BotFather Mini App, so you switch it on by hand. The Agent OS can handle the Hermes config after that.
No. Hermes saves each topic's thread_id back into config.yaml and reuses it on later start-ups.
They share the profile's memory files and skills. What they don't share is the conversation history and context window.
Open the topic in Telegram Web or Desktop. The last number in its t.me/c link is the thread ID.
Yes, as two profiles with two bot tokens and two gateways, or one multiplexed gateway using profile_routes.
Only per session: run /model inside the topic. A per-topic model setting is an open GitHub request.
Turn on Threaded Mode, paste Prompt 1, map your group with Prompt 2, and if you'd like help, my team can plan it on a free SEO strategy session, or you can join the AI Profit Boardroom to run hermes agent telegram threads from your Agent OS.
About Julian
I'm Julian Goldie, an AI entrepreneur, SEO expert and the founder of the AI Profit Boardroom, which has 3,400+ members.
I help business owners scale with AI agents, automation and SEO.
My YouTube channel has 400,000+ subscribers, and I run Goldie Agency, a seven-figure SEO agency.
→ Hermes Agent WhatsApp: Five Prompts To Run In Your Agent OS
→ Hermes Agent Slack: Let Your Agent Wire Itself Into Slack From Your Agent OS
The installable system behind every guide on this site — dashboard, agents, memory and pipelines — updated as new tools land, with 3,400+ members and four coaching calls a week.
Join the AI Profit Boardroom →📺 Video notes + links to the tools 👉
🎥 Learn how I make these videos 👉