The Telegram adapter lets you interact with Archon from any Telegram client — desktop, mobile, or web — using the Telegram Bot API with long-polling. Archon uses the grammY SDK. No public URL or webhook is required; the adapter polls Telegram directly. This page walks through creating a bot, configuring environment variables, restricting access, and understanding how conversations work.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/coleam00/Archon/llms.txt
Use this file to discover all available pages before exploring further.
Prerequisites
- Archon server running — see Quickstart
- A Telegram account
Setup
Create a bot with BotFather
- Open Telegram and start a conversation with @BotFather
- Send
/newbotand follow the prompts — choose a name and a username (must end inbot) - BotFather replies with your bot token in the format
123456789:ABCdefGHIjklMNOpqrsTUVwxyz - Save the token — you will need it in the next step
Set the bot token
Add the token to your Archon reads this variable at startup. If the variable is missing the Telegram adapter will not start, but the rest of the server continues running.
.env file:Restricting access (optional)
By default the bot responds to any Telegram user. To restrict it to specific users, set a comma-separated whitelist of Telegram user IDs. Finding your user ID:- Open Telegram and start a conversation with @userinfobot
- It replies with your numeric user ID (e.g.
123456789)
The variable name
TELEGRAM_ALLOWED_USERS is also accepted as an alias.Streaming mode (optional)
stream mode Archon sends partial AI responses as they arrive, updating the message in place. In batch mode it sends one complete message at a time. See Configuration for details.
How conversations work
Each Telegram chat maps to exactly one Archon conversation. The conversation ID is the Telegramchat_id — the numeric identifier for the chat (private chat with the bot, group, or supergroup).
- Private chats — every user has a dedicated conversation with the bot
- Group chats — the bot shares a single conversation context with the entire group
Usage
Once the bot is running, start a conversation in Telegram:Troubleshooting
Bot does not respond
Bot does not respond
- Verify
TELEGRAM_BOT_TOKENis set correctly in.env - Check the server logs for
telegram.start_failedortelegram.start_conflict_retrying - If you see a
409 Conflicterror, another process is polling with the same token — stop it and wait about 60 seconds before restarting
Unauthorized messages
Unauthorized messages
Messages are too long
Messages are too long
Telegram has a 4096-character message limit. Archon automatically splits long responses into paragraph-sized chunks and falls back to plain text if Markdown formatting fails.
Further reading
Configuration reference
Full list of environment variables and config options.
Slack adapter
Connect Archon to a Slack workspace via Socket Mode.