Skip to main content
Integrate CowAgent into Telegram via the official Bot API. Supports private chat and group chat (triggered by @mention or replying to the bot). Uses Long Polling — no public IP required, works out of the box.

1. Setup

Step 1: Create a Bot via BotFather

  1. Open the official account @BotFather in Telegram.
  2. Send /newbot and follow the prompts:
    • Bot name (display name, e.g. My CowAgent Bot)
    • Bot username (must end with bot, e.g. my_cowagent_bot)
  3. Once created, BotFather returns an HTTP API Token (e.g. 123456789:ABCdefGhIJKlmNoPQRsTUVwxyZ). Keep it safe.
The token is the password of your bot — never share it. If it leaks, send /revoke to @BotFather to reset it.

Step 2: (Group chat only) Disable Privacy Mode

Skip this step if you only use private chat. Telegram bots run in Privacy Mode by default — in groups they can only see commands suffixed with @bot (e.g. /start@your_bot) and replies to bot messages; plain @bot hello text messages are not delivered, so the bot will appear unresponsive in groups. Send the following to @BotFather:
  1. /setprivacy
  2. Pick the bot you just created
  3. Choose Disable
If the bot is still silent in groups after this, try removing it from the group and adding it back.

Step 3: Connect to CowAgent

The integration is ready when you see logs like:

2. Capabilities

Command Menu

On startup, the channel registers a command menu with BotFather. Typing / in Telegram shows a dropdown:
Telegram’s command menu only displays top-level commands; subcommands are entered with a space, e.g. /skill list, /context clear.

3. Usage

Once connected:
  • Private chat: search for your bot username (e.g. @my_cowagent_bot) in Telegram, click Start and chat away.
  • Group chat: add the bot to a group, then trigger it with @bot hello or by replying to one of the bot’s messages. If the bot doesn’t respond in groups, double-check Privacy Mode in Step 2.
When sending an image or file, you can add a caption (description / question) directly in the attachment input — the bot will answer based on both. Sending an attachment first and then a follow-up question also works; the two messages are merged automatically.