Skip to main content

WhatsApp++ for Hermes Agent: edit, delete, react, and star WhatsApp messages through the local Baileys bridge.

Project description

WhatsApp++ for Hermes Agent

Advanced WhatsApp message controls for Hermes Agent: edit bot-sent messages, delete/revoke messages for everyone, react/unreact, and star/unstar messages through the local Baileys WhatsApp bridge.

This repo packages the local Pulse Labs prototype of a Hermes plugin named whatsapp-plusplus with a tool named whatsapp_plusplus.

What it is

Hermes Agent can already send WhatsApp messages and returns WhatsApp message_id values. WhatsApp++ adds the missing follow-up controls that make Hermes more useful in real chats and group threads:

  • edit a Hermes/bot-sent message
  • delete/revoke a Hermes/bot-sent message for everyone, when WhatsApp allows it
  • react to a message with an emoji
  • clear a reaction
  • star or unstar a message locally for the connected WhatsApp account

It is especially useful when Hermes is operating through WhatsApp groups and needs to correct, clean up, or acknowledge messages without adding more clutter.

Who it is for

  • Hermes Desktop users running the bundled WhatsApp/Baileys bridge
  • teams using Hermes as a WhatsApp bot in group chats
  • agencies and operators who want an assistant that can clean up its own messages after corrections
  • developers experimenting with safer agent-side message controls

This is not a WhatsApp automation platform by itself. It is a small Hermes plugin plus bridge patch that exposes controls for an already-paired Hermes WhatsApp bridge.

How it works

There are two pieces:

  1. Hermes plugin

    • installs as the pip package wpp-hermes
    • exposes public CLI commands named wpp-hermes and whatsapp-plusplus
    • exposes a Hermes plugin entry point named whatsapp-plusplus
    • optionally writes a tiny ~/.hermes/plugins/whatsapp-plusplus/ CLI visibility shim
    • registers one tool: whatsapp_plusplus
    • sends local HTTP requests to the WhatsApp bridge, defaulting to http://127.0.0.1:3000
  2. Baileys bridge endpoints

    • adds/uses POST /edit
    • adds POST /delete
    • adds POST /react
    • adds POST /star

The plugin does not talk to WhatsApp directly. Hermes calls the plugin, the plugin calls the local bridge, and the bridge uses Baileys to operate as the connected WhatsApp bot account.

Actions exposed to Hermes

Tool: whatsapp_plusplus

Arguments:

  • action: one of edit, delete_for_everyone, react, unreact, star, unstar
  • chat_id: WhatsApp chat JID, for example 120363...@g.us
  • message_id: WhatsApp message key/id returned by Hermes or WhatsApp
  • message: replacement text for edit
  • emoji: emoji for react
  • from_me: whether the message was sent by the connected bot account; defaults to true
  • participant: optional participant JID for group messages, especially when from_me=false
  • safety_ack: required exact value USER_EXPLICITLY_REQUESTED_THIS for edit and delete_for_everyone

Safety model

WhatsApp++ deliberately makes edit/delete harder than react/star.

The plugin refuses to run edit or delete_for_everyone unless Hermes passes:

safety_ack=USER_EXPLICITLY_REQUESTED_THIS

Hermes should only pass that value when the user explicitly asks to edit or delete that exact message in the current conversation.

Safety & Security Disclaimer

This plugin gives an AI agent real control over visible WhatsApp history from the connected bot account. That is powerful, but it means a misconfigured, compromised, or poorly instructed agent could potentially:

  • send something the user did not intend, then edit it after the fact
  • delete a message to hide evidence of a mistake or unwanted action
  • clean up context in a group thread in a way that changes what other people can see
  • react to messages in ways that imply approval or agreement
  • star sensitive messages on the bot account for later retrieval

The safety acknowledgement is a guardrail, not a cryptographic permission system. Any agent that has this tool in its available tool list and decides to pass the acknowledgement string can technically attempt the action. Treat this plugin like a moderation/admin tool: only enable it for agents and chats where you trust the model, prompt, runtime, and operators.

Recommended guardrails:

  • keep edit/delete disabled or unavailable unless you actually need them
  • require explicit user wording such as "edit that message" or "delete that for everyone"
  • log every edit/delete action with chat_id, message_id, timestamp, and requesting user
  • prefer corrected follow-up messages over editing history
  • never allow autonomous/background jobs to edit or delete without human approval
  • use a dedicated bot WhatsApp account, not a personal account
  • test in a private chat before using in production groups

