> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.nvidia.com/nemoclaw/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.nvidia.com/nemoclaw/_mcp/server.

# NemoClaw Architecture Overview

> Learn how NemoClaw combines a host CLI, sandbox plugin, and versioned blueprint to run supported agents in a controlled sandbox.

This page explains how NemoClaw runs supported agents inside an OpenShell sandbox and how the gateway connects the agent to inference, integrations, and policy.

NemoClaw does not replace OpenShell or your chosen agent runtime.
NemoClaw packages them as a repeatable setup with a host CLI, a versioned blueprint, default policies, inference setup, and state helpers.

Deep Agents sandboxes receive managed `dcode` configuration under `/sandbox/.deepagents` during onboarding instead of the OpenClaw plugin path.
You can use that setup directly or adapt it for your own OpenShell integration.

## High-Level Flow

NemoClaw keeps the user workflow on the host while OpenShell enforces the sandbox boundary.
The gateway sits between NemoClaw control, the sandbox, inference providers, and external integrations.
That placement lets NemoClaw configure the environment without giving the agent direct access to host credentials or uncontrolled network egress.

```mermaid
flowchart TB
    subgraph TOP_ROW[" "]
        direction LR
        TOP_USERS["Users + Operators<br /><small>Developer, admin<br />end-user channels</small>"]:::hidden
        TOP_CONTROL["NemoClaw Control<br /><small>CLI, installer, dashboard<br />onboard + configure</small>"]:::hidden
        INFERENCE["Inference<br /><small>NVIDIA Endpoints, NIM<br />or compatible APIs</small>"]:::inference
        TOP_SANDBOX["NemoClaw Sandbox<br /><small>Selected agent runtime<br />integration, blueprints, tools</small>"]:::hidden
        TOP_STATE["State + Artifacts<br /><small>Config, credentials, logs<br />workspace, policy, transcripts</small>"]:::hidden

        TOP_USERS ~~~ TOP_CONTROL ~~~ INFERENCE ~~~ TOP_SANDBOX ~~~ TOP_STATE
    end

    subgraph MAIN_ROW[" "]
        direction LR
        USERS["Users + Operators<br /><small>Developer, admin<br />end-user channels</small>"]:::users
        CONTROL["NemoClaw Control<br /><small>CLI, installer, dashboard<br />onboard + configure</small>"]:::control
        GATEWAY["OpenShell Gateway<br /><small>Sandbox lifecycle<br />networking + policy</small>"]:::gateway
        SANDBOX["NemoClaw Sandbox<br /><small>Selected agent runtime<br />integration, blueprints, tools</small>"]:::sandbox
        STATE["State + Artifacts<br /><small>Config, credentials, logs<br />workspace, policy, transcripts</small>"]:::state

        USERS --> CONTROL
        CONTROL --> GATEWAY
        GATEWAY -->|"egress via gateway"| SANDBOX
        SANDBOX -.-> STATE
    end

    subgraph BOTTOM_ROW[" "]
        direction LR
        BOTTOM_USERS["Users + Operators<br /><small>Developer, admin<br />end-user channels</small>"]:::hidden
        BOTTOM_CONTROL["NemoClaw Control<br /><small>CLI, installer, dashboard<br />onboard + configure</small>"]:::hidden
        INTEGRATIONS["Integrations<br /><small>Messaging, MCP<br />GitHub, npm, PyPI, HF</small>"]:::integrations
        BOTTOM_SANDBOX["NemoClaw Sandbox<br /><small>Selected agent runtime<br />integration, blueprints, tools</small>"]:::hidden
        BOTTOM_STATE["State + Artifacts<br /><small>Config, credentials, logs<br />workspace, policy, transcripts</small>"]:::hidden

        BOTTOM_USERS ~~~ BOTTOM_CONTROL ~~~ INTEGRATIONS ~~~ BOTTOM_SANDBOX ~~~ BOTTOM_STATE
    end

    GATEWAY -->|"inference via gateway"| INFERENCE
    GATEWAY -->|"integrations via gateway"| INTEGRATIONS

    style TOP_ROW fill:transparent,stroke:transparent
    style MAIN_ROW fill:transparent,stroke:transparent
    style BOTTOM_ROW fill:transparent,stroke:transparent
    classDef hidden fill:transparent,stroke:transparent,color:transparent,stroke-width:0px
    classDef users fill:#d9ecf7,stroke:#6aa6c8,color:#1a1a1a,stroke-width:2px
    classDef control fill:#d7f0dc,stroke:#5a9f70,color:#1a1a1a,stroke-width:2px
    classDef gateway fill:#fff1be,stroke:#c4992f,color:#1a1a1a,stroke-width:2px
    classDef sandbox fill:#e7ddff,stroke:#8c6ccf,color:#1a1a1a,stroke-width:2px
    classDef state fill:#f7dfe4,stroke:#c86d7d,color:#1a1a1a,stroke-width:2px
    classDef inference fill:#d5f1f1,stroke:#4fa7a7,color:#1a1a1a,stroke-width:2px
    classDef integrations fill:#fce6d7,stroke:#c77e55,color:#1a1a1a,stroke-width:2px
```

The diagram has the following components:

