Connect Adam to Telegram. Send text or photos to the bot and get AI responses. Supports tools, memory, vision, and all Adam features.
- Open Telegram and search for @BotFather
- Send
/newbot - Choose a name (e.g. "My Adam Bot")
- Choose a username (must end in
bot, e.g.my_adam_bot) - BotFather will give you a token like
7123456789:AAH...— copy it
Create a .env file in this directory (or the project root):
TELEGRAM_BOT_TOKEN=7123456789:AAHxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
ANTHROPIC_API_KEY=sk-ant-...
Any LLM provider works — set ANTHROPIC_API_KEY, OPENAI_API_KEY, or GEMINI_API_KEY. For local models, use --local instead. Add OPENAI_API_KEY for voice message support (Whisper STT).
make
./telegramOr with a local model:
./telegram --local ../../models/gemma-3-4b-it-Q4_K_S.ggufWith vision:
./telegram --local ../../models/gemma-3-4b-it-Q4_K_S.gguf --mmproj ../../models/mmproj-gemma-3-4b-it-F16.ggufOpen your bot in Telegram (search for the username you chose) and press Start. Send any message.
| Command | Description |
|---|---|
/start |
Welcome message with instructions |
/tools |
Enable calculator and web search |
/memory |
Enable persistent memory (survives restart) |
/clear |
Clear conversation history |
/status |
Show current configuration |
- Text chat — multi-turn conversation with full history
- Voice messages — send voice notes, transcribed via Whisper STT then processed
- Image input — send photos and the bot describes/analyzes them
- Tool calling — calculator, web search (enable with
/tools) - Memory — persistent knowledge across conversations (enable with
/memory) - All providers — Anthropic, OpenAI, Gemini, or local llama.cpp
The bot uses Telegram's long polling (getUpdates with 30s timeout) — no webhook or public IP needed. Each message is processed sequentially through adam_run().
For photos, the bot downloads the highest-resolution version via getFile, attaches it to the conversation via adam_history_attach(), and sends the result. Voice messages are downloaded as OGG/Opus files and transcribed via the OpenAI Whisper API (adam_stt_transcribe), then the transcribed text is processed through adam_run() like a normal message.