Skip to content

Commit befc653

Browse files
committed
docs: fill manage sandbox command gaps
Fixes #3680 Signed-off-by: Deepak Jain <deepujain@gmail.com>
1 parent d4d1f9a commit befc653

17 files changed

Lines changed: 357 additions & 28 deletions

File tree

.agents/skills/nemoclaw-user-configure-inference/references/inference-options.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,46 @@ When you select it, NemoClaw starts the router proxy on the host, waits for its
7474
The sandbox does not call the router port directly.
7575

7676
The router model pool lives in `nemoclaw-blueprint/router/pool-config.yaml`.
77+
Edit that file to define which models the router can choose from.
7778
The default pool routes between NVIDIA-hosted Nemotron models and uses the `tolerance` value to choose the lowest-cost model whose predicted quality stays within the configured threshold.
79+
80+
```yaml
81+
routing:
82+
method: prefill
83+
checkpoint: llm-router/checkpoints/prefill_router_qwen08b.pt
84+
tolerance: 0.20
85+
encoder: Qwen/Qwen3.5-0.8B
86+
87+
models:
88+
- name: nano
89+
litellm_model: "openai/nvidia/nvidia/Nemotron-3-Nano-30B-A3B"
90+
cost_per_m_input_tokens: 0.05
91+
api_base: "https://inference-api.nvidia.com"
92+
93+
- name: super
94+
litellm_model: "openai/nvidia/nvidia/nemotron-3-super-v3"
95+
cost_per_m_input_tokens: 0.10
96+
api_base: "https://inference-api.nvidia.com"
97+
```
98+
99+
The `tolerance` parameter controls the accuracy-cost tradeoff.
100+
101+
| Value | Behavior |
102+
|-------|----------|
103+
| `0.0` | Always pick the most accurate model. |
104+
| `0.20` | Allow up to 20 percentage points below the best for a cheaper model (default). |
105+
| `1.0` | Always pick the cheapest model. |
106+
107+
The router runs on the host, not inside the sandbox.
108+
109+
```text
110+
Sandbox (agent) ──> OpenShell Gateway (L7 proxy) ──> Model Router (:4000) ──> NVIDIA API
111+
└── PrefillRouter selects model
112+
```
113+
114+
Credentials flow through the OpenShell provider system.
115+
The sandbox never sees raw API keys.
116+
78117
To use the router in scripted setup, set:
79118

