Gateway › Telegram

Telegram

Overview

The default gateway. One bot, one getUpdates consumer, group and topic. Commands start with / (e.g. /agent status) — see Chat commands.

Setup

  1. Create a bot with BotFather, get the token <bot_id>:<secret>.
  2. Save the token on the web app Integrations page → Gateways → Create on the telegram row (Bot token, Owner user id), then Enable. Credentials are stored by agent-hub, not in .env.
  3. Add the bot to the group; enable Topics if you want each topic to be its own scope.
  4. Type /project add in the group.

For a default lane for messages with no resolvable target, open Settings on the Telegram row of the Integrations page (Gateways card) and set Fallback target to telegram:<chat_id>:<thread_id>.

The fallback target is the fallback lane. Leave it empty and the first send that needs it logs an error and sends nothing.

Notes

Each bot token has only one getUpdates consumer. A second fleet on the same machine (AGENT_HUB_INSTANCE) must have its own bot, or the two pollers will fight over updates.