You can connect Hermes Agent WhatsApp two ways: the built-in Baileys bridge, which pairs by QR code like WhatsApp Web, or Meta's official WhatsApp Business Cloud API. The bridge is faster to set up but unofficial, and the Hermes docs warn it carries ban risk. The Cloud API is the stable, Meta-supported path, but it needs a Meta Business account, a public webhook URL, and it only lets the bot reply freely within 24 hours of a user's last message.
📺 Watch: Hermes AI Sales Agent Can Close Leads for You
🔥 Get the Agent OS as a free bonus: AI Profit Boardroom members get the full Agent OS zip, prompt libraries, daily tutorials and weekly live coaching calls. → Get inside
This page puts the two side by side, gives the setup commands for each, and covers the access rules that stop random numbers reaching your agent. If you want to see how other business owners put agents to work, the AI Profit Boardroom is where members share their Hermes setups.
Bridge or Cloud API: pick your route
| Baileys bridge | WhatsApp Business Cloud API | |
|---|---|---|
| Setup command | hermes whatsapp | hermes whatsapp-cloud |
| Official? | No. Emulates a WhatsApp Web session | Yes. Meta's supported path |
| Ban risk | Yes, per the Hermes docs | None, per the Hermes docs |
| Account | Personal WhatsApp on a phone | Meta Business account and a business number |
| Public URL | Not needed | Needed, HTTPS, for Meta's webhook |
| Runs on | Node.js v20+ bridge process | Python webhook server, no Node |
| Groups | Yes, with a group policy | No. Direct messages only in v1 |
| Voice replies | Sent as MP3 files | Native voice notes with ffmpeg |
| 24-hour reply window | No | Yes. Templates not supported in Hermes yet |
The Hermes docs sum it up plainly. Use the bridge for personal projects, quick demos and single-user setups, if you accept the risk to the bot's number. Use the Cloud API for a real business bot. Both adapters can run at the same time on different numbers.
Hermes Agent WhatsApp via the Baileys bridge
The bridge needs Node.js v20 or newer, npm, and a phone with WhatsApp. It has two modes:
- Separate bot number, recommended. People message the bot's own number. Cleaner, works for several users, and the docs say it lowers ban risk.
- Personal self-chat. You message yourself to talk to the agent. Quick for testing, single user only.
Setup:
- Run hermes whatsapp. Choose bot or self-chat. The wizard installs the bridge and shows a QR code in your terminal.
- On your phone, open WhatsApp, Settings, Linked Devices, Link a Device, and scan the code.
- If WhatsApp asks for a passkey, run hermes whatsapp --passkey-browser followed by the path to your Chrome or Edge app.
- Add to ~/.hermes/.env: WHATSAPP_ENABLED=true, WHATSAPP_MODE=bot, and WHATSAPP_ALLOWED_USERS with phone numbers in country-code form and no plus sign, for example 15551234567.
- Start with hermes gateway, or hermes gateway install to run it as a service. The gateway starts the bridge from the saved session.
The session lives in ~/.hermes/platforms/whatsapp/session. It holds the keys to the WhatsApp account, so never share it or commit it. If the session breaks after a phone reset or a WhatsApp update, run hermes whatsapp again and rescan.
The rules for the bridge, from the docs: use a dedicated number, not your personal one. Don't send bulk or spam messages. Don't automate outbound messages to people who haven't messaged first. WhatsApp also updates its web protocol from time to time, which can break third-party bridges until Hermes updates.
Groups on the bridge. group_policy defaults to pairing, which forwards nothing from groups. Set it to allowlist and list group JIDs (they end in @g.us) to admit specific groups, or open for every group the bot is in. Add require_mention: true so it only answers @mentions, replies to it, or commands.
📺 Watch: This Hermes AI Sales Agent Is SCARY Good
The official route: WhatsApp Business Cloud API
Before you run the wizard, you need:
- A Meta Business account from business.facebook.com.
- A Meta app with WhatsApp enabled. At developers.facebook.com/apps, Create App, choose "Connect with customers through WhatsApp", then Start using the API.
- A public HTTPS address for your gateway. The docs recommend Cloudflare Tunnel: cloudflared tunnel --url http://localhost:8090 gives a free trycloudflare.com address. That quick-tunnel address changes on every restart, so use a named tunnel for anything long-lived.
Then:
- Run hermes whatsapp-cloud. It asks for each value and checks it as you paste. It catches the most common mistake: pasting the phone number into the Phone Number ID field. The ID is a 15 to 17 digit number shown below the From dropdown on API Setup.
- Paste the access token (it starts with EAA) and the App Secret from Settings, Basic. Without the App Secret, Hermes refuses inbound messages.
- Start the gateway with hermes gateway.
- In the Meta dashboard, WhatsApp, Configuration, edit the webhook. Set the Callback URL to your tunnel address plus /whatsapp/webhook, and paste the Verify Token the wizard generated. Click Verify and save.
- Under Webhook fields, subscribe to messages. Without this, Meta delivers nothing.
Temporary access tokens last 24 hours. For a bot that stays up, the docs walk you through a System User token with expiration set to Never. While your Meta app is in development mode, Meta also limits which numbers the bot can message, up to five, until App Review.
On the Cloud API, the bot can take in text, images, voice notes (transcribed), documents and button taps. It sends text, images, voice notes, video and documents. Questions and command approvals show as tap buttons, and you see blue ticks and "typing…" while it works.
📺 Watch: Hermes Agent Just Made Multi-Device AI Agents INSANE!
Who can reach the bot
The Hermes docs state that by default the gateway denies every user who is not on an allowlist or paired via DM. Both WhatsApp routes follow that.
Cloud API allowlist. WHATSAPP_CLOUD_ALLOWED_USERS=15551234567,15557654321. Without it, the docs say every inbound message is denied.
Bridge allowlist or pairing. Use WHATSAPP_ALLOWED_USERS, or remove it and rely on pairing. An unknown sender gets a one-time code, which you approve with hermes pairing approve whatsapp followed by the code. hermes pairing list shows who is waiting and hermes pairing revoke whatsapp removes someone. Codes expire after an hour. For a private number, the docs suggest whatsapp.unauthorized_dm_behavior: ignore, so strangers get silence instead of a code.
WHATSAPP_ALLOWED_USERS=* or an allow-all flag opens the bot to anyone. Don't do that on a bot that can run commands.
Want help deciding which route fits your business? Book a free AI strategy session.
Limits to plan around
The 24-hour window. Meta only allows free-form messages within 24 hours of the user's last message. Outside that, Meta requires a pre-approved template, and the docs say template support is not built into Hermes yet. So a cron job that delivers to WhatsApp after a quiet day fails with error 131047. The fix is for the user to message the bot again. Normal back-and-forth chat is not affected. Keep that in mind before pointing a Hermes Agent cron job at WhatsApp.
No groups on the Cloud API. Direct messages only for now. Use the bridge if you need groups.
Not a broadcast tool. Neither route is built for mass messaging. The bridge docs warn against bulk sends outright. Hermes on WhatsApp is a conversation with people who message you.
One gateway, every platform
Since v0.23.0, released on 5 November 2026, one gateway per machine owns every session. Nous Research says the CLI, TUI, desktop app, editors, bots and cron all attach as clients, with one queue and one history. Your WhatsApp chat is the same session wherever you open it.
That gateway can also run your other platforms. See Hermes multi-gateway connections for running several, and best messaging app for Hermes Agent to pick a main one. Platform guides in this set: Hermes Agent Telegram, Hermes Agent Slack and Hermes Agent Discord.
The Agent OS guide shows the full agent system. Goldie Bench helps you choose the model.
Members of the AI Profit Boardroom share the agents they run for customer questions and daily admin. If you want a plan built for your own business, take a free AI strategy session.
FAQ
Will my WhatsApp number get banned using Hermes?
On the Baileys bridge there is a risk, because it is not an official API. Use a dedicated number and keep it conversational. The Cloud API has no ban risk, per the Hermes docs.
Why did my scheduled WhatsApp message fail with error 131047?
The 24-hour window closed. On the Cloud API, Hermes can only send free-form messages within 24 hours of the user's last message, and templates are not supported yet.
Can Hermes join WhatsApp groups?
On the bridge, yes, once you set group_policy to allowlist or open. On the Cloud API, no. It handles direct messages only.
Ready to have an agent answering on WhatsApp? Book a free AI strategy session and plan the first jobs it should take on.











