WhatsApp Channel
WhatsApp Channel Setup
Monitor WhatsApp groups via your OpenClaw agent to provide daily summaries, react to messages, and flag urgent items.
How It Works
Your personal WhatsApp is linked as a device to the agent Mac via the OpenClaw WhatsApp plugin (Baileys/WhatsApp Web). Everything the agent does on WhatsApp appears as you.
Flow:
- Messages flow into the group
- OpenClaw captures them as group history (
requireMentionmode — no auto-responses) - Every heartbeat cycle (~1h), the agent reviews accumulated WhatsApp history
- The agent occasionally reacts to a message with an emoji
- If something urgent is detected -> immediate ping to owner via iMessage
- Once daily (evening) -> agent sends a summary of the day’s chat via iMessage
Setup Steps
1. Enable WhatsApp Plugin
The WhatsApp plugin ships with OpenClaw but is disabled by default:
openclaw plugins enable whatsapp2. Link WhatsApp
openclaw channels loginScan the QR code using WhatsApp -> Settings -> Linked Devices on your phone. This links the agent Mac as a WhatsApp Web device.
3. Gateway Config
Add to ~/.openclaw/openclaw.json under channels:
"whatsapp": { "dmPolicy": "disabled", "selfChatMode": true, "groupPolicy": "allowlist", "groupAllowFrom": [], "groups": { "*": { "requireMention": true } }, "sendReadReceipts": true}Key settings:
- dmPolicy: “disabled” — no WhatsApp DMs, only group monitoring
- selfChatMode: true — this is your own phone number
- groupPolicy: “allowlist” — only accept messages from explicitly allowed groups (prevents prompt injection escalation via elevated tools)
- requireMention: true — agent only responds when @mentioned, but captures all messages as history
- sendReadReceipts: true — mark messages as read
4. Agent Binding
Route WhatsApp group messages to the main agent:
{ "agentId": "main-agent", "match": { "channel": "whatsapp", "peer": { "kind": "group", "id": "*" } }}For specific groups, use the group JID:
{ "agentId": "main-agent", "match": { "channel": "whatsapp", "peer": { "kind": "group", } }}5. Agent Config Updates
HEARTBEAT.md — Add WhatsApp monitoring tasks:
- Group check (2-3x/day): review group history, react to 1-2 messages
- Daily summary (1x/day, evening): send summary to owner via iMessage
- Urgent items: immediate iMessage ping for health/safety/time-sensitive items
AGENTS.md — Add group chat guidelines:
- Listen-mostly role
- React naturally with heartfelt emoji
- Never respond unless @mentioned
- Route all summaries/pings via iMessage, not WhatsApp
Reactions
WhatsApp reactions are supported via the gateway’s react action. During heartbeat, the agent can:
- Fetch group history to see messages with IDs
- Call the react action with
chatJid,messageId, andemoji - Reactions appear in WhatsApp as you
Preferred emoji palette: ❤️, 😂, 👍, 🙌, 🥰
Reactions are delayed by up to the heartbeat interval (~1h), which actually feels natural — like you checked your phone later and hearted something.
Identity Rules
With selfChatMode: true, everything the agent does on WhatsApp appears as you:
- NEVER use the agent’s emoji prefix or branding
- NEVER sign messages or hint that an AI is writing
- Send EXACTLY what the owner approves — no paraphrasing
Gap Recovery with wacli
OpenClaw’s Baileys connection occasionally times out (408 errors), missing messages. wacli provides a separate WhatsApp device link for gap recovery.
Installation
brew install steipete/tap/wacliUsage
# Fetch group history
# Search all messageswacli messages search "query"
# Continuous sync (run in background)wacli sync --follow
# Check auth statuswacli auth statusImportant: Store locks if multiple wacli processes run simultaneously. Don’t run wacli sync while manually querying.
Notes
- WhatsApp does not support the
readmessage action —sendReadReceiptsmay behave differently than BlueBubbles - WhatsApp does not support the
resolvecommand — group JIDs can’t be looked up by name selfChatModemeans messages the owner sends won’t appear as inbound — only messages from other group members trigger events- WhatsApp group messages route to their own session — use
sessions_historyto check, notmessage poll