| Mode | How it works | When to use |
|---|---|---|
| Bridge | Connects to an external WhatsApp bridge over WebSocket | You already run a bridge (e.g., whatsapp-web.js, mautrix-whatsapp) or want a language-agnostic adapter |
| Native | Uses whatsmeow in-process | You want a self-contained setup with no external bridge dependency |
- Bridge mode
- Native mode
In bridge mode, Operator connects to an external process that manages the WhatsApp Web protocol. The bridge and Operator communicate over a WebSocket connection using a simple JSON message protocol.The bridge sends messages to Operator with this structure:Operator sends replies with:
Setup
Deploy a WhatsApp bridge
Set up a WebSocket-capable WhatsApp bridge that implements the protocol above. The bridge should expose a WebSocket server at a URL like
ws://localhost:3001.Configuration reference
Set to
true to activate the WhatsApp channel.WebSocket URL of the external bridge. Required when
use_native is false. Example: ws://localhost:3001.When
true, use the built-in whatsmeow connection instead of an external bridge. Requires the whatsapp_native build tag. Default: false.Directory path where the SQLite session database is stored in native mode. Example:
/var/lib/operator/whatsapp. If empty, defaults to "whatsapp" relative to the working directory.Sender identifiers permitted to message the agent. In bridge mode, this is typically the phone number as the bridge sends it (e.g.
"+15551234567"). In native mode, use WhatsApp JIDs (e.g. "[email protected]").Strongly recommended — leave empty only if you fully control who can reach the WhatsApp number. See Common configuration fields for details.A chat ID where agent reasoning traces are sent. Leave empty to disable. See Messaging channels for details.
Security considerations
WhatsApp numbers are often shared in groups and can be forwarded. Unlike Slack or Discord where you control server membership, a WhatsApp number can receive messages from anyone with it. Always setallow_from to a specific list of phone numbers or JIDs.
Messages from senders not in allow_from are dropped immediately, before any media is downloaded or the agent is invoked.