BLACK_WALL pre-action guardrail for Hermes Agent (NousResearch). Hooks pre_tool_call to call forecast() before any tool runs; blocks STOP verdicts; auto-reports outcomes via observe(). Decision receipts are Ed25519-signed and verifiable offline.
Project description
blackwall-hermes-plugin
Pre-action risk check for Hermes Agent (NousResearch). Hooks pre_tool_call so STOP-rated tool calls abort before they run — without modifying any of your other plugins or skills.
Powered by BLACK_WALL. Get a free key at blackwalltier.com/dashboard/keys.
Install
pip install blackwall-hermes-plugin
Enable the plugin in ~/.hermes/config.yaml:
plugins:
enabled:
- blackwall
Set the API key (env var, ~/.hermes/.env, or your launcher):
export BLACKWALL_API_KEY=bw_live_xxx
export BLACKWALL_MODE=observe # or 'enforce' once you trust the verdicts
That's it. Every tool the agent tries to call goes through pre_tool_call → BLACK_WALL forecast → verdict.
What you get back per tool call
GO/CAUTION/STOP- risk score 0–100
- reversibility class (REVERSIBLE / RECOVERABLE / IRREVERSIBLE)
- named red flags — e.g.
SQL_NO_WHERE,PROMPT_INJECTION_LIKELY,IRREVERSIBLE_NO_BACKUP - an Ed25519-signed Decision Receipt — verifiable offline against the published public key
Latency: ~4–8 seconds.
Modes
| Mode | Behavior |
|---|---|
observe (default) |
Score every tool call and log to BLACK_WALL; never block. Zero behavior change — safe to drop in. |
enforce |
STOP → hard block (returns {"action": "block", "message": "..."}). CAUTION → configurable (default: block; set BLACKWALL_CAUTION=allow to let it proceed). GO → proceeds. |
Start in observe for a few days to see what the verdicts look like on your real traffic. Switch to enforce once you trust the scoring.
Why pre_tool_call?
Hermes Agent exposes pre_tool_call as a documented plugin hook with {"action": "block", "message": "..."} return semantics — exactly the shape a pre-action guardrail needs. The plugin does not monkey-patch the dispatcher; it uses the documented extension surface.
That means:
- Multiple plugins can register
pre_tool_call— first valid block directive wins - Companion
post_tool_callhook fires after the tool runs (or after a block), so we can auto-report outcomes via BLACK_WALLobserve() - The plugin is opt-in — users must add
blackwalltoplugins.enabledin their config
Config reference (env vars)
| Variable | Default | Notes |
|---|---|---|
BLACKWALL_API_KEY |
(required) | Free key at https://blackwalltier.com/dashboard/keys |
BLACKWALL_MODE |
observe |
observe (log only) or enforce (block STOP) |
BLACKWALL_CAUTION |
block |
block (treat CAUTION as STOP) or allow (let CAUTION proceed) |
BLACKWALL_BASE_URL |
https://blackwalltier.com |
Override for self-hosted/staging |
How it works
┌──────────────────────────────┐
│ Hermes agent decides to │
│ call tool X with args Y │
└─────────────┬────────────────┘
│
pre_tool_call
│
▼
┌──────────────────────────────────────────┐
│ blackwall plugin: forecast(X, Y) │
│ ↓ │
│ STOP → return {"action": "block", │
│ "message": "..."} │
│ CAUTION → block or allow (env-configured) │
│ GO → return None │
└──────────────────┬───────────────────────┘
│ (if not blocked)
▼
tool actually runs
│
post_tool_call
│
▼
┌──────────────────────────────────────────┐
│ blackwall plugin: observe(forecast_id, │
│ outcome_class) │
│ matched / diverged / aborted │
└──────────────────────────────────────────┘
Fail-open: if BLACK_WALL is unreachable, the hook logs a warning and lets the tool proceed. A BLACK_WALL outage will never take down your agent.
Architecture
┌──────────────────────────────────────────────┐
│ BLACK_WALL HTTP API (stable, versioned) │
└──────────────────────────────────────────────┘
▲
┌──────────────────────────────────────────────┐
│ blackwall-sdk (shared Python client) │
│ forecast() observe() │
└──────────────────────────────────────────────┘
▲
┌──────────────────────────────────────────────┐
│ blackwall-hermes-plugin (this package) │
│ pre_tool_call post_tool_call │
└──────────────────────────────────────────────┘
▲
Hermes Agent
When Hermes ships breaking changes to its plugin contract, only this package needs to update. The HTTP API, the blackwall-sdk client, and every other BLACK_WALL integration remain insulated.
Links
- Site & docs: https://blackwalltier.com
- Free API key: https://blackwalltier.com/dashboard/keys
- Failure-mode taxonomy (28 named red-flag codes): https://blackwalltier.com/failure-modes
- PyPI:
blackwall-hermes-plugin·blackwall-sdk - Source: https://github.com/bluetieroperations-create/blackwall-hermes-plugin
- Sibling plugins:
blackwall-eliza-guardrail(npm) ·blackwall-openclaw-plugin(npm)
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 blackwall_hermes_plugin-0.1.0.tar.gz.
File metadata
- Download URL: blackwall_hermes_plugin-0.1.0.tar.gz
- Upload date:
- Size: 10.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
579296c532377b90366434571cc3703b4e638ec30d073a5a6a9619963f3f8b76
|
|
| MD5 |
a9a3e65ff3fbf149a618b7f5b021c0a2
|
|
| BLAKE2b-256 |
ab200a73c2f08446c2adebaadb8cc3c7a7502ac0af2e1d440ff8350543dd40d3
|
File details
Details for the file blackwall_hermes_plugin-0.1.0-py3-none-any.whl.
File metadata
- Download URL: blackwall_hermes_plugin-0.1.0-py3-none-any.whl
- Upload date:
- Size: 9.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
32b90016d4ea953b025698c483e7f8ab0a126fb7478ed4adb5adaacd42e42810
|
|
| MD5 |
3f35d6c8d1e754c9b0aa475553e3b421
|
|
| BLAKE2b-256 |
08b04f3eb56c0f6cc0ea5364a00fb5193aabe0976fd375f411cc44d485c45c85
|