Important limits:

  • delete-for-everyone can fail due to WhatsApp message age/type/permission limits
  • deleting leaves a WhatsApp deleted-message placeholder
  • edits change visible chat history and should not be used silently
  • reactions are visible to the chat
  • starring is local to the connected WhatsApp bot account
  • the tool needs a real chat_id and message_id; do not guess

Install

One-line agent prompt: install this version

Paste this to Hermes:

Install Pulse Labs WhatsApp++ for Hermes with `uvx wpp-hermes install`, which installs the pip package into Hermes Desktop's Python with uv pip install, patches the bundled WhatsApp bridge, writes the Hermes plugin shim, enables the plugin, restarts only the WhatsApp bridge if needed, and verifies with py_compile, node --check, hermes plugins list, and safe /delete /react /star endpoint checks.

Short install from PyPI

WhatsApp++ is distributed as the PyPI package wpp-hermes. Hermes Desktop includes uv, so the short install uses uvx to run a temporary bootstrap CLI. The bootstrap then uses uv pip install --python <Hermes Python> wpp-hermes so the actual Hermes plugin lands in the same Python environment that runs Hermes.

uvx wpp-hermes install

That one command installs the package into Hermes Desktop, patches the local WhatsApp bridge, writes a small ~/.hermes/plugins/whatsapp-plusplus Hermes CLI visibility shim, and enables the plugin in Hermes config.

The public CLI names are wpp-hermes and whatsapp-plusplus. The Hermes plugin is still registered as a pip entry point named whatsapp-plusplus, and the Hermes tool is still named whatsapp_plusplus. The shim exists because current hermes plugins list/enable commands may only scan directory plugins. If the installer finds the older copied ~/.hermes/plugins/whatsapp_plusplus directory-plugin, it archives that directory under ~/.hermes/plugin_backups/ to avoid duplicate plugin entries; pass --keep-legacy-dir to keep it.

Then restart Hermes Gateway or restart only the WhatsApp bridge so the new bridge endpoints are live. Start a fresh Hermes session after enabling the plugin.

Install from GitLab before a PyPI release

uvx --from git+https://gitlab.com/pulse-labs/whatsapp-plusplus-hermes.git wpp-hermes install --package-spec git+https://gitlab.com/pulse-labs/whatsapp-plusplus-hermes.git

Manual install

If you prefer to see each step, this is what wpp-hermes install does:

HERMES_PY="C:/Users/you/AppData/Local/hermes/hermes-agent/venv/Scripts/python.exe"
uv pip install --python "$HERMES_PY" wpp-hermes
"$HERMES_PY" -m pulse_labs_whatsapp_plusplus_hermes.installer --enable

Source checkout install

Clone the repo:

git clone https://gitlab.com/pulse-labs/whatsapp-plusplus-hermes.git
cd whatsapp-plusplus-hermes

Install/edit the local checkout into Hermes' Python environment:

HERMES_PY="C:/Users/you/AppData/Local/hermes/hermes-agent/venv/Scripts/python.exe"
uv pip install --python "$HERMES_PY" -e .
"$HERMES_PY" -m pulse_labs_whatsapp_plusplus_hermes.cli enable

Custom Hermes home or bridge path

wpp-hermes install --hermes-home "C:/Users/you/AppData/Local/hermes" --bridge "C:/Users/you/AppData/Local/hermes/hermes-agent/scripts/whatsapp-bridge/bridge.js"

Different bridge URL

The plugin defaults to http://127.0.0.1:3000. Override it with:

export WHATSAPP_PLUSPLUS_BRIDGE_URL=http://127.0.0.1:3000

Publishing

Build and test locally first:

uv build
uvx --from dist/wpp_hermes-0.3.0-py3-none-any.whl wpp-hermes --help

Publish to TestPyPI. The upload endpoint intentionally uses /legacy/; that is still the current PyPI/TestPyPI upload API used by uv and twine. The install/index endpoint is /simple/.

uv publish --publish-url https://test.pypi.org/legacy/ --token "$TEST_PYPI_TOKEN"
uvx --index https://test.pypi.org/simple/ --from wpp-hermes wpp-hermes --help

After TestPyPI works, publish to real PyPI:

uv publish --token "$PYPI_TOKEN"
uvx wpp-hermes --help

Rebuild from scratch

For security-sensitive users who would rather have their local agent write the plugin and bridge patch from a prompt instead of installing prewritten package code, keep this option. Review the generated files before enabling edit/delete in any real chat.

One-line agent prompt: rebuild from scratch

Paste this to Hermes:

