OpenGuardrailsOpenGuardrailsDocs

Integrations

OGR binds guardrails at three integration points: the agent hook, the gateway hook, and the sandbox hook. Each binding emits the same GuardEvent and consumes the same Verdict, so one policy can correlate a logical action across all three boundaries.

The fastest agent-hook path is Claude Code: install a plugin and risky tool calls are gated even in bypass mode. The deepest reference integration secures a Hermes agent across every altitude, with a choice of sandbox backend.

The runnable gateway-hook integration shows how an OpenAI/Anthropic gateway normalizes wire requests and responses into OGR events. It is an integration example, not an OpenGuardrails-operated service.

The Hermes reference below shows the full picture: the agent connects to OGR once, then you choose an enforcement backend for the sandbox altitude. You write guardrails in one OGR policy model that compiles to either backend; the policy content differs, because a personal assistant and a multi-tenant agent are different security and infrastructure problems.

Two deployments, one policy model

Personal assistantMulti-tenant agent
BackendAnthropic srtNVIDIA OpenShell
IsolationOS-level (sandbox-exec / bubblewrap), no containerDocker/K8s container + gateway, per tenant
Networkper-process domain allowlistcentral OPA/Rego egress proxy
Threat modeltrusted user, untrusted inputsuntrusted tenants and workloads
Best forone developer, one laptopshared / multi-tenant service
PolicyOGR sandbox block — guards your hostOGR sandbox block — deny-by-default, no host FS, hard per-tenant limits

The portability is the model, not the file: one schema, one integration. You still author the policy that fits each deployment — the multi-tenant one is much stricter — but you write it once in OGR instead of hand-coding srt JSON for the laptop and Rego for the cluster. Security is policy, compiled to each backend.

Standalone Anthropic srt and NVIDIA OpenShell sandbox-hook examples will be added under integrations/; the Hermes integration currently demonstrates both backends.

An ebpf integration category is also reserved for future kernel-level process, filesystem, and network adapters. These adapters reuse the OGR contract and correlate with the three existing observation points.

How Hermes connects to OGR

Hermes needs no fork and no proxy — it already exposes the hooks OGR needs. The ogr-guard plugin binds them:

OGR altitudeHermes surfaceEnforces
gatewaypre_api_request / post_api_request hooksobserve + taint
agent_hookpre_tool_call hookblock before dispatch
(provenance)post_tool_call hooktaint web/MCP results
sandboxwraps BaseEnvironment.executerun exec under srt / route to OpenShell

One Runtime + one policy drive all altitudes, correlated by guard_id. The same integration runs in both deployments; only the policy and the sandbox backend change.

Choose your path