OpenClaw: Build Your Own AI Assistant on WhatsApp, Telegram & Discord
What if you could chat with an AI assistant right inside your favorite messenger โ WhatsApp, Telegram, Discord, or iMessage? Not a limited chatbot, but a full-powered AI agent that can run code, search the web, manage files, and remember your conversations?
OpenClaw makes this possible. Itโs an open-source gateway that connects AI models (Claude, GPT, etc.) to your messaging apps.
Photo by Google DeepMind on Unsplash
What is OpenClaw?
OpenClaw is a personal AI assistant gateway. It sits between your messaging apps and AI models:
Your Phone (WhatsApp/Telegram/Discord)
โ
โผ
โโโโโโโโโโโโโโโโโโโโโโโ
โ OpenClaw โ
โ Gateway โ โ Single process manages all channels
โโโโโโโโโโโฌโโโโโโโโโโโโ
โ
โผ
AI Agent (Pi) โ Claude, GPT, Gemini, etc.
Key Features
| Feature | Description |
|---|---|
| ๐ฑ WhatsApp | Full integration via WhatsApp Web (Baileys) |
| โ๏ธ Telegram | Bot API with group support (grammY) |
| ๐ฎ Discord | DMs + guild channels (discord.js) |
| ๐ฌ iMessage | macOS native integration |
| ๐งฉ Plugins | Mattermost, Slack, Signal, and more |
| ๐ Security | DM pairing, allowlists, auth tokens |
| ๐ง Multi-Agent | Run multiple AI agents simultaneously |
| โฐ Cron Jobs | Scheduled tasks and reminders |
| ๐ Media | Send/receive images, audio, documents |
| ๐ฅ๏ธ Dashboard | Web-based Control UI at localhost:18789 |
Links: Official Docs ยท GitHub ยท Discord Community
Prerequisites
- OS: macOS, Linux, or Windows (via WSL2)
- Node.js: Version 22 or higher
- AI API Key: Anthropic (recommended), OpenAI, or others
Install Node.js
# macOS (Homebrew)
brew install node
# Ubuntu/Debian
curl -fsSL https://deb.nodesource.com/setup_22.x | sudo -E bash -
sudo apt-get install -y nodejs
# Verify
node -v # Should show v22.x.x or higher
Installation
Option 1: One-Line Installer (Recommended)
curl -fsSL https://openclaw.ai/install.sh | bash
This installs OpenClaw globally and launches the onboarding wizard.
Windows (PowerShell):
iwr -useb https://openclaw.ai/install.ps1 | iex
Option 2: Manual npm Install
npm install -g openclaw@latest
Option 3: From Source (Developers)
git clone https://github.com/openclaw/openclaw.git
cd openclaw
pnpm install
pnpm ui:build
pnpm build
Setup: The Onboarding Wizard
The wizard walks you through everything:
openclaw onboard --install-daemon
What the Wizard Configures
- Mode โ Local (your machine) or Remote (server)
- AI Model Auth โ API keys or OAuth
- Gateway โ Port, binding, auth token
- Channels โ WhatsApp, Telegram, Discord, etc.
- Daemon โ Background service (launchd on macOS, systemd on Linux)
- Skills โ Additional capabilities
Model Authentication
The wizard supports multiple AI providers:
| Provider | Auth Method | Recommended Model |
|---|---|---|
| Anthropic | API key (recommended) | Claude Opus 4.5 |
| OpenAI | API key or OAuth | GPT-5.2 |
| Gemini | API key | Gemini models |
| Moonshot | API key | Kimi K2 |
| MiniMax | Auto-configured | M2.1 |
๐ก Recommendation: Anthropic API key + Claude Opus 4.5 offers the best long-context understanding and security against prompt injection.
Starting the Gateway
After onboarding, the daemon should be running:
# Check status
openclaw gateway status
# Manual start (foreground mode)
openclaw gateway --port 18789 --verbose
Access the Dashboard
Open your browser to:
http://127.0.0.1:18789/
Or use the CLI shortcut:
openclaw dashboard
The Dashboard (Control UI) lets you:
- Chat with the AI directly
- Manage sessions and channels
- Configure cron jobs
- Monitor system health
- Edit configuration
Connecting Channels
WhatsApp Setup
- Run the login command:
openclaw channels login - A QR code appears in the terminal
- On your phone: WhatsApp โ Settings โ Linked Devices โ Link a Device
- Scan the QR code
- Done!
Recommended: Use a separate phone number for the assistant. If you link your personal WhatsApp, every message to you becomes AI input.
Configuration (~/.openclaw/openclaw.json):
{
"channels": {
"whatsapp": {
"dmPolicy": "allowlist",
"allowFrom": ["+1234567890"]
}
}
}
Telegram Setup
- Message @BotFather on Telegram
- Send
/newbotand follow the prompts - Copy the bot token
{
"channels": {
"telegram": {
"enabled": true,
"botToken": "YOUR_BOT_TOKEN",
"dmPolicy": "pairing",
"groups": { "*": { "requireMention": true } }
}
}
}
Discord Setup
- Go to Discord Developer Portal
- Create New Application โ Bot โ Add Bot
- Enable Message Content Intent under Privileged Gateway Intents
- Copy the bot token
- Invite the bot to your server
{
"channels": {
"discord": {
"enabled": true,
"token": "YOUR_BOT_TOKEN"
}
}
}
DM Security (Pairing)
OpenClaw blocks unknown senders by default. When someone DMs your bot for the first time, they receive a pairing code:
# List pending pairing requests
openclaw pairing list whatsapp
# Approve a request
openclaw pairing approve whatsapp <code>
The Workspace: Your AIโs Brain
The AI assistant operates from a workspace directory:
~/.openclaw/workspace/
โโโ AGENTS.md # Behavioral rules
โโโ SOUL.md # Personality & tone
โโโ USER.md # Info about you
โโโ IDENTITY.md # Agent identity
โโโ TOOLS.md # Tool configurations
โโโ HEARTBEAT.md # Periodic tasks
โโโ memory/ # Persistent memory
โโโ 2026-02-03.md
Edit these files to customize your AIโs personality, knowledge, and behavior.
Full Configuration Example
Hereโs a complete personal assistant setup:
{
"logging": { "level": "info" },
"agent": {
"model": "anthropic/claude-opus-4-5",
"workspace": "~/.openclaw/workspace",
"thinkingDefault": "high",
"timeoutSeconds": 1800,
"heartbeat": { "every": "30m" }
},
"channels": {
"whatsapp": {
"allowFrom": ["+1234567890"],
"groups": { "*": { "requireMention": true } }
},
"telegram": {
"enabled": true,
"botToken": "YOUR_TOKEN",
"dmPolicy": "pairing"
},
"discord": {
"enabled": true,
"token": "YOUR_TOKEN"
}
},
"session": {
"scope": "per-sender",
"resetTriggers": ["/new", "/reset"],
"reset": {
"mode": "daily",
"atHour": 4,
"idleMinutes": 10080
}
}
}
Heartbeats: Proactive AI
OpenClaw can run periodic tasks automatically (default: every 30 minutes). Define tasks in HEARTBEAT.md:
- ๐ง Check emails
- ๐ Calendar reminders
- ๐ค๏ธ Weather updates
- ๐ Stock monitoring
- ๐ Custom notifications
Verification & Troubleshooting
# Full status report
openclaw status --all
# Health check
openclaw health
# Security audit
openclaw security audit --deep
# Diagnose issues
openclaw doctor
Common Issues
| Problem | Solution |
|---|---|
openclaw not found |
Add $(npm prefix -g)/bin to PATH |
| WhatsApp disconnects | Run openclaw channels login again |
| Gateway wonโt start | Run openclaw doctor |
| No AI response | Check auth: openclaw health |
Next Steps
- ๐ฅ๏ธ macOS Menu Bar App โ Voice activation
- ๐ฑ iOS/Android Nodes โ Camera, location integration
- โฐ Cron Jobs โ Scheduled automation
- ๐ง Skills System โ Extend capabilities
- ๐ Remote Access โ SSH tunnel, Tailscale
- ๐ณ Docker Setup โ Containerized deployment
Conclusion
OpenClaw puts a full-powered AI assistant in your pocket โ through the messaging apps you already use. Itโs open-source, self-hosted, and privacy-friendly. Whether you want a coding helper, a personal organizer, or a creative companion, OpenClaw gives you the foundation to build it.
Get started now:
- ๐ Official Documentation
- ๐ป GitHub Repository
- ๐ฌ Discord Community
- ๐ Quick Start Guide