Repository navigation
feat(sdk): report each agent's runtime ID in plan and apply results - #14186
Merged
Merged
Conversation
Plan and apply results now report each sandbox's agent name and the runtime ID that state records under `agents`, and text output prints the fabric-agent-ctl invoke command for each agent, so the docs no longer read terraform.tfstate with jq. Apply reads its state once after its changes for service URLs, runtime IDs, and interfaces. A failed read warns and leaves the URLs and IDs out, as it did for URLs; a deployment with interfaces still fails, as before. Refs #14185
Collaborator
Author
Authoring session — opening
|
Contributor
This was referenced Nov 4, 2026
cv
added a commit
that referenced
this pull request
Nov 4, 2026
…14191) ## Failure The GPU autoscaling example pins the [kubernetes-gpu-autoscaling chart](https://github.com/NVIDIA/nemoclaw-community/tree/ae756c28bda501eb9c4b7ec26d977e6f0c6fd2fc/examples/recipes/nvidia/kubernetes-gpu-autoscaling) at nemoclaw-community `ae756c28bd`, where one release runs one runtime. So the README says installing another `INFERENCE_RUNTIME` replaces the release's pods, and a deployment can't serve Hermes on vLLM and OpenClaw on Ollama from the same GPUs. NVIDIA/nemoclaw-community#215, merged as `cb46db83ab`, adds `install-two-runtimes.sh` for that, and `set-hpa-metric.sh` to switch the autoscaler's metric, but the README doesn't mention either. Its invoke step also names only a plan's JSON result for the runtime ID, while apply prints the command and its JSON reports the same `agents` field (#14186). ## Decision In `examples/kubernetes/gpu-autoscaling/README.md`: - Pin the chart to nemoclaw-community `cb46db83ab`; the anchors the README links to are unchanged there. - Add **Run Two Runtimes on Shared GPUs** under **Choose a Pairing**: `install-two-runtimes.sh` installs `nemoclaw-gpu-vllm` and `nemoclaw-gpu-ollama`, each in its own namespace with its own autoscaler and ceiling; a pod that doesn't fit stays Pending; each release's Gateway and key Secret follow its name; the configuration then declares one provider and inference per release. - After the HPA watch command, name `set-hpa-metric.sh gpu_utilization|latency_avg` and its `RELEASE` and `NAMESPACE` variables. - In **Invoke an Agent**, read the runtime ID from `agents.SANDBOX.runtimeId` in apply's or a plan's JSON result, beside apply's **Agents** list. The example keeps the read-only plan. No file reads `terraform.tfstate`; #14186 already replaced that `jq` filter. A load client that drives many agents follows in a stacked pull request. ## Validation - `cargo ci` on `d881d98de3`: all selected steps passed in 324 s, including lifecycle. - Read the chart's README, `install-two-runtimes.sh` and `set-hpa-metric.sh` at `cb46db83ab` for the release, namespace and variable names, and checked that the linked anchors `#install-details` and `#full-recipe-uninstall` exist there. - Installed the chart from `cb46db83ab` with `helm` on a local kind cluster (linux/arm64, no GPU), with Ollama and `qwen3:0.6b` on CPU, arm64 image digests, and Envoy Gateway v1.8.3; the stacked pull request's live run uses it. - Not run: `install-two-runtimes.sh` and `set-hpa-metric.sh`, which need GPU nodes with DCGM; nemoclaw-community#215 also lists them as not run on a cluster. - Deferred to CI: `cargo ci live-kind` and `live-docker`; the change is documentation only.
cv
added a commit
that referenced
this pull request
Nov 4, 2026
…4192) ## Failure The GPU autoscaling example has no way to load the chart's GPUs through the agents, which is what makes its autoscaler scale. #14009 had load clients, but they sent each prompt with `kubectl exec` into the sandbox pods, around the gateway's authentication, and read pod names and runtime IDs from NemoClaw's `terraform.tfstate`. With the `development` profile that example uses, nobody but NemoClaw can authenticate to the gateway, so no supported client could reach the agents. ## Decision Follows #14191 (merged), on which this was stacked. - `examples/kubernetes/gpu-autoscaling/load.sh`, a Bash script with the OpenShell CLI, `curl` and `jq`. It reads `nemoclaw apply -o json` and sends `PROMPTS` prompts across the agents, at most `CONCURRENCY` at a time through `xargs -P`, then prints how many it sent and how many replied, the median, 95th-percentile and longest latency overall and per sandbox, up to 10 failures, and one reply per sandbox. It exits nonzero if any request failed. Each sandbox takes one of the two paths that need no state files or `kubectl exec`: - **Hermes's API server**, when apply lists an `api` interface and an `api` service URL for the sandbox: OpenAI chat completions to `serviceUrls.SANDBOX.api`, through the gateway's port forward and with its client certificate. The script reads the interface token once, with `openshell sandbox exec … cat` and the reported `tokenPath`, into a private temporary file. - **`fabric-agent-ctl invoke`** for any other sandbox, such as OpenClaw or Deep Agents, through `openshell sandbox exec` with `agents.SANDBOX.runtimeId` (#14186). - `two-runtimes.yaml`: a Hermes sandbox on the chart's vLLM release and an OpenClaw sandbox on its Ollama release, the two that `install-two-runtimes.sh` installs (#14191). It uses the `oidc` profile, and declares Hermes's `api` interface with a `serviceExposures` entry using `BEARER_PASSTHROUGH`, because OpenShell's default `STRIP` drops the token Hermes checks. Its Envoy Service names are the ones Envoy Gateway v1.8.3 created for those Gateways on kind; it shortens a Gateway's name to 48 characters before the hash. - `README.md`: **Drive Load Through the Agents**, with the apply and run commands, the variables, and the limits: the gateway's one CPU for `sandbox exec`, Fabric's one invocation at a time per runtime, Hermes's 10 concurrent runs per sandbox, what a service URL skips, and that the CLI doesn't renew a client-credentials token (ai-openshell/openshell#4287). From #14009's `e2e-fabric-load-test.py` and client scripts, this keeps the prompts, the per-request timeout, the success check on `result.status` and `result.output.response`, and per-sandbox counts. It leaves out the HPA polling and the stop-at-ceiling logic, which belong to the chart and `kubectl get hpa --watch`; the OpenClaw tool pinning, which edited Fabric's generated configuration inside the sandbox; and the timeline and CSV output. ## Validation - `cargo ci` on `c6a581a9cf`: all selected steps passed in 135 s; test ran 1,827 tests and lifecycle 101. `cargo test -p nemoclaw-onboarding two_runtimes` ran the new file's onboarding journey. - `shellcheck` 0.11 (`koalaman/shellcheck:stable`) on `load.sh`: no findings. - Live run on a local kind cluster (kind v0.33.0, `kindest/node:v1.37.0`, Agent Sandbox 1.0.3, linux/arm64, no GPU), with resources I created and removed afterwards: - **Model:** the chart from nemoclaw-community `cb46db83ab` installed with `helm`, with Ollama and `qwen3:0.6b` on CPU, no GPU request or node selector, no ServiceMonitor or HPA, arm64 digests for Ollama 0.40.11 and `node:22-bookworm-slim`, behind Envoy Gateway v1.8.3. Both sandboxes used its one Envoy Service, with `model: qwen3:0.6b`. - **Issuer:** Keycloak 26.4 in the cluster, at `https://<kind node IP>:30443/realms/openshell` with a test CA, so that the gateway pod and the host see the same issuer URL, with a confidential client whose service account has the admin role in a `roles` claim and audience `openshell`. The kind HCL cases' issuer serves only discovery and keys, with no token endpoint, so the OpenShell CLI can't sign in through it. - **Deployment:** `two-runtimes.yaml` with the context, issuer, endpoints, model and image digests replaced, and `openclaw` and `hermes` built for linux/arm64 and pushed to a registry on the kind network. `nemoclaw apply -o json` with the bundle from this branch succeeded, and reported `serviceUrls.user-0000.api` as `https://nc-…--user-0000--api.openshell.localhost:8080/`, both runtime IDs under `agents`, and the Hermes token path under `interfaces`. - **CLI:** the port forward and client certificate from `docs/kubernetes.md`, then `openshell gateway add … --oidc-client-id` with `OPENSHELL_OIDC_CLIENT_SECRET` (OpenShell 0.1.6): `Authenticated via client credentials`; `openshell status` showed `Authenticated (OIDC)`. - **Load:** `PROMPTS=12 CONCURRENCY=4 load.sh apply.json`: ```text Sending 12 prompts to 2 sandboxes, at most 4 at a time: user-0000: Hermes API at https://nc-…--user-0000--api.openshell.localhost:8080/ user-0001: fabric-agent-ctl invoke, runtime runtime-1793794887745-82-2 Sent 12 prompts in 238 s: 12 replied, 0 failed. Latency of replies: p50 51.9 s, p95 156 s, max 156 s. user-0000 (api): 6/6 replied; p50 16.9 s, p95 87.6 s, max 87.6 s user-0001 (invoke): 6/6 replied; p50 80.7 s, p95 156 s, max 156 s reply #1 user-0000: A Kubernetes HorizontalPodAutoscaler is a service that automatically scales its pods based on metrics. reply #2 user-0001: The current system state shows no active exec sessions or subagents, indicating no ongoing operations are in progress. To proceed, please check your system or c ``` An earlier run of 8 prompts also got 8 replies. OpenClaw's replies don't answer the prompts, likely because of `qwen3:0.6b` with OpenClaw's tools; each invocation still reported `succeeded` with a response. - **Failures:** with `TIMEOUT=5`, both requests were reported as failed (`curl: (28) Operation timed out` and `timed out after 5 s`), and the script exited 1. - Not run: GPUs, autoscaling, vLLM, NIM, and Deep Agents. The Deep Agents path is the same `fabric-agent-ctl invoke` command as OpenClaw's. - Deferred to CI: `cargo ci live-kind` and `live-docker`; the change adds no image or Kubernetes code. Co-authored-by: maggiezha <[email protected]>
This was referenced Nov 4, 2026
cv
added a commit
that referenced
this pull request
Nov 11, 2026
…ms (#14413) The release notes now list every user-visible change on `v1` since the `v0.1.0-rc9` tag, including the breaking ones, and four example pages drop claims that later changes made false. ## Problem `docs/about/release-notes.md` listed three breaking changes and none of the features, fixes, and onboarding changes that reached `v1` after `v0.1.0-rc9`; it didn't name the configuration shapes the parser now rejects or the intent record version `v0.1.0-rc9` writes. Some example claims went stale: - `examples/spark/README.md` said the pinned OpenShell has the Podman TLS initialization blocker, ai-openshell/openshell#3427; its fix merged before OpenShell 0.1.0, and `v1` pins 0.1.7. - `examples/station/README.md` and `examples/gtc-dc/README.md` required exactly one visible GPU on the host; since #13929, `container.gpuDevices` lets a service on a host with more GPUs request one. - `examples/hcl/travel-team` said Fabric's Deep Agents adapter can't turn reasoning off, NVIDIA/NeMo-Fabric#433; NVIDIA/NeMo-Fabric#439 fixed that, and the pinned catalog's Deep Agents `reasoning_effort` accepts `none`. - The travel team cited #13313 for the booking key its service doesn't receive, but #13313 closed when `openshell_api` landed. ## Change - `docs/about/release-notes.md` gains "Changes Since v0.1.0-rc9", grouped by area, from the commits in `v0.1.0-rc9..origin/v1`; where a later commit changed an earlier one, the entry describes the current code, and changes added and removed after the tag aren't listed: - Agents and interfaces: #14037, #14038, #14269, #13981, #14024, #14186, #14052, #14385, #13971, #13858, #13947, #14039, #14042, #14044, #14343. - Inference: #13929, #14391, #14396, #14398, #14400, #13963, #13912, #13964, #14388, #14390, #14397. - Gateways and Kubernetes: #13909, #13970, #13922 (an existing namespace, refused at plan by #13756, is now bound; cluster-wide reads dropped), #14014, #14169, #13921. - Plan, apply, and diagnostics: #14224, #13756, #14141, #14133, #14135, #13775, #13744, #13701. - Onboarding: #13693, #13695, #13741, #13757, #13851, #13978, #14228, #14233, #14334, #14336. - Examples and builds: #14166, #14184, #14188, #14191, #14192, #14200, #13889, #14267, #14312, #14315, #14355, b30e9b4, #13781, #13813, #14246, and the pins in `versions.json` and `image/fabric/Dockerfile`. - Its breaking changes since the tag: - the intent record moving from 15, which `v0.1.0-rc9` writes, through 16 (#14266), 17 (#14343), 18 (#13929), 19 (#14391) and 20 (#14394); - name-keyed `sandboxes` and `inferenceProviders` (#13703, #13705); - a recipe `compatibility.gpu` outside every hardware profile (#13912); - model tuning the adapter doesn't accept (#14111), and Hermes's `max_tokens` losing its default (#14296); - `skills.paths` resolution (#14296); - endpoint and `networkCIDR` validation (#13847, #14081); - the HCL `gateway_values` attribute (#14014), and Kubernetes ownership receipts from before #13922 and #14014. The two earlier items stay, under their own heading. - `examples/spark/README.md` replaces the closed OpenShell#3427 blocker with the Podman and remote-model limits in `docs/resources/limits.md`. - `examples/station/README.md` and `examples/gtc-dc/README.md` require one GPU visible in the model container, and point to `container.gpuDevices` for a host with more. - `examples/hcl/travel-team/README.md` and `WALKTHROUGH.md` drop the NeMo-Fabric#433 limitation, and the travel team's booking-key statements link #14417 instead of #13313. Not listed, because both changes landed after the tag: Deep Agents Code (#14043, #14250), `compatibility.gpuCount` (#14391, #14394), and the "Creating infrastructure state" progress step (#14169, #14248). Checked and left unchanged: the root `README.md`, `crates/nemoclaw-onboarding/README.md`, `crates/nemoclaw-cli/assets/README.md`, `internal-docs/README.md`, the other example READMEs, and every example YAML header comment. The GPU autoscaling README and `load.sh` read the JSON fields `OperationResult` serializes, and ai-openshell/openshell#4287 is fixed only after the pinned 0.1.7. The two pre-tag release-note items still match the schema and SDK. `docs/README.md` is left to #14412, which retires the stale field reference snapshot it describes. Not verified: whether Hermes sends the booking key's placeholder to MCP servers; #14417 tracks the live check. ## Beyond CI Each relative link and anchor in the changed files resolves to an existing file and heading.
cv
added a commit
that referenced
this pull request
Nov 11, 2026
Brings the platform guides under `docs/` in line with `v1` at `637bdb6276`: they now name that revision and OpenShell 0.1.7, publish the generated configuration reference instead of a stale snapshot, restore guide text that the reorganization dropped, and correct what they say about policy changes, OpenShell resource schemas, and onboarding. ## Problem The reorganization in #14195 pinned the guides to `86b8d94273` and still describes that revision, 114 commits behind `v1`: - The published "YAML Configuration Reference" is a hand-kept snapshot of the generated reference at `86b8d94273`. It predates the typed application container options (#14166), network middleware bindings, the dropped Deep Agents Code harness, and the multi-GPU fields, and says that `docs/reference/configuration.md` differs from it on three field types. - The guides name OpenShell 0.1.6 and link its `ac7f615` sources, while `versions.json` pins 0.1.7 (`5d25211b`, #14245). #14245 left this for the next refresh of the inspected revision. - #14195 was written at `86b8d94273` and merged after #14186, #14132, and #14166, so it overwrote their guide changes: the `agents` field with each agent's runtime ID, the OIDC sign-in details for a managed Kubernetes gateway, and the application container example. - `docs/security/sandbox-network.md` and `docs/security/security.md` say apply rejects a policy change that needs a new sandbox. Since #13375, a changed sandbox specification, policy included, replaces the sandbox, as the same page's recovery section and `docs/build-deploy/usage.md` already say. - `docs/references/provider.md` says the OpenShell resource schemas are version 1; they're version 2 since #13157. - `docs/references/cli.md` says onboarding needs a verified bundle to read the target; since #12579 it reads the target directly, with no bundle or OpenTofu. - `docs/references/fabric-harnesses.md` says onboarding offers every catalog harness; since #14233 it offers OpenClaw and Hermes, and keeps a template's other harness as the suggestion. - The troubleshooting table lacks the errors that #14141 and #14133 added for retained gateway storage owned by another state directory and a missing kubeconfig context. ## Change - **Revision:** `docs/README.md`, the architecture overview, the container services page, and the first-deployment tutorial and its prerequisites now name `637bdb6276`, with OpenShell 0.1.7 and `5d25211b` from its `versions.json`. Links to NemoClaw sources at the old revision become repository-relative links, and the two test fixtures they named moved to `crates/nemoclaw-e2e/tests/integration/rust/`. - **OpenShell links:** every OpenShell link in these pages moves from `ac7f615` to `5d25211b`. The line ranges for the Docker, Podman, and Kubernetes proxy settings in OpenShell's `configuration.mdx` are recomputed for the new file; they cover the same blocks. - **Field reference:** `fern/pages.json` publishes `docs/reference/configuration.md`, which `cargo run -p nemoclaw-build -- schema` generates and CI checks, and `docs/references/v1-configuration.md` is removed. Links to it, including one in `docs/agents-inference/inference.md` and one in the user-guide skill, point at the generated reference. Refreshing the snapshot instead would keep a hand-copied file that goes stale with the next schema change. - **Restored from #14186:** the tutorial and the headless OpenClaw example in `docs/agents-inference/agents.md` read the runtime ID from `nemoclaw plan -o json` instead of `terraform.tfstate`; `docs/references/cli.md` lists the `agents` field and the **Agents** text; `docs/references/sdk.md` names `agents` in plan and apply results (`OperationResult::agents`). - **Restored from #14132:** the OIDC steps in `docs/build-deploy/kubernetes.md` cite the manual run in #14131 and describe the CLI's `http://127.0.0.1:<port>/callback` redirect and `SSL_CERT_FILE` trust, and the matching row in `docs/resources/limits.md` no longer says the steps never ran. OpenShell 0.1.7's `oidc_auth.rs` still builds that redirect. - **Restored from #14166:** `docs/build-deploy/usage.md` links `examples/application-container.yaml`. - **Policy changes:** both security pages and the change table in `usage.md` say a policy change replaces the sandbox, deleting its files and conversations (except on mounted volumes), the wording of #14141's CLI warning; `openshell_sandbox` has no mutable fields (`crates/openshell-provider/src/lib.rs`). - **Schema version:** `docs/references/provider.md` says version 2, as `crates/openshell-provider/tests/schema.txt` records, and drops the repeated sentence. - **Onboarding:** `docs/references/cli.md` says onboarding reads the target without a bundle (`nemoclaw_onboarding::author`) and that the saved file holds only authored values, a sentence #13978 added to the tutorial before #14195 replaced onboarding there with a copied example. - **Onboarding harnesses and troubleshooting:** `fabric-harnesses.md` names the harnesses onboarding offers and drops a past rehearsal list; the troubleshooting table gains rows for the two errors above, with their messages from `gateway_storage.rs` and `observation.rs`. - **Smaller fixes:** `tls: terminate` and `passthrough` are rejected by OpenShell 0.1.7 (its `l7/mod.rs` is unchanged from 0.1.6); OpenShell 0.1.7 still keeps GPU filesystem additions local to the workload (`boundary_server.rs`); `interfaces.md` points to the prerequisites for the tutorial's OpenShell version; `migration.md` links the onboarding guide; the internal evidence pages record that this change removed the snapshot; the prerequisites table no longer limits non-OpenClaw, non-Deep Agents images to ARM64, which `docker-bake.hcl` and `docs/build-deploy/build.md` contradict. Checked against the code and left unchanged: the Kubernetes namespace binding after #13756 (`operations.rs` binds an existing namespace by UID), agent replacement rules (`fabric-provider/src/agent.rs`), state paths and Fabric adapter pins in `docs/build-deploy/state.md` (`f33fa19a`, as `versions.json`), the harness table and its examples, CLI options against `args.rs`, SDK signatures and timeouts, provider versions, the 32-sandbox and 32-provider limits, the multi-GPU limit (#14384 is open, and `container.gpuDevices` still takes one entry), the compatibility page's state-version error, and the threat model. ## Beyond CI - The first-deployment tutorial hasn't been rerun at `637bdb6276`; its commands were checked against the CLI parser, `examples/openclaw.yaml`, and the result types. - The OIDC `SSL_CERT_FILE` behavior was observed in #14131 with OpenShell 0.1.6 and hasn't been rechecked with 0.1.7.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Failure
Invoking a deployed agent needs its Fabric runtime ID, but no plan or apply result reported it.
OperationResultcarriedconnection,serviceUrls, andinterfaces, and apply read runtime IDs from state only for agents with enabled interfaces.The only documented way to find the ID was
jqoverterraform.tfstate(docs/agents.md,docs/get-started.md, and the newexamples/kubernetes/gpu-autoscaling/README.md), a filedocs/state.mdcalls an implementation detail.Decision
Resolves #14185.
agents, keyed by sandbox name likeserviceUrls:agent, the agent's name, andruntimeId, omitted while state records no runtime. A plan reports the state before it, the runtimes the last apply left; apply reports the state after its changes, so a replaced runtime shows its new ID.openshell sandbox exec -n SANDBOX --no-tty -- fabric-agent-ctl invoke --agent AGENT --runtime-id ID --input FILE, orno runtime recorded. The selection prints once; Agent interfaces reuses it.nemoclaw plan -o jsoninstead of state, anddocs/reference/cli.md,docs/interfaces.md, anddocs/sdk.mddescribeagents.The
verify-*skills under.agents/skills/still readruntime_idfrom state; changing them needs live reruns, so they are left for a follow-up.Validation
crates/nemoclaw-sdk/tests/agent_runtimes.rs): plan before any apply, first apply, unchanged reapply, and plan after apply; a runtime replaced during apply reports its new ID; an agent without a runtime omitsruntimeId; an unreadable state warns. All four failed before the change; with apply reporting the pre-apply state instead, the replacement and first-apply cases fail.crates/nemoclaw-cli/src/formatting.rs: plan and apply text print the invoke command only for agents with a runtime and JSON carries the sameagents; agents and interfaces share one gateway selection. Both failed before the change.service_urls::apply_without_exposures_leaves_service_urls_outno longer asserts that apply skips reading state.cargo ci(fmt, clippy, build, test, schema, bundle, lifecycle): passed, after rebasing onorigin/v1atb32aa6f059.cargo ci live-docker: passed (interfaces_live,hcl_live::case,managed_gateway_live), before the rebase, whose base commit only added example files. The live tests parse the CLI's JSON; none assertsagents.cargo run --locked -p nemoclaw-build -- fern check: 0 errors, 1 warning.cargo ci live-kind; this change doesn't affect images or Kubernetes resources.