MessengersWhatsApp

People in your WhatsApp chats

Find WhatsApp contacts and build a cited brief from saved conversations before replying.

Learn more about one person from what your chats already hold: which chats you share, what they wrote to you or in your groups, and the names and notes you keep about them. Your agent can collect their messages for a summary without connecting.

Everything here comes from the local store, the copy of your messages wa keeps on this computer, filled by the phone's history push and by serve, so it shows only what arrived. The commands add --offline where they could otherwise ask WhatsApp: they then never connect and work while serve runs.

A person is named by their WhatsApp id or part of their name. WhatsApp names most people by a hidden id that ends in @lid (100000000000001@lid), not by their phone number. When part of a name matches more than one person, the command stops and lists them; run it again with the id.

On this page:

  1. What you can do
  2. Who they are: contacts show
  3. What they said: contacts context
  4. One person in two messengers: contacts link
  5. Your own names and notes: contacts aliases, contacts notes
  6. Ask WhatsApp about a person
  7. Next step

What you can do

TaskCommand
See a person and the chats you sharewa personal contacts show
Read what they said, in every chat or in the chats you namewa personal contacts context
Record that a WhatsApp account and a Telegram or MAX account are one personwa personal contacts link
Keep your own name and notes for a personwa personal contacts aliases, wa personal contacts notes
Save a person in your WhatsApp contacts, or rename them therewa personal contacts add, wa personal contacts rename

Every option of these commands is in the command reference.

Who they are: contacts show

wa personal contacts show 100000000000001@lid --offline
wa personal contacts show 100000000000001@lid --offline --with-notes --json

It answers the person as the store knows them, and the chats you share with them. --with-notes adds your private notes. The person is not told that you looked.

What they said: contacts context

Without --chat, it gives an overview from the store: the chats you share, the last message each way, their recent messages in your one-to-one chat and in groups, and where others mentioned them. It never connects.

wa personal contacts context 100000000000001@lid

With --chat, it gives their newest messages in each chat you name, oldest first, 20 per chat:

wa personal contacts context 100000000000001@lid --chat 120363000000000001@g.us --limit 10 --offline
  • Each message is only its time and text, so an agent can read many of them at once. -v adds the message id, the sender and what it replies to; -vv gives the whole message.
  • more: true means there are older messages than the limit; complete: false means the store does not hold the chat from its start, so the answer is a minimum. messages sync asks the phone for the older part (older history).

WhatsApp, Telegram and MAX share one local store on this computer. When you know that a WhatsApp account and an account in another messenger are the same person, record it:

wa personal contacts link 100000000000001@lid max:"Example User"

After that, contacts context without --chat gathers both accounts. contacts context --chat still shows only the account you named. The link is only ever what you record: the same name in two messengers is never taken as the same person.

To undo a link, name the account and the person it leaves. Without --from the command is refused, and the error names the person who holds the account:

wa personal contacts unlink 100000000000001@lid --from person:12

Your own names and notes: contacts aliases, contacts notes

wa personal contacts aliases set 100000000000001@lid Ana    # your own name for a person, on this computer only
wa personal contacts aliases remove 100000000000001@lid
wa personal contacts notes add 100000000000001@lid --text-file note.txt  # or the text from stdin
wa personal contacts notes list 100000000000001@lid

contacts notes edit and contacts notes remove take the person, then the note's id, which notes list shows.

Aliases and notes stay in the local store and never reach WhatsApp or the person's phone. An alias applies only in the account you use now; a note about a person shows in every profile on this computer that sees them. A command finds a person by your alias unless it matches someone else's name; then it needs the id. --revision stops an edit of a note that changed since you read it.

Ask WhatsApp about a person

These connect; while serve runs, they go through serve's connection.

wa personal contacts show 100000000000001@lid        # their name, about line and whether they show a photo
wa personal contacts block 100000000000001@lid
wa personal contacts unblock 100000000000001@lid
wa personal contacts add 100000000000001@lid          # save them under the name WhatsApp shows
wa personal contacts rename 100000000000001@lid Ana Lima   # save them under your name for them
wa personal contacts lookup < number.txt                # whether this number has WhatsApp, and its id
wa personal contacts sync                                # the phone's address book into the local store

For contacts lookup, first write the number to number.txt, on one line, in international format.

  • contacts show tells the person nothing. It shows no phone number, so --hide-phone changes nothing here. --offline answers from the local store alone.
  • contacts lookup reads the number from stdin, never from the command line, and sends nothing to it. It takes one number, at most one every 10 seconds for the profile: many lookups in a row are what WhatsApp bans scrapers for.
  • contacts add saves a person under the name WhatsApp shows for them, and contacts rename under the name you give. It is a WhatsApp contact name: it shows on every device of the account, and nothing is sent to the person. For someone saved in the phone's Contacts app, the phone keeps showing that app's name, which wa leaves alone. wa refuses the account's own number.
  • contacts remove and import are refused: a linked device cannot remove a WhatsApp contact, and a bulk import is what WhatsApp bans contact scrapers for.

Next step

To see what a whole group is doing, and who waits for an answer there, read groups. An AI agent can run all the commands on this page for you; to connect one, see the MCP server.