The most important thing for Hermes Agent to connect to WhatsApp is to run the gateway first, and then match the allowed users with the default delivery target. The idea of the official documentation is straightforward: first complete the QR code pairing through hermes gateway setup or hermes whatsapp, and then set environment variables such as WHATSAPP_ALLOWED_USERS and WHATSAPP_HOME_CHANNEL.
Minimal configuration process
- Install the Hermes Agent on your server or normally open machine.
- Run
hermes gateway setupSelect WhatsApp, or perform the relevant WhatsApp pairing process separately. - Scan the QR code on your phone and think of this instance as your Linked Device.
- Supplement
WHATSAPP_ALLOWED_USERSin the~/.hermes/.envand addWHATSAPP_HOME_CHANNELif necessary. - Start the
hermes gatewayand send a test message with your account first.
The easiest pit to step on
- The phone must remain online, and being off the internet for a long time can easily trigger re-pairing.
- If you always ask you to re-scan the QR code, first check whether the session directory is persistent.
- Don't automatically outsend unfamiliar contacts, and the document clearly reminds you not to use WhatsApp as a cold start marketing tool.
- Should the group be open to everyone, give priority to the allowlist, and do not directly let all members go.
In a word: The focus of Hermes Agent's WhatsApp configuration is not "being able to scan the code", but "session persistence, allowlist, and default delivery channel" three things are paired together.
Official open source address: https://github.com/NousResearch/hermes-agent; Official document entry: https://hermes-agent.nousresearch.com/.