⭐ Get the Agent OS + join 3,400+ founders inside the AI Profit Boardroom → Join AIPB

GoldieBench Blog · 6 min read

Hermes Agent Telegram Threads Setup: Five Moves To Per-Topic Sessions, A Five-Minute Isolation Test, And The Limits Still Open

Set up per-topic Hermes sessions on Telegram, then prove they're isolated with a short test. Here are the moves, the checks and the known gaps.

Illustrated hero: a dark navy benchmark board with gold accents showing separate stacked chat lanes, each with its own check mark

Hermes agent telegram threads isolate each Telegram topic as its own session, and the quickest way to trust that is to set it up and then test that the topics really are kept apart.

This page does both: the setup in five moves, then a short test plan that proves each topic keeps its own context, plus the limits you'll hit.

Sources are the Hermes Telegram docs, the sessions reference and the project's GitHub. If you'd like help planning it, book a free SEO strategy session.

The Rule Behind Every Topic Session

Hermes builds a session key from where a message came from.

A plain DM key holds the chat ID. A DM topic key adds the thread ID. A forum topic key holds the group's chat ID plus the thread ID.

Different key, different session: separate transcript, separate context window, separate running turn.

Forum topics are shared by everyone in them unless you set thread_sessions_per_user to true.

That rule is the whole reason the test plan below works: if two messages produce the same key, they share a session, and if they don't, they can't see each other's conversation.

Move 1: Enable Threaded Mode

In Telegram, search botfather and tap Open to load the Mini App. Then go to My bots, choose your bot, open Bot Settings and pick Threads Settings.

Switch Threaded Mode on and leave user-created topics allowed. The classic text menu lacks this toggle.

If you skip it, the gateway log says the chat is not a forum and no DM topics appear.

Bot not connected yet? Our Hermes Agent Telegram walkthrough covers the basics first.

Move 2: Choose A DM Mode

DM modeHow you start itSession behaviour
Threaded DMThreaded Mode aloneOne session per thread (per_thread), or one for the whole DM with dm_threads: shared
Declared topicsA dm_topics block in config.yamlFixed named topics, optional skill per topic, never auto-renamed
/topic modeSend /topic in the root DMUnlimited user-made topics, root DM becomes a lobby

dm_threads: shared arrived as an opt-in in v0.23.2. Topics declared in dm_topics, and /topic lanes, stay isolated either way.

Move 3: Declare Or Spawn Your Topics

For declared topics, list each one under platforms.telegram.extra.dm_topics with a name, and a skill if it should auto-load. Leave thread_id out; Hermes creates the topic and writes the ID back.

For /topic mode, send the command, then tap All Messages and send a message. Telegram creates a topic and Hermes answers inside it.

If a BotFather flag is off, Hermes sends a screenshot of the settings page instead of switching the mode on.

With declared topics, ignore_root_dm: true keeps the main DM for commands such as /start, /help and /status. With /topic mode the main DM is a lobby automatically.

Both modes can live on one bot, and topic names you declare in config are never overwritten by the auto-title.

Move 4: Map Your Group Topics

Supergroups with Topics mode isolate per topic out of the box.

To bind skills, add platforms.telegram.extra.group_topics with the group's chat_id and each topic's thread_id. You type those IDs in yourself: the thread ID is the last number of the topic's t.me/c link, and the chat_id is the group number prefixed with -100.

Unmapped topics simply get isolation without a skill.

Move 5: Fence The Bot

telegram.allowed_topics is a whitelist evaluated first. Anything outside it is dropped, with one INFO log line per chat and topic.

telegram.ignored_threads silences named topics before mention checks run. telegram.free_response_topics lets one topic answer without an @mention.

Remember that the General topic counts as 1, and that DMs are never filtered by the whitelist.

