Skip to content

Telegram Integration

This guide walks you through connecting an Aigentic agent to Telegram as a bot.

  • An Aigentic agent already created
  • A Telegram account
  1. Open Telegram and search for @BotFather.
  2. Start a conversation and send /newbot.
  3. Follow the prompts:
    • Enter a display name for your bot (e.g., “My AI Agent”).
    • Enter a username for your bot (must end in bot, e.g., my_ai_agent_bot).
  4. BotFather responds with your bot token. Copy it.
Use this token to access the HTTP API:
7123456789:AAHxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Step 2: Configure the Bot Profile (Optional)

Section titled “Step 2: Configure the Bot Profile (Optional)”

While still talking to BotFather, you can customize your bot:

CommandPurpose
/setdescriptionShort description shown when users find your bot
/setabouttextText shown on the bot’s profile page
/setuserpicUpload a profile photo
/setcommandsDefine command menu entries

Setting commands is recommended:

/start - Start a conversation
/help - Show available commands
/reset - Clear conversation history
  1. Open Channels from the sidebar.
  2. Click Configure on the Telegram card.
  3. Click Add New Bot.
  4. Paste the bot token from BotFather.
  5. Optionally click Test Token to verify the token is valid.
  6. Choose the response mode — Single Agent or Swarm (routes messages to a swarm’s orchestrator).
  7. Select the responding agent (or swarm) from the dropdown.
  8. Click Add Bot.

The token is encrypted and stored in the credential vault. You can add multiple Telegram bots — each appears in the “Active Bots” list where you can start, stop, or delete them individually.

  1. Open Telegram and find your bot by searching for its username.
  2. Click Start or send /start.
  3. Send a message:
    Hello! What can you do?
  4. The bot should respond within a few seconds.

In private (1-on-1) chats, the agent receives every message and responds directly. Conversation context is maintained per user.

In group chats, the bot’s behavior depends on its privacy mode:

  • Privacy mode ON (default): The bot only sees messages that are commands (start with /), directly reply to the bot’s messages, or mention the bot by @username.
  • Privacy mode OFF: The bot sees all messages in the group. Disable via BotFather with /setprivacy.

Telegram supports Markdown formatting. Aigentic automatically formats agent responses with bold, italic, code, and code blocks. Long responses are split into multiple messages if they exceed Telegram’s 4096-character limit.

  • Verify the bot token is correct (click Configure on the Telegram card in the Channels page).
  • Check that the agent is active.
  • Send /start to the bot to initialize the conversation.

Bot responds in private chat but not in groups

Section titled “Bot responds in private chat but not in groups”
  • Check the group privacy mode setting.
  • In groups with privacy mode enabled, the bot only sees commands and replies to its messages.
  • Make sure the bot was added to the group as a member.
  • Check the agent’s model — larger models produce slower responses.
  • The agent may be processing a complex request that requires tool invocations.

”Conflict: terminated by other getUpdates request”

Section titled “”Conflict: terminated by other getUpdates request””

This error means another instance is polling the same bot token. Ensure only one connection is using this bot token at a time. If you have Server-Side Polling enabled, the daemon may conflict with a browser-tab bridge — use one or the other.