Rebuild WhatsApp++ for Hermes from scratch: create a Hermes plugin exposing a whatsapp_plusplus tool with actions edit/delete_for_everyone/react/unreact/star/unstar, require safety_ack=USER_EXPLICITLY_REQUESTED_THIS for edit/delete, patch the local Baileys WhatsApp bridge with /delete, /react, and /star endpoints using Baileys message keys, and verify with py_compile, node --check, hermes plugins list, bridge health, and a disposable WhatsApp smoke test only after I explicitly approve edit/delete tests.

Usage examples

Delete a bot-sent message for everyone:

{
  "action": "delete_for_everyone",
  "chat_id": "120363000000000000@g.us",
  "message_id": "3EB0ABC123",
  "from_me": true,
  "safety_ack": "USER_EXPLICITLY_REQUESTED_THIS"
}

React to a message:

{
  "action": "react",
  "chat_id": "120363000000000000@g.us",
  "message_id": "3EB0ABC123",
  "emoji": "✅",
  "from_me": true
}

Star a message locally:

{
  "action": "star",
  "chat_id": "120363000000000000@g.us",
  "message_id": "3EB0ABC123",
  "from_me": true
}

Verification checklist

After install:

"$HERMES_PY" -m py_compile -q src/pulse_labs_whatsapp_plusplus_hermes/*.py scripts/install.py  # source checkout only
"$HERMES_PY" -m pulse_labs_whatsapp_plusplus_hermes.installer --help
node --check "$HOME/AppData/Local/hermes/hermes-agent/scripts/whatsapp-bridge/bridge.js"
hermes plugins list --plain --no-bundled | grep whatsapp-plusplus

Bridge endpoint checks should return HTTP 400 for missing required fields, not 404:

curl -i -X POST http://127.0.0.1:3000/delete -H 'Content-Type: application/json' -d '{}'
curl -i -X POST http://127.0.0.1:3000/react  -H 'Content-Type: application/json' -d '{}'
curl -i -X POST http://127.0.0.1:3000/star   -H 'Content-Type: application/json' -d '{}'

Bridge endpoint details

POST /delete

{ "chatId": "...", "messageId": "...", "fromMe": true, "participant": "optional" }

Calls Baileys:

sock.sendMessage(chatId, { delete: key })

POST /react

{ "chatId": "...", "messageId": "...", "emoji": "✅", "fromMe": true, "participant": "optional" }

Calls Baileys:

sock.sendMessage(chatId, { react: { text: emoji || '', key } })

POST /star

{ "chatId": "...", "messageId": "...", "star": true, "fromMe": true }

Calls Baileys:

sock.chatModify({ star: { messages: [{ id: messageId, fromMe }], star } }, chatId)

Repo layout

src/pulse_labs_whatsapp_plusplus_hermes/  pip-installable Hermes plugin package + installer
plugin/whatsapp_plusplus/                  directory-plugin copy for manual installs/reference
scripts/install.py                         source-checkout wrapper around the package installer
pyproject.toml                             uv/pip package metadata and Hermes entry point
README.md                                  public docs
LICENSE                                    MIT license

License

MIT License. See LICENSE.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

wpp_hermes-0.3.0.tar.gz (46.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

wpp_hermes-0.3.0-py3-none-any.whl (16.1 kB view details)

Uploaded Python 3

File details

Details for the file wpp_hermes-0.3.0.tar.gz.

File metadata

  • Download URL: wpp_hermes-0.3.0.tar.gz
  • Upload date:
  • Size: 46.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.30 {"installer":{"name":"uv","version":"0.9.30","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"12","id":"bookworm","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for wpp_hermes-0.3.0.tar.gz
Algorithm Hash digest
SHA256 6cb7f06921543567d51e7a5ee86ed5379bd94c87c801d80de3cc6d4a7cf0e088
MD5 75b7c728d1ed69081deaa5a2c3786f49
BLAKE2b-256 0dbdaf68853322798212b4e0a9814212c6c8adb84f4070e68d4bd1ea51e41c45

See more details on using hashes here.

File details

Details for the file wpp_hermes-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: wpp_hermes-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 16.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.30 {"installer":{"name":"uv","version":"0.9.30","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"12","id":"bookworm","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for wpp_hermes-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 33b06b8720952b0edf4483cb72f73e07750d587467fa9eb9ce1240acd2d235c8
MD5 61883393d17b1026a849b76af5a760f1
BLAKE2b-256 b3ba9b4717bcc79ce62390bf1a31abcc582f67ec373b20d25c6fb476e6948b14

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page