Secure Agent Workspace (SAW) gives each user an isolated AI agent workspace on OpenShift. Every workspace runs NVIDIA OpenShell with an OpenClaw or NemoClaw agent. Keycloak handles sign-in, only the owner can reach a workspace, and provider keys stay outside the agent.
A workspace runs on one of three backends:
| Backend | Runs as | Use it when |
|---|---|---|
| VM (default) | One OpenShift Virtualization VM per user | You want the strongest isolation and the most tested path |
| Container | Pods in per-user namespaces, using the OpenShell Kubernetes driver | You don't have virtualization or want faster starts |
| Kata | Container workspaces in OpenShift sandboxed containers | You want container workspaces with VM-backed pod isolation |
This repository implements NVIDIA's Secure Agent Workspace reference design as a Red Hat Validated Pattern.
Video walkthrough: from cluster installation to a working workspace
demo1.mp4
- Secure Agent Workspace
Argo CD deploys the platform from your fork: operators, Vault, External
Secrets, Keycloak, the governance service and the self-service portal. Each
entry in overrides/saw-users.yaml becomes a workspace. Users can also create
their own in Red Hat Developer Hub.
| Component | Technology | Purpose |
|---|---|---|
| Isolation | OpenShift Virtualization, or pods (optionally Kata) | One boundary per user |
| Identity | Red Hat Build of Keycloak | OIDC sign-in for the CLI and web UIs |
| Agent runtime | NVIDIA OpenShell + OpenClaw / NemoClaw | Sandboxes, gateway, inference routing |
| Secrets | Vault + External Secrets | Provider keys stay outside the sandbox |
| Governance | OpenShell governance interceptor, or APF | Fail-closed approval of gateway operations |
| GitOps | Argo CD (Validated Patterns) | Everything, including users, comes from Git |
| Namespace | Contents |
|---|---|
saw-<name> |
The user's workspace: the gateway VM, or the container sandbox and gateway |
saw-ctl-<id>, saw-ui-<id> |
Container workspaces only: controller and browser relay |
saw-history-<id> |
Container workspaces with audit receipts only: signed audit history, kept after deletion |
openshell-agents |
Golden VM image, image builds, governance service |
saw-keycloak |
Keycloak |
vp-gitops |
Argo CD applications, one set per user |
More detail: deployment guide, container architecture, GitOps policy model, storage layout.
| Resource | Per VM workspace | Platform |
|---|---|---|
| CPU | 4 cores | 8 cores |
| Memory | 8 GiB | 16 GiB |
| Storage | 40 GiB | 50 GiB |
- OpenShift 4.22+ on x86_64 or arm64 (arm64 notes), with OVN-Kubernetes.
- Cluster-admin for the install. End users only need their Keycloak account
and the
openshellCLI. - On your machine:
oc,helm3.x,jq,curl,openssl,uv, Podman, and theopenshellCLI 0.1.x. - A key for at least one inference provider, or your own OpenAI-compatible endpoint.
- Kata workspaces also need OpenShift sandboxed containers (Kata guide).
Run ./pattern.sh from a host that can run the Validated Patterns utility
image natively (for example, an x86_64 Linux machine with Podman).
Argo CD deploys from your fork, because users and settings are files in it. Fork the repository, then:
git clone https://github.com/<your-github-user>/secure-agent-workspace.git
cd secure-agent-workspaceoc login --server=https://api.<cluster>:6443 -u <admin-user>make saw-initThis creates your SSH keys and ~/values-secret.yaml, mirrors the VM image,
and checks storage, the OIDC certificate and the container prerequisites. It
is safe to run again.
Put each key in a file, one line with no trailing newline:
~/.nvidia-api-key: used by the default profile.~/.brave-api-key: optional, for web search.
~/values-secret.yaml already points at these files.
./pattern.sh make installWithout a Brave key, add WEB_SEARCH_ENABLED=false. Argo CD follows the branch
you install from, so keep it pushed. To use a branch other than the one checked
out, set TARGET_BRANCH and TARGET_ORIGIN.
No SAW user workspace exists yet. Next, add a user.
Add the user to overrides/saw-users.yaml, then commit and push. Names are
lowercase and at most 19 characters. Each user gets a Keycloak account and a
workspace in namespace saw-<name>.
-
Add the entry:
users: - name: alice
-
Create the Keycloak account and push:
make keycloak-add-users git add overrides/saw-users.yaml git commit -m "Add alice" git push -
Wait until the workspace is Synced and Healthy, then until the installer inside the VM is done:
oc -n vp-gitops get application saw-alice make saw-logs OPENSHELL_SAW_NAME=alice # wait for apply: Done
Audit: the gateway and each sandbox send OCSF security events (sign-ins,
refused API calls, network decisions) to an OpenTelemetry collector the pattern
installs in openshell-agents. Its log shows them
(oc -n openshell-agents logs deploy/saw-ocsf-collector); point it at your
SIEM in charts/saw-telemetry/values.yaml. The agent's tool gate also keeps a
log of tool calls in the workspace. For signed, fail-closed receipts with
history kept outside the workspace, see
Audit receipts (advanced).
-
Create the Keycloak account and get its subject:
make keycloak-add-users make keycloak-user-info KC_USER=alice
-
Create
~/values-secret-alice.yamlfor the user's inference key. Secret names must be unique within a file, even with differentvaultPrefixes; do not append a secondinferenceentry to the installation's secrets file.version: "2.0" secrets: - name: inference vaultPrefixes: - hub/saw-alice fields: - name: api_key path: ~/.alice-inference-key
If web search is enabled, also copy the
web-searchentry fromvalues-secret.yaml.templateinto this file withvaultPrefixes: [hub/saw-alice]. Then load the user's file explicitly:VALUES_SECRET="$HOME/values-secret-alice.yaml" ./pattern.sh make load-secretsTo share an existing key instead, add
hub/saw-aliceto that entry'svaultPrefixes(for example,[hub, hub/saw-alice]) and load the installation's secrets file. One entry writes the same fields to every listed prefix. -
Add the entry:
users: - name: alice ownerSubject: <subject from step 1> profiles: [custom-inference] vaultPrefix: secret/data/hub customInferenceURL: https://<inference host>/v1 modelInputs: inference.model: <model name> values: deployment: {mode: container}
-
Push and check:
git add overrides/ git commit -m "Add alice (container)" git push oc -n vp-gitops get applications.argoproj.io | grep -E 'saw-alice|saw-c-'
New container workspaces wait for an operator review before they start. On a
demo or development cluster, skip the review by listing
/overrides/saw-container-demo.yaml after /overrides/saw-container-defaults.yaml.
Never do this in production. For the review flow and all entry fields, see
Installing container workspaces.
Kata workspaces are container workspaces that run in OpenShift sandboxed containers: the agent and its supervisor each get their own Kata VM.
-
Turn on the Kata runtime for the cluster's workers. The pattern already installs the OpenShift sandboxed containers operator; enabling the
saw-kataapplication reboots the workers once. See Prepare OpenShift sandboxed containers. It also creates thesaw-kataRuntimeClass the workspaces run in; on demo clusters (autoApprove) users are bound to it automatically. -
Follow the container workspace steps, with
mode: kata:values: deployment: {mode: kata}
- Remove: delete the entry and push. Container and Kata workspaces are
removed with it (with audit receipts, their history namespace is kept). A VM entry only
removes its Argo CD applications and leaves the VM running. To delete the VM
too, first set
pruneOnRemove: trueon the entry and push, then remove the entry. - Start over (container and Kata): remove the entry and push. Wait until
Argo CD has deleted
saw-<name>, then add the entry back with a highergeneration:(for examplegeneration: 2) and push. - Self-service: users can create and delete their own workspaces in Red Hat Developer Hub. See the Developer Hub user guide and self-service portal.
Sign in and connect the CLI to your workspace:
make login # opens the browser for Keycloak sign-in
export OPENSHELL_SAW_NAME=alice
make saw-configure # registers the gateway and signs you in
openshell sandbox list
openshell sandbox list --workspace cuda-devTo get the user's password for the sign-in, run
make keycloak-password KC_USER=alice. It copies the password without printing
it.
Open an agent:
make sandbox-ui # browser URLs for profile UIs
SANDBOX_NAME=notebook make openclaw-tui # terminal UI
SANDBOX_NAME=notebook GUI_PORT=18790 make openclaw-gui
SANDBOX_NAME=cuda-sandbox WORKSPACE=cuda-dev make nemoclaw-tui
openshell sandbox exec -n notebook -- sh # a shell in the sandbox- Signed out? Tokens last up to 24 hours. Run
openshell gateway login $OPENSHELL_SAW_NAMEagain. - Sign out: run
make logout. - GUI tunnel password: enter
gateway.auth.passwordfrom the sandbox's/sandbox/.openclaw/openclaw.json. - Known limits: web search does not work in the default
notebooksandbox (details).openshell sandbox connectshows nothing; useexec(details).
Video walkthrough: sandbox UIs and the OpenShell CLI
demo2.mp4
| Provider | Key | Example model |
|---|---|---|
| NVIDIA Build (default) | build |
nvidia/nemotron-3.5-lightning-30b-a3b |
| Google Gemini | gemini |
gemini-2.5-flash |
| Anthropic | anthropic |
claude-sonnet-4-6 |
| OpenAI | openai |
gpt-4o |
| OpenRouter | openrouter |
anthropic/claude-sonnet-4-6 |
| Ollama | ollama |
llama3 |
| Your own OpenAI-compatible endpoint | custom-inference |
the model it serves |
To add OpenAI or Anthropic to the default notebook sandbox:
- Set
enabled: truefor it incharts/saw-bom/profiles/data-science/default/providers.yaml. - Add it to
notebook.providersinsandbox.yamlin the same directory. - Add its
inference-openaiorinference-anthropicentry fromvalues-secret.yaml.templateto your secrets file. - Run
uv run --locked scripts/saw-profile-catalog.py, then commit and push.
Pick the model in the notebook chat's model picker.
Use your own model server (vLLM, Ollama, or any OpenAI-compatible API). A keyed endpoint must use HTTPS on port 443 with a publicly trusted certificate. Use the same host in every step.
-
Approve the host in
overrides/governance-profiles/custom-inference.yaml:endpoints: - host: api.inference.example.com port: 443 protocol: rest enforcement: enforce access: read-write
-
For VM users, allow egress to the same host in
overrides/saw-users.yaml:defaults: openshellSaw: egress: extraAllow: - api.inference.example.com
-
Give the user
profiles: [custom-inference]. Container users also setcustomInferenceURLandmodelInputs(see Container workspace). -
For VM users, set the endpoint in the
inferenceentry of your secrets file:- name: inference fields: - name: url value: https://api.inference.example.com/v1 - name: model value: <served-model> - name: api_key path: ~/.custom-inference-api-key
-
Load the secrets and push:
./pattern.sh make load-secrets git add overrides git commit -m "Configure custom inference" git push
An existing VM picks up the change after make saw-restart OPENSHELL_SAW_NAME=<name>.
For more, including a second endpoint and in-cluster model servers, see
Custom inference.
Every gateway calls a fail-closed governance service. The default is the OpenShell governance interceptor. You can switch to NVIDIA Agent Policy Fabric (APF), which serves the same policy as a signed bundle and keeps an audit trail.
-
Get read access to the private APF chart and images on
ghcr.io/mkhaas/apf. Then save aread:packagestoken in~/.ghcr-token. -
Create your signing key and bundle, then commit and push them:
make apf-keys make apf-bundle git add charts/governance-interceptor/files/apf git commit -m "Sign the APF policy bundle" git push -
Add the
ghcrandapf-signingentries to your secrets file, then run./pattern.sh make load-secrets. -
Set
global.governance.engine: apfinvalues-global.yaml, push, then restart each VM workspace once.
Full steps, the quickstart variant, and switching back are in APF.
The quickstart deploys one VM workspace with Make, without Argo CD. Install the
OpenShift Virtualization and Red Hat Build of Keycloak operators first, and
create a HyperConverged resource. See
Quickstart notes.
-
Clone the repository and log in:
git clone https://github.com/validatedpatterns-sandbox/secure-agent-workspace.git cd secure-agent-workspace oc login --server=https://api.<cluster>:6443 -u <admin-user> export KEYCLOAK_NS=saw-keycloak OPENSHELL_SAW_NAME=alice
-
Prepare the cluster and deploy Keycloak and governance:
make quickstart-prereqs-check make saw-init make keycloak-deploy make keycloak-check make governance-deploy make login
-
Create the workspace. When asked, press Enter to make yourself the owner.
read -r API_KEY < "$HOME/.nvidia-api-key"; export API_KEY make saw-create PROVIDER=build MODEL=nvidia/nemotron-3.5-lightning-30b-a3b unset API_KEY
For web search, also export
WEB_SEARCH_API_KEYfrom~/.brave-api-key. For a custom endpoint, addPROFILES=custom-inference PROVIDER=custom-inference ENDPOINT_URL=https://<host>/v1. -
Wait for the installer, then connect:
make saw-status # wait for install and apply: Done make saw-configure openshell sandbox list
For container or Kata workspaces, add DEPLOYMENT_MODE=container or
DEPLOYMENT_MODE=kata to saw-init and saw-create. See
Standalone installation.
Remove workspaces first, while Keycloak, the portal and Argo CD are still running:
- portal workspaces: use Delete my agent workspace in Developer Hub;
- Git users: remove the entries (with
pruneOnRemove: truefor VM users); - quickstart workspaces: run
make saw-delete.
Then remove the platform:
./pattern.sh make pattern-uninstall # Validated Pattern
make quickstart-delete # quickstartFor reinstall checks and troubleshooting, see Uninstall and reinstall.
make lint # charts and static checks, no cluster needed
make test # the full pytest suiteTo check a deployed user's workspace end to end (Argo CD health, the sandbox,
one real OpenClaw turn through the user's inference provider, the tool-gate
audit log and OCSF export), with oc logged in as an administrator:
make e2e-workspace OPENSHELL_SAW_NAME=alice DEPLOYMENT_MODE=container # or kata, vmvm also needs the OpenShell CLI connected to the user's gateway (see
Use your workspace).
See Testing, and the live deployment test for a dedicated test cluster.
- Isolation: each user gets their own VM or set of namespaces. No agent process is shared.
- Sign-in: Keycloak OIDC for the CLI and every web UI. The gateway validates tokens itself, through a TLS passthrough route.
- Owner-only access: web UIs admit only the owner and explicit support users. The gateway checks workspace membership.
- Keys outside the sandbox: provider keys come from Vault through External Secrets. The sandbox only sees non-secret markers. See Credential isolation.
- Network: default-deny NetworkPolicy, plus an egress firewall that allows only listed hosts.
- Governance: every gateway calls a fail-closed governance service.
- Audit: container gateways and sandboxes export OCSF events to an OpenTelemetry collector (best-effort); signed tool-call receipts are an option.
Video walkthrough: a personal assistant with governed access
demo3.mp4
See the personal assistant guide and the governance interceptor.
Production has no demo users, and self-registration is off. Accounts come from
overrides/saw-users.yaml:
make keycloak-add-users # create missing accounts
make keycloak-password KC_USER=carol # copy a password (never printed)
make keycloak-reset-password KC_USER=carol # set a new one
make keycloak-passwords # list users with stored passwordsEach account gets a random strong password, stored in a Secret in the Keycloak
namespace. Each entry can also set email, firstName, lastName and
roles (default [openshell-user]). Give openshell-admin only to operators:
it grants admin access to every gateway.
To test as two users, sign in as the second user in a private browser window.
Demo users (developer, admin, alice, bob) are only for test
clusters. In the quickstart, use
make -f Makefile-quickstart keycloak-deploy DEMO_ENABLED=true. For the
pattern, set demo.enabled=true on the Keycloak application, and use
overrides/saw-users-demo.yaml.
On a realm imported by an older release, run make keycloak-harden and
make keycloak-session-max to apply the current password, lockout and session
settings.
Every workspace web UI has its own host. Keycloak needs each one registered as a redirect URI. The redirect registrar in the Keycloak namespace does this automatically, within seconds of a route appearing. It also removes entries for deleted workspaces.
To keep Keycloak admin access out of the cluster, set
redirectRegistrar.enabled: false in the openshell-keycloak values.
Register the redirect URIs yourself instead:
make -f Makefile-quickstart keycloak-register KC_USER=carol # one user's UIs
make -f Makefile-quickstart keycloak-redirects # show what is missing
make -f Makefile-quickstart keycloak-redirects-sync # sync all workspacesWith another OIDC issuer, register the callbacks there. To list them, run:
oc get routes -A -l saw.redhat.com/oidc-redirect=true \
-o jsonpath='{range .items[*]}https://{.spec.host}/oauth2/callback{"\n"}{end}'.
├── Makefile, Makefile-common, Makefile-quickstart # all make targets (make help)
├── pattern.sh # Validated Patterns wrapper
├── values-global.yaml # pattern settings
├── values-prod.yaml # cluster group: operators and applications
├── values-secret.yaml.template # secrets template
├── overrides/
│ ├── saw-users.yaml # one entry per user
│ ├── saw-container-defaults.yaml
│ └── governance-profiles/ # extra governance profiles
├── charts/ # Argo CD-managed Helm charts
├── kubernetes-runtime/ # container workspace controller
├── credential-proxy/ # VM credential proxy
├── harness-bundles/ # agent skills, MCP servers and tools
├── image-builder-charts/ # image builds and the golden VM image
├── scripts/ # install and helper scripts
├── tests/ # pytest suite and shell checks
└── docs/ # guides
- NVIDIA Secure Agent Workspace reference design
- NVIDIA OpenShell and NemoClaw
- Red Hat Validated Patterns
- Red Hat Build of Keycloak
- Troubleshooting
- Agent harness bundles
- Versioned BOM installer
| Field | Value |
|---|---|
| Title | Secure Agent Workspace |
| Description | Deploy isolated, per-user AI agent sandboxes on OpenShift |
| Industry | Cross-industry |
| Product | Red Hat OpenShift |
| Use case | AI agent sandboxing, secure coding environments |
| Partner | NVIDIA |
