Skip to main content

synoi-hermes-guard

Python plugin for Nous Research's Hermes agent that consults the SynOI gateway before any tool call executes, translated to Hermes's tool-call extension API.

Status: Beta. The plugin, policy client, capability mapping, and receipt handling are implemented, with 40 passing unit tests. End-to-end tests against a live SynOI gateway exist but are skipped unless a gateway is reachable, so integration against a running deployment is not covered by the unit suite. The API may still change before 1.0.

Source is not yet public. See https://synoi.systems.

What you get

  • Real-time HITL gates on dangerous Hermes tool calls (rm -rf, kubectl delete, schema migrations, prod deploys, and so on)
  • Same risk policy the gateway already uses on the LLM-call side
  • Per-tenant policy, so different teams get different rules
  • Decision Receipts: every gated call audit-trailed by the gateway
  • SMS approval, dispatched by the gateway to the approver on file. SMS is the only approval channel implemented today; other surfaces are planned and not shipped
  • Capability mapping, so your Hermes tool names (bash_shell, code_executor) map to canonical capabilities (shell.command, code.execute) and your gateway policy stays portable across agent frameworks

Install

pip install synoi-hermes-guard

Requires a SynOI gateway to consult and a license key. See https://synoi.systems.

Configure

Environment variables (see synoi_hermes_guard/config.py):

Key Required Default Description
SYNOI_LICENSE_KEY yes none Your SynOI license
SYNOI_GATEWAY_URL no http://localhost:3000 Where the gateway runs
SYNOI_GUARD_MODE no permissive permissive (fail-open) or strict (fail-closed)
SYNOI_TENANT_ID no derived from license Tenant identifier
SYNOI_TOOL_CAPABILITY_MAP no identity Path to YAML / JSON mapping file
SYNOI_REQUEST_TIMEOUT_MS no 2000 HTTP timeout for the gateway check call
SYNOI_WORKFLOW_POLL_INTERVAL_MS no 1000 How often to poll for require_approval resolution
SYNOI_WORKFLOW_POLL_TIMEOUT_MS no 300000 Max wait for workflow resolution (5 min)

Capability mapping file

synoi-hermes-guard.tool-map.yml:

mappings:
  bash_shell:        shell.command
  code_executor:     code.execute
  web_browser:       web.fetch
  file_writer:       fs.write
  database_query:    db.read

Then point SYNOI_TOOL_CAPABILITY_MAP=./synoi-hermes-guard.tool-map.yml.

Canonical capability names are what the gateway policy is written against, so a policy authored once stays portable as more agent frameworks are added.

Failure modes

permissive (default): if the license is invalid, the gateway is unreachable, or it returns an error, the plugin allows the tool call and logs a warning. The customer's agent never silently hangs because of SynOI infrastructure problems.

strict: the same conditions block the tool. Required for compliance use cases where governance is mandatory.

Programmatic use

from synoi_hermes_guard import HermesGuardPlugin, GuardConfig

plugin = HermesGuardPlugin()

# In your Hermes agent's tool-call interceptor:
verdict = await plugin.before_tool_call(
    tool_name="bash_shell",
    tool_input={"command": "kubectl delete pod payments-7f8d"},
    agent_context={"thread_id": "...", "user_id": "..."},
)

if verdict.block:
    # Don't run the tool. Stamp verdict.reason into the agent transcript.
    raise RuntimeError(f"Hermes Guard blocked tool call: {verdict.reason}")
else:
    # Proceed. Stamp verdict.receipt_id into the conversation log for audit.
    pass

Every gated call resolves against the same gateway endpoint and produces a Decision Receipt, so the audit trail is uniform regardless of which agent framework made the call.

License

AGPL-3.0-or-later. See the LICENSE file included in this distribution.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

synoi_hermes_guard-0.2.0.tar.gz (22.4 kB view details)

Uploaded Source

Built Distribution

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

synoi_hermes_guard-0.2.0-py3-none-any.whl (17.9 kB view details)

Uploaded Python 3

File details

Details for the file synoi_hermes_guard-0.2.0.tar.gz.

File metadata

  • Download URL: synoi_hermes_guard-0.2.0.tar.gz
  • Upload date:
  • Size: 22.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.5

File hashes

Hashes for synoi_hermes_guard-0.2.0.tar.gz
Algorithm Hash digest
SHA256 445d0f96d85a76c7158787b0ad8e1188e658359f5217834031608f1099d05081
MD5 b9ef0b17a9aff43a6eedd928dcdf1b6d
BLAKE2b-256 81bf817c4138d84f5d3d6820483790ef1fc34b240ca315004eb03cc67f957e5e

See more details on using hashes here.

File details

Details for the file synoi_hermes_guard-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for synoi_hermes_guard-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 824b6aeb1ce21f65808313f1c5e82b33e484114a59fd1a67f4e2f571d650cddf
MD5 cf646666626f395838853ed976796a8f
BLAKE2b-256 e3d88c851b04a040fde1043210e61d73af39645da0c159cacc09d2f40836061d

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