gokapso/hermes-agent-plugin when a Hermes Agent gateway needs to receive Kapso webhooks, turn inbound WhatsApp messages into Hermes MessageEvents, and send replies through Kapso.
Use @kapso/whatsapp-cloud-api directly when you are building your own app and do not need Hermes platform routing.
Installation
Requires:| Requirement | Use |
|---|---|
| Hermes Agent gateway | Runs the Kapso platform adapter. |
| Kapso API key | Sends WhatsApp replies through Kapso. |
| Connected Kapso WhatsApp number | Sender number for replies and cron delivery. |
| Public HTTPS URL | Receives Kapso webhooks. Tailscale Funnel works well. |
| Node.js/npm | Needed only when setup installs or uses the Kapso CLI. |
KAPSO_API_KEY. Webhook secret, phone number, allowlist, and webhook creation happen in the setup command.
Hermes clones the plugin into ~/.hermes/plugins/kapso and loads it on the next session or gateway restart.
If your Hermes environment does not already include aiohttp:
Setup
Recommended setup:KAPSO_WEBHOOK_SECRET, and create the phone-number webhook in Kapso.
The created webhook points at:
Environment
The setup command writes these values to~/.hermes/.env. Manual env vars also work:
| Variable | Required | Use |
|---|---|---|
KAPSO_API_KEY | Yes | Sends outbound WhatsApp messages. |
KAPSO_WEBHOOK_SECRET | Yes for signed webhooks | Verifies signed Kapso webhooks. Generated by setup if missing. |
KAPSO_PHONE_NUMBER_ID | Recommended | Default sender number ID for replies, manual sends, and cron delivery. |
KAPSO_HOME_CHANNEL | No | Default WhatsApp recipient for deliver=kapso cron jobs. |
KAPSO_ALLOWED_USERS | No | Comma-separated WhatsApp user IDs allowed to talk to the bot. |
KAPSO_ALLOW_ALL_USERS | No | Set true for development-only open access. |
KAPSO_WEBHOOK_URL | No | Public webhook URL saved by setup for status and debugging. |
KAPSO_BASE_URL | No | Defaults to https://api.kapso.ai/meta/whatsapp. |
KAPSO_GRAPH_VERSION | No | Defaults to v24.0. |
KAPSO_HOST | No | Webhook bind host. Defaults to 0.0.0.0. |
KAPSO_PORT | No | Webhook port. Defaults to 8648. |
KAPSO_WEBHOOK_PATH | No | Webhook path. Defaults to /kapso/webhook. |
Kapso webhook
The adapter listens on0.0.0.0:8648 and accepts POST /kapso/webhook by default.
With Tailscale Funnel:
| Setting | Value |
|---|---|
| Scope | WhatsApp phone number |
| Endpoint URL | https://<your-funnel-host>/kapso/webhook |
| Events | whatsapp.message.received |
| Kind | kapso |
| Payload version | v2 |
| Secret | Same value as KAPSO_WEBHOOK_SECRET |
localhost and private network URLs cannot receive Kapso Cloud webhooks.
Health check:
Send and receive
Inbound Hermes sessions use encoded chat IDs:KAPSO_PHONE_NUMBER_ID is set:
label (url), and **bold** becomes WhatsApp *bold*.
Media
Inbound images are downloaded through Kapso, cached locally, and attached to HermesMessageEvent.media_urls for native vision processing.
Inbound audio and voice notes are downloaded through Kapso, cached locally as audio media, and attached to MessageEvent.media_urls for Hermes STT. WhatsApp voice notes are cached as .ogg.
For local, no-key transcription:
YAML config
Environment variables are the easiest path. YAML config also works:Troubleshooting
| Issue | Check |
|---|---|
| Plugin installed but no webhooks arrive | Run hermes gateway restart, check hermes gateway status, and confirm the public URL points to /kapso/webhook. |
Webhook returns 401 | KAPSO_WEBHOOK_SECRET does not match the Kapso webhook secret, or the signature header is missing. |
| Outbound sends fail with missing phone number ID | Set KAPSO_PHONE_NUMBER_ID or send to <phone_number_id>:15551234567. |
| Bot should not answer everyone | Set KAPSO_ALLOWED_USERS and do not set KAPSO_ALLOW_ALL_USERS=true outside local development. |
| Images do not reach the agent | Tail gateway logs for cached inbound image; confirm the webhook payload includes kapso.mediaUrl, kapso.media_url, or an image media id. |
| Voice notes do not transcribe | Confirm audio was cached under ~/.hermes/audio_cache or ~/.hermes/cache/audio, then check the Hermes STT provider config. |
| Kapso CLI is missing | Run hermes kapso install-cli or npm install -g @kapso/cli. |
Source
GitHub repository
Source code, plugin metadata, and issue tracker for the Kapso Hermes Agent plugin.

