Architecture Details
NemoClaw combines a host CLI, an in-sandbox integration layer, and a versioned YAML blueprint that defines the sandbox image, policies, and inference profiles applied through OpenShell.
System Overview
NVIDIA OpenShell is a general-purpose agent runtime. It provides sandbox containers, a credential-storing gateway, inference proxying, and policy enforcement, but it has no opinions about what runs inside. NemoClaw is an opinionated reference stack built on OpenShell that handles what goes in the sandbox, prepares agent-specific integration, and makes the setup accessible.
Deployment Topology
The logical diagram above shows how components relate.
This section shows what actually runs where on the host.
NemoClawās default Docker-driver topology does not place the sandbox in an embedded k3s cluster.
On Linux, NemoClaw configures and restarts the package-managed OpenShell gateway user service when it is installed, then creates the sandbox as a Docker container.
NemoClaw treats that service as authoritative only when systemctl --user show openshell-gateway reports a package/vendor unit path and an openshell-gateway ExecStart.
Per-user units, partial units, and user-manager or bus outages do not take over gateway ownership; NemoClaw falls back to the standalone gateway process used by earlier installs.
That compatibility fallback remains until supported upgrade paths no longer include pre-service OpenShell installs and the package-managed handoff has direct nightly coverage.
On Apple Silicon macOS, NemoClaw starts the OpenShell Docker-driver gateway and creates the sandbox as a Docker container.
In both Docker-driver modes, the sandbox is a Docker container, not a Kubernetes pod.
Entrypoint supervisors create the in-container /tmp/nemoclaw-gateway-local marker only when they actually launch an in-container gateway, and they normally keep it present while that supervisor is active.
On normal exits, handled SIGTERM/SIGINT, startup failures, and shell errexit termination through the EXIT trap, the supervisor removes the marker on a best-effort basis so the Docker health check does not keep trusting a stale gateway PID.
Terminal runtimes may not write it.
NemoClaw does not treat sandbox environment hints such as OPENSHELL_DRIVERS as authoritative for gateway ownership.
Legacy non-Docker-driver installs still use the k3s-based gateway path.
In that topology, the openshell-cluster-nemoclaw container runs an embedded k3s cluster that includes the OpenShell gateway, an agent-sandbox-controller workload, and a Kubernetes custom resource definition named sandboxes.agents.x-k8s.io.
Each NemoClaw sandbox appears as a Sandbox custom resource in the openshell namespace, and the controller reconciles that resource into the corresponding agent pod.
For example, kubectl get sandboxes.agents.x-k8s.io -n openshell inside the legacy cluster container lists the sandbox resources, and kubectl describe pod -n openshell <sandbox-pod> reports Controlled By: Sandbox/<name>.
That Kubernetes resource path is a legacy implementation detail of the non-Docker-driver gateway, and it is not present in the default Docker-driver topology.
The diagram below shows the standard Docker-driver topology.
Layering from top to bottom:
NemoClaw never gives the sandbox a raw provider key.
At onboard time it registers credentials with OpenShellās provider/placeholder system, and the L7 proxy substitutes the real value into outbound requests at egress.
The CLI helper isInferenceRouteReady (in src/lib/onboard.ts) is a host-side readiness check used by the resume flow to decide whether the active route already covers the chosen provider and model.
It is not a runtime component.
For the DGX Spark-specific variant of this topology (cgroup v2, aarch64, unified memory), refer to the NVIDIA Spark playbook.
NemoClaw Agent Integration
NemoClaw integrates with each supported agent through a runtime layer that adapts the agent to OpenShell-managed providers, policies, and sandbox state. The concrete files differ by agent because each runtime has its own plugin system, config format, state layout, and startup command.
The Hermes integration follows the generic agent-manifest path instead of the OpenClaw plugin package path.
The manifest declares Hermesā binary, health probe, config directory, state directories, and OpenAI-compatible API endpoint.
Messaging channel availability is declared by each channel manifestās supportedAgents list under src/lib/messaging/channels/, not by the Hermes agent manifest.
The build-time config generator turns NemoClaw onboarding choices into Hermes YAML and environment files, and the Hermes plugin manifest exposes NemoClaw tools and an on_session_start hook.
NemoClaw Blueprint
The blueprint is a versioned YAML package with its own release stream. The runner resolves, verifies, and applies the blueprint through the OpenShell CLI. The blueprint defines the sandbox shape, default policies, and inference profiles; the runner performs the OpenShell operations.
Hermes keeps its agent-owned image, plugin, config, entrypoint, and policy additions under agents/hermes/.
The default Hermes policy starts from agents/hermes/policy-additions.yaml.
The current blueprint runner implementation lives in the nemoclaw/ TypeScript package:
Blueprint Lifecycle
- Resolve. The integration layer locates the blueprint artifact and checks the version against the OpenShell and agent runtime constraints in
blueprint.yaml. - Verify. The integration layer checks the artifact digest against the expected value.
- Plan. The runner determines what OpenShell resources to create or update, such as the gateway, providers, sandbox, inference route, and policy.
- Apply. The runner executes the plan by calling
openshellCLI commands. - Status. The runner reports current state.
Sandbox Environment
Normal NemoClaw onboarding builds from the ghcr.io/nvidia/nemoclaw/sandbox-base base image and layers the NemoClaw runtime Dockerfile on top.
Inside the sandbox:
- The selected compatible agent runs with the NemoClaw integration layer installed or generated for that agent.
- Inference calls are routed through OpenShell to the configured provider.
- Network egress is restricted by the baseline policy for the selected agent profile.
- Filesystem access is confined to
/sandboxand/tmpfor read-write access, with system paths read-only. - NemoClaw writes generated Hermes configuration into the sandbox, then the Hermes runtime exposes its own gateway and health surface.
- The image exposes health checks for the managed Hermes runtime.
- The image includes common runtime compatibility helpers such as Homebrew and a
pythontopython3symlink for tools that still invokepython.
Inference Routing
Inference requests from the agent never leave the sandbox directly. OpenShell intercepts them and routes them to the configured provider:
When you select the Model Router provider, the OpenShell gateway routes to a host-side router process instead of a single upstream model. The router selects from the configured pool, then calls the upstream NVIDIA endpoint with the credential held outside the sandbox.
Some model and provider combinations need agent-specific compatibility setup.
NemoClaw keeps those declarations under nemoclaw-blueprint/model-specific-setup/<agent>/ so fixes for each supported agent can be tested and reviewed independently.
Refer to Choose an Inference Provider for provider configuration details.
Provider Credential Storage
Provider credentials live in the OpenShell gateway store, not on the host filesystem. NemoClaw never writes them to host disk. The OpenShell L7 proxy injects values at egress. Refer to Credential Storage for the inspection, rotation, and migration flow.
Host-Side State and Config
NemoClaw keeps non-secret operator-facing state on the host rather than inside the sandbox.
The following environment variables configure optional services and local access.
For normal setup and reconfiguration, prefer nemohermes onboard over editing these files by hand.