Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ Thumbs.db

# Project-specific
.nemoclaw-maintainer/
# Legacy DORI status file; no longer read, kept ignored to prevent accidental commits.
.dori_user_status
draft_newsletter_*
research/
Expand Down
62 changes: 22 additions & 40 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -297,46 +297,28 @@ If the command trace contains no reviewer-request write, report the event as an

### NVIDIA DORI Routing

Use the ignored `.dori_user_status` file at the repository root to select the
documentation path. The file can contain only one line: `authorized` or
`external`.

1. Read `.dori_user_status` before checking for DORI.
- If the value is `external`, use the
[Writing Style Guide](docs/AGENTS.md#writing-style-guide) without checking
DORI.
- If the value is `authorized`, continue to step 2.
- If the file is absent or invalid, ask the user to select one of these
options. Use selectable options when the host supports them. Otherwise,
present the numbered list:

1. Select `authorized` if you are an NVIDIA employee or authorized
contractor with access to `gitlab-master.nvidia.com`.
2. Select `external` for all other contributors.

- Normalize an unambiguous response and write only the corresponding
lowercase value to `.dori_user_status`.
- Store `authorized` for option 1, `1`, `authorized`, or a response that
clearly selects `authorized`, such as `yes, authorized`.
- Store `external` for option 2, `2`, `external`, or a response that
clearly selects `external`.
- If the response is ambiguous, selects both options, or does not select
either option, ask again and do not write the file.
- If the user declines to answer or store a value, do not create the file.
Use the [Writing Style Guide](docs/AGENTS.md#writing-style-guide).
- Tell the user that deleting `.dori_user_status` resets the choice.
2. Only after an `authorized` value, check whether the current agent exposes
`dori_handle` or `dori_route`.
- If DORI is available, use it for task routing. When `dori_collections` is
available, verify that a collection source contains
`tech-docs/skill-library`.
- If DORI is unavailable or the Skill Library is missing, follow
[NVIDIA DORI Setup](docs/DORI_SETUP.md).

The stored value does not prove access or approve installation or host
configuration. Use the
[Writing Style Guide](docs/AGENTS.md#writing-style-guide) if setup is declined
or fails.
Select the documentation path from current host capabilities.
Do not ask the user to classify themselves or store repository-scoped identity
state during a normal documentation task.

1. Check whether the current agent exposes `dori_handle` or `dori_route` and
`dori_collections`.
If the user explicitly asks not to use DORI, use the
[Writing Style Guide](docs/AGENTS.md#writing-style-guide) instead.
2. When those tools are available, list the installed collections.
- If a collection source contains `tech-docs/skill-library`, use DORI for
task routing.
- If the collection is missing, inaccessible, or cannot be verified,
continue with the
[Writing Style Guide](docs/AGENTS.md#writing-style-guide).
3. When the DORI tools are unavailable, continue with the Writing Style Guide.
Do not inspect a shell-visible CLI, install software, or configure the host
during a normal documentation task.
4. Use [NVIDIA DORI Setup](docs/DORI_SETUP.md) only when the user explicitly
asks to install or configure DORI.

Capability detection does not approve installation or host configuration.
DORI unavailability must not block documentation work.

## PR Requirements

Expand Down
13 changes: 7 additions & 6 deletions docs/AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,10 @@ Apply these rules to documentation, examples, headings, UI text, and release not

## Use DORI for Complete NVIDIA Doc Tools

Follow [NVIDIA DORI Routing](../AGENTS.md#nvidia-dori-routing) before checking for DORI.
Only an `authorized` value can select the DORI path.
When root routing selects that path, you can use DORI for additional documentation tools.
Complete the documentation before the developer opens the pull or merge request.
Follow [NVIDIA DORI Routing](../AGENTS.md#nvidia-dori-routing).
Use the following DORI workflow only when current host capabilities include the
verified NVIDIA documentation Skill Library. Complete the documentation before
the developer opens the pull or merge request.

1. Route the documentation task through DORI. Include the changed source files,
the user-visible impact, the documentation that might need updates, and the
Expand All @@ -91,8 +91,9 @@ Complete the documentation before the developer opens the pull or merge request.
4. When the host does not support subagents, complete the same documentation
work in the primary task.

If root routing directs you to the Writing Style Guide, or if DORI is unavailable, inaccessible, declined, or fails, do not block the change.
Continue using the Writing Style Guide above.
If the verified Skill Library is unavailable, inaccessible, or fails, skip DORI.
Do not attempt routing, prompt for setup, or ask for or persist a user
classification. Continue using the Writing Style Guide above.

## Before Editing

Expand Down
14 changes: 7 additions & 7 deletions docs/DORI_SETUP.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@

# NVIDIA DORI Setup

Use this guide only after the root `AGENTS.md` reads an `authorized` value from `.dori_user_status`.
The stored value does not prove private access or approve installation or host configuration.

If the status is not `authorized`, stop this setup and use the checked-in [Writing Style Guide](AGENTS.md#writing-style-guide).
Use this guide only when the user explicitly asks to install or configure NVIDIA DORI.
Before inspecting or installing private components, ask the user to confirm that they can access `gitlab-master.nvidia.com`.
If the user does not confirm access, stop this setup and use the checked-in [Writing Style Guide](AGENTS.md#writing-style-guide).
Access confirmation does not approve installation or host configuration.

## Inspect the Environment

Expand Down Expand Up @@ -50,7 +50,7 @@ Before an installation or host configuration change, ask:
> Do you want me to install or configure these components in your user environment?

Continue only after explicit approval.
An `authorized` status does not approve these changes.
The user's private-source access confirmation does not approve these changes.
If the user declines, use the [Writing Style Guide](AGENTS.md#writing-style-guide).

## Install Missing Components
Expand Down Expand Up @@ -103,8 +103,8 @@ Until the current agent exposes DORI tools, continue the original task with the
- Never search for, request, print, copy, export, or embed a token, password, cookie, SSH key, or credential-bearing URL.
- Let `uv`, Git, and DORI use credentials that the user already configured.
If access is denied or authentication is missing, stop and refer to the internal DORI installation guide.
- Never stage or commit `.dori_user_status`.
Do not treat its value as proof of employment, authorization, or current private access.
- Do not create repository-scoped identity or authorization files.
Confirm private-source access only for an explicit setup request.
- Do not bypass approval controls for writes outside the repository.
- Do not create or commit project-scoped DORI state or MCP configuration without separate repository-owner authorization.
- Do not retry a failed installation in the same task.
148 changes: 4 additions & 144 deletions docs/get-started/quickstart-langchain-deepagents-code.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -133,150 +133,9 @@ The image includes `ripgrep`, and ordinary sessions suppress the optional Tavily

</Accordion>

<Accordion title="Use the managed runtime">
### Choose the Default Sandbox

When you manage multiple sandboxes, use the Deep Agents alias to promote a registered Deep Agents Code sandbox to the default.

```bash
nemo-deepagents use <sandbox-name>
```

The command updates NemoClaw's host-side registry.
It does not modify the sandbox or the `dcode` configuration.

### Use the Harness

Connect to the sandbox, then launch the terminal UI.

```bash
nemoclaw <sandbox-name> connect
dcode
```

For a single headless task, run:

```bash
dcode -n "Summarize this repository"
```

For automation, add `--json`.
The managed runtime writes exactly one UTF-8 JSON object to stdout and suppresses other stdout text.
Progress is suppressed.
Warnings and diagnostics go to stderr.

```bash
dcode -n "Summarize this repository" --json
```

A successful run has this version 1 envelope:

```json
{
"schema_version": 1,
"command": "non-interactive",
"data": {
"status": "success",
"exit_code": 0,
"response": "The repository contains...",
"completion": {
"thread_id": "thread-id",
"duration_ms": 842,
"response_bytes": 26
}
}
}
```

`response` contains the exact final assistant text on success and is `null` on failure.
`response_bytes` is its UTF-8 byte length on success and is `0` on failure.
The process exit code matches `data.exit_code`.
The terminal statuses are `success`, `agent_failure`, `process_failure`, `timeout`, `turn_limit`, `cancelled`, and `output_limit`.
A timeout exits `124`, cancellation exits `130`, and other failures exit nonzero.

The complete serialized envelope is limited to 1 MiB.
If the response cannot fit, the runtime discards it and emits a bounded `output_limit` failure envelope.
If it cannot write the envelope, the command exits nonzero and reports the write failure on stderr; callers must reject empty, malformed, additional, or unsupported-version stdout.

The managed `dcode`, `dcode.real`, and `deepagents-code` launchers use `/opt/venv/bin/python3 -I` to run the pinned package with an isolated import path and `HOME=/sandbox`.
For interactive and headless sessions, each launcher supervises its own process descendants so completion, terminal exit, or disconnect terminates the associated LangGraph server tree without affecting another session.
After a disconnect, the supervisor uses bounded grace periods before it kills unresponsive processes from that session.
The supervisor runs inside the Linux OpenShell sandbox and fails closed if invoked outside Linux; the host operating system does not change this sandbox guarantee.
They disable Deep Agents Code package update checks and the LangGraph server version check, block CLI and TUI update/install commands, and disable nested remote sandbox providers, remote async subagents, MCP commands and project auto-loading, startup commands, executable hooks, ACP mode, interpreter tool calling, shell allow-list overrides, native LangSmith tracing, and ambient OpenTelemetry exporter configuration.
The managed model constructor accepts only Deep Agents Code's `openai` provider path and reads its endpoint from a root-owned image file.
It supplies the non-secret gateway placeholder key and ignores mutable provider classes, credentials, endpoints, and constructor parameters in Deep Agents Code config.
CLI and TUI model parameter overrides and custom rubric models are blocked.
For headless runs, `--max-retries` remains available after Deep Agents Code validates the retry count.
The managed boundary discards every other model parameter, including credentials, endpoints, and provider settings.
Project and user-defined subagents remain available, but they inherit the managed chat model instead of accepting their own model override.
MCP servers registered through `nemoclaw <sandbox-name> mcp add` remain available through NemoClaw's dedicated `/sandbox/.deepagents/.nemoclaw-mcp.json` projection and OpenShell egress policy.
Project and user MCP files are never auto-loaded.
Sandboxes with the older managed MCP v1 runtime must rebuild before `mcp add` or `mcp restart`; remove, rebuild, and destroy can still scrub exact registry-owned legacy entries without claiming unrelated user content.
Before launch, NemoClaw validates and canonicalizes the complete managed file as HTTPS-only definitions with exact OpenShell credential placeholders, then gives Deep Agents Code a process-local, integrity-bound snapshot for server starts and restarts.
It prefers a sealed in-memory file when available; the OpenShell-compatible anonymous read-only descriptor fallback verifies the inode, size, and SHA-256 digest and fails closed on drift.
Stdio commands, extra headers, raw credentials, and unrelated top-level configuration fail closed.
For authenticated MCP setup and credential rotation, see [Add an MCP Server](../manage-sandboxes/mcp-servers/add-an-mcp-server) and [Manage MCP Servers](../manage-sandboxes/mcp-servers/manage-mcp-servers).
This isolated-mode guarantee applies to those managed launchers, not arbitrary Python commands in the sandbox.

Interactive shell execution and other destructive tools remain behind human-in-the-loop approval prompts by default.
Thread-wide auto-approval is unavailable unless you enable the managed thread opt-in capability, and shell allow-list auto-approval remains disabled.
Headless `dcode -n` is an explicit automation boundary.
It has no approval UI and automatically approves non-shell tool requests, including file writes and edits.
The managed headless path still disables shell execution, startup commands, interpreter tool calling, executable hooks, unmanaged MCP configuration, nested remote sandboxes, remote async subagents, and alternate model routes.
Use the interactive TUI when you need to inspect each destructive tool request before it runs.

#### Configure Thread Auto-Approval

Managed Deep Agents sandboxes keep interactive thread auto-approval disabled by default.
In this mode, the TUI auto-approval choice and `dcode -y` fail closed.

Enable the capability for a named sandbox through a transactional rebuild because NemoClaw bakes the capability into the managed image.

```bash
nemo-deepagents <sandbox-name> rebuild --dcode-auto-approval thread-opt-in --yes
```

The `thread-opt-in` setting grants permission to activate auto-approval, but it does not activate auto-approval by itself.
For each thread, select **Auto-approve for this thread** in the approval menu or start that `dcode` process with `dcode -y`.
The TUI shows the upstream active-state indicator and a warning while the current thread can run tool calls, including shell commands, without further confirmation.

NemoClaw resets the active state when you start a new `dcode` process, run `/clear` or `/force-clear`, switch or resume a different thread, or switch agents.
You must opt in again after each reset.
The host-side status command reports the configured capability, not whether one live TUI thread currently has auto-approval active.

```bash
nemo-deepagents <sandbox-name> status
```

Thread auto-approval does not bypass OpenShell network policy, credential isolation, the managed inference route, managed MCP validation, or the other Deep Agents runtime restrictions described above.
Headless `dcode -n` remains a separate automation boundary with non-shell auto-approval and managed shell execution disabled.

Return the sandbox to the default posture with another transactional rebuild.

```bash
nemo-deepagents <sandbox-name> rebuild --dcode-auto-approval disabled --yes
```

To confirm which sandbox a session is in, run the identity command:

```bash
dcode status
```

The command prints the sandbox name, NemoClaw harness, active `dcode` agent, configured inference route, upstream provider, model, endpoint, and runtime, then exits without starting the interactive UI.
`dcode whoami` and `dcode identity` are aliases.
`dcode --help` lists the managed aliases before the upstream Deep Agents Code help.
The sandbox name resolves when you run the command from a `nemoclaw <sandbox-name> connect` shell, which loads the NemoClaw runtime environment.

Inspect the generated Deep Agents configuration from the host with:

```bash
nemo-deepagents <sandbox-name> config get
```

NemoClaw parses `config.toml`, removes gateway auth data, and redacts credential-shaped values before printing it.
`config set` is not supported for this image-baked configuration; re-onboard the named sandbox to change its managed provider or model selection.

<Accordion title="Run the managed runtime">
<a id="use-the-harness"></a>
Continue with [Run Deep Agents Code](../manage-sandboxes/operate-sandboxes/run-deep-agents-code) for sandbox selection, interactive and headless tasks, the JSON output contract, runtime restrictions, thread auto-approval, and identity checks.
</Accordion>

<Accordion title="Manage Python and sandbox state">
Expand Down Expand Up @@ -402,6 +261,7 @@ There is no dashboard port or long-running gateway process for this harness.

## Next Steps

- [Run Deep Agents Code](../manage-sandboxes/operate-sandboxes/run-deep-agents-code) explains interactive and headless operation, automation output, and approval boundaries.
- [Choose an Inference Provider](../inference/learn-and-choose/choose-inference-provider) explains how to choose a provider and model.
- [Understand Sandbox State](../manage-sandboxes/state-and-backups/understand-sandbox-state) explains `/sandbox/.deepagents`, memory, skills, and what NemoClaw preserves.
- [Create and Restore Snapshots](../manage-sandboxes/state-and-backups/create-and-restore-snapshots) explains snapshot and rebuild preservation.
Expand Down
12 changes: 12 additions & 0 deletions docs/index.yml
Original file line number Diff line number Diff line change
Expand Up @@ -406,6 +406,9 @@ navigation:
- page: "Community Solutions"
path: _build/agent-variants/resources/community-contributions.openclaw.generated.mdx
slug: community-contributions
- page: "Engineer Documentation for AI Agents"
path: _build/agent-variants/resources/engineer-agentic-documentation.openclaw.generated.mdx
slug: engineer-agentic-documentation
- link: "Discord"
href: https://discord.gg/XFpfPv9Uvx
- link: "Report Vulnerabilities"
Expand Down Expand Up @@ -575,6 +578,9 @@ navigation:
- page: "Run Sandboxes"
path: _build/agent-variants/manage-sandboxes/run-sandboxes.deepagents.generated.mdx
slug: run-sandboxes
- page: "Run Deep Agents Code"
path: manage-sandboxes/run-deep-agents-code.mdx
slug: run-deep-agents-code
- page: "Recover and Rebuild Sandboxes"
path: _build/agent-variants/manage-sandboxes/recover-rebuild-sandboxes.deepagents.generated.mdx
slug: recover-and-rebuild-sandboxes
Expand Down Expand Up @@ -719,6 +725,9 @@ navigation:
- page: "Community Solutions"
path: _build/agent-variants/resources/community-contributions.deepagents.generated.mdx
slug: community-contributions
- page: "Engineer Documentation for AI Agents"
path: _build/agent-variants/resources/engineer-agentic-documentation.deepagents.generated.mdx
slug: engineer-agentic-documentation
- link: "Report Vulnerabilities"
href: https://github.com/NVIDIA/NemoClaw/blob/main/SECURITY.md
- page: "License"
Expand Down Expand Up @@ -1098,6 +1107,9 @@ navigation:
- page: "Community Solutions"
path: _build/agent-variants/resources/community-contributions.hermes.generated.mdx
slug: community-contributions
- page: "Engineer Documentation for AI Agents"
path: _build/agent-variants/resources/engineer-agentic-documentation.hermes.generated.mdx
slug: engineer-agentic-documentation
- link: "Report Vulnerabilities"
href: https://github.com/NVIDIA/NemoClaw/blob/main/SECURITY.md
- page: "License"
Expand Down
Loading
Loading