This is the orientation document for any AI agent working in this repo. It
covers repo shape, the conventions shared across demos, and cross-repo
conventions. It deliberately does not duplicate installation steps —
those live in demos/base/README.md and each
demos/<name>/README.md. Read this file first, then the relevant README for
whatever you're actually building.
Before running anything against a real cluster:
- Check tool versions. Run
openshell --version,helm show values oci://ghcr.io/nvidia/openshell/helm-chart, etc. before assuming any flag in a README still matches — this space moves fast. - Don't apply anything without confirming with the user first — this
includes
oc adm policy add-scc-to-user,helm install/upgrade, and anything that creates Keycloak clients, secrets, or other cluster state. Scaffold and show the plan, then ask. - When a README says [VERIFY], verify it — don't silently promote an inferred command to a confirmed one just because it's already in the file.
.
├── CLAUDE.md # agent entry point (references this file)
├── AGENTS.md # this file — repo orientation + conventions
├── README.md # human-facing repo overview + demo index
├── .env.example # cluster-wide variables
├── docs/
│ ├── headless-browser-automation.md # Playwright setup + OAuth flow automation
│ ├── guide-testing-protocol.md # how to test a demo guide end to end
│ ├── openshell-flows.md
│ └── diagrams/
└── demos/
├── _template/README.md # copy this when adding a new demo
├── base/ # demo-agnostic OpenShell-on-OpenShift install
│ ├── README.md
│ ├── .env.example
│ ├── helm/values-openshift.yaml
│ └── scripts/
└── keycloak-oidc/
├── README.md
├── .env.example
├── helm/values.yaml
├── keycloak/ | providers/ | policies/ | mcp-servers/
└── scripts/
demos/base/is the foundational demo. It installs a working OpenShell gateway on OpenShift and proves it with a generic hello-world sandbox (no OIDC, no SPIFFE, no external identity provider). Nothing underdemos/base/should ever assume any particular other demo. Changes todemos/base/should make sense even if every other demo folder were deleted.- Each
demos/<name>/is a self-contained, independent OpenShell install. Own README, own.env/.env.example, own Helm values file, own scripts, own extra infrastructure (Keycloak, whatever it needs), own provider profiles and policies, and — critically — its own namespace viaOPENSHELL_NAMESPACEin its own.env. Namespace is always per-demo, never shared — it does not live in the root.env. Each demo carries a completehelm/values.yaml(including the OpenShift-compatibility overrides) so it can be installed with a single-f:The roothelm upgrade --install openshell oci://ghcr.io/nvidia/openshell/helm-chart \ --version "$OPENSHELL_CHART_VERSION" --namespace "$OPENSHELL_NAMESPACE" \ -f demos/<name>/helm/values.yaml
.envholds only cluster-wide variables (OPENSHELL_CHART_VERSION,CLUSTER_APPS_DOMAIN). Check a demo's own.env/README for which namespace it targets. Namespace names must not start withopenshell-. At least one demo derives its gateway Route hostname asopenshell-${OPENSHELL_NAMESPACE}.${CLUSTER_APPS_DOMAIN}, and a redundant prefix can push the FQDN over the 64-byte X.509 CommonName limit when using an external ACME issuer (e.g. Let's Encrypt) for the Route cert. Use a short demo slug alone, e.g.keycloak-oidc-demo, notopenshell-keycloak-oidc-demo. - Order of operations:
demos/base/is a good first demo — it proves the chart/cluster combination works at all — but each demo is meant to stand on its own. A demo's own README states its prerequisites explicitly — don't assume. - Multiple demos coexist trivially on one cluster, since each deploys into its own namespace with its own gateway release — there's no shared gateway config to conflict over.
Copy demos/_template/README.md to
demos/<name>/README.md and keep its section headings — Purpose,
Prerequisites, What this demo deploys, Architecture,
Steps, Configuration reference, Secrets and security notes, Definition of
done, Open risks, References. Use a short descriptive name for the folder
(e.g. keycloak-oidc), not a numeric prefix — numerals belong
on scripts inside a demo folder (00-prereqs.sh, 01-deploy.sh, …)
where they reflect execution order, not on the folder itself.
Do not place new demos inside demos/base/ — base is a peer demo, not
a parent directory for others.
- Branch naming: version-update branches use
v<VERSION>(e.g.v0.0.106). Feature or fix branches use a short descriptive slug. - Environment variables: the root
.envholds cluster-wide variables (OPENSHELL_CHART_VERSION,CLUSTER_APPS_DOMAIN). Each demo has its own.envwith demo-specific variables — at minimumOPENSHELL_NAMESPACE. Every.env.examplelists variable names only. Real values go in a gitignored.env(or a secret manager) at the same level, never committed. Realm exports use hardcoded demo-only credentials (see each demo's README for details); in production, generate unique secrets per environment. - Script numbering:
00-,01-,02-, ... reflects run order within a folder. - Idempotency: scripts should be safe to re-run (
get || createpatterns,helm upgrade --installrather than bareinstall). - Keycloak operator: always use the Red Hat build of Keycloak
(
rhbk-operatorfrom the Red Hat Operators catalog). Search forrhbk, notkeycloak— searchingkeycloakreturns unrelated community operators. Never suggest the communitykeycloak-operatoror other alternatives without first confirmingrhbk-operatoris unavailable viaoc get packagemanifests -n openshift-marketplace | grep rhbk-operator. - Honesty about confidence: if a command in a README is inferred rather
than confirmed against a live source (docs,
--helpoutput, an actual running cluster), it's marked [VERIFY] in that README and stays marked until someone actually checks it — don't quietly drop the tag.
When running demos without a GUI (e.g. from a CLI agent), browser-based OAuth flows need to be automated. Two docs cover this:
- Headless browser automation — Playwright setup, xdg-open interception, Keycloak form selectors, CLI + Playwright orchestration pattern, and OpenShell CLI quirks.
- Guide testing protocol — the
methodology for testing a demo guide end to end: follow every step
literally, handle failures, resolve
[VERIFY]tags, and report results. openshell settings set --globalrequires--yesin non-interactive mode (the interactive prompt can't be answered by an agent). Append--yeswhen running headlessly.- keycloak-oidc test scope: headless testing of
demos/keycloak-oidcmust always run the main recipe (steps 1–5, including the curl-based isolation verification). The README also contains optional recipes (Codex + BYO LLM, Claude Code + BYO LLM) — ask the user whether to run them before finishing. Never skip the optional recipes silently: either run them or explicitly report that they were not tested.
| Name | What it covers | Status |
|---|---|---|
base |
Demo-agnostic OpenShell-on-OpenShift install + hello-world sandbox verification | Verified end to end |
keycloak-oidc |
Keycloak as OIDC IdP, per-user credential isolation via Providers v2, MCP servers gated by Keycloak role via an Envoy sidecar | Verified end to end against a live cluster |
Read these before working on the relevant area — they capture patterns and constraints that aren't obvious from the code alone:
- Sandbox service patterns —
custom images (static binaries, Containerfile layout, remote gateway
build+push workflow), running background services inside sandboxes,
service exposevs--forward, Host-header routing, toolbox workarounds. Start here for anything involving long-running processes in sandboxes (agent-proxy, Prometheus exporters, dev servers). - Inference API compatibility — which LLM API format each agent requires (Codex → OpenAI Responses API with namespace tools; Claude Code → Anthropic Messages API), provider compatibility matrix, vLLM version requirements, and a test script.
- OpenShell flows — operational flows by role (admin vs user) and auth mode (mTLS vs OIDC), with SVG diagrams. Useful for understanding the end-to-end lifecycle before writing new demo steps.
- Headless browser automation — Playwright setup, xdg-open interception, Keycloak form selectors, CLI + Playwright orchestration pattern, and OpenShell CLI quirks.
- Guide testing protocol — how to
test a demo guide end to end: follow every step literally, handle
failures, resolve
[VERIFY]tags, and report results. - EvalHub red-team plan —
DRAFT. Agent-proxy + Garak + EvalHub for red-team evaluations
inside sandboxes. Contains resolved design decisions, validated
lifecycle findings, and open items. Lives under
demos/keycloak-oidc/because the demo extends that stack.
Demo-specific links live in each demo's own README. These apply across the whole repo:
- OpenShell repo: https://github.com/NVIDIA/OpenShell
- OpenShell docs home: https://docs.nvidia.com/openshell
- OpenShift install path: https://docs.nvidia.com/openshell/kubernetes/openshift
- Support matrix: https://docs.nvidia.com/openshell/reference/support-matrix