docs/guides/whatsapp-ai-agent.md
This guide connects nanobot to WhatsApp through the whatsapp channel. The
channel links as a WhatsApp device and uses the same nanobot agent runtime,
tools, memory, and workspace as the CLI and WebUI.
whatsapp channel enabled in config.jsonnanobot agent -m "Hello!"
nanobot gateway running.python -m pip install nanobot-ai
nanobot onboard --wizard
Install the optional channel dependency:
nanobot plugins enable whatsapp
Link WhatsApp as a device:
nanobot channels login whatsapp
Scan the QR code from WhatsApp -> Settings -> Linked Devices.
Merge this snippet into ~/.nanobot/config.json:
{
"channels": {
"whatsapp": {
"enabled": true,
"groupPolicy": "mention"
}
}
}
Omitting allowFrom enables pairing-only mode for private chats. groupPolicy
defaults to "open" in the channel, but "mention" is safer for a first
deployment.
nanobot channels status
nanobot gateway
Send the bot a private WhatsApp message. It should return a pairing code. Approve it from a trusted local surface:
nanobot agent -m "/pairing approve ABCD-EFGH"
Send the message again after approval. The reply should use the same model and workspace as your local CLI check.
allowFrom only when you want a
static allowlist.groupPolicy as "mention" before adding the bot to groups.allowFrom: ["*"] unless the bot is intentionally public or isolated.nanobot channels login whatsapp.bridgeUrl and
bridgeToken, then re-login.lidMappings in the full reference.