Requirements & Constraints

  • Compatibility: AnythingLLM >v1.11.2 (Docker, Desktop Mac/Windows/Linux).
  • Network: The AnythingLLM instance must be running and online for the bot to function.
  • Access Mode: Single-user mode (or single-user with password protection) only. Enabling multi-user mode automatically disconnects the bot.
  • Capacity: Limit of one Telegram bot per AnythingLLM instance.

Setup & Configuration

Step 1: Create Telegram Bot via BotFather

  1. Open @BotFather in Telegram.
  2. Send command: /newbot
  3. Define the bot display name and username.
  4. Copy the generated API token.

Within @BotFather, apply the following settings to your bot:

  • Disable group joins.
  • Disable inline mode.
  • Use a non-obvious username.

Step 3: Connect to AnythingLLM

  1. Navigate to Settings > Channels > Telegram in the AnythingLLM UI.
  2. Paste the Telegram API token.
  3. Click Connect Bot.

Step 4: Authorize Users

  1. Have the user message the Telegram bot to generate a pairing code.
  2. Navigate to Settings > Channels > Telegram > Users in AnythingLLM.
  3. Verify the pairing code matches the user’s code.
  4. Click the check mark to authorize access.

Operations & Commands

Inline Bot Capabilities

  • Text Chat: Uses the active workspace LLM.
  • Image Input: Supported via vision-capable LLMs.
  • Voice Input: Auto-transcribes and processes voice messages.
  • Agent Execution: Supports @agent commands, tool calling, and PNG chart rendering.

Bot Commands

CommandDescription
/startDisplay welcome message and active workspace metadata
/switchToggle active workspace or thread
/newCreate a new thread in the active workspace
/history [count]Retrieve recent messages (Default: 10, Max: 50)
/statusQuery active workspace, thread, provider, and model configurations
/resetClear conversation history context
/proofOutput document source citations for the last response
/modelHot-swap active LLM model
/helpList available commands