hermes - 💡(How to fix) Fix feat(telegram): channel_profiles — route Telegram chats to Hermes profiles in one gateway

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Allow a single Telegram bot (one gateway process) to route messages from different chats/groups/DMs to different Hermes profiles via a simple channel_profiles config map.

Root Cause

Allow a single Telegram bot (one gateway process) to route messages from different chats/groups/DMs to different Hermes profiles via a simple channel_profiles config map.

Code Example

telegram:
  channel_profiles:
    "-1001234567890": "crypto"       # group → crypto profile
    "-1009876543210": "coder"         # group → coder profile
    "56005800": "default"             # DMdefault (optional)
RAW_BUFFERClick to expand / collapse

Summary

Allow a single Telegram bot (one gateway process) to route messages from different chats/groups/DMs to different Hermes profiles via a simple channel_profiles config map.

Motivation

Right now, one gateway = one profile. To have different agent personalities per chat, you must run separate gateway processes with separate bot tokens (Pattern B in the multi-profile docs). This works but wastes RAM (~200MB per extra gateway) and requires managing multiple @BotFather tokens.

The backend is now ready: PRs #39921 + #39993 made the gateway WebSocket protocol profile-aware — session.create, session.resume, and prompt.submit all accept a profile parameter. One dashboard process can run agent turns as ANY profile on the host, loading that profile's config, SOUL.md, skills, model, and state.db.

What's missing: the Telegram adapter layer that reads a route config and passes profile to the session calls.

Proposed config

telegram:
  channel_profiles:
    "-1001234567890": "crypto"       # group → crypto profile
    "-1009876543210": "coder"         # group → coder profile
    "56005800": "default"             # DM → default (optional)

When a message arrives from a chat listed in channel_profiles, the gateway:

  1. Resolves profile = channel_profiles[chat_id] (falls back to gateway's launch profile)
  2. Passes profile to session.create / session.resume / prompt.submit
  3. The existing profile-aware backend handles the rest — loads correct HERMES_HOME, config, SOUL, state.db

Scope

In scopeOut of scope
telegram.channel_profiles — static chat→profile mapping/profile coder slash command (→ #24913)
Per-profile isolation: config, SOUL, model, skills, memory, state.db@coder inline per-message routing (→ #24913)
Survives gateway restart (config-based)Topic/thread-level routing (→ #10143)
Backward compatible — absent key = no changeCross-platform (Discord/Slack) — can follow

Why now

The blocking prerequisite (gateway profile-aware protocol) landed in main this week (#39921 Jun 5, #39993 Jun 5). Before these PRs, the gateway was hard-bound to one HERMES_HOME and could not run turns under different profiles. That architectural barrier is gone.

Related

  • #29535 — profile_routes (broader, platform-agnostic version of this)
  • #24913 — /profile <name> slash command
  • #10143 — Topic-to-Profile routing
  • #39921 — Gateway: profile-aware session.resume + prompt.submit
  • #39993 — Gateway: profile-aware session.create

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING