Use WhatsApp when you want the same Nakama agent available from your phone in a direct chat or group.
The WhatsApp bridge talks to the same Nakama server as the web app and CLI. It is a chat channel, not a separate agent system.
Good use cases
WhatsApp works well for:
- quick questions while away from your desk
- using one Nakama profile from phone and web
- simple direct-chat workflows for one linked number
- lightweight status checks and short back-and-forth conversations
What WhatsApp can do
With WhatsApp enabled, users can:
- chat with a Nakama profile in a private WhatsApp chat or a group
- switch org with commands
- start a new conversation or clear history
- stop an in-progress reply
- receive replies with simple WhatsApp-friendly formatting
Reply formatting
Agents can still write normal Markdown-style replies, but Nakama simplifies them for WhatsApp.
In practice:
- code fences are flattened to plain text
- headings are converted to normal text
- bold and italics are reduced to WhatsApp-friendly formatting
- long replies are split into smaller chat bubbles
This keeps replies readable in WhatsApp without depending on web-style Markdown rendering.
Setup
1. Enable WhatsApp in Nakama
- Open Integrations → WhatsApp in the Nakama web app
- Choose which profile should reply
- Click Enable WhatsApp
2. Start the bridge
From the repo root:
bun run dev:whatsappIf the Nakama server is not already running, start it too:
bun run dev:server3. Link your WhatsApp account
Nakama supports two ways to link:
Option A: pairing code
- In Integrations → WhatsApp, generate or copy the pairing code
- Open WhatsApp on your phone
- Go to Settings → Linked Devices
- Choose Link with phone number
- Enter the pairing code
Option B: QR code
- Start the WhatsApp bridge
- Wait for the QR code to appear in Integrations → WhatsApp
- Open WhatsApp on your phone
- Go to Settings → Linked Devices
- Tap Link a Device and scan the QR code
After linking succeeds, Nakama shows the linked account and the bridge can receive messages.
Chat behavior
WhatsApp works in private chats and groups.
- direct chats send every message to the agent
- group chats reply only to a mention of the linked number, a reply to a Nakama message, or a
/command - each private chat and each group keeps its own Nakama session
/orgin a group is stored for that group, not your private chat- pairing still happens in a private chat first
- extra numbers in Integrations → WhatsApp → Allowed numbers can also talk to the agent
- reply to another group message while mentioning Nakama includes that quoted text in the agent turn
This keeps group chats usable without making Nakama answer every message.
If you change the reply profile, new messages use that profile. Starting a new conversation with /new gives you a fresh session.
Commands
Useful WhatsApp commands:
| Command | What it does |
|---|---|
/help | Shows available WhatsApp commands |
/status | Shows server and model status |
/org | Lists or switches the active organization |
/clear | Clears the current chat history |
/new | Starts a fresh conversation |
/compact | Compacts the current conversation history |
/stop | Stops an in-progress reply |
/attach | Sends the most recent saved artifact as a WhatsApp document |
Saved artifacts and share links
When your agent saves a file for you with the save-artifact skill (content file plus .nakama-meta.json sidecar in the same turn), Nakama posts a Publish-style share link after the reply in WhatsApp.
Opening that link does not require a Nakama login. Anyone who can read the WhatsApp message can open the file until the share is revoked from the dashboard.
To receive the file itself in WhatsApp, ask in plain language — for example, “send the file” or “attach it” — or type /attach. Nakama sends a native WhatsApp document when the file is within the attach size limit. If the file is too large, use the share link instead.
In a WhatsApp group, both the share link and a requested document go to the whole group (same visibility as the bot’s other replies).
Unpaired saves (content without a sidecar in the same turn) do not produce share links or attachments.
Troubleshooting
WhatsApp is enabled but messages do not arrive
Check:
- the Nakama server is running
- the WhatsApp bridge is running with
bun run dev:whatsapp - the WhatsApp account is linked
- the linked number shown in Integrations → WhatsApp is the one you are messaging from
Pairing code does not work
Check these first:
- generate a fresh pairing code from Integrations → WhatsApp
- open Settings → Linked Devices → Link with phone number
- paste the latest code exactly as shown
If a code was already used or expired, generate a new one.
QR linking is stuck
If QR linking does not finish:
- use Reconnect with QR in Integrations → WhatsApp
- wait for a fresh QR code
- scan it again from WhatsApp
The bot does not reply in a group
In a group, Nakama only answers when someone:
- mentions the linked WhatsApp number
- replies to a Nakama message
- sends a
/command
The sender must be the linked WhatsApp number, or a number listed under Integrations → WhatsApp → Allowed numbers. Add country code, like +62812…. Reply to another person's message while mentioning Nakama if the agent should see that text.
The wrong bot is answering
Open Integrations → WhatsApp and check the Reply as profile. That is the profile the bridge uses for new messages.