Telegram Groups

The DM bridge turns Telegram into a unified inbox for one person talking to their entire team of agents. That's great when you're the only human working with a repo. But if you're on a team — a few engineers, maybe a PM — and you all want to interact with the same agents, DMs don't work. Everyone would need their own bot, their own pairing, their own private conversation. Nobody sees what anyone else asked or what an agent said back.

Telegram group support fixes this. You create a Telegram group, add your repo's bot, and invite your team. Anyone in the group can send instructions to the agent. The agent's responses appear in the group where everyone can see them. You get a shared conversation with your agents that the whole team can participate in.

How It Works

Telegram Group
┌─────────────────────────────────┐
│  Alice: @thrum_bot check the    │
│         deploy status           │
│                                 │
│  thrum_bot: Deploy is green.    │
│    Last push 12m ago by Bob.    │
│                                 │
│  Bob: @thrum_bot run the smoke  │
│       tests on staging          │
│                                 │
│  thrum_bot: All 47 tests pass.  │
└─────────────┬───────────────────┘
              │
              ▼
┌─────────────────────────────────┐
│  Thrum Daemon                   │
│                                 │
│  Bridge → @coordinator_main     │
│           (or configured agent) │
└─────────────────────────────────┘

Prerequisites

  1. A working DM bridge. Follow the Telegram Bridge guide first. You'll have a bot token, a paired Telegram account, and a working DM relay. The group feature builds on top of this.
  2. Bot privacy mode disabled. By default, Telegram bots in groups only see messages that @mention them or are commands. For messages with no @mention to come through, you need privacy mode turned off. In Telegram, message @BotFather, send /setprivacy, select your bot, and choose Disable.

Setup

1. Create a Telegram Group

Create a regular Telegram group. Add your bot and invite your team. Give it a name that makes sense — "Dev Coordination" or "Backend Agents" or whatever.

Note the group's chat ID. Easiest way: send a message in the group, then check thrum telegram status --json. Group chat IDs are negative numbers (e.g., -100123456789).

2. Configure the Group

Add the group to your Telegram config. You can do this from the web UI (Settings → Telegram → Groups) or the config file directly.

.thrum/config.json:

{
  "telegram": {
    "token": "...",
    "target": "@coordinator_main",
    "user_id": "leon-letto",
    "chat_id": 7747509251,
    "enabled": true,
    "allow_from": [7747509251],
    "groups": [
      {
        "chat_id": -100123456789,
        "name": "dev-team"
      }
    ]
  }
}

Everyone in the group who should be able to message the agent needs their Telegram user ID in the global allow_from list. Same gate as DMs — if your ID isn't in the list, your messages are silently dropped.

3. Restart and Test

thrum daemon restart

Test it — send a message in the Telegram group mentioning the bot:

@your_bot_name hello from the group

Check the agent's inbox:

thrum inbox --unread

You should see the message. Have the agent reply and verify it appears in Telegram.


@Mention Routing

Messages in the group are routed based on @mentions:

Message What happens
@thrum_bot check the API Bot relays to agent
Schema changed in v2 (no @mention) Bot relays to agent
Hey @alice what do you think? Bot ignores — addressed to a human, not the bot

If privacy mode is disabled, the bot sees everything. It relays messages that either @mention it or have no @mention at all. Messages that @mention a human (not the bot) are left alone — the person gets a normal Telegram notification and the agent doesn't need to see it.


Security

The same security model from the DM bridge applies to groups:


Configuration Reference

The groups array sits alongside the existing DM fields in the telegram config:

TelegramGroup

Field Type Description
chat_id int Telegram group chat ID (negative number)
name string Human-readable label for this group (used in logs and the web UI)
trusted_bots int[] Bot user IDs allowed to relay messages in this group (see Multi-Bot Groups)
remote_agents array Proxy agent definitions (see Multi-Bot Groups)

RemoteAgent

Field Type Description
name string Agent name in the remote repo (e.g., coordinator_main)
prefix string Local prefix — the proxy registers as {prefix}:{name}
bot string Target bot's @username for @mention routing

Web UI

The web UI's Settings → Telegram panel has a Groups section where you can:

All changes take effect on daemon restart.


Multi-Bot Groups

Thrum supports putting multiple bots in the same Telegram group. This is fully implemented — trusted bot allowlists, proxy agent registration, @mention routing between bots. The use case is cross-repo coordination: Repo A's bot and Repo B's bot in the same group, agents messaging each other through it.

There's a catch. Telegram's Bot API has a server-side restriction: bots cannot see messages from other bots in groups. This is intentional on Telegram's part — it prevents bot loops. What this means in practice:

The outbound direction works fine. If you want your agent's messages to be visible in a group that humans are watching, that works. What doesn't work is the return path — the other repo's bot picking up those messages and delivering them to its agents.

I'm leaving the multi-bot infrastructure in place because:

  1. The outbound routing is genuinely useful (agents can post to groups that humans monitor)
  2. Telegram might change this restriction in the future
  3. Cross-repo agent-to-agent communication will come through a different mechanism — likely local daemon-to-daemon communication or Tailscale sync, not Telegram

If you want to configure trusted bots or proxy agents anyway (for the outbound direction), here's how:

Trusted Bots

Add bot user IDs to the group's trusted_bots array. This creates a per-group exception to the default "drop all bot messages" rule:

{
  "groups": [
    {
      "chat_id": -100123456789,
      "name": "cross-repo-coord",
      "trusted_bots": [8693071965]
    }
  ]
}

Proxy Agents

Proxy agents register a remote agent as a local stand-in. They show up in thrum team and can be addressed directly:

{
  "groups": [
    {
      "chat_id": -100123456789,
      "name": "cross-repo-coord",
      "trusted_bots": [8693071965],
      "remote_agents": [
        {
          "name": "coordinator_main",
          "prefix": "falcon",
          "bot": "@falconmode_backend_bot"
        }
      ]
    }
  ]
}

Sending to a proxy agent posts a message to the Telegram group with the target bot's @mention:

thrum send "check the /users endpoint" --to @falcon:coordinator_main

The message appears in the group as:

@falconmode_backend_bot @coordinator_main: check the /users endpoint

Humans in the group can see it. The target bot cannot (Telegram limitation). The proxy agent shows in thrum team as:

● @falcon:coordinator_main [remote] (falcon-backend)

Troubleshooting

Messages not arriving from the group:

Bot responses not appearing in the group:

Group chat ID: