max tui). But Telegram is the best way to interact with Max when you’re away from your machine: send tasks from your phone, get notified when background work finishes, and check on running workers from anywhere.
Required values
Two environment variables must both be present for Telegram to be enabled:The HTTP API token issued by @BotFather when you create a bot.Example:
123456:ABC-DEF1234ghIkl-zyx57W2v1u123ew11Your numeric Telegram user ID. Max only responds to this user.Example:
123456789config.telegramEnabled is false and the bot is not started.
How Max authenticates
Max does not use Telegram’s built-in privacy settings for access control. Instead, every incoming update is checked in middleware:- If the sender’s user ID matches
AUTHORIZED_USER_ID, the message is processed normally. - If the sender is anyone else, the update is silently dropped — no error, no reply.
Bot commands
Once your bot is running, these slash commands are available in any Telegram chat with it:| Command | Description |
|---|---|
/cancel | Cancel the current in-flight message being processed by the orchestrator. |
/model | Show the current model, or switch to a new one (e.g. /model gpt-4.1). |
/auto | Toggle automatic model routing on or off. |
/memory | Display stored long-term memories. |
/skills | List all installed skills. |
/workers | Show active background worker sessions and their status. |
/restart | Restart the Max daemon. |
/help | Show the full command list in the Telegram chat. |
Security recommendations
Lock the bot to your user ID
Lock the bot to your user ID
Always set
AUTHORIZED_USER_ID. Without it, config.telegramEnabled returns false even if a token is present, so the bot will not start. But if you manually bypass this check, anyone who finds your bot can send it commands.Disable group joins
Disable group joins
By default, any Telegram user can add your bot to a group chat. Prevent this:
- Open @BotFather
- Send
/mybots→ select your bot → Bot Settings → Allow Groups? - Set to Disable
Rotate your token if exposed
Rotate your token if exposed
If your
TELEGRAM_BOT_TOKEN is ever committed to a repository or shared accidentally:- Open @BotFather and send
/revoke - Generate a new token
- Update
~/.max/.envand restart the daemon
Setting up Telegram
For a step-by-step walkthrough of creating a bot and obtaining your user ID, see the Telegram setup guide. You can also re-run the interactive wizard at any time:~/.max/.env.