Integrating with NVIDIA OpenShell¶
Deploy the Agent Governance Toolkit as the governance layer inside (or alongside) NVIDIA OpenShell sandboxes to combine runtime isolation with governance intelligence.
TL;DR โ OpenShell provides the walls (sandbox, network, filesystem policies). The toolkit provides the brain (identity, trust, policy decisions, audit). Together they form a complete agent security stack.
Why Combine Them?¶
OpenShell and the Agent Governance Toolkit solve different halves of the agent security problem:
| Capability | OpenShell | Governance Toolkit |
|---|---|---|
| Container isolation | โ | โ |
| Filesystem policies | โ | โ |
| Network egress control | โ | โ |
| Process / syscall restrictions | โ | โ |
| Inference routing | โ | โ |
| Agent identity (Ed25519 DIDs) | โ | โ |
| Behavioral trust scoring | โ | โ |
| Policy engine (YAML + OPA + Cedar) | โ | โ |
| Authority resolution (reputation-gated delegation) | โ | โ |
| Tamper-evident Merkle audit chains | โ | โ |
| SLOs, circuit breakers, execution rings | โ | โ |
| Multi-agent governance | โ | โ |
OpenShell asks: "Is this network call allowed by sandbox policy?" The toolkit asks: "Should this agent be trusted to make this call at all?"
Neither replaces the other โ they're complementary layers in a defense-in-depth stack.
Architecture¶
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ OpenShell Sandbox โ
โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ AI Agent (Claude, โ โ Governance Toolkit (sidecar) โ โ
โ โ Codex, OpenCode, etc) โ โ โ โ
โ โ โ โ AgentIdentity โ Ed25519 DIDs โ โ
โ โ Tool call โโโโโโโโโโโโโโโโโบ PolicyEngine โ YAML/OPA/Cedarโ โ
โ โ โโโโโโโโโโโโโโโ RewardService โ trust scoring โ โ
โ โ (allow / deny) โ โ AuditLog โ Merkle chain โ โ
โ โ โ โ AuthorityResolver โ delegation โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ OpenShell Policy Engine โ โ
โ โ Filesystem โธ Network โธ Process โธ Inference โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Request flow:
- Agent issues a tool call (e.g.,
shell:curl,file:write) - Governance Toolkit evaluates: identity verified? trust score above threshold? policy allows action? authority delegated?
- If governance approves โ OpenShell's sandbox policy engine enforces runtime constraints (network egress, filesystem boundaries, process restrictions)
- Both layers log independently โ governance writes to the Merkle audit chain, OpenShell writes to its own policy log
- If either layer denies โ action is blocked
Setup¶
Option A: Governance Skill Inside the Sandbox (Python Library)¶
Install the OpenShell governance skill and use it from your agent's code:
# Inside the sandbox
# pip install openshell-agentmesh (or install from repo)
from openshell_agentmesh import GovernanceSkill
skill = GovernanceSkill(policy_dir="./policies")
# Before each tool call, check policy
decision = skill.check_policy("shell:curl https://api.example.com")
if not decision.allowed:
print(f"Blocked: {decision.reason}")
See the runnable example for a complete demo.
Option B: Governance Sidecar (Production)¶
Run the governance API server as a sidecar container. Your agent (or orchestration layer) calls the sidecar's HTTP API before executing actions:
# openshell-governance-policy.yaml โ OpenShell sandbox network rules
network:
outbound:
- match:
host: "localhost"
port: 8081
action: allow # Allow agent โ governance sidecar
- match:
host: "*.openai.com"
action: allow # Allow approved LLM calls
- action: deny # Block everything else
# Start the governance sidecar (Agent OS server)
python -m agent_os.server --host 127.0.0.1 --port 8081 &
# Create the sandbox with the policy
openshell sandbox create \
--policy openshell-governance-policy.yaml \
-- claude
Note: The sidecar does not yet transparently intercept tool calls โ your agent must call
http://localhost:8081/api/v1/detect/injectionor/api/v1/executeexplicitly. See the sidecar API docs.
See the full OpenClaw sidecar deployment guide for Docker Compose and AKS configurations.
Policy Layering Example¶
A single agent action passes through two policy layers:
Agent: "I want to POST to https://api.github.com/repos/org/repo/issues"
Layer 1 โ Governance Toolkit:
โ
Agent identity verified (did:mesh:a1b2c3)
โ
Trust score 0.82 > threshold 0.5
โ
Policy allows "http:POST:api.github.com/*"
โ
Authority: delegated by parent agent with scope "github:issues:create"
โ ALLOW (logged to Merkle audit chain)
Layer 2 โ OpenShell:
โ
Network policy permits POST to api.github.com
โ
Process policy permits curl binary
โ ALLOW (logged to OpenShell policy log)
Result: Action executes
If either layer denies:
Agent: "I want to POST to https://169.254.169.254/metadata"
Layer 1 โ Governance Toolkit:
โ Policy blocks "http:*:169.254.169.254/*" (cloud metadata endpoint)
โ DENY (logged with violation reason)
Result: Action blocked before reaching OpenShell
OpenShell Policy + Governance Policy Mapping¶
| OpenShell Layer | Governance Toolkit Equivalent | How They Interact |
|---|---|---|
filesystem.read/write | Capability policies (file:read:*, file:write:*) | Governance decides who can, OpenShell enforces where |
network.outbound | Capability policies (http:GET:*, http:POST:*) | Governance decides what action, OpenShell enforces which endpoints |
process | Blocked-tool policies, execution rings | Governance gates by trust level, OpenShell gates by syscall |
inference routing | N/A (complementary) | OpenShell routes LLM traffic; governance audits responses |
| N/A | Identity, trust scoring, audit | Governance-only capabilities |
Monitoring¶
When running both layers, you get two complementary telemetry streams:
Governance Toolkit metrics (Prometheus / OpenTelemetry): - policy_decisions_total{result="allow|deny"} - trust_score_current{agent="did:mesh:..."} - audit_chain_entries_total - authority_resolutions_total{decision="allow|deny|narrowed"}
OpenShell metrics: - Sandbox network egress logs - Filesystem access logs - Process execution logs - Inference routing logs
Both can feed into the same Grafana dashboard for a unified view. See the Agent SRE monitoring guide for SLO configuration.
FAQ¶
Q: Do I need both? No. Each works independently. But together they provide defense-in-depth: governance intelligence (who, what, why) plus runtime isolation (where, how).
Q: Does the toolkit work with agents other than OpenClaw? Yes. The toolkit is agent-agnostic โ it works with any AI agent framework (LangChain, CrewAI, AutoGen, Semantic Kernel, etc.) on any cloud (AWS, GCP, Azure) or locally.
Q: Does OpenShell replace the sidecar deployment? OpenShell can host the sidecar. The governance sidecar runs inside or alongside the OpenShell sandbox. OpenShell provides the isolation boundary; the sidecar provides the governance logic.
Q: What about NemoClaw? NemoClaw bundles OpenShell with NVIDIA Nemotron models. The governance toolkit works with NemoClaw the same way โ it adds identity, trust, and audit capabilities on top of the NemoClaw runtime.
Related¶
- OpenShell Governance Skill โ Python skill package for OpenShell agents
- Runnable Example โ Self-contained demo with policy enforcement
- OpenClaw Sidecar Deployment โ AKS and Docker Compose guide
- NVIDIA OpenShell โ Runtime sandbox for AI agents
- Architecture โ Full toolkit architecture