|
| 1 | +--- |
| 2 | +# SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. |
| 3 | +# SPDX-License-Identifier: Apache-2.0 |
| 4 | +title: "Architecture" |
| 5 | +sidebar-title: "Architecture" |
| 6 | +description: "Understand the OpenShell control plane, sandbox boundary, runtime isolation, and policy-enforced network path." |
| 7 | +keywords: "Generative AI, Cybersecurity, AI Agents, Architecture, Gateway, Sandbox, Supervisor, Isolation" |
| 8 | +position: 2 |
| 9 | +--- |
| 10 | + |
| 11 | + |
| 12 | + |
| 13 | +OpenShell separates control-plane state from sandbox enforcement. The gateway |
| 14 | +owns sandbox state, policy, providers, and access. A compute driver provisions |
| 15 | +the workload and its isolation boundary. |
| 16 | + |
| 17 | +The trusted supervisor runs outside the workload. `openshell-sandbox` runs |
| 18 | +inside it, owns the agent process, and mediates its network requests. All other |
| 19 | +workload egress is denied. The supervisor initiates one connection to the |
| 20 | +gateway for configuration, credentials, logs, and interactive sessions. |
| 21 | + |
| 22 | +## What Each Piece Does |
| 23 | + |
| 24 | +| Component | What it does | |
| 25 | +|---|---| |
| 26 | +| [Gateway](/sandboxes/manage-gateways) | Checks who you are and remembers everything about your sandboxes. It delivers policy and settings, attaches providers, decides who can do what, and coordinates connections into sandboxes. | |
| 27 | +| [Compute runtime](/reference/sandbox-compute-drivers) | Creates the sandbox, starts the supervisor and the workload, sets up the private channel between them, and builds the network fence. It reports status back and cleans up when the sandbox goes away. | |
| 28 | +| [Supervisor](#inside-the-sandbox-boundary) | Lives on the trusted side of the boundary. It checks requests against policy, supplies credentials, resolves DNS, opens approved connections, and keeps the link to the gateway alive. | |
| 29 | +| [Isolation backend](/extensibility/isolation-backends) | Gives the supervisor one consistent way to work with any runtime: confirm the boundary, start the agent, run commands, forward connections, and see network requests. | |
| 30 | +| [`openshell-sandbox`](/extensibility/isolation-backends) | Lives inside the boundary with the agent. It owns the agent's processes, knows which program made each request, applies process controls, and forwards TCP and DNS traffic to the supervisor. | |
| 31 | +| [Outer network fence](/security/best-practices#deny-by-default-egress) | Denies all network egress from the workload except its protected connection to the supervisor. Each runtime builds this with its own native tools. | |
| 32 | +| [Policies](/sandboxes/policies) | Describe what the agent can touch: files, processes, network destinations, API calls, and where provider credentials can go. | |
| 33 | +| [Providers](/sandboxes/manage-providers) | Connect a service name to a stored credential. The supervisor hands that credential out only where policy allows it. | |
| 34 | + |
| 35 | +## Inside the Sandbox Boundary |
| 36 | + |
| 37 | +The supervisor and `openshell-sandbox` sit on opposite sides of the boundary. |
| 38 | +The supervisor is trusted and makes the decisions. `openshell-sandbox` shares |
| 39 | +the boundary with the untrusted agent, so it never makes policy decisions. It |
| 40 | +reports what the agent is trying to do and lets the supervisor decide. |
| 41 | + |
| 42 | + |
| 43 | + |
| 44 | +### Starting an agent safely |
| 45 | + |
| 46 | +Before the agent runs, the isolation backend walks through a fixed series of |
| 47 | +steps: |
| 48 | + |
| 49 | +```text |
| 50 | +Attach → Bound → Confirmed → Ready → Running |
| 51 | +``` |
| 52 | + |
| 53 | +Each step must succeed before the next one begins. The backend checks that the |
| 54 | +workload identity, the private channel, the launch controls, and the network |
| 55 | +fence all belong to this exact sandbox, not a stale or impostor copy. If any |
| 56 | +check fails, or the boundary is lost later, the agent doesn't run. OpenShell |
| 57 | +fails closed. |
| 58 | + |
| 59 | +### How a network request travels |
| 60 | + |
| 61 | +Say the agent tries to call an API. Here's what happens, and it works the same |
| 62 | +way on every runtime: |
| 63 | + |
| 64 | +1. The agent opens a TCP connection or makes a DNS lookup. |
| 65 | +2. `openshell-sandbox` notes which program made the request. |
| 66 | +3. The request travels over the Sandbox Protocol to the supervisor. |
| 67 | +4. The supervisor checks the request against policy and adds any credentials the |
| 68 | + policy allows. |
| 69 | +5. If the request is allowed, the supervisor opens the real connection and |
| 70 | + relays the traffic. |
| 71 | + |
| 72 | +The protected channel to the supervisor is the only network path allowed out of |
| 73 | +the workload boundary. The outer fence denies all other network egress. The |
| 74 | +agent cannot reach an external service, the gateway, DNS, or another private |
| 75 | +address directly. |
| 76 | + |
| 77 | +## How Each Runtime Builds the Boundary |
| 78 | + |
| 79 | +Every runtime follows the same contract, but each one uses the tools it already |
| 80 | +has to place the supervisor, connect it to the sandbox, and fence off the |
| 81 | +network. |
| 82 | + |
| 83 | +| Runtime | Where the supervisor runs | How it talks to the sandbox | How direct egress is blocked | |
| 84 | +|---|---|---|---| |
| 85 | +| Docker | Its own container | Authenticated Unix socket on a driver-owned volume | Workload container has networking turned off | |
| 86 | +| Podman | Its own container | Authenticated Unix socket on a driver-owned volume | Workload container has networking turned off | |
| 87 | +| Kubernetes | Its own pod | Private service with mutual TLS | NetworkPolicy allows only the supervisor service | |
| 88 | +| VM | A process on the host | Authenticated vsock | Guest has no network device | |
| 89 | + |
| 90 | +The runtime's job is to build the boundary and prove it's in place. It never |
| 91 | +decides whether a request is allowed. That decision always belongs to the shared |
| 92 | +supervisor and policy engine, which is why the same policy behaves the same way |
| 93 | +everywhere. |
| 94 | + |
| 95 | +Runtimes can differ in how they report readiness and which features they |
| 96 | +support. Each one advertises its capabilities so the gateway knows what it can |
| 97 | +do. |
| 98 | + |
| 99 | +## Who Trusts Whom |
| 100 | + |
| 101 | +The gateway issues two separate, short-lived credentials: |
| 102 | + |
| 103 | +- A gateway credential lets the supervisor connect to any gateway replica. |
| 104 | +- A sandbox credential lets the supervisor connect to `openshell-sandbox`. |
| 105 | + |
| 106 | +Each credential works only for its own channel. Both are tied to a specific |
| 107 | +sandbox and a specific run of that sandbox. When a sandbox restarts or you |
| 108 | +revoke access, OpenShell moves on to a new generation, and credentials from the |
| 109 | +old one stop working. |
| 110 | + |
| 111 | +The agent's side of the boundary gets only what it needs to confirm it's |
| 112 | +talking to the right supervisor. It never sees gateway signing keys or |
| 113 | +supervisor credentials. |
| 114 | + |
| 115 | +## Working With Your Existing Infrastructure |
| 116 | + |
| 117 | +OpenShell plugs into the tools you already use, including container runtimes, |
| 118 | +schedulers, secret stores, identity providers, image pipelines, storage, and |
| 119 | +device plugins. The gateway and supervisor define how OpenShell behaves. |
| 120 | +Drivers translate that behavior into whatever your platform understands and |
| 121 | +report back what happened. This keeps platform-specific details out of the core |
| 122 | +control plane and the policy model. |
0 commit comments