WhatsApp with your AI agent, step by step
Common WhatsApp CLI tasks step by step: the commands to run, why each runs and what to check.
Each scenario is a common task in order: the commands to run, why each one runs and what to look at in the answer. The same scenarios are in the terminal: wa guide lists them and wa guide <name> prints one.
Commands that use an account start with your profile, the name you gave the account at login: wa <profile> ….
Give an agent your account, never the send button
Let an agent read and draft from your WhatsApp while every send is refused.
-
wa mcp add claude-code --permission messages.send=deny --allow-writesadd this profile to Claude Code; its server refuses messages send whatever the profile allows, and --allow-writes acknowledges the other tools that may write
-
wa sends listevery attempt to send, refused ones too, so you can see what the agent tried
What to look at:
- refused lines in sends list, and which command asked
WhatsApp bans numbers that send in bulk or to strangers, so a send stays your call. For a script, WA_READ_ONLY=1
does the same for one run: it reads and syncs, and refuses every send, edit and delete.
In the terminal: wa guide agent-without-send
Catch up after a day away
Know what changed, who waits on you and what you promised, without opening every chat.
-
wa review 'date>1d' --transcribeevery message since yesterday in the chats that changed, yours too, with voice notes as text
-
wa review --unanswered 4hquestions to you that nobody answered for four hours or more
-
wa tasks agendatasks due today, replies you owe and replies you are waiting for
What to look at:
- who asked first and how long ago
- promises in your own messages that no task holds yet
review reads what serve saved in the local store and marks nothing read. Keep wa personal server install
running, so the store has what arrived while you were away.
In the terminal: wa guide catch-up
Find what someone said
Get back a message, a file or a voice note when you remember only a word or the person.
-
wa search all invoicemessages and notes in one search, best match first; add --offline to stay on this computer
-
wa contacts events Annaeverything one person wrote or was mentioned in, newest first, from the store
-
wa messages context Team 1234the message a hit points to, with what came either side of it
What to look at:
- the chat and the time of each hit
- the ref of the hit you want, which the next commands take
A search finds only what the store holds: the history the phone pushed at linking, and what serve saved since.
wa personal messages sync <chat> asks the phone for one chat's older messages, page by page; the phone answers only
recent history.