Skip to content

Feature Request: Per-topic agentId routing in Telegram forum supergroups #31473

@kortexmw

Description

@kortexmw

Summary

Add agentId support to TelegramTopicConfig so that different topics within a Telegram forum supergroup can route to different agents.

Current Behavior

  • Topics in a Telegram forum group all route to the same agent (determined by the group-level binding).
  • TelegramTopicConfig supports requireMention, groupPolicy, skills, enabled, allowFrom, and systemPrompt — but not agentId.
  • Bindings (match.peer.kind) only accepts direct|group|channel — no topic kind.

Desired Behavior

Allow per-topic agent routing, e.g.:

{
  channels: {
    telegram: {
      groups: {
        "-1001234567890": {
          topics: {
            "1": { agentId: "main" },       // Kortex
            "3": { agentId: "zu" },          // Zu (different agent, different workspace)
            "5": { agentId: "q" }            // Q (research agent)
          }
        }
      }
    }
  }
}

Each topic should:

  • Route to the specified agent's workspace and session store
  • Use that agent's model, identity, and memory
  • Maintain fully isolated sessions per topic per agent

Use Case

Multi-agent setup where one Telegram forum group serves as a unified hub:

  • Topic 1 (Kortex) — general assistant, research, ops
  • Topic 3 (Zu) — scheduling, group coordination, cost splitting
  • Topic 5 (Q) — deep research, brainstorming

This is much cleaner for the user than managing separate Telegram groups per agent.

Current Workaround

Using systemPrompt per topic to give a different personality, but this is cosmetic only — all topics share the same agent's workspace/memory, which breaks agent isolation.

Environment

  • OpenClaw v2026.3.1
  • Telegram forum supergroup with topics enabled
  • Multi-agent config (3+ agents with separate workspaces)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions