Skip to main content

AxioRank security gateway plugin for the Hermes agent framework.

Project description

AxioRank security gateway for Hermes

Route every Hermes agent tool call through AxioRank, the security gateway for AI agents. It scores tool calls and tool results for live secrets, prompt injection, destructive operations, PII, and risky egress, injects a live guardrail policy into the model's turn, and can hard block a dangerous action before it runs.

Works offline with no API key (local detectors). Add an AXIORANK_API_KEY to also escalate verdicts to the hosted gateway, apply your workspace policy, land the session in a central audit log, and mint a signed, offline-verifiable Coding Session Seal.

What you get

  • Guard tools the agent can call: axiorank_inspect (score a command, content, or a tool call), axiorank_scan_mcp (verify an external MCP server or agent card before trusting it), axiorank_verify (offline-verify an audit receipt).
  • A guardrail injected into every session: a standing policy banner plus a one-shot taint warning when a tool result is flagged, so a poisoned web page or MCP reply cannot quietly steer the agent.
  • Audit and sealing: a per-session trace, a running risk tally, and a signed Coding Session Seal on exit (with a key).
  • Optional hard blocking: a pre_tool_call shell hook that denies a dangerous action before it executes, installed with one command.
  • A bundled skill that teaches the agent to self-gate risky actions.

Install

With pip (recommended)

pip install hermes-axiorank

Hermes discovers the plugin automatically on next start. Enable it:

hermes plugins enable axiorank

Directory drop

Copy the plugin into your Hermes plugins directory:

mkdir -p ~/.hermes/plugins/axiorank
cp -R src/hermes_axiorank/* ~/.hermes/plugins/axiorank/
pip install 'axiorank>=0.17'   # the detection engine
hermes plugins enable axiorank

Use

Start Hermes. You should see axiorank: axiorank_inspect, axiorank_scan_mcp, axiorank_verify in the tool list. Check status any time:

/axiorank status

The agent will call the guard tools on its own (guided by the bundled skill). To load the skill explicitly:

skill_view("axiorank:secure-tool-use")

Hosted mode (optional)

Set a workspace API key to escalate to the hosted gateway and enable session seals:

export AXIORANK_API_KEY=axr_live_...
# optional, defaults to https://app.axiorank.com
export AXIORANK_BASE_URL=https://app.axiorank.com

Get a key from app.axiorank.com.

Hard enforcement (optional)

Python plugin hooks observe tool calls but cannot block them mid-flight. To hard block a dangerous action before it runs, install the shell hook:

hermes axiorank init                 # guards terminal, write_file, file_edit, patch, web_fetch, mcp__*
hermes axiorank init --tools all     # guard every tool
hermes axiorank init --api-key axr_live_...   # also save the key to ./.env
hermes axiorank init --print         # print the config snippet instead of editing

This adds a pre_tool_call hook to ~/.hermes/config.yaml that runs axiorank-hermes-guard. It denies a call the detectors flag as high risk and stays silent otherwise, so Hermes's own permission flow is unaffected.

Configuration

The plugin runs with sensible defaults and no configuration. Environment variables:

Variable Meaning
AXIORANK_API_KEY Workspace key for hosted escalation and session seals. Optional.
AXIORANK_BASE_URL Gateway base URL. Defaults to https://app.axiorank.com.
AXIORANK_MODE enforce or monitor for the shell guard. Defaults to enforce once installed.
AXIORANK_HERMES_GUARD_DISABLE_REMOTE Force local-only scoring in the shell guard.
AXIORANK_HERMES_GUARD_TIMEOUT_MS Shell guard hosted-call timeout.

Posture (mode, deny threshold, blocked categories, result inspection, context injection) can also be set through the host plugin config. Defaults: monitor posture for the in-session hooks (they observe and inject context), a deny threshold of 75, a review band from 50, and blocked categories secret, destructive, malware, injection.

How it works

  • Scoring uses the AxioRank detectors from the axiorank Python SDK, offline and keyless by default.
  • With a key, each call is also reported to POST /api/gateway/tool-call; the central decision can only tighten the local one.
  • The pre_llm_call hook returns context that Hermes appends to the user turn (never the system prompt), so the guardrail rides alongside the user's message and does not break prompt caching.

License

MIT

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

hermes_axiorank-0.1.0.tar.gz (37.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

hermes_axiorank-0.1.0-py3-none-any.whl (42.1 kB view details)

Uploaded Python 3

File details

Details for the file hermes_axiorank-0.1.0.tar.gz.

File metadata

  • Download URL: hermes_axiorank-0.1.0.tar.gz
  • Upload date:
  • Size: 37.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.8

File hashes

Hashes for hermes_axiorank-0.1.0.tar.gz
Algorithm Hash digest
SHA256 248035403d004d2490d0abd03ab757cea13d8becf3570233e58d1be785d15a2d
MD5 e8e4b2d8aa068d997746c15dd5bdc581
BLAKE2b-256 7a04b61171eb6d92cb02d10ee0ccd7164ab9d0e1c7b1eeb185a6e13a67cec592

See more details on using hashes here.

File details

Details for the file hermes_axiorank-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for hermes_axiorank-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 58643a17c9f496ff393ea2be8445343422304f7dbdfd20dec6dfb4896b018612
MD5 ab4ce296c51b5fa46fa9dc60f871b168
BLAKE2b-256 f8bf802077ab405ee15c4ebf28f8eaf52140f2d1469e78f49f8c09d45e115b3e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page