A shared Hermes Agent research bot for your team's Telegram group

Put Hermes Agent in a Telegram group so teammates can @mention it for research, with access control, no shell tools, and a weekly digest posted to the group.

· ranx.cloud

Illustration of a round table with empty chairs, stacks of books and a lamp glowing in the middle

This is for a small team (a startup, an agency, a research group) that already talks in a Telegram group and wants one assistant there. You end up with a Hermes Agent bot that answers when someone @mentions it, can search and read the web, only works for people you approved, can't run shell commands, and posts a weekly digest to the group on a schedule.

Everything is configured from the Hermes dashboard and Telegram. Settings are from Hermes Agent v0.22.7.

Decide two things first

Who can use it. Hermes denies everyone by default. You open it up in one of three ways:

Setting Effect
TELEGRAM_ALLOWED_USERS listed user IDs can use the bot in DMs and groups
TELEGRAM_GROUP_ALLOWED_USERS listed user IDs can use it in groups only, no DMs
TELEGRAM_GROUP_ALLOWED_CHATS every member of the listed groups can use it there

There's also DM pairing: someone not on a list who DMs the bot gets a one-time code, and you approve it on the dashboard's Pairing page.

For a closed team group, TELEGRAM_GROUP_ALLOWED_CHATS is the simplest: group membership is the access list.

What it can do. The Telegram toolset includes the terminal by default (with safety checks), because the default assumes a personal bot. On a team bot, anyone in the group who can talk to it could ask it to run commands in the agent's environment. This guide removes the terminal and file tools for Telegram.

Step 1: Create the bot

  1. In Telegram, open @BotFather, send /newbot, choose a name and a username ending in bot, and copy the token.
  2. Get your own numeric user ID from @userinfobot.
  3. In the dashboard, open Channels → Telegram → Manual setup. Paste the token into Telegram bot token and your ID into Allowed Telegram user IDs, save, and click Restart now on the banner.
  4. DM the bot "hi" to confirm it answers.

You're the only allowed user so far, which is what you want while you configure it.

Step 2: Let the bot see group mentions

Telegram bots have privacy mode on by default. With it on, the bot only receives commands, replies to its own messages, and a few service messages, which means a plain @yourbot what's new in X? may never reach it.

Pick one:

  • In BotFather: /mybots → your bot → Bot Settings → Group Privacy → Turn off. Then remove the bot from the group and add it again; Telegram keeps the old setting for existing memberships.
  • Or make the bot a group admin. Admin bots receive all messages regardless of privacy mode.

Either way the bot now sees all group messages, so the next step tells it to only answer when addressed.

Step 3: Get the group's chat ID

Add the bot to the group. To find the group's ID, add @userinfobot to the group briefly; it reports the chat ID. Group IDs are negative, often starting with -100. Remove @userinfobot afterwards.

Then on the Keys page, add:

TELEGRAM_GROUP_ALLOWED_CHATS=-1001234567890

If the Keys page doesn't list this variable, add it as a custom variable. Restart the gateway from System → Gateway afterwards, since platform settings are read when the gateway starts.

Step 4: Group behavior and tool limits

Open Config, switch to YAML, and add:

telegram:
  require_mention: true

platform_toolsets:
  telegram: [web, vision, skills, session_search, todo, clarify]

memory:
  user_profile_enabled: false

platforms:
  telegram:
    extra:
      allow_admin_from:          # admins in DMs
        - "111111111"            # your user ID
      user_allowed_commands:
        - new
        - status
      group_allow_admin_from:    # admins in groups, a separate list
        - "111111111"
      group_user_allowed_commands:
        - new
        - status

What each part does:

  • require_mention: true makes the bot respond in groups only to @botname mentions, replies to its messages, and /command@botname. Without it, it answers every message it can see.
  • platform_toolsets.telegram is the full list of toolsets the bot gets on Telegram. This one allows web search and page reading, image understanding, reading skills, searching past conversations, a to-do list for multi-step tasks, and clarifying questions. It leaves out terminal, file, code_execution, browser, delegation, memory, and cronjob, so a group member can't get it to run commands, write files, or create scheduled jobs. The skills toolset can also write skills; drop it from the list if you don't want group conversations to change the bot's skills.
  • memory.user_profile_enabled: false turns off USER.md. Memory is per Hermes profile, not per Telegram user, so on a team bot one person's "I prefer short answers" would apply to everyone. Leaving out the memory toolset keeps the agent from saving notes during group turns. The background review that runs after turns may still propose memory writes; set memory.write_approval: true if you want to vet those with /memory pending.
  • allow_admin_from / user_allowed_commands (DMs) and group_allow_admin_from / group_user_allowed_commands (groups) split slash commands: you can run every command, everyone else only /new, /status, /help, and /whoami. Each scope needs its own lists; a scope without an admin list stays unrestricted. Ordinary messages aren't affected.

