Validated Patterns

Pattern

Secure Agent Workspace

Status Sandbox Sandbox

NVIDIA and related names, logos, and product names are trademarks or registered trademarks of their respective owners. This pattern is contributed as community content and is not an official product endorsement.

About the Secure Agent Workspace pattern

The Secure Agent Workspace Validated Pattern creates isolated AI agent workspaces on Red Hat OpenShift Container Platform for each user. Each workspace contains a dedicated virtual machine that runs NVIDIA OpenShell and its agent sandboxes. Workspaces are consistent and secure, with single sign-on (SSO), centrally governed sandbox policy, and API keys that never enter the agent environment.

Use case
  • Run AI coding and knowledge agents, which execute code and call tools on a user’s behalf, inside a boundary that belongs to one user only.

  • Control what agents can reach: which hosts, which programs, and which credentials, from policy kept in Git.

  • Onboard and remove users by editing one file in Git, with Red Hat OpenShift GitOps creating or deleting each user’s workspace.

Background

This pattern implements the NVIDIA Secure Agent Workspace reference design on Red Hat OpenShift Container Platform with OpenShift Virtualization, following its OpenShift Virtualization reference implementation. Agents can run arbitrary code, so container isolation alone is not enough: each user gets a virtual machine, and inside it every agent runs in an OpenShell sandbox whose network access and credentials are enforced by a supervisor, not by the agent. This pattern generalizes one or more successful deployments of this use case. Implementation details might vary depending on your specific environment and requirements.

About the solution

The Validated Patterns framework installs the Operators and shared services, then creates one workspace per user listed in overrides/saw-users.yaml. Each workspace contains the following:

  • a namespace, saw-<user>

  • a OpenShift Virtualization VM named after the user

  • routes for the user VM

  • inputs to the VM installer

Each VM installs a pinned OpenShell release on every boot from a versioned bill of materials (the InstallerBOM), then applies the user’s SAW-BOM profiles: the OpenShell workspaces, model and tool providers, and agent sandboxes the user gets. The default data-science profile creates two sandboxes running the OpenClaw agent with the NVIDIA Nemotron model on build.nvidia.com, and Brave web search in the default workspace.

Security comes in layers:

  • VM isolation: one VM per user, so no agent shares a kernel or process space with another user’s agents.

  • Identity: users sign in to Keycloak with OIDC. The OpenShell gateway in each VM accepts only tokens for its realm and maps Keycloak roles to OpenShell roles.

  • Governance: every sandbox and provider change goes through a governance interceptor that serves a signed sandbox policy and the approved provider profiles. Policy changes are made in Git.

  • Credentials: API keys are stored in HashiCorp Vault and reach the user’s namespace through the External Secrets Operator. Inside a sandbox, the agent receives only a placeholder. The sandbox’s egress proxy substitutes the real key, but only for the hosts and programs that the provider profile allows.

About the technology

This solution uses the following technologies:

Red Hat OpenShift Container Platform

An enterprise-ready Kubernetes container platform built for an open hybrid cloud strategy. It provides a consistent application platform to manage hybrid cloud, public cloud, and edge deployments.

Red Hat OpenShift Virtualization

Runs virtual machines alongside containers on OpenShift Container Platform. This pattern runs one workspace VM per user, cloned from a template image with a known, stable configuration. OpenShift Virtualization requires bare-metal worker nodes.

Red Hat OpenShift GitOps

A declarative application continuous delivery tool for Kubernetes based on the Argo CD project. Application definitions, configurations, and environments are declarative and version controlled in Git.

Red Hat build of Keycloak

Identity and access management based on Keycloak. The pattern creates an openshell realm with the roles and OIDC clients that the OpenShell CLI, gateway, and web UI use.

HashiCorp Vault and the External Secrets Operator

Store the model and tool API keys and the SSH key, and copy them into each user’s namespace.

NVIDIA OpenShell

The runtime for agent sandboxes: a gateway that manages workspaces, providers, and sandboxes, and a supervisor in each sandbox that enforces filesystem, process, and network policy. The pattern uses the Red Hat build of OpenShell (quay.io/opendatahub/odh-openshell-*).

OpenClaw and NVIDIA NemoClaw

The AI agents that run in the sandboxes, with a terminal UI and a web UI.

NVIDIA models on build.nvidia.com

The default model provider (NVIDIA Nemotron). You can use any OpenAI-compatible endpoint on the cluster instead, such as vLLM or Ollama.

Secure Agent Workspace architecture

The following figure shows the pattern on one cluster, with the workspace of one user, alice, in detail.

An architectural and workflow diagram showing a workspace created for hypothetical user Alice using the Secure Agent Workspace Validated Pattern
Figure 1. Secure Agent Workspace architecture

