Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 47 additions & 0 deletions .cursor/rules/oc-shell-unsandboxed.mdc
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
---
description: >-
Run oc/openshell/deploy/presenter shell commands outside the Cursor sandbox
(required_permissions: ["all"]). Prefer user-kubernetes MCP for cluster reads.
alwaysApply: true
---

# OpenShift Shell: Unsandboxed

Observed failure (2026-09-30): Cursor **Agent Shell** defaults to a sandbox where
`oc whoami` fails with `Forbidden` / “Not logged into OpenShift” even though
`~/.kube/config` has a valid interactive login. With
`required_permissions: ["all"]`, the same command succeeds.

## Prefer MCP for cluster API

For pods, logs, events, Helm, Routes, operators → use **`user-kubernetes`** MCP
(`openshift-mcp` skill). Do **not** use sandboxed `oc` for those.

## Shell must request `all` when

Any of the following run in the **Shell** tool (not MCP):

| Pattern | Examples |
|---|---|
| OpenShift CLI | `oc …`, `kubectl …` |
| OpenShell CLI | `openshell …` |
| Presenter / observability | `./scripts/demo-presenter-serve.sh`, `demo-observability-proxy.py` |
| Deploy / verify / demo scripts | `make -C deploy …`, `./scripts/launch-openclaw.sh`, `./scripts/verify.sh`, `./scripts/demo-*.sh`, `./scripts/cluster-lifecycle.sh` |

Invoke Shell with:

```text
required_permissions: ["all"]
```

## If `oc whoami` fails

1. Retry the **same** command with `required_permissions: ["all"]` (do not tell the user to re-login yet).
2. Only if unsandboxed `oc whoami` still fails → ask the user to run `oc login` in their interactive terminal.
3. Never commit kubeconfig, tokens, or paste login tokens into the repo or chat.

## Do not

