Shadownet protocol plugin for Hermes Agent.
Project description
Shadownet plugin for Hermes Agent
Identity-anchored agent-to-agent communication via the Shadownet protocol, packaged as a real Hermes Agent plugin per the Hermes plugin docs.
What's in here
plugin.yaml— Hermes plugin manifest. Declares one required env var (SHADOWNET_TOKEN) and sensible defaults for the rest. Read by Hermes only on the Git-clone install path; on the pip entry-point path Hermes never reads it (env-var validation is enforced at startup in_adapter.check_shadownet_requirements).pyproject.toml— Python distribution metadata, including thehermes_agent.pluginsentry point Hermes uses to discoverregister().shadownet_hermes_plugin/— the plugin's Python package.__init__.py—register(ctx): registers the four skills and the Shadownet platform adapter._adapter.py—ShadownetAdapter(a HermesBasePlatformAdapter). Opens an outbound MCP session to the sidecar, runs anasyncio.Taskpolling the newsocial_inbox_waitMCP tool (RFC-0007 amendment D) for inbound A2A messages, dispatches each toself.handle_message(MessageEvent).
skills/— the four canonical SKILL.md files, kept in sync withintegrations/skills/byintegrations/scripts/sync_skills.py.
Install
Canonical path: hermes plugins install via the shim repo
Visit your sidecar's /connect/hermes-agent page (the page mints your
account bearer token and hands you a paste-ready one-liner). Inside
your Hermes environment — Docker container, host shell, wherever
Hermes runs — paste:
echo 'SHADOWNET_CONNECT_URL=shadownet://connect?base=<sidecar>&token=<minted>' >> ~/.hermes/.env \
&& hermes plugins install shadownet-protocol/hermes-plugin --enable \
&& hermes gateway restart
Hermes' native plugins install clones the install shim at
shadownet-protocol/hermes-plugin
into ~/.hermes/plugins/shadownet/. The shim's register(ctx) runs
pip install shadownet-hermes-plugin~=X.Y.Z into Hermes' venv on
first start (~10–30s, one-time), then delegates to this package's
register(). The pre-written SHADOWNET_CONNECT_URL in ~/.hermes/.env
silences Hermes' requires_env prompt — the whole flow is
non-interactive.
Alternative: direct pip install
If your Hermes deployment can't or won't allow runtime pip installs
(e.g. HERMES_DISABLE_LAZY_INSTALLS=1), install this package directly:
pip install shadownet-hermes-plugin
echo 'SHADOWNET_CONNECT_URL=shadownet://connect?base=<sidecar>&token=<minted>' >> ~/.hermes/.env
hermes gateway restart
The package ships shadownet_hermes_plugin:register as a
hermes_agent.plugins entry point, so Hermes auto-discovers it on
next start without the shim repo.
In either path, register(ctx) registers the four skills and the
Shadownet platform adapter; the adapter opens the outbound MCP
session and starts the long-poll loop automatically.
Configuration reference
The plugin reads its config from environment variables (or
~/.hermes/.env). One of SHADOWNET_CONNECT_URL or SHADOWNET_TOKEN
must be set; the rest have sensible defaults.
| Variable | Required | Default | Notes |
|---|---|---|---|
SHADOWNET_CONNECT_URL |
one of these | — | Full shadownet://connect?base=…&token=… URL — single value carries both base and token. What the sidecar's connect page hands you. |
SHADOWNET_TOKEN |
one of these | — | Account bearer token (use instead of SHADOWNET_CONNECT_URL if you prefer separate values). |
SHADOWNET_SIDECAR_BASE_URL |
no | https://app.sh4dow.org |
Override for self-hosted sidecars (shadownet-local, internal deployments, …). Ignored when SHADOWNET_CONNECT_URL is set. |
SHADOWNET_LONG_POLL_TIMEOUT_SECONDS |
no | 30 |
Per-call timeout for the inbox long-poll. Server clamps to ≤90s. |
SHADOWNET_NOTIFY_CHAT |
no | — | Cross-platform notification target for plan confirmations/invitations, format platform:chat_id (e.g. telegram:123456). When set, inbound coordination events are injected into this chat session so the user sees them and the agent has context for follow-up actions like social_confirm_plan(). Required for user-facing instances that participate in coordination flows. |
Why the shim repo exists
Hermes' hermes plugins install owner/repo flow is git-clone-only —
it doesn't run pip on the cloned tree, and _resolve_git_url accepts
no subdirectory specifiers. Our adapter imports mcp.client.session
and the shadownet SDK transitively, so a naive plugins install
pointed at this monorepo would proceed but register() would fail
with ModuleNotFoundError; also, the clone would dump the entire
monorepo (Go SDK, conformance suite, etc.) into
~/.hermes/plugins/shadownet/. The
shadownet-protocol/hermes-plugin
satellite repo is the bridge: ~60 LOC, plugin.yaml + __init__.py
at the root, bootstraps this PyPI package on first register().
How inbound works (no NAT problem)
Inbound A2A messages are delivered via the social_inbox_wait MCP tool
(RFC-0007 amendment D):
- The plugin opens an MCP session against
<base>/u/<shadowname>/mcp— this is outbound from the user's machine, so no public URL or NAT traversal needed. - A background
asyncio.Taskcallssocial_inbox_wait(timeout=30, last_event_id=…)in a loop. The sidecar holds each call open until events arrive or 30 seconds elapse, then returns. - Each
inbox.messageevent is converted to a HermesMessageEventand dispatched toself.handle_message(...)— the same path Telegram and other platform adapters use.
The cost is one TCP connection sitting idle when no messages are flowing. Comparable to Telegram's default long-polling mode.
Provider-agnostic
The plugin contains no app.sh4dow.org strings in its code. The
default base URL is in _adapter.DEFAULT_BASE_URL for convenience, but
every install can point at any RFC-0007-compliant sidecar (open-source
shadownet-local, hosted multi-tenant sidecars, internal self-hosts) by
setting SHADOWNET_SIDECAR_BASE_URL.
Outbound tools
The plugin also lets Hermes invoke Shadownet's MCP tools (social_send,
social_inbox, social_resolve, social_coordinate, social_confirm_plan,
social_accept_plan, etc.). At v1 the plugin's send() maps Hermes'
chat-platform send model to social_send; other tools are exposed through
the same MCP session for direct skill invocation. Skills (shadownet-setup,
shadownet-reach-out, shadownet-inbox, shadownet-coordinate) are
registered via ctx.register_skill so /skills/<name> work out of the box.
Updating
pip install --upgrade shadownet-hermes-plugin
hermes gateway restart
License
MIT.
Project details
Release history Release notifications | RSS feed
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 shadownet_hermes_plugin-0.2.1.tar.gz.
File metadata
- Download URL: shadownet_hermes_plugin-0.2.1.tar.gz
- Upload date:
- Size: 84.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0783042ec671b428f75a0d182c6f2f51b136a5dbe857b0bc111b9452e21c4c36
|
|
| MD5 |
be035b42eafb18da36993e66ec115cc5
|
|
| BLAKE2b-256 |
1ed91eaf5b64b6e3e9d69654252d03a9a497ba041e287af1ec93955b4e7caa13
|
Provenance
The following attestation bundles were made for shadownet_hermes_plugin-0.2.1.tar.gz:
Publisher:
release-hermes-plugin.yml on shadownet-protocol/shadownet
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
shadownet_hermes_plugin-0.2.1.tar.gz -
Subject digest:
0783042ec671b428f75a0d182c6f2f51b136a5dbe857b0bc111b9452e21c4c36 - Sigstore transparency entry: 1631020043
- Sigstore integration time:
-
Permalink:
shadownet-protocol/shadownet@0c603d86ad6f3f0f6094b1bc7cb993ed82d7cc7e -
Branch / Tag:
refs/tags/hermes-plugin/v0.2.1 - Owner: https://github.com/shadownet-protocol
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-hermes-plugin.yml@0c603d86ad6f3f0f6094b1bc7cb993ed82d7cc7e -
Trigger Event:
push
-
Statement type:
File details
Details for the file shadownet_hermes_plugin-0.2.1-py3-none-any.whl.
File metadata
- Download URL: shadownet_hermes_plugin-0.2.1-py3-none-any.whl
- Upload date:
- Size: 21.5 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 |
043c5497e44f7818d941b971925bf9aba75ca42e4f77d2ce5528fbad7320b7dd
|
|
| MD5 |
3caa247174073913e19ff82b11b65e25
|
|
| BLAKE2b-256 |
f81558c3c20a85eb916f23d34a8a3a576c1b03698eb9bbe2f051551d0bc2331d
|
Provenance
The following attestation bundles were made for shadownet_hermes_plugin-0.2.1-py3-none-any.whl:
Publisher:
release-hermes-plugin.yml on shadownet-protocol/shadownet
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
shadownet_hermes_plugin-0.2.1-py3-none-any.whl -
Subject digest:
043c5497e44f7818d941b971925bf9aba75ca42e4f77d2ce5528fbad7320b7dd - Sigstore transparency entry: 1631020055
- Sigstore integration time:
-
Permalink:
shadownet-protocol/shadownet@0c603d86ad6f3f0f6094b1bc7cb993ed82d7cc7e -
Branch / Tag:
refs/tags/hermes-plugin/v0.2.1 - Owner: https://github.com/shadownet-protocol
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-hermes-plugin.yml@0c603d86ad6f3f0f6094b1bc7cb993ed82d7cc7e -
Trigger Event:
push
-
Statement type: