nemoclaw-user-manage-policy
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinese<!-- SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -->
<!-- SPDX-License-Identifier: Apache-2.0 -->
<!-- SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -->
<!-- SPDX-License-Identifier: Apache-2.0 -->
Customize the Sandbox Network Policy
自定义沙箱网络策略
Gotchas
注意事项
- Custom preset hosts bypass NemoClaw's review process and can widen sandbox egress to arbitrary destinations.
- 自定义预设主机可绕过NemoClaw的审核流程,可能将沙箱出站范围扩大到任意目标地址。
Prerequisites
前提条件
- A running NemoClaw sandbox for dynamic changes, or the NemoClaw source repository for static changes.
- The OpenShell CLI on your .
PATH
Add, remove, or modify the endpoints that the sandbox is allowed to reach.
The sandbox policy is defined in a declarative YAML file in the NemoClaw repository and enforced at runtime by NVIDIA OpenShell.
NemoClaw supports both static policy changes that persist across restarts and dynamic updates applied to a running sandbox through the OpenShell CLI.
Note:
If the sandbox needs to reach an HTTP service running on the host, expose the service on a host IP that the OpenShell gateway can reach.
Apply a custom NemoClaw preset with .
Do not rely on as a general host-service path because it bypasses the OpenShell policy path and may not be reachable in every sandbox runtime.
See Agent cannot reach a host-side HTTP service (use the skill).
nemoclaw <sandbox> policy-add --from-filehost.docker.internalnemoclaw-user-reference- 运行中的NemoClaw沙箱(用于动态修改),或NemoClaw源码仓库(用于静态修改)。
- 系统中已配置OpenShell CLI。
PATH
添加、移除或修改沙箱允许访问的端点。
沙箱策略在NemoClaw仓库的声明式YAML文件中定义,并由NVIDIA OpenShell在运行时强制执行。
NemoClaw支持两种策略修改方式:静态修改(修改后需重启沙箱生效,且更改会持久化),以及通过OpenShell CLI对运行中的沙箱进行动态更新。
注意:
如果沙箱需要访问主机上运行的HTTP服务,请将服务暴露在OpenShell网关可访问的主机IP上。
使用应用自定义NemoClaw预设。
不要依赖作为通用主机服务路径,因为它会绕过OpenShell策略路径,且在部分沙箱运行环境中可能无法访问。
如需了解更多,请使用技能查看「Agent无法访问主机端HTTP服务」相关内容。
nemoclaw <sandbox> policy-add --from-filehost.docker.internalnemoclaw-user-referenceStatic Changes
静态修改
Static changes modify the baseline policy file and take effect after the next sandbox creation.
静态修改会更改基线策略文件,需在下次创建沙箱时生效。
Edit the Policy File
编辑策略文件
Open and add or modify endpoint entries.
nemoclaw-blueprint/policies/openclaw-sandbox.yamlIf you want a built-in preset to be part of the baseline policy, merge its entries into this file and re-run .
network_policiesnemoclaw onboardIf you only need to apply a preset to a running sandbox, use under Dynamic Changes.
That updates the live policy and does not edit .
nemoclaw <name> policy-addopenclaw-sandbox.yamlUse a manual YAML edit when you need to allow custom hosts that are not covered by a preset, such as an internal API or a weather service.
Each entry in the section defines an endpoint group with the following fields:
networkendpointsbinariesrules打开,添加或修改端点条目。
nemoclaw-blueprint/policies/openclaw-sandbox.yaml如果希望将内置预设纳入基线策略,请将其条目合并到该文件中,然后重新运行。
network_policiesnemoclaw onboard当需要允许预设未覆盖的自定义主机(如内部API或天气服务)时,可手动编辑YAML文件。
networkendpointsbinariesrulesRe-Run Onboard
重新运行Onboard向导
Apply the updated policy by re-running the onboard wizard:
console
$ nemoclaw onboardThe wizard picks up the modified policy file and applies it to the sandbox.
通过重新运行Onboard向导应用更新后的策略:
console
$ nemoclaw onboard向导会识别修改后的策略文件并将其应用到沙箱。
Verify the Policy
验证策略
Check that the sandbox is running with the updated policy:
console
$ nemoclaw <name> status检查沙箱是否已运行更新后的策略:
console
$ nemoclaw <name> statusAdd Blueprint Policy Additions
添加蓝图策略扩展
If you maintain a custom blueprint, you can add extra policy entries under in .
NemoClaw validates those entries with the same policy schema used by preset files, fetches the live policy during sandbox creation, merges the additions into , and applies the merged policy through OpenShell.
The applied additions are recorded in the run metadata so you can audit which blueprint-level policy entries were active for that sandbox run.
components.policy.additionsnemoclaw-blueprint/blueprint.yamlnetwork_policies如果维护自定义蓝图,可在的下添加额外策略条目。
NemoClaw会使用预设文件相同的策略架构验证这些条目,在沙箱创建期间获取实时策略,将扩展条目合并到中,并通过OpenShell应用合并后的策略。
已应用的扩展会记录在运行元数据中,以便审计该沙箱运行期间生效的蓝图级策略条目。
nemoclaw-blueprint/blueprint.yamlcomponents.policy.additionsnetwork_policiesDynamic Changes
动态修改
Dynamic changes apply a policy update to a running sandbox without restarting it.
[!WARNING]replaces the sandbox's live policy with the contents of the file you provide; it does not merge. A running sandbox's live policy is the baseline fromopenshell policy setplus every preset that was layered on during onboarding. Applying a file that contains only the baseline (or only a single preset) silently drops every other preset that was in effect.openclaw-sandbox.yaml
动态修改可在不重启沙箱的情况下,对运行中的沙箱应用策略更新。
[!WARNING]命令会替换沙箱的实时策略为你提供的文件内容,而非合并。 运行中沙箱的实时策略由openshell policy set的基线策略加上Onboarding期间叠加的所有预设组成。 仅包含基线(或单个预设)的文件会静默丢弃所有已生效的其他预设。openclaw-sandbox.yaml
Option 1: Drop a Preset File and Use policy-add
(Recommended)
policy-add选项1:添加预设文件并使用policy-add
(推荐)
policy-addThis is the non-destructive path and the only flow NemoClaw supports out of the box for merging new entries into a running policy.
-
Create a preset-format YAML file under, for example
nemoclaw-blueprint/policies/presets/:nemoclaw-blueprint/policies/presets/influxdb.yamlyamlpreset: name: influxdb description: "InfluxDB time-series database" network_policies: influxdb: name: influxdb endpoints: - host: influxdb.internal.example.com port: 8086 protocol: rest enforcement: enforce rules: - allow: { method: GET, path: "/**" } - allow: { method: POST, path: "/api/v2/write" } binaries: - { path: /usr/bin/curl } -
Apply it to the running sandbox:console
$ nemoclaw my-assistant policy-addNemoClaw reads the live policy via, structurally merges your preset'sopenshell policy get --fullinto it, and writes the merged result back. Existing presets and the baseline remain in place. The preset file undernetwork_policiesalso persists across sandbox recreations.presets/
这是无损修改路径,也是NemoClaw原生支持的唯一将新条目合并到运行中策略的流程。
-
在下创建预设格式的YAML文件,例如
nemoclaw-blueprint/policies/presets/:nemoclaw-blueprint/policies/presets/influxdb.yamlyamlpreset: name: influxdb description: "InfluxDB time-series database" network_policies: influxdb: name: influxdb endpoints: - host: influxdb.internal.example.com port: 8086 protocol: rest enforcement: enforce rules: - allow: { method: GET, path: "/**" } - allow: { method: POST, path: "/api/v2/write" } binaries: - { path: /usr/bin/curl } -
将其应用到运行中的沙箱:console
$ nemoclaw my-assistant policy-addNemoClaw会通过读取实时策略,将你的预设openshell policy get --full结构化合并到其中,然后将合并结果写回。 现有预设和基线策略会保留。network_policies下的预设文件也会在沙箱重新创建时持久化。presets/
Option 2: Snapshot, Edit, and Set via OpenShell
选项2:快照、编辑并通过OpenShell设置
Use this path only when you cannot add a file under the NemoClaw source tree.
You must start from the live policy, not from , so the presets layered on at onboarding are preserved in the file you apply.
openclaw-sandbox.yamlconsole
$ openshell policy get --full my-assistant > live-policy.yamlEdit to add your entries under , keeping the existing field intact, then apply:
live-policy.yamlnetwork_policies:versionconsole
$ openshell policy set --policy live-policy.yaml my-assistant仅当无法在NemoClaw源码目录下添加文件时使用此路径。
必须从实时策略开始,而非,这样Onboarding期间叠加的预设才会保留在你应用的文件中。
openclaw-sandbox.yamlconsole
$ openshell policy get --full my-assistant > live-policy.yaml编辑,在下添加条目,保留现有字段不变,然后应用:
live-policy.yamlnetwork_policies:versionconsole
$ openshell policy set --policy live-policy.yaml my-assistantScope of Dynamic Changes
动态修改的作用范围
Dynamic changes apply only to the current session.
When the sandbox stops, the running policy resets to the baseline composed from plus the presets recorded for the sandbox.
To make a custom policy survive a sandbox recreation, ship the preset file in the repository (Option 1 above — the file under persists) or edit and re-run .
openclaw-sandbox.yamlpresets/openclaw-sandbox.yamlnemoclaw onboard动态修改仅对当前会话生效。
当沙箱停止时,运行策略会重置为基线策略加上沙箱记录的预设组成的版本。
要使自定义策略在沙箱重新创建后仍生效,请将预设文件存入仓库(上述选项1——下的文件会持久化),或编辑并重新运行。
openclaw-sandbox.yamlpresets/openclaw-sandbox.yamlnemoclaw onboardApprove Requests Interactively
交互式批准请求
For one-off access, you can approve blocked requests in the OpenShell TUI instead of editing the baseline policy:
console
$ openshell termThis is useful when you want to test a destination before deciding whether it belongs in a permanent preset or custom policy file.
对于一次性访问需求,你可以在OpenShell TUI中批准被拦截的请求,无需编辑基线策略:
console
$ openshell term这适用于在决定是否将目标地址纳入永久预设或自定义策略文件之前进行测试的场景。
Policy Presets
策略预设
NemoClaw ships preset policy files for common integrations in .
Apply a preset as-is or use it as a starting template for a custom policy.
For guided post-install examples, see Common Integration Policy Examples (use the skill).
nemoclaw-blueprint/policies/presets/nemoclaw-user-manage-policyDuring onboarding, the policy tier (use the skill) you select determines which presets are enabled by default.
You can add or remove individual presets in the interactive preset screen that follows tier selection.
nemoclaw-user-referenceAvailable presets:
| Preset | Endpoints |
|---|---|
| Brave Search API |
| Homebrew (Linuxbrew) package manager |
| Discord API, gateway, and CDN access |
| GitHub and GitHub REST API |
| Hugging Face Hub (download-only) and inference router |
| Atlassian Jira API |
| Local Ollama and vLLM through the host gateway |
| npm and Yarn registries |
| Microsoft 365 and Outlook |
| Python Package Index |
| Slack API and webhooks |
| Telegram Bot API |
| WhatsApp Web messaging |
To apply a preset to a running sandbox:
console
$ nemoclaw <name> policy-addNote:
Preset selection is interactive when you omit a preset name.
Pass a preset name with for scripted workflows.
--yesFor example, to interactively add PyPI access to a running sandbox:
console
$ nemoclaw my-assistant policy-addTo list which presets are applied to a sandbox:
console
$ nemoclaw <name> policy-listTo include a preset in the baseline, merge its entries into and re-run .
openclaw-sandbox.yamlnemoclaw onboardNote:
The command operates on raw policy files and does not
accept the metadata block used in preset YAML files. Use for
presets.
openshell policy set --policy <file> <sandbox-name>preset:nemoclaw <name> policy-addFor scripted workflows, and accept the preset name as a positional argument:
policy-addpolicy-removeconsole
$ nemoclaw my-assistant policy-add pypi --yes
$ nemoclaw my-assistant policy-remove pypi --yesSet instead of to drive the same flow from an environment variable.
See Commands (use the skill) for the full flag reference.
NEMOCLAW_NON_INTERACTIVE=1--yesnemoclaw-user-referencenemoclaw <name> rebuildNemoClaw在中提供了常见集成的预设策略文件。
可直接应用预设,或以此为模板创建自定义策略。
如需安装后的引导式示例,请使用技能查看「常见集成策略示例」。
nemoclaw-blueprint/policies/presets/nemoclaw-user-manage-policy在Onboarding期间,你选择的策略层级(使用技能查看)会决定默认启用哪些预设。
在层级选择后的交互式预设界面中,你可以添加或移除单个预设。
nemoclaw-user-reference可用预设:
| 预设 | 端点 |
|---|---|
| Brave Search API |
| Homebrew(Linuxbrew)包管理器 |
| Discord API、网关和CDN访问 |
| GitHub及GitHub REST API |
| Hugging Face Hub(仅下载)和推理路由 |
| Atlassian Jira API |
| 通过主机网关访问本地Ollama和vLLM |
| npm和Yarn注册表 |
| Microsoft 365和Outlook |
| Python Package Index |
| Slack API和Webhooks |
| Telegram Bot API |
| WhatsApp Web消息 |
要对运行中的沙箱应用预设:
console
$ nemoclaw <name> policy-add注意:
省略预设名称时,预设选择为交互式。
在脚本化工作流中,可通过参数传入预设名称。
--yes例如,交互式为运行中的沙箱添加PyPI访问权限:
console
$ nemoclaw my-assistant policy-add要列出沙箱已应用的预设:
console
$ nemoclaw <name> policy-list要将预设纳入基线策略,请将其条目合并到并重新运行。
openclaw-sandbox.yamlnemoclaw onboard注意:
openshell policy set --policy <file> <sandbox-name>preset:nemoclaw <name> policy-add在脚本化工作流中,和接受预设名称作为位置参数:
policy-addpolicy-removeconsole
$ nemoclaw my-assistant policy-add pypi --yes
$ nemoclaw my-assistant policy-remove pypi --yes也可通过设置环境变量替代参数,实现相同的工作流。
如需完整的参数参考,请使用技能查看「命令」相关内容。
NEMOCLAW_NON_INTERACTIVE=1--yesnemoclaw-user-referencenemoclaw <name> rebuildCustom Preset Files
自定义预设文件
Apply a user-authored preset YAML to a running sandbox without editing the baseline or dropping to .
openshell policy set可将用户编写的预设YAML应用到运行中的沙箱,无需编辑基线策略或使用命令。
openshell policy setAuthoring
编写规范
A custom preset follows the same shape as the built-in ones under :
nemoclaw-blueprint/policies/presets/yaml
preset:
name: my-internal-api
description: "Internal service"
network_policies:
my-internal-api:
name: my-internal-api
endpoints:
- host: api.example.internal
port: 443
protocol: rest
enforcement: enforce
rules:
- allow: { method: GET, path: "/**" }
binaries:
- { path: /usr/local/bin/node }The top-level must be a lowercase RFC 1123 label (letters, digits, hyphens) and must not collide with a built-in preset name such as or .
Rename if NemoClaw refuses to apply the file because of a collision.
preset.nameslackpypipreset.name自定义预设遵循下内置预设的相同格式:
nemoclaw-blueprint/policies/presets/yaml
preset:
name: my-internal-api
description: "Internal service"
network_policies:
my-internal-api:
name: my-internal-api
endpoints:
- host: api.example.internal
port: 443
protocol: rest
enforcement: enforce
rules:
- allow: { method: GET, path: "/**" }
binaries:
- { path: /usr/local/bin/node }顶层必须是小写的RFC 1123标签(字母、数字、连字符),且不能与或等内置预设名称冲突。
如果NemoClaw因名称冲突拒绝应用文件,请重命名。
preset.nameslackpypipreset.nameApply a Single File
应用单个文件
console
$ nemoclaw my-assistant policy-add --from-file ./presets/my-internal-api.yamlPreview the endpoints without applying with , and skip the confirmation prompt with or by exporting .
--dry-run--yesNEMOCLAW_NON_INTERACTIVE=1console
$ nemoclaw my-assistant policy-add --from-file ./presets/my-internal-api.yaml使用参数可预览端点而不实际应用,使用参数或导出可跳过确认提示。
--dry-run--yesNEMOCLAW_NON_INTERACTIVE=1Apply Every File in a Directory
应用目录下所有文件
console
$ nemoclaw my-assistant policy-add --from-dir ./presets/ --yesFiles are processed in lexicographic order.
Processing stops at the first failure; presets already applied are not rolled back.
Fix the failing file and re-run the command to continue.
Warning:
Custom preset hosts bypass NemoClaw's review process and can widen sandbox egress to arbitrary destinations.
Review every host in a custom preset before applying it, especially when the file originates outside your team.
console
$ nemoclaw my-assistant policy-add --from-dir ./presets/ --yes文件按字典序处理。
处理过程中遇到第一个失败时会停止,已应用的预设不会回滚。
修复失败的文件后重新运行命令即可继续。
警告:
自定义预设主机可绕过NemoClaw的审核流程,可能将沙箱出站范围扩大到任意目标地址。
应用前请审核自定义预设中的每一个主机,尤其是文件来自团队外部的情况。
Remove a Custom Preset
移除自定义预设
Custom presets applied with or are recorded in the NemoClaw sandbox registry alongside their full YAML content, so they can be removed by name — the original file does not need to be kept on disk:
--from-file--from-dirconsole
$ nemoclaw my-assistant policy-remove my-internal-api --yespolicy-removenemoclaw <name> policy-list通过或应用的自定义预设会连同完整YAML内容一起记录在NemoClaw沙箱注册表中,因此可通过名称移除——无需保留原始文件:
--from-file--from-dirconsole
$ nemoclaw my-assistant policy-remove my-internal-api --yespolicy-removenemoclaw <name> policy-listReferences
参考资料
- references/integration-policy-examples.md — Guides users through common post-install integration policy setup for maintained NemoClaw policy presets, including Outlook, messaging channels, GitHub, Jira, Brave Search, package managers, Hugging Face, local inference, and OpenShell approval workflows.
- Load references/approve-network-requests.md when approving or denying sandbox egress requests, managing blocked network calls, or using the approval TUI. Reviews and approves blocked agent network requests in the TUI.
- references/integration-policy-examples.md — 引导用户完成NemoClaw维护的策略预设的常见安装后集成策略设置,包括Outlook、消息渠道、GitHub、Jira、Brave Search、包管理器、Hugging Face、本地推理和OpenShell审批工作流。
- 如需批准或拒绝沙箱出站请求、管理被拦截的网络调用或使用审批TUI,请查看references/approve-network-requests.md。该文档介绍了如何在TUI中审核和批准被拦截的Agent网络请求。
Related Skills
相关技能
- — Network Policies (use the
nemoclaw-user-referenceskill) for the full baseline policy referencenemoclaw-user-reference - OpenShell Policy Schema for the full YAML policy schema reference.
- OpenShell Sandbox Policies for applying, iterating, and debugging policies at the OpenShell layer.
- — 使用该技能查看「网络策略」获取完整的基线策略参考
nemoclaw-user-reference - OpenShell Policy Schema — 获取完整的YAML策略架构参考
- OpenShell Sandbox Policies — 了解在OpenShell层应用、迭代和调试策略的方法