| Component           | Role in the flow                                                                                                      |
| ------------------- | --------------------------------------------------------------------------------------------------------------------- |
| Users and operators | Start from the CLI, installer, dashboard, or an end-user channel.                                                     |
| NemoClaw control    | Collects configuration, runs onboarding, prepares the blueprint, and asks OpenShell to create or update resources.    |
| OpenShell gateway   | Owns sandbox lifecycle, networking, policy enforcement, inference routing, and integration egress.                    |
| NemoClaw sandbox    | Runs the onboarded agent with the selected blueprint contents and supporting tools.                                   |
| Inference           | Receives model requests through the gateway, using NVIDIA endpoints, NIM, or compatible APIs.                         |
| Integrations        | Reach messaging services, MCP servers, GitHub, package indexes, or model hubs through gateway-managed egress.         |
| State and artifacts | Store configuration, credentials, logs, workspace files, policies, and transcripts outside the running agent process. |

For repository layout, file paths, and deeper diagrams, refer to [Architecture](../reference/architecture).

## Design Principles

NemoClaw follows these architecture principles.

Versioned blueprint
: Host-side orchestration uses a versioned blueprint and runner that can evolve on its own release cadence.
&#x20;The OpenClaw sandbox plugin stays small and stable inside the container.

Respect CLI boundaries
: The  CLI is the primary interface for sandbox management.

Supply chain safety
: Blueprint artifacts are immutable, versioned, and digest-verified before execution.

OpenShell-backed lifecycle
: NemoClaw orchestrates OpenShell resources under the hood, but  onboard is the supported operator entry point for creating or recreating NemoClaw-managed sandboxes.

Reproducible setup
: Running setup again recreates the sandbox from the same blueprint and policy definitions.

## CLI, Plugin, and Blueprint

NemoClaw separates host orchestration from sandbox image contents.

* The *host CLI* runs onboarding, validates provider choices, stores configuration, and calls OpenShell commands for gateway, provider, sandbox, and policy operations.

* NemoClaw writes Deep Agents runtime configuration into `/sandbox/.deepagents` during onboarding, including `config.toml`, managed MCP projection state, and the inference route used by `dcode`.

* The *blueprint* is a versioned YAML package with the sandbox image, policy, inference profile, and supporting assets.
  The runner resolves and verifies the blueprint before applying it through OpenShell.

This separation keeps agent-specific sandbox assets focused and lets host orchestration and blueprint contents evolve on separate release cadences.

## Sandbox Creation

When you run  onboard, NemoClaw creates an OpenShell sandbox that runs your selected agent in an isolated container.
The host CLI and blueprint runner orchestrate this process through the OpenShell CLI:

1. NemoClaw resolves the blueprint, checks version compatibility, and verifies the digest.
2. The onboarding flow determines which OpenShell resources to create or update, such as the gateway, inference providers, sandbox, and network policy.
3. The runner calls OpenShell CLI commands to create the sandbox and configure each resource.

After the sandbox starts, the agent runs inside it with all network, filesystem, and inference controls in place.

## Inference Routing

Inference requests from the agent never leave the sandbox directly.
OpenShell intercepts every inference call and routes it to the configured provider.
During onboarding, NemoClaw validates the selected provider and model, configures the OpenShell route, and bakes the matching model reference into the sandbox image.
The sandbox then talks to `inference.local`, while the host owns the actual provider credential and upstream endpoint.
When you select the Model Router provider, `inference.local` routes to a host-side router that chooses from the configured NVIDIA model pool for each request.

For Deep Agents, the managed `dcode` runtime reads the OpenAI-compatible route that NemoClaw writes into `/sandbox/.deepagents/config.toml`.

## Protection Layers

The sandbox starts with a default policy that controls network egress, filesystem access, process privileges, and inference routing.

| Layer      | What it protects                                                         | When it applies             |
| ---------- | ------------------------------------------------------------------------ | --------------------------- |
| Network    | Blocks unauthorized outbound connections.                                | Hot-reloadable at runtime.  |
| Filesystem | Restricts system paths to read-only; `/sandbox` and `/tmp` are writable. | Locked at sandbox creation. |
| Process    | Blocks privilege escalation and dangerous syscalls.                      | Locked at sandbox creation. |
| Inference  | Reroutes model API calls to controlled backends.                         | Hot-reloadable at runtime.  |

When the agent tries to reach an unlisted host, OpenShell blocks the request and surfaces it in the TUI for operator approval.
Approved endpoints persist for the current session but are not saved to the baseline policy file.
NemoClaw's runtime context tells supported agents to try allowed network and filesystem actions first, then report whether policy denial, DNS, timeout, TLS, or filesystem access caused a failure.

## Next Steps

* Read [Ecosystem](ecosystem) for stack-level relationships and NemoClaw versus OpenShell-only paths.
* Follow [Quickstart with Deep Agents](../get-started/quickstart) to launch your first sandbox.
* Read [Architecture](../reference/architecture) for the full technical structure, including file layouts and the blueprint lifecycle.
* Read [Inference Options](../inference/inference-options) for detailed provider configuration.
* For details on the baseline rules, refer to [Network Policies](../reference/network-policies).