You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Setting up WhatsApp on Hermes Agent is significantly more complex and error-prone than other platforms — especially Telegram, which has a straightforward hermes gateway setup flow that just asks for a bot token and works.
WhatsApp requires at least 4 manual configuration steps that a new user cannot reasonably discover on their own:
Pairing — hermes whatsapp → scan QR. This works (more or less).
Allowlist — Set WHATSAPP_ALLOWED_USERS to the owner's personal phone number, NOT the bot's number. This distinction is not documented or obvious. First-time users routinely set it to the bot's own number, locking themselves out.
DM policy — Change dm_policy from "open" to "allowlist" in config.yaml, otherwise the gateway refuses to start when WHATSAPP_ALLOW_ALL_USERS=false.
Home channel — Set WHATSAPP_HOME_CHANNEL in .env for cron delivery. Without this, cron job output never reaches the user on WhatsApp.
On top of that:
The gateway service must be restarted via hermes-gateway.service (not hermes-dashboard), which is easy to confuse.
The delivery format for cron targets is unintuitive: whatsapp:<LID>@lid (not the phone JID format <number>@s.whatsapp.net).
There is no built-in test to verify delivery works after setup.
This matters because WhatsApp is the dominant messaging platform in many countries — Brazil, India, Mexico, much of Europe, Southeast Asia, and Africa. For users in these regions, WhatsApp is not a "nice to have" integration; it's the primary way they interact with messaging services. A painful WhatsApp setup creates a disproportionate onboarding barrier for a huge portion of the global user base.
A single guided command that configures everything in one pass:
$ hermes whatsapp setup
┌─ WhatsApp Setup ──────────────────────────────────┐
│ │
│ This will guide you through WhatsApp setup. │
│ You'll need your WhatsApp account ready to scan │
│ a QR code. │
│ │
├────────────────────────────────────────────────────┤
│ │
│ Step 1/4: Pairing │
│ ───────────────── │
│ Starting WhatsApp bridge... │
│ │
│ 📱 Scan this QR code with WhatsApp: │
│ ┌─────────────────────────────────────────┐ │
│ │ ██████████████████ │ │
│ │ ██ QR CODE ██ │ │
│ │ ██████████████████ │ │
│ └─────────────────────────────────────────┘ │
│ │
│ ✓ Paired successfully as: 5511999999999 │
│ │
├────────────────────────────────────────────────────┤
│ │
│ Step 2/4: Who can use this bot? │
│ ─────────────────────────────── │
│ │
│ We detected your paired account: 5511999999999 │
│ │
│ Is this YOUR personal number? [Y/n] │
│ → Y │
│ │
│ ✓ WHATSAPP_ALLOWED_USERS = 5511999999999 │
│ ✓ WHATSAPP_ALLOW_ALL_USERS = false │
│ ✓ dm_policy = allowlist │
│ │
├────────────────────────────────────────────────────┤
│ │
│ Step 3/4: Cron delivery home channel │
│ ───────────────────────────────────── │
│ │
│ Should cron job output be delivered here? [Y/n] │
│ → Y │
│ │
│ ✓ WHATSAPP_HOME_CHANNEL = <your_chat_id> │
│ │
├────────────────────────────────────────────────────┤
│ │
│ Step 4/4: Test delivery │
│ ─────────────────────── │
│ │
│ Sending test message... │
│ ✓ Test message delivered to your WhatsApp! │
│ │
├────────────────────────────────────────────────────┤
│ │
│ ✅ WhatsApp fully configured! │
│ │
│ Summary: │
│ ───────────────────────────────────────────── │
│ Paired as: 5511999999999 │
│ Allowed users: 5511999999999 (only you) │
│ DM policy: allowlist (no randoms) │
│ Groups: blocked │
│ Home channel: ✓ (cron deliveries enabled) │
│ Test delivery: ✓ │
│ │
└────────────────────────────────────────────────────┘
Under the hood, the wizard would:
Pair (reuse existing hermes whatsapp flow)
Detect owner — After pairing, read creds.json's me.id to know the bot's own number. Ask the user if this is their personal number, or let them type a different one.
Set allowlist — Write WHATSAPP_ALLOWED_USERS=<owner_number> and WHATSAPP_ALLOW_ALL_USERS=false to .env.
Set dm_policy — Run hermes config set whatsapp.dm_policy allowlist (handles the config.yaml restriction the agent has).
Set home channel — Detect the user's chat LID from the lid-mapping files and write WHATSAPP_HOME_CHANNEL=<LID>@lid to .env.
Test delivery — Send a test message via the bridge to confirm everything works.
Restart gateway — Prompt to restart hermes-gateway.service.
Print summary — Clear overview of what was configured.
Benefits
Parity with Telegram setup — Telegram's hermes gateway setup asks for a token and works. WhatsApp should be equally straightforward.
Eliminates the "wrong number" trap — The Terminal tool #1 mistake (setting the bot's number instead of the owner's) is caught automatically.
No manual .env editing — All three env vars (ALLOWED_USERS, ALLOW_ALL_USERS, HOME_CHANNEL) plus dm_policy in config.yaml are set by the wizard.
Works out of the box — New users in WhatsApp-dominant countries (Brazil, India, Mexico, etc.) can be productive in minutes, not hours.
Self-verifying — The test step catches silent failures immediately.
Implementation Considerations
The hermes_cli/main.py already has a whatsapp_setup function (around line 2506) that handles allowlist configuration — this could be extended.
The gateway already exposes _standalone_send for WhatsApp — the test step can reuse this.
No new dependencies needed — everything uses existing infrastructure (qrcode for pairing, the bridge for sending, hermes config for YAML edits).
The wizard should be idempotent — re-running it should update the config, not error out.
Problem
Setting up WhatsApp on Hermes Agent is significantly more complex and error-prone than other platforms — especially Telegram, which has a straightforward
hermes gateway setupflow that just asks for a bot token and works.WhatsApp requires at least 4 manual configuration steps that a new user cannot reasonably discover on their own:
hermes whatsapp→ scan QR. This works (more or less).WHATSAPP_ALLOWED_USERSto the owner's personal phone number, NOT the bot's number. This distinction is not documented or obvious. First-time users routinely set it to the bot's own number, locking themselves out.dm_policyfrom"open"to"allowlist"inconfig.yaml, otherwise the gateway refuses to start whenWHATSAPP_ALLOW_ALL_USERS=false.WHATSAPP_HOME_CHANNELin.envfor cron delivery. Without this, cron job output never reaches the user on WhatsApp.On top of that:
hermes-gateway.service(nothermes-dashboard), which is easy to confuse.whatsapp:<LID>@lid(not the phone JID format<number>@s.whatsapp.net).This matters because WhatsApp is the dominant messaging platform in many countries — Brazil, India, Mexico, much of Europe, Southeast Asia, and Africa. For users in these regions, WhatsApp is not a "nice to have" integration; it's the primary way they interact with messaging services. A painful WhatsApp setup creates a disproportionate onboarding barrier for a huge portion of the global user base.
Proposed Solution:
hermes whatsapp setupInteractive WizardA single guided command that configures everything in one pass:
Under the hood, the wizard would:
hermes whatsappflow)creds.json'sme.idto know the bot's own number. Ask the user if this is their personal number, or let them type a different one.WHATSAPP_ALLOWED_USERS=<owner_number>andWHATSAPP_ALLOW_ALL_USERS=falseto.env.hermes config set whatsapp.dm_policy allowlist(handles the config.yaml restriction the agent has).WHATSAPP_HOME_CHANNEL=<LID>@lidto.env.hermes-gateway.service.Benefits
hermes gateway setupasks for a token and works. WhatsApp should be equally straightforward.ALLOWED_USERS,ALLOW_ALL_USERS,HOME_CHANNEL) plusdm_policyin config.yaml are set by the wizard.Implementation Considerations
hermes_cli/main.pyalready has awhatsapp_setupfunction (around line 2506) that handles allowlist configuration — this could be extended._standalone_sendfor WhatsApp — the test step can reuse this.Related
hermes_cli/gateway.pyhasprint_qr_code()and pairing infrastructure that this can build on.