Docs/Telegram

Telegram

Deploy your Hybrix agents as Telegram bots. Supports private chats, group conversations, inline keyboards, and media attachments.

1. Create a Telegram bot

  1. Open Telegram and message @BotFather
  2. Send /newbot and follow the prompts to name your bot
  3. Copy the HTTP API token that BotFather provides
  4. Add the token to your .env file
env
TELEGRAM_BOT_TOKEN=7123456789:AAH...

2. Configure the channel

json
{
  "channels": [
    {
      "type": "telegram",
      "token": "$TELEGRAM_BOT_TOKEN",
      "agents": ["Atlas"],
      "allowGroups": true,
      "parseMode": "Markdown",
      "webhookMode": true
    }
  ]
}
OptionDefaultDescription
allowGroupstrueRespond in group chats (not just DMs)
parseModeMarkdownMessage formatting: Markdown or HTML
webhookModetrueUse webhooks (recommended) vs. long polling
commands[]Register custom bot commands with Telegram

Supported features

Inline keyboards — Agents can present interactive button menus for confirmations, selections, and navigation.

Media handling — Receive and send photos, documents, voice messages, and videos.

Group mode — In groups, the bot responds only when mentioned by name or via /command.

Bot commands — Register custom commands that appear in Telegram's command menu.

For local development, Hybrix automatically falls back to long polling mode, so you don't need a public URL. Webhook mode is only required in production.