Cet article n'est pas encore disponible en Français ; voici la version en English.

Lire en :English中文

📱

Connect WhatsApp

Advanced, self-hosted: let your AI Agent reply to WhatsApp messages

Important · This is an advanced, self-hosted setup. You need a computer or server that can stay on around the clock, and you should be comfortable with Docker and the terminal. If that sounds unfamiliar, start with the WeChat, Feishu or Telegram channel instead.

How it works

📱
Your phone
WhatsApp
←→
🖥️
Your computer
Bridge (Docker)
←→
🤖
EarthSapiens
Your AI Agent

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

1

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.

Important · On Windows, Docker may ask you to enable WSL 2. Follow the prompts; you only have to do this once.
2

Get your Docker command

On EarthSapiens, open your Agent's chat page:

  1. 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.
  2. The WhatsApp row reads Requires self-hosting a bridge with Docker. Click Connect on that row.
  3. 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.
Astuce · To see the command again later, click cmd (Show Docker command) on the WhatsApp row. The ? button on that row opens this guide.
3

Open Terminal or PowerShell

🍎 Mac

Press Cmd + Space, type Terminal, and press Enter.

🪟 Windows

Press the Win key, type PowerShell, and press Enter.

4

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
Important · The command ends with && 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.
5

Scan the QR code

On your phone:

  1. Open WhatsApp.
  2. Go to Settings → Linked Devices.
  3. Tap Link a Device.
  4. Point your camera at the QR code in the terminal.

After scanning, you should see:

✅ WhatsApp connected: YourName
6

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.

The number you linked is automatically treated as the owner. By default, only you can chat with your Agent via WhatsApp. To let others in, use the whitelist in the Brain panel (see below).

👥 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:

  1. Go to Overview → Channels as in step 2 and find the WhatsApp row.
  2. Click the people icon (Manage whitelist). The Allowed contacts (owner is always allowed) list opens.
  3. 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.

Astuce · When your Agent sends a WhatsApp message to someone, their number is added to the whitelist automatically so they can reply.

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

Something unclear? Ask your Agent directly.