agent-whatsapp
Agent WhatsApp
A Baileys-backed WhatsApp CLI for AI agents. Links as a companion device via QR code or pairing code, so your phone stays connected. Each command connects on demand and disconnects when done.
Use one of these entrypoints:
- Global install:
agent-whatsapp ... - One-off execution:
bunx --package agent-messenger agent-whatsapp ...
Key Concepts
Before diving in, a few things about WhatsApp's architecture:
- JID (Jabber ID) = WhatsApp's address format. Individual:
1234567890@s.whatsapp.net. Group:123456789-123345@g.us. You can pass plain phone numbers and the CLI resolves them to JIDs automatically. - QR code auth = links the CLI as a companion device by scanning a QR code displayed in the terminal or browser. Open WhatsApp > Linked Devices > Link a Device and scan the code.
- Pairing code auth = links the CLI as a companion device using a numeric code displayed in your terminal. Enter it in WhatsApp on your phone under Linked Devices.
- Connect-on-demand = the CLI opens a WebSocket connection for each command and disconnects afterward. There's no persistent background process.
- Multi-account = multiple WhatsApp accounts can be linked. Use
auth listandauth useto switch between them.
Quick Start
More from devxoul/agent-messenger
agent-slack
Interact with Slack workspaces - send messages, read channels, manage reactions
73agent-slackbot
Interact with Slack workspaces using bot tokens - send messages, read channels, manage reactions
70agent-discord
Interact with Discord servers - send messages, read channels, manage reactions
68agent-teams
Interact with Microsoft Teams - send messages, read channels, manage reactions
59agent-discordbot
Interact with Discord servers using bot tokens - send messages, read channels, manage reactions
42agent-telegram
Interact with Telegram through TDLib - authenticate, inspect chats, and send messages
8