Skip to main content
Use 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:
The installer prompts only for 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:
The setup command can install the Kapso CLI, list connected WhatsApp numbers, ask which number Hermes should use, ask for your WhatsApp user ID, generate KAPSO_WEBHOOK_SECRET, and create the phone-number webhook in Kapso. The created webhook points at:
Non-interactive setup:
Restart the gateway after enabling the plugin or changing env vars:
Check setup:

Environment

The setup command writes these values to ~/.hermes/.env. Manual env vars also work:
For unsigned local fixtures only:
Allow a WhatsApp user later:
For local testing only:

Kapso webhook

The adapter listens on 0.0.0.0:8648 and accepts POST /kapso/webhook by default. With Tailscale Funnel:
The setup command can create the webhook for you. If webhook creation fails, create a phone-number scoped Kapso webhook manually: Use a public HTTPS URL. localhost and private network URLs cannot receive Kapso Cloud webhooks. Health check:

Send and receive

Inbound Hermes sessions use encoded chat IDs:
For manual sends or cron delivery, use a plain WhatsApp recipient when KAPSO_PHONE_NUMBER_ID is set:
Or include the sender phone number ID explicitly:
Text replies are split at WhatsApp’s 4096-character limit. Markdown links become label (url), and **bold** becomes WhatsApp *bold*.

Media

Inbound images are downloaded through Kapso, cached locally, and attached to Hermes MessageEvent.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:
For OpenAI transcription:
Other non-image media currently lands as captions or descriptive placeholders.

YAML config

Environment variables are the easiest path. YAML config also works:

Troubleshooting

Source

GitHub repository

Source code, plugin metadata, and issue tracker for the Kapso Hermes Agent plugin.