This repository demonstrates how to connect OpenClaw to a Telegram Bot and run a production-ready, self-hosted Telegram AI Agent using the OpenClaw Gateway.
openclaw-telegram-ai-agent.mp4
If you're searching for:
- openclaw
- openclaw telegram bot
- telegram AI agent bot
- connect openclaw to telegram
- self-hosted telegram ai assistant
You're in the right place.
This project shows how to:
- Create a Telegram bot using BotFather
- Connect the bot to OpenClaw Gateway
- Configure Telegram channel settings in OpenClaw
- Pair and approve users securely
- Enable streaming AI responses
- Deploy a persistent AI assistant on Telegram
This turns Telegram into a powerful AI automation interface powered by OpenClaw.
OpenClaw is a self-hosted AI agent gateway that connects:
- Messaging platforms (Telegram, WhatsApp, Discord, etc.)
- Large Language Models (OpenAI, Anthropic, etc.)
- Custom tools & automation workflows
Instead of just chatting, your AI can execute actions.
Telegram User
β
Telegram Bot (BotFather Token)
β
OpenClaw Gateway
β
AI Agent + LLM + Tools
OpenClaw acts as the bridge between Telegram and your AI runtime.
- Open Telegram
- Search for
@BotFather - Run
/newbot - Copy your Bot Token
Edit your OpenClaw configuration file:
{
"channels": {
"telegram": {
"enabled": true,
"botToken": "YOUR_TELEGRAM_BOT_TOKEN",
"dmPolicy": "pairing",
"groups": {
"*": {
"requireMention": true
}
}
}
}
}