A Five-Minute Test Plan For Isolation

  1. In topic A, tell the agent a made-up project name. In topic B, ask what the project name is. It should not know.
  2. Type /new in topic A. Ask topic B something that relies on its own earlier context. It should still remember.
  3. Inside any /topic lane, send /topic with no argument. Hermes should show that topic's session title and ID.
  4. Post in a topic missing from allowed_topics. Nothing should reply, and the log should show one INFO drop line.
  5. Run /model in topic A, then check topic B. B should still run the default, because a plain /model switch is session-only.

Step one tests the conversation only. Long-term memory files belong to the profile, so a fact the agent saves to memory can surface in any topic.

Step five follows the slash command reference: /model is session-only unless you add --global, and /model reset drops the pick.

Route Scheduled Results Into A Topic

A topic makes a clean landing spot for cron jobs. The cron documentation takes a target in the form telegram, chat ID and thread ID, separated by colons; thread 1 is the forum's General topic.

If /topic mode has turned your DM root into a lobby, point cron at a dedicated topic with TELEGRAM_CRON_THREAD_ID in .env. Replies to a cron post then continue inside that topic's session, so you can act on the result straight away.

Several Bots In One Group

Topics share one agent. For agents with their own memory and skills, run separate profiles, each with its own BotFather token and gateway; the FAQ says two profiles can't share a token.

With require_mention and exclusive_bot_mentions both enabled, a message that starts with a bot handle is handled by that bot alone. If two bots ping-pong, bots_require_mention ends it, and the bot loop guard caps bot traffic per chat.

For one shared bot serving several profiles, a multiplexed gateway can route by chat and thread with gateway.profile_routes, explained in the multi-profile guide.

Where Model Choice Fits

Topics themselves don't depend on the model. Isolation is handled by the gateway, whatever model answers.

Model choice matters only if you switch models per topic with /model, for example a quick model in General and a stronger one in a research lane.

A per-topic model in config isn't available; that is issue 57664, still open. When you do pick models to switch between, compare them on the Goldie Bench leaderboard.

Limits Still Open On GitHub

  • Topic bound to an external runtime such as Codex or Claude Code: issue 5394.
  • Persistent brief and working directory per forum topic: issue 61136.
  • enabled_toolsets per group topic, parsed but not enforced: issue 37743.

Treat all three as not built in yet.

My Verdict

Set up /topic for personal work, a forum supergroup for teams, and run the five-minute test before you rely on either.

If the test passes, every job gets a clean context, and the only shared layer left is the profile's memory and skills.

Members of the AI Profit Boardroom can run this test with a coach on a live call.

Enable Threaded Mode, pick a mode, fence your group, run the five-minute test, and for help, talk to my team on a free SEO strategy session or learn inside the AI Profit Boardroom, and your hermes agent telegram threads will pass every check.

FAQ

How can I prove two Telegram topics are separate Hermes sessions?

Tell the agent a made-up detail in one topic, then ask about it in another. A separate session won't know it.

Why can a saved fact still appear in another topic?

Topics separate conversations, but long-term memory files belong to the profile, so saved memories are shared across topics.

Does topic isolation depend on which AI model I use?

No. The gateway handles isolation. The model only matters if you switch models inside a topic with /model.

How do I check which session a topic is bound to?

In /topic mode, send /topic with no argument inside the topic. Hermes shows the session title and ID.

Why does one group topic never get a reply?

Check telegram.allowed_topics and telegram.ignored_threads. A topic missing from the whitelist, or on the ignore list, stays silent.

Can a Telegram topic run Claude Code directly?

Not built in. Binding a topic to an external runtime is an open GitHub feature request.

The same stack Julian uses

Run this stack yourself.

Every demo on this bench was built inside the Agent Operating System — one prompt, one shot, single HTML file out. The Agent OS, the prompts, the templates, the weekly walkthroughs and 3,400+ founders shipping with it every day all live inside the AI Profit Boardroom.

3,400+founders
258documented wins
38countries
4coaching calls a week