WhatsApp channel for Kestrel agents — isolated-venv feature (WhatsApp-Web via neonize + Twilio).
Project description
kestrel-channel-whatsapp
WhatsApp messaging channel for Kestrel agents. It runs as an isolated-venv feature: the transport (neonize, which needs protobuf 7 — incompatible with the host's gRPC/Google-AI stack) runs in a per-agent venv and process, and the host talks to it over the SDK's stdio JSON-RPC isolated-feature contract.
It's a single package. The base install is the lightweight host-side marker
(SDK only). The transport (neonize/twilio/segno) is the [service] extra, which
the host loader installs into a per-agent isolated venv — so the heavy,
protobuf-7 deps never touch the host venv:
host venv: pip install kestrel-channel-whatsapp # marker, SDK-only
per-agent venv: pip install "kestrel-channel-whatsapp[service]" # + transport (done by the loader)
How it integrates
The service advertises a whatsapp channel capability at initialize. The
host (kestrel-sovereign ≥ 0.31, the isolated-runtime channel bridge from #1825)
registers a forwarding ChannelAdapter into ChannelFeature.registry, so the
agent uses the generic channels tools unchanged:
| Direction | Path |
|---|---|
| Outbound | channels_send(channel="whatsapp", to, message) → host proxy → service whatsapp_send tool → provider |
| Inbound | provider → service emits a channel.inbound event → host proxy → ChannelFeature.handle_inbound → channel.message cognition signal → agent replies via channels_send |
Service tools: whatsapp_send, whatsapp_status, whatsapp_link (QR pairing
for the web provider).
Providers
| Provider | Outbound | Inbound | Notes |
|---|---|---|---|
web (default) |
✅ | ✅ | neonize (whatsmeow) — links as a companion device. Scan the whatsapp_link QR in WhatsApp → Linked Devices. Needs system libmagic. |
twilio |
✅ | ❌ | Outbound-only in the isolated runtime — Twilio inbound needs a public HTTP webhook, which the stdio service does not host. whatsapp_status reports inbound_supported: false. |
A freshly queued message is reported as PENDING, not delivered — the agent will not claim delivery it cannot confirm.
Install
The host installs the [service] extra into a per-agent venv automatically when
the feature is enabled. To develop locally:
uv pip install -e /path/to/kestrel-channel-whatsapp # host-side marker
uv pip install -e "/path/to/kestrel-channel-whatsapp[service]" # + transport, to test the service
Add WhatsAppFeature to the agent's features list in multi_agent.toml, then
restart the host. The feature appears in the agent's features UI with a config
form.
Configuration
Set via the features UI / persisted config (forwarded to the service through the initialize handshake), or via environment variables (UI/persisted config wins; env is a fallback):
| Config key | Env var | Notes |
|---|---|---|
provider |
KESTREL_WHATSAPP_PROVIDER |
web (default) or twilio |
session_db |
KESTREL_WHATSAPP_SESSION_DB |
web: neonize companion-session SQLite path |
allowed_senders |
— | E.164 allowlist; empty = allow all |
account_sid |
TWILIO_ACCOUNT_SID |
twilio only |
auth_token |
TWILIO_AUTH_TOKEN |
twilio only (secret) |
from_number |
TWILIO_WHATSAPP_FROM |
twilio sender, E.164. Defaults to the sandbox +14155238886 |
Linking the web provider
- Enable the feature with
provider="web"and restart the host. - Call
whatsapp_link(or!whatsapp link) — it returns a pairing QR. - On your phone: WhatsApp → Settings → Linked Devices → Link a Device → scan.
- Once linked,
whatsapp_statusreportsconnected: true; the agent receives inbound messages aschannel.messagesignals and replies viachannels_send.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file kestrel_channel_whatsapp-0.2.1.tar.gz.
File metadata
- Download URL: kestrel_channel_whatsapp-0.2.1.tar.gz
- Upload date:
- Size: 114.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fd6331e3f5ebda6f7d79f4029c5a6f3708cf58fcc4523aba3f02026dd4713404
|
|
| MD5 |
3990745d5abe1d9f844e4a11f1bbb6b5
|
|
| BLAKE2b-256 |
ef4cd2cf5117a027876f9a3201387e4c321f1535694d9403e2ba80b8cb025a07
|
Provenance
The following attestation bundles were made for kestrel_channel_whatsapp-0.2.1.tar.gz:
Publisher:
publish.yml on KestrelSovereignAI/kestrel-channel-whatsapp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
kestrel_channel_whatsapp-0.2.1.tar.gz -
Subject digest:
fd6331e3f5ebda6f7d79f4029c5a6f3708cf58fcc4523aba3f02026dd4713404 - Sigstore transparency entry: 2038306253
- Sigstore integration time:
-
Permalink:
KestrelSovereignAI/kestrel-channel-whatsapp@3573c828c2b6f275ec21418174b9b5f4fe2124a4 -
Branch / Tag:
refs/tags/v0.2.1 - Owner: https://github.com/KestrelSovereignAI
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@3573c828c2b6f275ec21418174b9b5f4fe2124a4 -
Trigger Event:
push
-
Statement type:
File details
Details for the file kestrel_channel_whatsapp-0.2.1-py3-none-any.whl.
File metadata
- Download URL: kestrel_channel_whatsapp-0.2.1-py3-none-any.whl
- Upload date:
- Size: 23.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9e239f2364a21e14379ce88a23e0c8e783200bdc2e446163415a0ea83cf8a26e
|
|
| MD5 |
739988ddc906f86f37b5840b23dff01a
|
|
| BLAKE2b-256 |
0f87931a6ca095023a0a3a85a18f03fd88e6cd3687ca2337d0c1420c932e2f4a
|
Provenance
The following attestation bundles were made for kestrel_channel_whatsapp-0.2.1-py3-none-any.whl:
Publisher:
publish.yml on KestrelSovereignAI/kestrel-channel-whatsapp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
kestrel_channel_whatsapp-0.2.1-py3-none-any.whl -
Subject digest:
9e239f2364a21e14379ce88a23e0c8e783200bdc2e446163415a0ea83cf8a26e - Sigstore transparency entry: 2038306581
- Sigstore integration time:
-
Permalink:
KestrelSovereignAI/kestrel-channel-whatsapp@3573c828c2b6f275ec21418174b9b5f4fe2124a4 -
Branch / Tag:
refs/tags/v0.2.1 - Owner: https://github.com/KestrelSovereignAI
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@3573c828c2b6f275ec21418174b9b5f4fe2124a4 -
Trigger Event:
push
-
Statement type: