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
- Open the official account @BotFather in Telegram.
- Send
/newbotand follow the prompts:- Bot name (display name, e.g.
My CowAgent Bot) - Bot username (must end with
bot, e.g.my_cowagent_bot)
- Bot name (display name, e.g.
- Once created, BotFather returns an HTTP API Token (e.g.
123456789:ABCdefGhIJKlmNoPQRsTUVwxyZ). Keep it safe.
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:
/setprivacy- Pick the bot you just created
- 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
- Web Console (Recommended)
- Config File
Open the Web Console (default
http://127.0.0.1:9899), go to Channels, click Add Channel, choose Telegram, paste the Bot Token, and click connect.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, clickStartand chat away. - Group chat: add the bot to a group, then trigger it with
@bot helloor by replying to one of the bot’s messages. If the bot doesn’t respond in groups, double-check Privacy Mode in Step 2.
