OpenClaw: Build Your Own AI Assistant on WhatsApp, Telegram & Discord

Complete guide to installing OpenClaw - the open-source personal AI assistant that works on WhatsApp, Telegram, Discord, and iMessage. Step-by-step setup with configuration examples.

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.

AI Assistant 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

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

  1. Mode โ€” Local (your machine) or Remote (server)
  2. AI Model Auth โ€” API keys or OAuth
  3. Gateway โ€” Port, binding, auth token
  4. Channels โ€” WhatsApp, Telegram, Discord, etc.
  5. Daemon โ€” Background service (launchd on macOS, systemd on Linux)
  6. 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

  1. Run the login command:
    openclaw channels login
    
  2. A QR code appears in the terminal
  3. On your phone: WhatsApp โ†’ Settings โ†’ Linked Devices โ†’ Link a Device
  4. Scan the QR code
  5. 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

  1. Message @BotFather on Telegram
  2. Send /newbot and follow the prompts
  3. Copy the bot token
{
  "channels": {
    "telegram": {
      "enabled": true,
      "botToken": "YOUR_BOT_TOKEN",
      "dmPolicy": "pairing",
      "groups": { "*": { "requireMention": true } }
    }
  }
}

Discord Setup

  1. Go to Discord Developer Portal
  2. Create New Application โ†’ Bot โ†’ Add Bot
  3. Enable Message Content Intent under Privileged Gateway Intents
  4. Copy the bot token
  5. 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


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: