Skip to main content
Build a Telegram bot with tools, memory, and voice note transcription.
1

Create the bot

Open Telegram and message @BotFather:
  1. Send /newbot
  2. Choose a name and username
  3. Copy the bot token
2

Create the agent

telegram_bot.py
3

Install dependencies

4

Set environment variables

5

Run

Open Telegram, find your bot, and start chatting. The bot:
  • Calls the weather tool when asked about weather
  • Remembers conversations across messages
  • Transcribes voice notes to text automatically

Production Deployment

For production, switch to webhook mode:
See Telegram reference for all configuration options.