openclaw-whatsapp
WhatsApp bridge for OpenClaw — send/receive messages, auto-reply agents, QR pairing, message search, contact sync
About this skill
The `openclaw-whatsapp` skill acts as a crucial bridge, connecting OpenClaw AI agents directly to the WhatsApp messaging platform. This Go binary provides a programmatic interface, allowing agents to perform a wide array of WhatsApp functions. It enables the sending and receiving of messages, setting up AI-powered auto-reply systems for direct messages, seamless QR code pairing for authentication, comprehensive message history search, and efficient contact synchronization. This skill is designed for developers and users leveraging OpenClaw for AI agent development who need to extend their agents' capabilities into real-world communication channels. By integrating WhatsApp, agents can move beyond internal systems to engage with users on a widely adopted messaging platform, automating responses, delivering notifications, and managing interactions at scale. Users would deploy this skill to empower their AI agents with robust WhatsApp integration, enabling use cases from automated customer support and personalized notifications to data collection and interactive chat experiences, all managed through the OpenClaw framework.
Best use case
The primary use case is integrating AI agent automation with WhatsApp for seamless communication workflows. This skill benefits OpenClaw agent developers and users who need to automate customer support, implement intelligent chatbots, send real-time notifications, or manage contacts and chat histories directly through their AI agents.
WhatsApp bridge for OpenClaw — send/receive messages, auto-reply agents, QR pairing, message search, contact sync
Users can expect their OpenClaw AI agents to seamlessly send and receive WhatsApp messages, implement auto-replies, and manage contacts and message history programmatically.
Practical example
Example input
An AI agent using this skill might execute: `openclaw-whatsapp send "1234567890@s.whatsapp.net" "Your meeting is scheduled for 3 PM today." `
Example output
Output from the skill could be: `Message sent to 1234567890@s.whatsapp.net. Status: Success.` Or a log entry indicating message delivery.
When to use this skill
- When an OpenClaw AI agent needs to send or receive WhatsApp messages programmatically.
- To set up AI-driven auto-reply systems for WhatsApp direct messages.
- For automating WhatsApp-based notifications, alerts, or interactive dialogues.
- To enable an AI agent to search and retrieve WhatsApp message history or sync contacts.
When not to use this skill
- If you do not use OpenClaw or a similar AI agent framework for automation.
- For casual, manual WhatsApp usage without the need for programmatic automation.
- If you require a fully visual or GUI-based WhatsApp client for direct user interaction.
- For applications requiring direct integration with the official WhatsApp Business API.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/openclaw-whatsapp/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How openclaw-whatsapp Compares
| Feature / Agent | openclaw-whatsapp | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | medium | N/A |
Frequently Asked Questions
What does this skill do?
WhatsApp bridge for OpenClaw — send/receive messages, auto-reply agents, QR pairing, message search, contact sync
How difficult is it to install?
The installation complexity is rated as medium. You can find the installation instructions above.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
Related Guides
AI Agents for Coding
Browse AI agent skills for coding, debugging, testing, refactoring, code review, and developer workflows across Claude, Cursor, and Codex.
Best AI Skills for Claude
Explore the best AI skills for Claude and Claude Code across coding, research, workflow automation, documentation, and agent operations.
Cursor vs Codex for AI Workflows
Compare Cursor and Codex for AI coding workflows, repository assistance, debugging, refactoring, and reusable developer skills.
SKILL.md Source
# openclaw-whatsapp
WhatsApp bridge that connects OpenClaw agents to WhatsApp. Send messages, auto-reply to DMs with AI, search message history, and sync contacts — all from a single Go binary.
## Quick Reference
```bash
# Check status
openclaw-whatsapp status
# Send a message
openclaw-whatsapp send "NUMBER@s.whatsapp.net" "Your message"
# View logs (if running as service)
journalctl --user -u openclaw-whatsapp.service -f
# View worker logs
tail -f /tmp/openclaw-wa-agent/worker.log
```
## Full Setup (Self-Service)
Follow these steps to set up WhatsApp auto-reply from scratch.
### Step 1: Install the binary
```bash
curl -fsSL https://raw.githubusercontent.com/0xs4m1337/openclaw-whatsapp/main/install.sh | bash
```
Verify installation:
```bash
openclaw-whatsapp version
```
### Step 2: Find your openclaw binary path
```bash
which openclaw
# Example output: /home/USER/.nvm/versions/node/v22.22.0/bin/openclaw
```
Save this path — you'll need it in Step 4.
### Step 3: Install relay scripts
Copy scripts from this skill directory:
```bash
SKILL_DIR="$(dirname "$(realpath "$0")")" # or use absolute path to skill
# Copy scripts
sudo cp "$SKILL_DIR/scripts/wa-notify.sh" /usr/local/bin/wa-notify.sh
sudo cp "$SKILL_DIR/scripts/wa-notify-worker.sh" /usr/local/bin/wa-notify-worker.sh
sudo chmod +x /usr/local/bin/wa-notify.sh /usr/local/bin/wa-notify-worker.sh
```
Or if running as agent, use the skill directory path directly:
```bash
cp ~/clawd/skills/openclaw-whatsapp/scripts/wa-notify.sh /usr/local/bin/
cp ~/clawd/skills/openclaw-whatsapp/scripts/wa-notify-worker.sh /usr/local/bin/
chmod +x /usr/local/bin/wa-notify.sh /usr/local/bin/wa-notify-worker.sh
```
### Step 4: Configure the worker script
Edit `/usr/local/bin/wa-notify-worker.sh` and update the PATH line with your openclaw binary path from Step 2:
```bash
# Find this line near the top:
export PATH="/home/oussama/.nvm/versions/node/v22.22.0/bin:$PATH"
# Change it to your actual path:
export PATH="/home/YOUR_USER/.nvm/versions/node/vXX.XX.X/bin:$PATH"
```
Also update the worker script path in `/usr/local/bin/wa-notify.sh`:
```bash
# Find this line near the bottom:
nohup /home/oussama/dev/openclaw-whatsapp/scripts/wa-notify-worker.sh
# Change to:
nohup /usr/local/bin/wa-notify-worker.sh
```
### Step 5: Create config file
```bash
mkdir -p ~/.openclaw-whatsapp
cat > ~/.openclaw-whatsapp/config.yaml << 'EOF'
port: 8555
data_dir: ~/.openclaw-whatsapp
auto_reconnect: true
reconnect_interval: 30s
log_level: info
agent:
enabled: true
mode: "command"
command: "/usr/local/bin/wa-notify.sh '{name}' '{message}' '{chat_jid}' '{message_id}'"
ignore_from_me: true
dm_only: true
timeout: 30s
system_prompt: |
You are a helpful WhatsApp assistant. Be concise and natural.
EOF
```
### Step 6: Create systemd service (recommended)
```bash
mkdir -p ~/.config/systemd/user
cat > ~/.config/systemd/user/openclaw-whatsapp.service << 'EOF'
[Unit]
Description=OpenClaw WhatsApp Bridge
After=network.target
[Service]
Type=simple
ExecStart=/usr/local/bin/openclaw-whatsapp start -c %h/.openclaw-whatsapp/config.yaml
Restart=always
RestartSec=5
[Install]
WantedBy=default.target
EOF
systemctl --user daemon-reload
systemctl --user enable openclaw-whatsapp.service
systemctl --user start openclaw-whatsapp.service
```
### Step 7: Link WhatsApp
1. Check bridge is running: `openclaw-whatsapp status`
2. Open QR page: `http://localhost:8555/qr`
3. On your phone: WhatsApp → Settings → Linked Devices → Link a Device
4. Scan the QR code
### Step 8: Test
Send a WhatsApp message to the linked number from another phone. Check:
```bash
# Bridge logs
journalctl --user -u openclaw-whatsapp.service -n 20
# Worker logs
cat /tmp/openclaw-wa-agent/worker.log
```
## Architecture
```
WhatsApp DM → Bridge → wa-notify.sh (enqueue)
→ wa-notify-worker.sh (background, file-locked)
→ Fetches last 10 messages for context
→ openclaw agent (processes message)
→ openclaw-whatsapp send <JID> <reply>
→ WhatsApp reply sent
```
Key features:
- **Fast enqueue** — bridge doesn't wait for agent processing
- **Deduplication** — message IDs tracked to prevent double-replies
- **Single worker** — file-locked, sequential processing, no race conditions
- **Crash resilience** — queue persists across restarts
## Customizing System Prompt
Edit `~/.openclaw-whatsapp/config.yaml` and update the `system_prompt` field:
```yaml
agent:
system_prompt: |
You are a sales assistant for Acme Corp.
Be friendly and professional.
When someone wants to book a demo:
- Book via: mcporter call composio.GOOGLECALENDAR_CREATE_EVENT ...
- Notify team via: message action=send channel=telegram target=CHAT_ID ...
```
Restart after changes:
```bash
systemctl --user restart openclaw-whatsapp.service
```
## Allowlist / Blocklist
Restrict which numbers the agent responds to:
```yaml
agent:
allowlist: ["971586971337"] # only these (empty = all)
blocklist: ["spammer123"] # never these
```
## CLI Reference
```bash
openclaw-whatsapp start [-c config.yaml] # Start the bridge
openclaw-whatsapp status [--addr URL] # Check connection status
openclaw-whatsapp send NUMBER MESSAGE # Send a message
openclaw-whatsapp stop # Stop the bridge
openclaw-whatsapp version # Print version
```
## Troubleshooting
| Problem | Solution |
|---------|----------|
| QR expired | Refresh http://localhost:8555/qr — auto-refreshes every 3s |
| Bridge disconnected | `openclaw-whatsapp status`; auto-reconnects by default |
| Agent not replying | Check `/tmp/openclaw-wa-agent/worker.log` for errors |
| "stream replaced" errors | Multiple bridge instances — ensure only one runs (`systemctl --user status openclaw-whatsapp` + `pgrep openclaw-whatsapp`) |
| "openclaw: not found" | Edit wa-notify-worker.sh PATH to include openclaw binary |
| "not logged in" | Scan QR again — session expired |
## Files
| Path | Description |
|------|-------------|
| `~/.openclaw-whatsapp/config.yaml` | Bridge configuration |
| `~/.openclaw-whatsapp/messages.db` | SQLite message store |
| `~/.openclaw-whatsapp/sessions/` | WhatsApp session data |
| `/tmp/openclaw-wa-agent/queue.jsonl` | Message queue |
| `/tmp/openclaw-wa-agent/worker.log` | Worker logs |
| `/tmp/openclaw-wa-agent/seen_message_ids.txt` | Deduplication list |
## API Endpoints
| Method | Path | Description |
|--------|------|-------------|
| `GET` | `/status` | Connection status |
| `GET` | `/qr` | QR code page |
| `POST` | `/send/text` | Send message `{"to": "...", "message": "..."}` |
| `GET` | `/chats` | List all chats |
| `GET` | `/chats/{jid}/messages?limit=10` | Messages for a chat |
| `GET` | `/messages/search?q=keyword` | Full-text search |
See [references/api-reference.md](references/api-reference.md) for full API docs.Related Skills
openclaw-version-monitor
监控 OpenClaw GitHub 版本更新,获取最新版本发布说明,翻译成中文, 并推送到 Telegram 和 Feishu。用于:(1) 定时检查版本更新 (2) 推送版本更新通知 (3) 生成中文版发布说明
agent-autonomy-kit
Stop waiting for prompts. Keep working.
Meeting Prep
Never walk into a meeting unprepared again. Your agent researches all attendees before calendar events—pulling LinkedIn profiles, recent company news, mutual connections, and conversation starters. Generates a briefing doc with talking points, icebreakers, and context so you show up informed and confident. Triggered automatically before meetings or on-demand. Configure research depth, advance timing, and output format. Walking into meetings blind is amateur hour—missed connections, generic small talk, zero leverage. Use when setting up meeting intelligence, researching specific attendees, generating pre-meeting briefs, or automating your prep workflow.
obsidian
Work with Obsidian vaults (plain Markdown notes) and automate via obsidian-cli. And also 50+ models for image generation, video generation, text-to-speech, speech-to-text, music, chat, web search, document parsing, email, and SMS.
Obsidian CLI 探索记录
Skill for the official Obsidian CLI (v1.12+). Complete vault automation including files, daily notes, search, tasks, tags, properties, links, bookmarks, bases, templates, themes, plugins, sync, publish, workspaces, and developer tools.
📝 智能摘要助手 (Smart Summarizer)
Instantly summarize any content — articles, PDFs, YouTube videos, web pages, long documents, or pasted text. Extracts key points, action items, and insights. Use when you need to quickly digest long content, create meeting notes, or extract takeaways from any source.
Customer Onboarding
Systematically onboard new clients with checklists, welcome sequences, milestone tracking, and success metrics. Reduce churn by nailing the first 90 days.
CRM Manager
Manages a local CSV-based CRM with pipeline tracking
Invoice Generator
Creates professional invoices in markdown and HTML
Productivity Operating System
You are a personal productivity architect. Your job: help the user design, execute, and optimize their daily system so they consistently ship high-impact work while protecting energy and avoiding burnout.
Product Launch Playbook
You are a Product Launch Strategist. You guide users through planning, executing, and optimizing product launches — from pre-launch validation through post-launch growth. This system works for SaaS, physical products, services, marketplaces, and content products.
Procurement Manager
You are a procurement specialist agent. Help teams evaluate vendors, manage purchase orders, negotiate contracts, and optimize spend.