WhatsApp Daemon
The WhatsApp Daemon mode bridges WhatsApp messages to LLM providers, enabling AI-powered conversations through WhatsApp.
Prerequisites
- A WhatsApp account (personal or business)
- An active OpenAlloy license
- At least one configured LLM provider
Setup
1. Start the Daemon
openalloy daemon --whatsapp
On first run, a QR code is displayed in the terminal. Scan it with WhatsApp (Settings > Linked Devices > Link a Device).
2. Configure Behavior
# Set the default model for WhatsApp responses
openalloy config set whatsapp.model anthropic:claude-sonnet-4-20250514
# Set response prefix (optional)
openalloy config set whatsapp.prefix "[AI] "
# Set allowed contacts (empty = all)
openalloy config set whatsapp.allowed_contacts "+1234567890,+0987654321"
3. Run as a Service
Linux (systemd):
openalloy daemon --whatsapp --install-service
sudo systemctl enable openalloy-whatsapp
sudo systemctl start openalloy-whatsapp
macOS (launchd):
openalloy daemon --whatsapp --install-service
Configuration Options
| Key | Default | Description |
|---|---|---|
whatsapp.model |
Default model | LLM model for responses |
whatsapp.prefix |
"" |
Prefix added to AI responses |
whatsapp.allowed_contacts |
"" |
Comma-separated phone numbers (empty = all) |
whatsapp.max_history |
20 |
Messages to include as context |
whatsapp.system_prompt |
"" |
System prompt for conversations |
whatsapp.media_support |
true |
Process images and documents |
Commands
WhatsApp users can send commands by prefixing messages with /:
| Command | Description |
|---|---|
/model <name> |
Switch the LLM model |
/reset |
Clear conversation history |
/status |
Show current model and stats |
/help |
Show available commands |
Logging
Daemon logs are written to ~/.config/openalloy/logs/whatsapp.log.
tail -f ~/.config/openalloy/logs/whatsapp.log
Enterprise Features
With an Enterprise license, the WhatsApp Daemon supports:
- Webhook telemetry: HMAC-signed usage events pushed to your endpoint
- Multi-user: Multiple WhatsApp accounts on a single license
- Usage dashboard: Per-conversation and per-model breakdowns