OpenShell: NVIDIA's Sandboxed Runtime for Safer AI Agents
NVIDIA's OpenShell runs AI agents in isolated, network-locked sandboxes and hides real API keys, so agents can't leak credentials.

What is OpenShell and what problem does it solve?
OpenShell is a runtime from NVIDIA for running AI agents inside isolated sandboxes with no network access by default. Agents become genuinely useful once they can read files, call APIs, and use credentials, but that same capability is what makes them dangerous. An agent that can hit the network can also leak a key, get prompt-injected into calling somewhere it shouldn’t, or exfiltrate data without anyone noticing until after the fact. OpenShell addresses this by putting the agent in a container, cutting off all outbound network traffic by default, and requiring every connection to be explicitly approved. Even approved connections never expose the real credential to the agent itself.
How does OpenShell actually work?
The architecture has four main pieces: the agent, the sandbox, a supervisor, and a gateway.
The agent runs inside a container or VM with a blunt rule enforced around it: no network access at all, except a single channel to the supervisor. When the agent needs to call an API or a model, it can’t reach out directly. It has to ask the supervisor, which checks the request against policy.
If the destination is approved, the supervisor attaches the real credentials and forwards the request. The agent itself never sees or touches the actual API key. If the destination isn’t approved, the request gets denied and logged.
The gateway is where policies, provider definitions, and sandbox configurations live. An approver component reviews every policy change for new risk before it takes effect, whether that review happens manually or, when no new risk is detected, automatically.
When an agent hits a wall (tries to reach something not yet allowed) it doesn’t just fail silently. OpenShell converts the denial into a proposed rule. A human (or the automatic approver, depending on configuration) decides whether to grant it. Once approved, the rule loads into the already-running sandbox and the supervisor retries the request. No restart needed.
How do you install and set it up?
Based on a hands-on walkthrough on Ubuntu, the setup looks like this:
OpenShell requires Docker Engine version 28 or newer. Installation itself is a single one-line command. After installing, a status check confirms the tool is connected and authenticated.
From there, you add an API key from any provider (Anthropic, OpenAI, OpenRouter, and others are supported). The key gets imported as part of a “provider profile,” which defines which service an agent is allowed to reach and which program is allowed to use that service. OpenShell ships example profiles in its repo (an OpenRouter profile was used in the demo), and importing one stores the real key securely. The agent never sees that real key, only a placeholder.
Next, you create a sandbox from a base image (the demo used an “opencode” image) and attach the provider profile to it. Running the sandbox drops you into an isolated shell. From inside that shell, you can launch whatever agent or model you want, Claude, GPT models via OpenAI, OpenRouter-routed models, Pi, or others, and start prompting normally.
What does the network-blocking actually look like in practice?
By default, everything is denied. In a demonstration, an agent was asked to make a call to GitHub, a destination nobody had explicitly allowed. The agent tried, using curl, and got a clear denial: no external network access. Checking the logs showed the same pattern across the board: TCP policy denied, repeatedly, for anything not on the allow list.
The useful part is what happens next. Instead of manually writing firewall rules, you can take those denial events and turn them directly into proposed rules. Approving just the GitHub rule (and leaving the rest blocked) is a single action. After approval, rerunning the exact same prompt in the same running sandbox, no restart required, succeeds for GitHub while every other destination stays denied. Checking the logs again confirms it: one allowed entry, the rest still denied.
This is least-privilege access applied to AI agents: nothing is reachable until someone explicitly says it can be, and every decision is logged.
How does OpenShell protect API keys from the agent itself?
This is arguably the core feature. Inside a sandboxed agent, asking it to print an environment variable holding an API key doesn’t return the real key. It returns a placeholder, a random-looking reference string. The actual credential is stored outside the sandbox entirely, on the gateway side. Only when a request actually goes out to the real provider does OpenShell swap the placeholder for the genuine key, at the last possible moment, outside the agent’s reach.
Built like a system. Not vibe-coded.
Remy manages the project — every layer architected, not stitched together at the last second.
The practical implication: if the agent is compromised, through a prompt injection, a malicious tool call, or just printing its own environment variables, whatever string an attacker gets is useless. There’s no real secret inside the sandbox to steal.
Other isolation details reinforce this. System folders inside the sandbox are read-only, so write attempts to protected paths fail outright. Temp directories remain writable, so normal agent operations like scratch files still work. And the network block isn’t limited to AI-specific calls: a plain network request with no AI model involved is blocked by default too, confirming the isolation is at the container/network level, not just wrapped around model API calls.
Is OpenShell worth adopting for agent workflows?
For anyone deploying agents that touch real credentials or real infrastructure, OpenShell addresses a genuine gap. Most agent frameworks assume you trust the agent’s output enough to let it make arbitrary API calls or file writes. That assumption breaks down fast with prompt injection, hallucinated tool calls, or just plain bugs. OpenShell’s default-deny network posture, combined with credential placeholders and a review workflow for new rules, gives teams a way to run agents with meaningful guardrails instead of hoping nothing goes wrong.
It also fits into existing infrastructure: beyond a single Docker host, OpenShell can run in Kubernetes and related container orchestration setups, which matters for teams running agents at any scale beyond a laptop demo.
The tradeoff is the same one any least-privilege security model carries: you’ll spend time approving rules as agents discover they need new access. That friction is the point. It converts invisible risk (an agent silently calling anywhere) into a visible, auditable decision you make once per destination.
Frequently Asked Questions
What is OpenShell used for?
It’s used to run AI agents in a sandboxed environment where network access, file access, and API credentials are tightly controlled, so an agent can be useful (reading files, calling APIs, using models) without being able to leak secrets or reach unapproved destinations.
Does OpenShell block all network access?
Yes, by default every outbound connection is denied, including plain non-AI network calls. Access to a specific destination, like a provider API or GitHub, has to be explicitly approved before it works.
Can an agent running in OpenShell see the real API key?
No. The agent only sees a placeholder string stored in its environment. The real credential lives outside the sandbox and is attached to the request only at the point it leaves to reach the actual provider.
What do I need to run OpenShell?
Docker Engine version 28 or newer is required. Installation is a single command, after which you import a provider profile with your API key and create a sandbox from a base image to start running agents inside it.
Does OpenShell work with any AI provider?
The demo used OpenRouter, but the tool supports importing provider profiles for Anthropic, OpenAI, and other providers, with example profiles available in the OpenShell repository.