80119
```console

.agents/skills/nemoclaw-user-configure-security/references/best-practices.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,15 @@ For sensitive workloads, use a reviewed host-side immutability workflow after in
184184

185185
- **DAC permissions (default).** The sandbox user owns `/sandbox/.openclaw` with mode `2770` (setgid `sandbox:sandbox`) and `openclaw.json` with mode `660`, so the agent and its group can read and write config directly. A reviewed host-side immutability workflow should compare the intended ownership and mode with the live sandbox filesystem before treating the config tree as locked.
186186
- **Config integrity hash.** The image includes a SHA256 hash of `openclaw.json`. In the default mutable state, `.config-hash` is sandbox-owned and is not a tamper-proof trust anchor, so startup does not fail closed on that hash. When the hash is root-owned and read-only, startup enforces it and refuses to start if the hash does not match.
187+
- **Content seal under shields up.**
188+
When `nemoclaw <name> shields up` runs against a clean lock, it captures a SHA-256 seal of `openclaw.json` and any other locked files into the host-side shields state file.
189+
On sealed sandboxes, every `shields status` call recomputes the hash inside the sandbox and surfaces drift on any mismatch, so a host-root tamper that flips perms back to `444 root:root` after rewriting the file is still flagged.
190+
Sandboxes locked before this seal landed have no recorded hash; perm-only verification cannot prove their bytes match the image-original, so the seal is **not** a retroactive proof of integrity for legacy state.
191+
The same refusal applies to partial seals where the locked file set grew after the existing seal was captured (some entries sealed, some missing).
192+
By default, `shields up` refuses to seal in either case and asks you to rebuild the sandbox first for a known-good baseline.
193+
`shields status` on a legacy lockdown surfaces `UP (UNSEALED — content integrity unknown for legacy lockdown)` and exits with status 2 so scripts treat it as a failure until the operator seals an explicit baseline.
194+
If you explicitly trust the current bytes, opt in via `NEMOCLAW_SHIELDS_ACCEPT_LEGACY_BASELINE=1`, which captures a seal over the current files and is acknowledged in the log line.
195+
Once a sandbox is sealed, `shields up` refuses to re-seal a tampered baseline; restore the original file or rebuild the sandbox before re-running.
187196
- **Gateway token environment.** The gateway exports `OPENCLAW_GATEWAY_TOKEN` and writes it to `/tmp/nemoclaw-proxy-env.sh` for interactive sandbox sessions. Keep this in mind when deciding whether a workload should run with mutable config or an immutable config posture.
188197

189198
| Aspect | Detail |

.agents/skills/nemoclaw-user-get-started/SKILL.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ $ curl -fsSL https://www.nvidia.com/nemoclaw.sh | bash
7474
On DGX Spark, DGX Station, and Windows WSL, an interactive installer offers express install after you accept the third-party software notice.
7575
Express install switches onboarding to non-interactive mode, allows `sudo` password prompts for required host changes, and selects the managed local inference path for that platform.
7676
Unless `NEMOCLAW_POLICY_TIER` is set, it applies sandbox policy in `suggested` mode with the `balanced` tier by default, using the base sandbox policy plus supported package, model, web-search, and local-inference presets.
77+
On DGX Spark, express install uses `my-spark-assistant` as the sandbox name unless `NEMOCLAW_SANDBOX_NAME` is already set.
7778
On WSL, express install selects the Windows-host Ollama setup path.
7879
Set `NEMOCLAW_NO_EXPRESS=1` to skip the express prompt, or set `NEMOCLAW_PROVIDER` before launching the installer when you want to choose a provider yourself.
7980

.agents/skills/nemoclaw-user-get-started/references/quickstart-hermes.md

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,6 @@
55
Use NemoHermes when you want NemoClaw to create an OpenShell sandbox that runs Hermes instead of the default OpenClaw agent.
66
The `nemohermes` command is an alias for `nemoclaw` with the Hermes agent pre-selected.
77

8-
**Experimental Feature:**
9-
10-
The Hermes agent option is experimental.
11-
Interfaces, defaults, and supported features may change without notice, and it is not recommended for production use.
12-
138
Review the [Prerequisites](prerequisites.md) before starting.
149
Docker must be installed, running, and reachable from the current shell before Hermes onboarding can build the sandbox image.
1510
On Linux, the installer can install Docker, start the service, and add your user to the `docker` group.

.agents/skills/nemoclaw-user-manage-sandboxes/SKILL.md

Lines changed: 56 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,16 @@ Check a specific sandbox's health, inference route, active connections, live pol
3636
$ nemoclaw my-assistant status
3737
```
3838

39+
Run the per-sandbox doctor when you need a readiness gate for automation or a deeper diagnostic bundle for one sandbox:
40+
41+
```console
42+
$ nemoclaw my-assistant doctor
43+
$ nemoclaw my-assistant doctor --json
44+
```
45+
46+
`doctor` checks the host, gateway, sandbox, inference route, messaging channels, and local services.
47+
Failed checks exit non-zero.
48+
3949
Use the host-level status command when you want the sandbox inventory plus host auxiliary service state, such as cloudflared:
4050

4151
```console
@@ -56,8 +66,27 @@ Stream logs while you reproduce a problem:
5666
$ nemoclaw my-assistant logs --follow
5767
```
5868

69+
Limit the history window with `--tail` (or `-n`) and `--since`:
70+
71+
```console
72+
$ nemoclaw my-assistant logs --tail 100
73+
$ nemoclaw my-assistant logs --since 10m
74+
```
75+
5976
The log command reads both OpenClaw gateway output and OpenShell audit events, so policy denials appear beside gateway logs.
6077

