Skip to content

Telegram setup

Telegram is Bestie’s first real chat channel after terminal chat. It runs locally with long polling and owner-only access.

Run the helper:

Terminal window
bestie telegram setup

Or configure .bestie/config.json manually:

{
"channels": {
"telegram": {
"enabled": true,
"botTokenEnv": "BESTIE_TELEGRAM_BOT_TOKEN",
"ownerUserId": "123456789"
}
}
}

Add the bot token to .bestie/.env:

Terminal window
BESTIE_TELEGRAM_BOT_TOKEN=123456:bot-token-here

Never commit .bestie/.env.

Terminal window
bestie telegram

For one update cycle during smoke/debug work:

Terminal window
bestie telegram --once
  • /start - owner-only readiness reply.
  • /help - supported commands.
  • /status - short local status summary without secrets.
  • /doctor - concise Doctor summary.
  • /memory or /memory list - memory status or recent-memory summary.
  • /memory pending - pending-memory review queue.
  • /memory pending inspect <id> - inspect one pending memory.
  • /memory pause and /memory resume - pause or resume local memory.
  • /approvals - list pending action approval requests.
  • /approve <id> and /deny <id> - record owner decisions. The current foundation records decisions without executing approved actions.

Unknown slash commands return a short fallback instead of going to the LLM.

Telegram can download supported files into .bestie/workspace/telegram/..., forward caption and metadata, and include bounded previews for text-like files.

Important defaults:

  • downloadPolicy: allow
  • maxBytes: 20971520
  • parseMaxBytes: 5242880
  • visionPolicy: deny
  • transcriptionPolicy: deny

Uploaded content is untrusted. Full saved files can be read later through local read tools when permitted.

When a Telegram turn uses tools, Bestie should edit one progress message instead of spamming the chat. The final answer replaces the progress message when possible.

Progress text should be user-facing, for example:

Miu đang xem danh sách tệp trong src/cli
Miu đang tìm tệp khớp *.md trong docs
Miu đang gom tài liệu Markdown từ src

Raw internal tool names should not leak into the Telegram chat.

Terminal window
npm run build
npm run smoke
npm run smoke:doctor:exit-code
bestie telegram --once
bestie telegram

Then send /start, /help, /status, /doctor, /memory, /memory pending, approval commands when pending approvals exist, and a normal owner text message.

Messages from any other Telegram user should be ignored.