Save, then restart the gateway from System.

Check what the bot ended up with: DM it /whoami to see your access tier, and ask "which tools do you have right now?" in the group. If terminal is still listed, the toolset list didn't apply; check the YAML for indentation errors.

Step 5: Give it a voice

On the Profiles page, edit the profile's SOUL, which is the persona text added to every session:

You are the research assistant for the Acme product team, in a Telegram group.
Answer in at most 150 words unless asked for more. Cite every factual claim
with a link. If a question is ambiguous, ask one clarifying question.
Say "I don't know" rather than guessing. Never share one person's messages
with another person in a DM.

Keep it short; it's in every prompt.

Step 6: Sessions per person or per room

By default each person in the group gets their own session with the bot (group_sessions_per_user: true). Alice's long research thread doesn't fill Bob's context, and costs stay attached to whoever is asking. The trade-off: the bot doesn't know what it told Alice when Bob asks a follow-up.

If your team wants one shared conversation with the bot, set this in Config:

group_sessions_per_user: false

That shares context, token cost, and interruptions across the room. Forum topics are already one shared session per topic.

Step 7: Weekly digest to the group

In the group, send /sethome (as an admin user). Scheduled output for Telegram now goes to this group.

Create the job on the Cron page:

Field Value
Name Weekly market digest
Prompt see below
Schedule weekly, Monday, 09:00
Deliver to Telegram
Advanced → enabled_toolsets web
Search the web for news from the past 7 days about: usage-based pricing
for developer tools, and the companies Example A, Example B and Example C.
Pick at most 6 items. For each: one-line headline, one sentence on why a
B2B devtools product team should care, link. End with one line:
"Ask me about any item with @botname".

Set timezone in Config first (for example Europe/Amsterdam), or 09:00 means server time.

Cron runs aren't affected by the Telegram toolset list; they use the job's enabled_toolsets (or the cron platform's default toolsets when that's empty). Since only you can reach the Cron page and members can't create jobs, that's under your control.

Costs

Each @mention is one agent turn. Assume a research question takes 4 model calls averaging 18,000 input tokens (about 72,000 in total) and 700 output tokens, with half the input served from prompt cache. Five people asking 4 questions a working day is about 440 turns a month.

At list prices as of November 2026 (Claude pricing):

  • Claude Sonnet 5.5: 36,000 × $2/M + 36,000 × $0.10/M + 700 × $10/M = $0.072 + $0.0036 + $0.007 ≈ $0.083 per question, about $36 a month.
  • Claude Haiku 5.5: 36,000 × $0.10/M + 36,000 × $0.01/M + 700 × $0.50/M ≈ $0.0043 per question, about $1.90 a month.

The weekly digest adds little: about 300,000 input tokens per run comes to $0.13 a month on Haiku 5.5 or $2.60 on Sonnet 5.5 for four runs (no caching assumed).

Replace these assumptions with real numbers from Analytics after the first week, and see the model and cost guide for moving side tasks to a cheaper model. Telegram's Bot API is free; its limit of about 20 messages per minute in a single group (Bot FAQ) only matters if the bot streams long answers in many small edits.

What goes wrong

The bot answers in DMs but not in the group. Work through Hermes's own checklist: privacy mode is on (turn it off or make the bot admin, then remove and re-add it); the sender or group isn't allowed (TELEGRAM_GROUP_ALLOWED_CHATS needs the negative group ID, not a user ID); require_mention is on and the message didn't mention the bot.

It worked, then stopped after the group changed. Telegram gives a group a new ID when it's upgraded to a supergroup, for example when you turn on topics. Update TELEGRAM_GROUP_ALLOWED_CHATS and run /sethome again.

A teammate listed in TELEGRAM_GROUP_ALLOWED_USERS is ignored in a supergroup. There's an open report of exactly this (#55462). Allow the chat with TELEGRAM_GROUP_ALLOWED_CHATS instead.

Pairing codes don't arrive or expire. Codes last one hour, each user can request one every 10 minutes, and at most 3 can be pending per platform. Approve them promptly on the Pairing page.

Someone asks the bot to run a command. With terminal and file left out of platform_toolsets.telegram, it can't. Never set GATEWAY_ALLOW_ALL_USERS=true or use * in the allowlists on a bot with shell tools; one user reported a bot with open DMs being used to install a backdoor on their host (#77424).

Messages sent during a restart get no answer. Telegram updates that queued while the gateway was down are dropped on a cold start by default (#143123). Add drop_pending_on_cold_boot: false under platforms.telegram.extra in the YAML above if your team expects every question to be answered.

On ranx.cloud, only Pro and Power plans take daily backups, and the bot's sessions and settings live on its disk. Use System → Operations → create a backup now and then and download the archive; for a team tool, an occasional restart (for maintenance or updates) can mean a missed message, which the setting above mitigates.