Back to blog

How to create a Telegram AI bot with OpenClaw

Set up a personal AI bot on Telegram using OpenClaw. From creating a bot with BotFather to configuring AI models and testing your first conversation.

K-Claw Team·March 01, 2026·2 min read

Why Telegram for your AI agent?

Telegram is the easiest messaging platform to connect with a personal AI agent. Creating a bot takes under 2 minutes, there's no approval process, and the API is free and well-documented.

Your AI agent on Telegram can:

  • Respond to direct messages instantly
  • Participate in group chats (when mentioned)
  • Send rich messages with formatting, images, and files
  • Handle inline queries for quick lookups

Step 1: create your Telegram bot

Open Telegram and search for @BotFather. Send these commands:

  1. /newbot — Start creating a new bot
  2. Enter a display name (e.g., "My AI Agent")
  3. Enter a username ending in "bot" (e.g., my_ai_agent_bot)

BotFather will give you a bot token — a long string like 123456789:ABCdefGHIjklMNOpqrsTUVwxyz. Copy it carefully.

Step 2: install OpenClaw with k-claw

If you haven't already, install OpenClaw on your VPS:

curl -fsSL https://claw.krokanti.com/install | bash

When the installer asks about your messaging channel, choose Telegram and paste your bot token.

Step 3: test your bot

After installation completes:

  1. Open Telegram and find your bot by its username
  2. Send "Hello!" to start a conversation
  3. Your AI agent should respond within seconds

Customizing your bot

Back in BotFather, you can customize your bot's appearance:

  • /setdescription — Profile description
  • /setabouttext — "About" section text
  • /setuserpic — Upload a profile picture
  • /setcommands — Add command suggestions

Group chat setup

To use your bot in group chats:

  1. Add the bot to a group
  2. The bot will respond when mentioned (@your_bot_name) or when a keyword is detected
  3. Configure group keywords in your OpenClaw config file

For privacy in groups, the bot only processes messages that mention it — it doesn't read every message.

Tips for the best experience

  • Pin the bot chat for quick access
  • Use /help to see available commands
  • Customize the system prompt to match your preferred communication style
  • Set up keyboard shortcuts in Telegram for common prompts

Your AI agent, always in your pocket.

Connect OpenClaw to Telegram in minutes. Ask questions, delegate tasks, and get briefings — all from your phone.

Connect to Telegram