78+
## Retrieve Gateway Token
79+
80+
Print the OpenClaw gateway auth token when an in-container client or debug script needs to call the gateway directly:
81+
82+
```console
83+
$ nemoclaw my-assistant gateway-token
84+
$ TOKEN=$(nemoclaw my-assistant gateway-token --quiet)
85+
```
86+
87+
Use `--quiet` when the command is part of shell substitution and you want only the token on stdout.
88+
Treat the token as a secret.
89+
6190
## Collect Diagnostics
6291

6392
Collect diagnostics for bug reports or support handoff:
@@ -73,6 +102,7 @@ $ nemoclaw debug --quick --sandbox my-assistant
73102
```
74103

75104
The debug command gathers system information, Docker state, gateway logs, and sandbox status.
105+
The debug command auto-redacts known secrets before writing files, but review the tarball before sharing it outside your trusted support path.
76106

77107
## Manage Dashboard Ports
78108

@@ -116,15 +146,20 @@ For full details on port conflicts and overrides, refer to Port already in use (
116146
## Reconfigure or Recover
117147

118148
Recover from a misconfigured sandbox without re-running the full onboard wizard or destroying workspace state.
149+
Use `recover` when the sandbox container is still healthy but gateway or dashboard forwarding needs repair.
150+
Use `rebuild` when the sandbox image, agent runtime, provider bake-in, or container state needs to be recreated while preserving workspace state.
119151

120152
### Change Inference Model or API
121153

122154
Change the active model or provider at runtime without rebuilding the sandbox:
123155

124156
```console
157+
$ nemoclaw inference get
158+
$ nemoclaw inference get --json
125159
$ nemoclaw inference set --model <model> --provider <provider>
126160
```
127161

162+
`inference get` is the read-only companion for checking the current route before you change it.
128163
Refer to Switch Inference Providers (use the `nemoclaw-user-configure-inference` skill) for provider-specific model IDs and API compatibility notes.
129164

130165
### Restart the Gateway and Port Forward
@@ -187,7 +222,7 @@ Re-run the installer.
187222
Before it onboards anything, the installer calls `nemoclaw backup-all` (use the `nemoclaw-user-reference` skill) automatically, storing a snapshot of each running sandbox in `~/.nemoclaw/rebuild-backups/` as a safety net.
188223
If your existing gateway is from OpenShell earlier than `0.0.37`, the installer prompts before it runs the new automatic gateway upgrade path.
189224
The automatic path is offered only when the existing `nemoclaw` CLI supports `backup-all`; older installs must preserve sandbox state manually before retiring the gateway.
190-
For unattended installs, set `NEMOCLAW_ACCEPT_EXPERIMENTAL_OPENSHELL_UPGRADE=1`, or manually run `nemoclaw backup-all` and `openshell gateway destroy -g nemoclaw || openshell gateway destroy` before rerunning the installer as `curl -fsSL https://www.nvidia.com/nemoclaw.sh | NEMOCLAW_OPENSHELL_UPGRADE_PREPARED=1 bash`.
225+
For unattended installs, set `NEMOCLAW_ACCEPT_EXPERIMENTAL_OPENSHELL_UPGRADE=1`, or manually run `nemoclaw backup-all`, `openshell gateway remove nemoclaw || openshell gateway destroy -g nemoclaw || openshell gateway destroy` (both verbs are tried so the right one runs on either OpenShell release), and `sudo pkill -f openshell-gateway` if a privileged host gateway remains before rerunning the installer as `curl -fsSL https://www.nvidia.com/nemoclaw.sh | NEMOCLAW_OPENSHELL_UPGRADE_PREPARED=1 bash`.
191226

