Telegram Bot Setup
Telegram is aidaemon’s primary channel, built on the teloxide framework. See also Slack for workspace integration.
Create a Bot
- Message @BotFather on Telegram
- Send
/newbotand follow the prompts - Copy the bot token (format:
123456789:ABCdefGHIjklMNOpqrSTUvwxYZ)
Get Your User ID
Your numeric Telegram user ID is needed for the allowed_user_ids list. You can find it by messaging @userinfobot.
Configuration
config.toml
[telegram]
bot_token = "123456789:ABCdefGHIjklMNOpqrSTUvwxYZ"
allowed_user_ids = [123456789]Access Control
If
allowed_user_ids is empty, anyone who finds your bot can chat with it. Always set this in production.Features
- Typing indicator โ sent every 4 seconds during agent processing
- Markdown rendering โ agent responses are converted to Telegram HTML
- Long message splitting โ responses over 4096 chars are split at paragraph/line boundaries
- Screenshot sharing โ browser screenshots sent as photos with captions
- File transfer โ send and receive documents, photos, audio, video via Telegram
- Live task status โ
/tasksshows running agent tasks with elapsed time - Inline approval buttons โ Allow Once / Allow Always / Deny buttons for command approval
- Multi-bot support โ configure multiple Telegram bots via
[[telegram.bots]] - Enhanced file handling โ MIME type detection, size limits, and path security validation
Retry Behavior
The Telegram dispatcher uses exponential backoff on crashes:
- Initial backoff: 5s
- Doubles each crash: 5s โ 10s โ 20s โ 40s โ 60s (max)
- Resets to 5s if the bot runs stable for 60+ seconds