Agents
Telegram
Connect your OpenClaw Agent to Telegram.
What You'll Need
- A Telegram account.
- About 5 minutes.
- A Clawi/OpenClaw agent in your dashboard.
Step-by-Step Guide
1. Create Your Telegram Bot
Use @BotFather to create a bot.
- Open Telegram and search for
@BotFather. - Start a chat and send
/newbot. - Follow prompts:
- Display Name: Friendly name (example:
My AI Assistant) - Username: Must end with
bot(example:myaiassistant_bot)
- Display Name: Friendly name (example:
- Copy the token returned by BotFather (format like
123456789:ABC...).
Keep this token private. Anyone with this token can control your bot.
2. Add Telegram to Your Agent
- Open My Agents in dashboard.
- Create a new agent or click
Configureon an existing one. - In Channels, enable Telegram.
- Paste the token into Bot Token.
- Click
Save & Connectand wait for restart.
3. Pair Your Telegram Account
- Search for your bot by username in Telegram.
- Send any message to the bot.
- Copy the 6-digit pairing code from the response.
- In dashboard, click
Pairingon your agent card. - Enter the pairing code.
Advanced Settings
DM Policy
Pairing(default): Users must pair with code.Allowlist: Only specific user IDs can DM.Open: Anyone can DM.Disabled: DMs disabled.
Group Policy
Set whether the bot can be added to groups.
Stream Mode
Off: Full response at once.Partial: Stream in chunks (recommended).Block: Stream semantic blocks.
Troubleshooting
Bot not responding
- Confirm agent status is
Running. - Verify bot token is correct.
- Restart agent from dashboard.
Pairing code not showing
- Ensure DM Policy is set to
Pairing. - Check whether the user is already paired.
- Wait 30 seconds after restart, then retry.