Atbash safety plugin for Hermes Agent
Project description
Atbash Hermes Plugin
Atbash guardrail plugin for Hermes Agent
using the official Python SDK (atbash-sdk).
The plugin registers a Hermes pre_tool_call hook and asks Atbash for a verdict
before a Hermes tool runs. If Atbash returns a blocking decision, the tool call is
stopped before execution.
What It Does
- Intercepts Hermes tool calls through
pre_tool_call. - Sends the tool name, arguments, command-like payload, session metadata, and inferred action class to Atbash.
- Blocks tool execution on
BLOCK,DENY,REJECT,DISALLOW, orHOLD. - Persists learned Hermes tool classifications across sessions.
Install
Install the plugin into the same Python environment that runs Hermes:
pip install atbash-hermes-plugin
If Hermes is installed in a virtual environment, use that environment's Python:
/path/to/hermes/venv/bin/python -m pip install atbash-hermes-plugin
Configure Atbash
The plugin needs an Atbash agent key. Configure either ATBASH_KEY_PATH or
ATBASH_AGENT_PRIVKEY.
Recommended:
ATBASH_KEY_PATH=$HOME/.config/atbash/guard-client-key
Alternative:
ATBASH_AGENT_PRIVKEY='{"pubkey":"...","privkey":"..."}'
Where To Set Environment Variables
Hermes commonly loads environment variables from ~/.hermes/.env.
Create or edit that file:
nano ~/.hermes/.env
Add:
ATBASH_KEY_PATH=$HOME/.config/atbash/guard-client-key
ATBASH_ENFORCE_DECISION=true
ATBASH_DEBUG=false
Restart Hermes after changing .env.
For a one-off terminal session, you can also export variables before starting Hermes:
export ATBASH_KEY_PATH="$HOME/.config/atbash/guard-client-key"
export ATBASH_ENFORCE_DECISION=true
export ATBASH_DEBUG=false
hermes
Optional Settings
# Override the Atbash API endpoint.
ATBASH_ENDPOINT=https://api.atbash.io
# Fail closed when Atbash cannot be reached. Default: true.
ATBASH_ENFORCE_DECISION=true
# Emit verbose plugin logs. Default: false.
ATBASH_DEBUG=false
# Override where learned Hermes tool classifications are saved.
ATBASH_TOOL_MAP_PATH=$HOME/.config/atbash/hermes-tool-map.json
Enable Or Check The Plugin
Hermes should discover installed Python packages that expose the
hermes_agent.plugins entry point.
Check whether Hermes sees the plugin:
hermes plugins list | grep atbash
If needed, enable it:
hermes plugins enable atbash-hermes-plugin
Verify It Is Working
Start Hermes and ask it to do something that uses a tool, such as creating a file or opening a website.
In another terminal, watch the Hermes log:
tail -f ~/.hermes/logs/agent.log
With ATBASH_DEBUG=true, you should see lines similar to:
[atbash-hermes-plugin] registered pre_tool_call hook
Atbash pre_tool_call enter tool=...
Atbash verdict tool=... verdict=ALLOW reason=...
If Atbash blocks a tool call, Hermes receives a blocking response before the tool executes.
Docker
When running Hermes in Docker, mount your Hermes data directory and put the Atbash key inside the mounted volume.
Example host layout:
~/.hermes/
.env
atbash/
guard-client-key
Example ~/.hermes/.env for Docker:
ATBASH_KEY_PATH=/opt/data/atbash/guard-client-key
ATBASH_ENFORCE_DECISION=true
ATBASH_DEBUG=false
Run Hermes:
docker run --rm -it \
-v ~/.hermes:/opt/data \
nousresearch/hermes-agent
You can also pass variables directly:
docker run --rm -it \
-v ~/.hermes:/opt/data \
-e ATBASH_KEY_PATH=/opt/data/atbash/guard-client-key \
-e ATBASH_ENFORCE_DECISION=true \
-e ATBASH_DEBUG=false \
nousresearch/hermes-agent
Tool Classification
Hermes tool names can vary by version, installed plugins, and enabled skills. The plugin ships with defaults for common tools and learns unseen tool names at runtime.
Learned mappings are saved to:
~/.config/atbash/hermes-tool-map.json
Set ATBASH_TOOL_MAP_PATH to override the location. The file persists across
Hermes sessions.
Verdict Behavior
ALLOW: the tool proceeds.HOLD: the tool is blocked with a review message.BLOCK,DENY,REJECT,DISALLOW: the tool is blocked.- Atbash API error:
ATBASH_ENFORCE_DECISION=true: fail closed and block.ATBASH_ENFORCE_DECISION=false: fail open and allow.
Troubleshooting
If Hermes does not show the plugin:
hermes plugins list | grep atbash
python -m pip show atbash-hermes-plugin
Make sure the package was installed into the same Python environment that runs Hermes.
If Atbash verdicts are not appearing in logs:
ATBASH_DEBUG=true
Then restart Hermes and watch:
tail -f ~/.hermes/logs/agent.log
If the plugin blocks everything with an unavailable-key or authentication error, check:
echo "$ATBASH_KEY_PATH"
test -f "$ATBASH_KEY_PATH" && echo "key file exists"
If using Docker, remember that paths inside the container are different from
host paths. Prefer /opt/data/... paths for mounted Hermes data.
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 atbash_hermes_plugin-0.1.1.tar.gz.
File metadata
- Download URL: atbash_hermes_plugin-0.1.1.tar.gz
- Upload date:
- Size: 7.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ccedc4a730285161b79ba93cf004fd1879f9a5b85d1daa82dd40db50443f5749
|
|
| MD5 |
ec314a7b303bf4eb9506886179806a67
|
|
| BLAKE2b-256 |
d2457fccd9c9c44e83b05fa02ff163df87dfb9dd2f4ae1b6f7f4d98f8713f52e
|
File details
Details for the file atbash_hermes_plugin-0.1.1-py3-none-any.whl.
File metadata
- Download URL: atbash_hermes_plugin-0.1.1-py3-none-any.whl
- Upload date:
- Size: 7.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
facaee2150032461e907cf5de69c1f85bb97d6c3b6bbdef0701a4435e12950fb
|
|
| MD5 |
d53d999c0eb4474c28399fbfd9489e07
|
|
| BLAKE2b-256 |
b1a441f76172b5ee69ac65f00c410c114fca7ff6c57ff8c0eea6fd58fb705b72
|