---
name: whatsapp
description: WhatsApp messaging channel — Baileys QR pairing, DM/group policy enforcement, inbound routing, business hours gating, outbound messaging, document sending, conversation browsing.
tools:
  - whatsapp-login-start
  - whatsapp-login-wait
  - whatsapp-status
  - whatsapp-disconnect
  - whatsapp-send
  - whatsapp-send-document
  - whatsapp-config
  - whatsapp-activity
  - whatsapp-conversations
  - whatsapp-messages
  - whatsapp-group-info
metadata: {"platform":{"embed":["admin"]}}
---

# WhatsApp

Activate when the user asks about WhatsApp — connecting, linking, checking status, managing accounts, DM policies, group policies, or sending messages.

## What this unlocks

- QR-code-based WhatsApp pairing via Baileys (linked device)
- Multi-account support (optional, multiple linked numbers)
- Inbound message routing (admin phone → admin agent, public → public agent)
- Group messaging with mention gating and per-group activation
- DM policy enforcement (open, allowlist, disabled)
- Conversation browsing — list active conversations, read message history, inspect group metadata
- Inbound voice note transcription (OGG Opus → text via local whisper.cpp + Haiku refinement)
- Outbound voice note normalization (OGG Opus via ffmpeg)
- Auto-reconnection with exponential backoff
- Business hours gating — public messages gated by `OpeningHoursSpecification` from Neo4j, with optional after-hours auto-reply via the `afterHoursMessage` config field

## Conversation Browsing

Three tools for reading WhatsApp conversation context. Messages come from the in-memory store — they accumulate while the server is running and clear on restart.

| Tool | Returns |
|------|---------|
| `whatsapp-conversations` | JIDs with recent message activity, conversation type (group/DM), last message timestamp, message count |
| `whatsapp-messages` | Stored messages for a specific JID — sender, body, timestamp, reply context. Supports optional `limit` for most recent N messages |
| `whatsapp-group-info` | Group metadata from WhatsApp servers — subject, description, participants with admin flags, creation date. Requires active connection |

**Limitations:** In-memory only (Phase 0). Store clears on server restart. Inbound messages only — outbound messages sent by the agent are not stored.

## Skills

| Skill | Purpose |
|-------|---------|
| [connect-whatsapp](skills/connect-whatsapp/SKILL.md) | Complete WhatsApp setup — QR pairing, admin phone registration, public agent selection |
| [manage-whatsapp-config](skills/manage-whatsapp-config/SKILL.md) | Guided WhatsApp settings editing — messaging policies, limits, group config, acknowledgement |

## References

| Reference | Topics |
|-----------|--------|
| [channels-whatsapp.md](references/channels-whatsapp.md) | Implementation details — Baileys architecture, reconnection, voice notes, outbound policy, disconnect reasons |

Config field definitions (field names, types, valid values) are available on-device via `whatsapp-config action: schema`.
