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.
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:
/newbot— Start creating a new bot- Enter a display name (e.g., "My AI Agent")
- 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:
- Open Telegram and find your bot by its username
- Send "Hello!" to start a conversation
- 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:
- Add the bot to a group
- The bot will respond when mentioned (@your_bot_name) or when a keyword is detected
- 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
/helpto 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 TelegramRelated articles
What is a personal AI agent? A complete guide for 2026
Learn what personal AI agents are, how they work, and why self-hosting gives you privacy, control, and unlimited customization compared to cloud-based assistants.
How to install OpenClaw on a VPS: step-by-step guide
A complete walkthrough for installing OpenClaw on your own VPS. From choosing a server to configuring AI models and messaging channels.