192227
```console
193228
$ curl -fsSL https://www.nvidia.com/nemoclaw.sh | bash
@@ -243,6 +278,18 @@ Your existing container keeps serving traffic until the new image is ready.
243278

244279
## Uninstall
245280

281+
### Garbage Collect Orphan Images
282+
283+
After destroying or rebuilding older sandboxes, remove Docker images that are no longer referenced by registered sandboxes:
284+
285+
```console
286+
$ nemoclaw gc --dry-run
287+
$ nemoclaw gc --yes
288+
```
289+
290+
Use `--dry-run` first to preview deletions.
291+
Use `--force` only when you intentionally want to remove images referenced by stopped containers.
292+
246293
To remove NemoClaw and all resources created during setup, run the CLI's built-in uninstall command:
247294

248295
```bash
@@ -255,6 +302,14 @@ nemoclaw uninstall
255302
| `--keep-openshell` | Leave OpenShell binaries installed. |
256303
| `--delete-models` | Also remove NemoClaw-pulled Ollama models. |
257304

305+
**Note:**
306+
307+
`nemoclaw uninstall` preserves `~/.nemoclaw/rebuild-backups/` (host-side snapshots that `nemoclaw <name> snapshot create` and `nemoclaw backup-all` write), `~/.nemoclaw/backups/` (workspace backups that `scripts/backup-workspace.sh` writes), and `~/.nemoclaw/sandboxes.json` (the sandbox registry) by default.
308+
Uninstall removes every other entry under `~/.nemoclaw/`.
309+
Interactive runs prompt before they remove the preserved entries; the default answer keeps them.
310+
For non-interactive runs (`--yes`, `NEMOCLAW_NON_INTERACTIVE=1`, or a non-TTY shell), set `NEMOCLAW_UNINSTALL_DESTROY_USER_DATA=1` to acknowledge data loss and remove the preserved entries as well.
311+
See `nemoclaw uninstall` (use the `nemoclaw-user-reference` skill) for the full preservation contract.
312+
258313
`nemoclaw uninstall` runs the version-pinned `uninstall.sh` that shipped with your installed CLI, so it does not fetch anything over the network at uninstall time.
259314

260315
If the `nemoclaw` CLI is missing or broken, fall back to the hosted script:

