Skip to main content

ory-hermes

Ory Agent Security for the Hermes agent framework.

Wraps your Hermes tool registry so every call is authorized against Ory Permissions, audited, and tied to the user → agent identity — built on ory-argus.

pip install ory-hermes

Hermes drives its loop from a {name: callable} tool registry (model_tools). Gate it before handing it to the agent:

from ory_hermes import guard_function_map

tools = guard_function_map(model_tools)   # returns a gated copy of the registry

Tool objects (with a run / _run method) work too:

from ory_hermes import guard_tools

tools = guard_tools([search_tool, shell_tool])

MCP tools

Hermes registers MCP tools as mcp__<server>__<tool>. Those calls are checked as McpServer:<server> and McpTool:<server>:<tool> instead of plain tools. Give the guard Hermes' registry and mcp_servers config for the most exact identity:

from tools.registry import registry          # Hermes' tool registry
from hermes_cli.config import load_config

tools = guard_function_map(
    model_tools,
    registry=registry,                         # exact server from the `mcp-<server>` toolset
    mcp_servers=load_config().get("mcp_servers"),  # server names + hashed fingerprints
)

The server is read from the tool's mcp-<server> toolset when registry is given (Hermes keeps the unsanitized server name there), else from the configured server whose sanitized name prefixes the tool, else from the registry name itself. The tool is Hermes' sanitized tool name; for a name Hermes clamped to 64 characters with a hash suffix, only the McpServer check applies. With mcp_servers config, the server's URL host or launched package is also sent as a hashed fingerprint so Agent Security matches the server to its catalog whatever it is named; URLs and arguments themselves are not sent. Both arguments are optional, and other tools keep their native checks.

In enforce mode a denied tool raises OryDenialError before the tool body runs; Hermes surfaces the denial and the tool never executes. In observe mode (default) the tool runs and a permission.observe_deny activity event is recorded. Network and rate-limit errors deny in enforce mode and fail open in observe mode.

The integration is SDK-free: it wraps Hermes' plain Python registry by duck typing. Hermes is installed through its own bootstrap process and does not publish an installable Python SDK, so this package intentionally has no Hermes dependency or external real-SDK compatibility test.

Credentials come from the shared ~/.config/ory-agent-plugins/config.json, so a login performed by any other Ory harness plugin or SDK integration is reused here.

Metadata

Release files for ory-hermes 1.8.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ory-hermes 1.8.0
File Size Uploaded Provenance Actions
ory_hermes-1.8.0.tar.gz 9.2 kB Without provenance Details for ory_hermes-1.8.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for ory-hermes 1.8.0
File Interpreter ABI Platform Actions
ory_hermes-1.8.0-py3-none-any.whl Python 3 none any Details for ory_hermes-1.8.0-py3-none-any.whl

Total release size: 16.4 kB

Release files / ory_hermes-1.8.0.tar.gz

Download URL ory_hermes-1.8.0.tar.gz
Size 9.2 kB
Tags Source
SHA-256 checksum
How to use checksums
974c1af63b04a3687f3ef30d8ef86bfdca75eefbeec6428b3bc2434509f500bd
BLAKE2b-256 checksum
How to use checksums
45fca82169610f7201e9418c7c819e57900ac82595f864ac4d0ce275158a8554
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.6 {"installer":{"name":"uv","version":"0.13.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / ory_hermes-1.8.0-py3-none-any.whl

Download URL ory_hermes-1.8.0-py3-none-any.whl
Size 7.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b53623acd65a457841390da32d1dc537d6e96f05f552194abbce572b19fa5b7d
BLAKE2b-256 checksum
How to use checksums
0ba3bfc1534411729cb62487b2e96f228328f14697e562160d8a1efaba5f8c07
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.6 {"installer":{"name":"uv","version":"0.13.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for ory-hermes 1.8.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page