The following list describes the numbered flows shown in the Secure Agent Workspace architecture figure:

  1. Red Hat OpenShift GitOps syncs the pattern from your fork of the pattern repository.

  2. Red Hat OpenShift GitOps installs the shared services and, for each user in overrides/saw-users.yaml, a namespace, a VM, and the VM’s inputs.

  3. Users sign in to Keycloak with OIDC. The OpenShell gateway in each VM accepts those tokens.

  4. The openshell CLI and the web UI reach the user’s own gateway through the routes in the user’s namespace.

  5. The gateway checks every sandbox and provider change with the governance interceptor.

  6. The External Secrets Operator copies the provider API keys from HashiCorp Vault into the user’s namespace.

  7. Sandbox traffic leaves through the sandbox supervisor’s egress proxy. Only the hosts specified as allowed in the provider profiles are reachable, and the egress proxy adds the real API key to those requests.

  8. Every time the VM boots, it installs the OpenShell release that is pinned in its InstallerBOM.

OpenShift Virtualization runs virtual machines with hardware virtualization, so the worker nodes that run the workspace VMs must be bare metal: an on-premise bare-metal cluster, or bare-metal instance types in a public cloud (for example, *.metal instances on AWS). Nested virtualization is not supported. For more information, see Cluster sizing.

Shared services

The pattern installs these once per cluster:

OpenShift Virtualization (openshift-cnv)

Runs the workspace VMs. The pattern creates each VM by cloning from a template image with a known, stable configuration. The template image is based on Fedora and includes podman and OpenShell service units. The pattern stores the template image as a Containerized Data Importer (CDI) DataSource.

Red Hat build of Keycloak (saw-keycloak)

Provides the openshell realm with the openshell-user and openshell-admin roles and the OIDC clients for the CLI (openshell-cli, device code and PKCE) and the web UI (openshell-dashboard). The realm includes test users (alice, bob, developer, admin). Replace these test users before you use the pattern in production.

HashiCorp Vault and the External Secrets Operator (vault, external-secrets)

Store the model provider key, the web search key, and the SSH key that the pattern loads from your values-secret file. The External Secrets Operator copies them into each user’s namespace. By default, all users share one set of keys, but you can also configure an individual Vault path for each user as needed.

Governance interceptor (openshell-agents)

A gRPC service that every OpenShell gateway calls before it creates a sandbox or a provider, or changes a sandbox’s configuration. It serves the signed sandbox policy (filesystem, process, and Landlock rules) and the only provider profiles that users can use: nvidia, openai, brave, github, slack, gemini, and web-search. The policy and the profiles are files in the governance-policy chart, so changing them is a Git change. The interceptor fails closed: if it is unreachable, the gateways refuse those operations.

Per-user workspace

For each entry in overrides/saw-users.yaml, the saw-users chart creates a namespace saw-<user> and three Argo CD applications: the user’s secrets, the user’s bill of materials, and the VM.

Routes

<user>-gateway exposes the OpenShell gateway (port 17670, TLS passthrough, gRPC) for the openshell CLI and the web UI. <user>-webui exposes the OpenShell web UI through an OAuth2 proxy that signs in with Keycloak.

Installer inputs

The user’s provider Secrets (inference, web-search), the InstallerBOM, and the user’s SAW-BOM profiles. They are attached to the VM as read-only disks, so the installer reads them without any access to the cluster API.

VirtualMachine

A Fedora VM (4 vCPU, 8 GiB memory, and a 40 GiB disk by default). The VM runs the following tasks every time it boots:

  • saw-install pulls each OpenShell component (gateway, CLI, supervisor, and sandbox runtime) by digest, checks its version, starts the gateway, and, when the gateway moves to a new OpenShell release series, recreates the gateway state.

  • saw-apply signs in to the gateway with its own mTLS identity and creates the workspaces, providers, and sandboxes of the user’s profiles. It then onboards the OpenClaw agent in each agent sandbox against its model provider.

Sandboxes

Each sandbox is a rootless podman container that the OpenShell gateway creates, with a supervisor that enforces the signed policy. The agent’s environment holds only placeholders for API keys. The supervisor’s egress proxy only adds the real API key to requests that are from allowed programs (for example node or curl) and to allowed hosts, which are defined in the sandbox’s provider profiles lists. This means that when an agent calls a model or tool API, the supervisor’s egress proxy can deny outbound traffic by withholding the real API key. All other outbound traffic is denied.

Default profile

The data-science SAW-BOM profile, which every user gets by default, creates:

WorkspaceSandboxAgentProviders

default

notebook

OpenClaw

nvidia (NVIDIA Nemotron on build.nvidia.com), brave (web search)

cuda-dev

cuda-sandbox

OpenClaw in the NemoClaw sandbox image

nvidia

The custom-inference profile uses an OpenAI-compatible endpoint of your own, such as vLLM or Ollama on the cluster, instead of build.nvidia.com. For more information, see Ideas for customization.

Implementation technologies

ComponentTechnology

VM isolation

OpenShift Virtualization (KubeVirt, CDI)

GitOps

Validated Patterns Operator, Red Hat OpenShift GitOps

Identity

Red Hat build of Keycloak (OIDC)

Secrets

HashiCorp Vault, External Secrets Operator

Agent runtime

NVIDIA OpenShell (gateway, supervisor), podman

Agents

OpenClaw, NVIDIA NemoClaw sandbox image

Governance

OpenShell governance interceptor (signed sandbox policy, provider profiles)

Models

NVIDIA Nemotron on build.nvidia.com, or any OpenAI-compatible endpoint