.agents/skills/nemoclaw-user-manage-sandboxes/references/messaging-channels.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,9 @@ Telegram uses a bot token from [BotFather](https://t.me/BotFather).
4141
Open Telegram, send `/newbot` to [@BotFather](https://t.me/BotFather), follow the prompts, and copy the token.
4242
For Telegram group chats, disable privacy mode before testing group replies: in @BotFather, run `/setprivacy`, choose the bot, then choose **Disable**.
4343
After changing privacy mode, remove the bot from each Telegram group and add it back so Telegram applies the new delivery setting to that group.
44-
`TELEGRAM_ALLOWED_IDS` is a comma-separated list of Telegram user IDs for DM access.
44+
`TELEGRAM_ALLOWED_IDS` is a comma-separated list of Telegram user or private-chat IDs for DM access.
45+
For compatibility with older QA scripts, NemoClaw also treats `TELEGRAM_AUTHORIZED_CHAT_IDS` and `TELEGRAM_CHAT_ID` as aliases, but new automation should use `TELEGRAM_ALLOWED_IDS`.
46+
Keep these aliases until QA automation and public repro templates have stopped exporting them for at least one full release.
4547
Group chats stay open by default so rebuilt sandboxes do not silently drop Telegram group messages because of an empty group allowlist.
4648
Set `TELEGRAM_REQUIRE_MENTION=1` to make the bot reply in Telegram groups only when users mention it.
4749
Pairing and `TELEGRAM_ALLOWED_IDS` still govern direct messages.
@@ -158,6 +160,8 @@ If applying the preset fails, NemoClaw warns and tells you to re-apply manually
158160
Choose the rebuild so the running sandbox image picks up the new channel.
159161
For Telegram, Discord, and Slack, `channels add` also checks the rebuilt runtime for the selected bridge and reports startup, credential, or missing-plugin warnings before returning.
160162
If you need optional channel settings such as `TELEGRAM_ALLOWED_IDS`, `TELEGRAM_REQUIRE_MENTION`, `DISCORD_SERVER_ID`, `DISCORD_USER_ID`, `DISCORD_REQUIRE_MENTION`, `SLACK_ALLOWED_USERS`, or `SLACK_ALLOWED_CHANNELS`, export them before the rebuild starts.
163+
Telegram Bot API `sendMessage` calls prove outbound delivery from the bot; to test inbound agent replies, send a message from the Telegram client as an allowed user.
164+
For a repeatable live Telegram reply check, run `test/e2e/test-messaging-providers.sh` with `TELEGRAM_BOT_TOKEN_REAL`, `TELEGRAM_AUTHORIZED_CHAT_IDS` or `TELEGRAM_CHAT_ID`, and `NEMOCLAW_TELEGRAM_INBOUND_REPLY_E2E=1`.
161165
If you defer the rebuild, apply the change later:
162166

163167
```console

.agents/skills/nemoclaw-user-manage-sandboxes/references/runtime-controls.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,24 @@ The table below maps each commonly changed item to the layer that owns it and th
2525
| Sandbox name | **Locked at creation** | Re-onboard with a different `--name` |
2626
| GPU passthrough enable / device selector | **Locked at creation** | Re-onboard with `--gpu` / `--sandbox-gpu-device` |
2727
| Agents allow-list (`agents.list` in `openclaw.json`) | Runtime — hot-reloaded by OpenClaw on config change | Prefer agent or NemoClaw commands that keep host and sandbox state aligned |
28+
| `/etc/hosts` aliases inside the sandbox | Runtime — updates the sandbox pod template and active hosts file | `nemoclaw <name> hosts-add <hostname> <ip>`, `hosts-list`, and `hosts-remove` |
2829
| `openclaw.json` keys (general — model, agents.list, web.backend, channel config, etc.) | Mixed. Individual keys still follow the rebuild rules in the rows above, such as provider switch requiring rebuild even after editing the JSON. | Prefer NemoClaw host commands so the host registry and rebuilt image stay aligned |
2930

3031
If a row above conflicts with what you observe, the runtime source of truth inside the sandbox is `/opt/nemoclaw/openclaw.json`; the host registry caches metadata but the image and OpenClaw read from the in-sandbox file.
3132

33+
## Override DNS Inside the Sandbox
34+
35+
Use host aliases when a sandbox needs to reach a private hostname that normal DNS cannot resolve:
36+
37+
```console
38+
$ nemoclaw my-assistant hosts-add internal.example.com 10.0.0.42
39+
$ nemoclaw my-assistant hosts-list
40+
$ nemoclaw my-assistant hosts-remove internal.example.com
41+
```
42+
43+
Aliases are useful for private test services, local gateways, and temporary lab names.
44+
Use `hosts-add --dry-run` to validate the entry without changing the sandbox.
45+
3246
## See also
3347

3448
The mutability table above is a consolidated index of information that lives in more detail on per-topic pages:

.agents/skills/nemoclaw-user-manage-sandboxes/references/workspace-files.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,20 @@ You can edit them in two ways:
9898
1. Ask your agent to update its persona, memory, or user context.
9999
2. Use `nemoclaw <name> connect` to open a terminal inside the sandbox and edit files directly, or use `openshell sandbox upload` to push edited files from your host.
100100

101+
## Mount Sandbox Files on the Host
102+
103+
For longer editing sessions, mount a sandbox path onto the host with SSHFS and use your local editor:
104+
105+
```console
106+
$ nemoclaw my-assistant share mount /sandbox/.openclaw/workspace ~/my-assistant-workspace
107+
$ nemoclaw my-assistant share status
108+
$ nemoclaw my-assistant share unmount ~/my-assistant-workspace
109+
```
110+
111+
`share mount` defaults to the sandbox workspace when no path is provided.
112+
The mount remains active until you unmount it or destroy the sandbox.
113+
If the command reports that `sshfs` is missing, install it on the host and rerun the mount command.
114+
101115
## Next Steps
102116

103117
- Set Up Task-Specific Sub-Agents (use the `nemoclaw-user-configure-inference` skill)

0 commit comments

Comments
 (0)