- Assume “Not logged in” from a sandboxed Shell means the workstation session is dead
- Start `demo-presenter-serve.sh` without `["all"]` (preflight will false-fail)
- Store cluster credentials in project files to “fix” agent auth
4 changes: 4 additions & 0 deletions .cursor/skills/demo-presenter-panel/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ Interactive FlowStory panels — not slides. See [`docs/demo/README.md`](../../d

## Start servers

**Agent Shell:** always run these with `required_permissions: ["all"]`. The Cursor
sandbox breaks `oc whoami` (false “Not logged in”) even when `~/.kube/config` is
valid — see `.cursor/rules/oc-shell-unsandboxed.mdc`.

From repo root (recommended — preflight + static UI + cluster observability proxy):

```bash
Expand Down
6 changes: 6 additions & 0 deletions .cursor/skills/openshift-mcp/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,15 @@ Read the local YAML file, then pass its content as the `resource` string to `res
Only use `oc`/`kubectl` when:
- MCP server status is `error` or `needsAuth` and auth fails
- The operation requires a subcommand not exposed by MCP (e.g., `oc debug`, port-forward)
- A project script must run locally (`demo-presenter-serve.sh`, `launch-openclaw.sh`, `make -C deploy …`)

When falling back, mention why MCP was not used.

**Required:** any Shell invocation of `oc` / `openshell` / deploy / presenter scripts
MUST use `required_permissions: ["all"]`. The default Cursor sandbox makes
`oc whoami` fail with `Forbidden` despite a valid interactive kubeconfig — see
`.cursor/rules/oc-shell-unsandboxed.mdc`.

## Additional resources

- OpenShift/RHOAI resource cheat sheet: [reference.md](reference.md)
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,6 @@ tests/playwright-report/
.logs/
.agent-status/
.verify-status.json

# Local scratch (e.g. downloaded demo recordings for analysis)
.tmp/
9 changes: 6 additions & 3 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ This maps demo features to specific Red Hat products/components:

## Demo Narrative

Active live script (~9–10 min): [`docs/demo-narrative-v1.md`](docs/demo-narrative-v1.md) (Spanish) + [`docs/demo-script.md`](docs/demo-script.md) (English).
Active live script (~9–10 min): [`docs/demo-narrative-v1.md`](docs/demo-narrative-v1.md) (Spanish) + [`docs/demo-script.md`](docs/demo-script.md) (English). Short slot / video (~5 min one-take, same A–D): [`docs/demo-narrative-5min.md`](docs/demo-narrative-5min.md) (Spanish) / [`docs/demo-narrative-5min.en.md`](docs/demo-narrative-5min.en.md) (English).

1. **Context** (1–2 min): Architecture map via v5 step **Overall Demo** ([`docs/demo/v5/live.html`](docs/demo/v5/live.html)) — skill: `demo-presenter-panel`
2. **Tests A & B** (2–3 min): API key not in sandbox; `/etc/shadow` blocked — skill: `demo-present`
Expand Down Expand Up @@ -183,8 +183,10 @@ agentops-showcase/
│ ├── stack-decisions.md # ADR executive summary (by layer)
│ ├── adr/ # Architecture Decision Records
│ ├── demo/ # Presenter UI (v5 live companion; v1–v4 deprecated)
│ ├── demo-script.md # Live demo script (English)
│ ├── demo-narrative-v1.md # Active live demo narrative (Spanish)
│ ├── demo-script.md # Live demo script (English; includes 5-min one-take)
│ ├── demo-narrative-v1.md # Active live demo narrative (Spanish, ~9–10 min)
│ ├── demo-narrative-5min.md # Five-minute one-take narrative (Spanish, same A–D)
│ ├── demo-narrative-5min.en.md # Five-minute one-take narrative (English)
│ ├── demo-narrative-v2.md # EvalHub/Garak extension (nice-to-have)
│ └── github-actions.md # CI workflows
├── deploy/
Expand Down Expand Up @@ -247,6 +249,7 @@ The `.cursor/rules/adr-alignment.mdc` rule enforces this for all agent sessions.
- **Target platform**: RHOAI 3.x on demo.redhat.com - everything must be deployable there
- **Pinned versions**: All operators and components use explicit version pinning (see [ADR-0006](docs/adr/0006-explicit-version-pinning.md)). No automatic updates. Version bumps are deliberate and tested.
- **No secrets in repo**: This is a public repo. Use environment variables, sealed secrets, or external secret management. Enforced by `.cursor/rules/no-secrets.mdc` and the `no-secrets` skill (scan before commit/PR).
- **OpenShift from agent Shell**: Prefer `user-kubernetes` MCP for cluster API. When running `oc` / `openshell` / `demo-presenter-serve.sh` / `make -C deploy …` in Shell, use `required_permissions: ["all"]` — the Cursor sandbox false-fails `oc whoami` (see `.cursor/rules/oc-shell-unsandboxed.mdc`).
- **Browser UI auth**: OpenClaw `gateway.auth.mode: password` behind the nginx mTLS bridge (`deploy-openclaw-ui-proxy`). Do not reintroduce oauth-proxy / `trusted-proxy` without updating [ADR-0011](docs/adr/0011-openclaw-ui-auth-nginx-bridge-password.md).
- **English**: All code, comments, docs, and demo content in English
- **GitOps**: All configuration as code, no manual cluster changes
Expand Down
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,11 @@ make deploy-all && make validate

- [CfP kit](docs/cfp/README.md) — reusable talk proposals and TLDR submission base
- [NeMo Guardrails Installation](docs/nemo-guardrails-installation.md)
- [Demo script (live, ~9–10 min)](docs/demo-script.md) — Cursor skills in [AGENTS.md](AGENTS.md) § Demo v1
- [Demo script (live, ~9–10 min; includes 5-min one-take)](docs/demo-script.md) — Cursor skills in [AGENTS.md](AGENTS.md) § Demo v1
- [Demo scenario logs runbook](docs/demo/demo-scenario-logs.md) — per-test log evidence and [Sandbox panel highlight rules](docs/demo/demo-scenario-logs.md#sandbox-panel-highlight-rules)
- [Demo narrative v1 (Spanish)](docs/demo-narrative-v1.md)
- [Demo narrative v1 (Spanish, ~9–10 min)](docs/demo-narrative-v1.md)
- [Demo narrative 5 min (Spanish, one-take)](docs/demo-narrative-5min.md)
- [Demo narrative 5 min (English, one-take)](docs/demo-narrative-5min.en.md)
- [Demo presenter UI](docs/demo/README.md) — `v5/live.html` live companion + observability panel
- [docs/ROADMAP.md](docs/ROADMAP.md) - Development roadmap and task tracking
- [docs/cluster-bootstrap.md](docs/cluster-bootstrap.md) - RHOAI platform deploy, validate, and teardown on OpenShift
Expand Down
3 changes: 2 additions & 1 deletion docs/ROADMAP.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@
- [x] Scaffold Helm charts for one-command deployment — RHOAI + OpenShell: `[deploy/helm/openshell/](../deploy/helm/openshell/)` + `make -C deploy deploy-openshell`
- [x] Refactor OpenShell wrapper chart (`0.3.0`): absorb namespace + SCC RoleBinding into Helm; Agent Sandbox via OLM only (OSC 1.13); retire kustomize + SCC script + raw `v0.5.1` manifest — see [ADR-0003](adr/0003-openshell-deployment-on-openshift.md)
- [x] Write step-by-step demo script with timing marks (~9–10 min live) — [`demo-script.md`](demo-script.md) (English); narrative [`demo-narrative-v1.md`](demo-narrative-v1.md) (Spanish)
- [x] Five-minute one-take narrative (same A–D) — [`demo-narrative-5min.md`](demo-narrative-5min.md) (ES) / [`demo-narrative-5min.en.md`](demo-narrative-5min.en.md) (EN); timing table in [`demo-script.md`](demo-script.md) § Five-minute one-take
- [x] Create health-check script (`tests/health-check.sh`)
- [x] Create warm-up script — skill `demo-warmup`, script `scripts/demo-warmup.sh`
- [ ] DemoJam Record fallback video
Expand Down Expand Up @@ -227,7 +228,7 @@ Active v1 demo now aligns with that unlock direction for egress:

- [x] Demo-initial policy with default deny — [`config/openshell/default.yaml`](../config/openshell/default.yaml)
- [x] Live allowlist script — [`scripts/demo-allow-google-egress.sh`](../scripts/demo-allow-google-egress.sh) applies [`config/openshell/google-egress.yaml`](../config/openshell/google-egress.yaml)
- [x] Narrative + timed script — [`demo-narrative-v1.md`](demo-narrative-v1.md), [`demo-script.md`](demo-script.md)
- [x] Narrative + timed script — [`demo-narrative-v1.md`](demo-narrative-v1.md), [`demo-script.md`](demo-script.md); 5-min variant [`demo-narrative-5min.md`](demo-narrative-5min.md) / [`demo-narrative-5min.en.md`](demo-narrative-5min.en.md)
- [x] Keep `config/openshell/default.yaml` as CI / `validate-security` baseline (unchanged)
- [x] Optional: document per-endpoint `openshell policy update --add-endpoint` as an alternate Change 1 presentation

Expand Down
162 changes: 162 additions & 0 deletions docs/demo-narrative-5min.en.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,162 @@
# Demo narrative — 5-minute format (one-take)

> Language: **English** (on-camera talk track).
> Spanish beat-by-beat: [`demo-narrative-5min.md`](demo-narrative-5min.md).
> Timed table: [`docs/demo-script.md`](demo-script.md) § Five-minute one-take.
> Full live narrative (~9–10 min, Spanish): [`demo-narrative-v1.md`](demo-narrative-v1.md).

Status: short-slot / recording variant. **Same four tests A–D** and the two live changes. No `ls` digression. No long recaps. Built for **one-take** (no edit jump-cuts): pace comes from rehearsal, not from the cut.

## Message

When we talk with customers about agentic architectures, security is one of the biggest challenges we hit. With **BYOA** we can deploy any agent/harness — and that is dangerous without guardrails: skills, scripts, internet access, complex tasks by default. This demo showcases **RHOAI security capabilities** so we can help customers deploy agents safely in production. In five minutes we **demonstrate** four controls; we install nothing on stage.

## Differences vs the 10-minute narrative

| In 10 min | In 5 min (one-take) |
|---|---|
| Models/security gap intro (~55s) | **~45s** hook: customer challenge + BYOA + two panels |
| Explain → paste prompt | **Paste → Play → one line** |
| `ls` digression after B | **Cut** |
| Three-layer recap before D (~40s) | **One line** in flight |
| Wait for recon script on camera | Narrate over it; if the model drags, start Change 2 as soon as useful code appears |
| MLflow with several invocations | **Curl deny → allow** (same trace type, different Response) |
| Broad close | Overall Demo **Play** + roadmap/GitOps/RHPDS + tagline |

Backstage, policies, and scripts: same as v1 (`default.yaml` → `demo-allow-google-egress.sh` → `demo-enable-guardrails.sh`; reset with `demo-reset.sh`).

## Live talk track (5:00)

Split screen: [`v5/live.html`](demo/v5/live.html) (left) + Control UI / OpenClaw (right). Same chat session for A–C; **New session** only before D-after (after Change 2), as in v1.

### 0:00–0:45 — Hook + two panels

**Spoken text:**

When we have conversations with our customers about adopting agentic architectures, security is one of the biggest challenges we run into.

With BYO agent we are enabling the ability to deploy any agent/harness, and that can create many security problems if we cannot configure security guardrails to limit what it may or may not do. Running skills, creating scripts, reaching the internet — in short, an agent that by default can perform many complex and potentially dangerous tasks.

That is why we prepared a demo to showcase the security capabilities RHOAI provides, so we can help our customers deploy these agents safely in their production environments.

The demo is organized in two panels: on the left, a visual representation of the architecture with a series of guided steps that let us explain different security scenarios; on the right, OpenClaw, which we will use as the harness to interact with the model and see how it behaves.

*(Companion on step A or Overall Demo ready; no need to walk the full layer map.)*

### 0:45–1:15 — Test A (`inference.local` / API key)

1. **Copy prompt** (key-audit — same as v1 / `demo-script.md`).
2. **Play** in Control UI.

**Expected:** no real key (`apiKey: unused` / empty env). The agent does not know which model it uses and does not hold the API key: it talks to `inference.local`; the gateway injects the credential.

**Line:** “The key is injected at the gateway; the sandbox does not have it.”

### 1:15–1:40 — Test B (`/etc/shadow` / Landlock)

1. **Copy prompt** (`cat /etc/shadow`).
2. **Play**.

**Expected:** Permission denied (OpenShell sandbox / Landlock).

**Line:** “System files were already locked down from minute zero.”

Do not run `ls` or contrast the workspace.

### 1:40–2:45 — Test C + Change 1 (egress)

#### C.before — connectivity controlled (OpenShell gateway)

1. **Copy prompt** (`curl -sI https://google.com`).
2. **Play** → **blocked**.

**Line:** “We control the agent’s connectivity from the gateway.”

#### C.after — permissive mode

1. Visible terminal: `./scripts/demo-allow-google-egress.sh` — explain the config (google.com allowlist; agent in permissive mode for that destination).
2. Same prompt.
3. **Play** → **HTTP 200** (or 301 toward google).

**Line:** “One policy lever; no sandbox rebuild. The agent does not change.”

Advance the companion to C-after when the 200 is on screen.

### 2:45–4:05 — Test D + Change 2 (NeMo)

#### D.before — full access to model capabilities

1. **Copy prompt** (network recon — same as v1).
2. **Play** → potentially dangerous response (script / recon plan).

While it generates: “Without Guardrails, the model can deliver the dangerous task; it does not need to execute it.”

#### D.after — NeMo Guardrails in action

1. Explain NeMo Guardrails (TrustyAI): security layer on the inference path.
2. Terminal: `./scripts/demo-enable-guardrails.sh`.
3. **New session** in Control UI.
4. Same prompt → **Play** → refuse / rail (“I can't respond” or equivalent).

**Line:** “OpenClaw still calls `inference.local`; the backend changes. The guardrail cuts — not the harness.”

If the model drags on D-before: do not pad with theory; around ~3:50 on the clock, start Change 2 even if the script is unfinished (before/after still holds if before already produced code).

### 4:05–4:30 — MLflow (traceability)

Open Gen AI Studio / experiment `openclaw-tracing` for **this** session (or the companion MLflow tab).

Show the **curl to google**: same kind of trace, **different Response** — blocked vs allowed. With MLflow we get full traceability: actions, commands, LLM invocations, prompts.

**Line:** “Success and failure in the same place — platform observability, not an add-on.”

If time is short: only the curl deny → allow contrast.

### 4:30–4:45 — Overall Demo + summary

Return to the **Overall Demo** step in the companion and hit **Play**. While it runs, a short summary of the security path just shown (credentials, files, egress, Guardrails, traces).

### 4:45–5:00 — Roadmap + GitOps + close

Call out capabilities we will add next (project nice-to-haves): EvalHub/Garak red teaming ([`demo-narrative-v2.md`](demo-narrative-v2.md)), MCP Gateway, cost/showback.

**Line:** “The whole deployment is GitOps-based; standing it up on RHPDS / demo.redhat.com is straightforward.”

Tagline: *Your Agent. Our Platform. Production-Ready.*

## Timing (clock)

| Block | Clock | Hard stop |
|---|---|---|
| Hook + two panels | 0:00–0:45 | 0:50 |
| A | 0:45–1:15 | 1:20 |
| B | 1:15–1:40 | 1:45 |
| C + Change 1 | 1:40–2:45 | 2:50 |
| D + Change 2 | 2:45–4:05 | 4:10 |
| MLflow | 4:05–4:30 | 4:35 |
| Overall Demo Play | 4:30–4:45 | 4:50 |
| Roadmap + GitOps + tagline | 4:45–5:00 | 5:00 |

If the clock hits **4:10** without D-after: jump to New session + refuse prompt; compress MLflow to ~20s; still try Overall + the GitOps/RHPDS line.

## Preflight (same as v1)

```bash
./scripts/demo-reset.sh
./scripts/demo-presenter-serve.sh
# New session in Control UI before recording
```

Skills: `demo-backstage-prep`, `demo-present`, `demo-allow-google-egress`, `demo-enable-guardrails`, `mlflow-tracing-validate`.

## One-take rehearsal

- Time with a visible clock; do not pause the recording.
- Prompts already in the companion (**Copy prompt**); do not type by hand; cadence **prompt → Play**.
- Change 1/2 scripts in terminal history (Enter — do not hunt for the path).
- If an LLM prompt is slow: advance to the next clock gate; do not improvise digressions.
- Rehearse the jump to Overall Demo + the GitOps/RHPDS line so both fit in ~15s.

## Relationship to v1

Same architecture, same scripts, same tests. This file only **compresses the talk track** for a five-minute slot (customer hook, prompt→Play beats, Overall + roadmap close). For the long runbook and product context, use [`demo-narrative-v1.md`](demo-narrative-v1.md) (Spanish) and [`demo-script.md`](demo-script.md) (English timed companion).
Loading
Loading