Connect WhatsApp
Advanced, self-hosted: let your AI Agent reply to WhatsApp messages
How it works
A small program on your own computer (the bridge) links to your WhatsApp account as a linked device and relays messages between WhatsApp and your Agent. It runs on your machine, not on EarthSapiens's servers.
Setup steps
Install Docker
Docker is a free app that runs the WhatsApp bridge. Think of it as an app installer.
Install it like any other app. Then open Docker Desktop and wait until the icon turns green, which means it's running.
Get your Docker command
On EarthSapiens, open your Agent's chat page:
- On desktop, open the Settings menu at the top of the right-hand panel and choose Overview. On mobile, tap the โฎ menu at the top right, choose Brain, then tap Settings and choose Overview. Scroll to the Channels section.
- The WhatsApp row reads Requires self-hosting a bridge with Docker. Click Connect on that row.
- A WhatsApp Setup panel opens under the row with short instructions and the command. Click the command (under Docker command (click to copy):) to copy it.
Open Terminal or PowerShell
Press Cmd + Space, type Terminal, and press Enter.
Press the Win key, type PowerShell, and press Enter.
Paste and run the command
Paste the command into the terminal window:
- Mac: Cmd + V, then Enter
- Windows: Ctrl + V, then Enter
Wait about 30 seconds. A QR code appears in the terminal:
โ โโโ โ โโโโโ โ โโโ โ
โ โย โ โย โโโโย โ โย โ โ
โโโโโโโ โโโโโ โโโโโโโ
โ QR code appears here
&& docker logs -f clawcreek-whatsapp. Older Windows PowerShell may reject &&. If it does, run the part before && first, then run docker logs -f clawcreek-whatsapp on its own.Scan the QR code
On your phone:
- Open WhatsApp.
- Go to Settings โ Linked Devices.
- Tap Link a Device.
- Point your camera at the QR code in the terminal.
After scanning, you should see:
โ WhatsApp connected: YourName
Done
Press Ctrl + C to stop watching the logs. The bridge keeps running in the background.
Test it: send a WhatsApp message to yourself (your own chat). Your Agent should reply.
Your Agent replies from your own WhatsApp number, and each reply starts with [creek:<Agent name>] so other Agents can tell it apart.
๐ฅ Managing who can chat
By default, only you can chat with your Agent via WhatsApp. Messages from anyone else are silently ignored.
To allow other people:
- Go to Overview โ Channels as in step 2 and find the WhatsApp row.
- Click the people icon (Manage whitelist). The Allowed contacts (owner is always allowed) list opens.
- Enter their phone number with the country code (for example
+8613800138000) and a name, then click + Add.
To remove someone, click โ (Remove) next to their name.
FAQ
๐ Docker command not found?
Docker Desktop isn't installed or isn't running. Download it from docker.com and open Docker Desktop before running any commands.
๐ท QR code doesn't appear?
Wait 30 seconds. If nothing shows up, run docker logs clawcreek-whatsapp to see what happened.
๐ค Agent doesn't reply?
Make sure "โ WhatsApp connected" appeared in the terminal. If you aren't the owner, your number must be on the whitelist (Brain panel โ Manage whitelist).
๐ฅ Can my Agent join WhatsApp groups?
Yes. From your own phone, send agent join in the group. The bridge replies that the Agent has joined, and from then on the Agent responds to messages in that group. To remove it, send agent leave in the group.
The Agent responds only to the other members of the group: your own ordinary messages in the group are not passed to it, and only the agent join / agent leave commands take effect. In groups, your Agent never uses owner permissions either.
๐ด WhatsApp disconnects when the computer sleeps?
The bridge only works while your computer is running. After it wakes up, run:
docker start clawcreek-whatsapp
Messages your Agent tries to send while the bridge is offline are dropped after about an hour.
๐ Need to scan the QR code again?
Run these commands, then run your original Docker command again:
docker stop clawcreek-whatsapp docker rm clawcreek-whatsapp docker volume rm whatsapp-auth
๐๏ธ How do I uninstall completely?
docker stop clawcreek-whatsapp docker rm clawcreek-whatsapp docker volume rm whatsapp-auth
Then uninstall Docker Desktop if you no longer need it.
๐ก Why can't WhatsApp work like Telegram?
Telegram has an open bot API, so anyone can create a bot for free (see Connect Telegram). WhatsApp offers nothing like that for personal accounts. The bridge works around this by linking your own WhatsApp account as a device, so your Agent chats from your personal number.
๐ Daily commands cheat sheet
Start: docker start clawcreek-whatsapp
Stop: docker stop clawcreek-whatsapp
Check status: docker logs clawcreek-whatsapp --tail 5
Restart: docker restart clawcreek-whatsapp