Repository navigation
docs: clarify sub-agent setup prerequisites - #5521
Conversation
📝 WalkthroughWalkthroughThe ChangesSub-Agent Setup Documentation
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Possibly related PRs
Suggested labels
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
🌿 Preview your docs: https://nvidia-preview-pr-5521.docs.buildwithfern.com/nemoclaw |
E2E Advisor RecommendationRequired E2E: None Full advisor summaryE2E Recommendation AdvisorBase: Required E2E
Optional E2E
New E2E recommendations
|
Vitest E2E Scenario RecommendationRequired Vitest E2E scenarios: None Full Vitest E2E advisor summaryVitest E2E Scenario AdvisorBase: Required Vitest E2E scenarios
Optional Vitest E2E scenarios
Relevant changed files
|
PR Review AdvisorFindings: 0 needs attention, 1 worth checking, 1 nice ideas Review findings🛠️ Needs attention
🔎 Worth checking
🌱 Nice ideas
This is an automated advisory review. A human maintainer must make the final merge decision. |
There was a problem hiding this comment.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
docs/inference/set-up-sub-agent.mdx (1)
93-100:⚠️ Potential issue | 🟡 MinorClarify that the config upload step is intentionally for mutable state, not the hardened posture.
The documentation on line 90 already states "In the default mutable state, this keeps the local hash consistent but does not make it tamper-proof," and line 91 defers hardening to "NemoClaw runtime controls."
However, the command block itself does not make this distinction explicit.
Consider adding a brief note above the code block (before line 93) to clarify: "The following commands upload the patched config for immediate use in the default mutable state; they do not provide tamper-proofing. Harden the config using NemoClaw runtime controls separately."
This resolves the reviewer's concern thatchown sandbox:sandboxwithchmod 444allows the sandbox user to revert permissions, which contradicts a "hardened" intent.
The commands are correct for their intended mutable-state purpose; they just need clearer context in the example.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@docs/inference/set-up-sub-agent.mdx` around lines 93 - 100, Add a clarifying note above the bash code block containing the docker exec commands for uploading the patched config. The note should explicitly state that these commands upload the patched config for immediate use in the default mutable state and do not provide tamper-proofing, with hardening to be handled separately using NemoClaw runtime controls. This clarification will resolve confusion about the chmod and chown operations (which are appropriate for mutable state) and align the code block with the context already provided in the surrounding documentation.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docs/inference/set-up-sub-agent.mdx`:
- Around line 79-87: The command example in the documentation passes the
NVIDIA_API_KEY as a positional argument to the openclaw-patch.py script, which
exposes the secret in shell history and process listings. Update the code block
to instead export NVIDIA_API_KEY as an environment variable before running the
script, and remove the "$NVIDIA_API_KEY" positional argument from the python3
command invocation. Verify with the vlm-demo maintainers that the
openclaw-patch.py script properly supports reading the API key from the
NVIDIA_API_KEY environment variable, or confirm if the recommended approach is
to use apply-omni-subagent.sh from the openclaw-omni-demo folder instead.
---
Outside diff comments:
In `@docs/inference/set-up-sub-agent.mdx`:
- Around line 93-100: Add a clarifying note above the bash code block containing
the docker exec commands for uploading the patched config. The note should
explicitly state that these commands upload the patched config for immediate use
in the default mutable state and do not provide tamper-proofing, with hardening
to be handled separately using NemoClaw runtime controls. This clarification
will resolve confusion about the chmod and chown operations (which are
appropriate for mutable state) and align the code block with the context already
provided in the surrounding documentation.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: d516ff3f-3485-46bf-b685-4c8aadc14594
📒 Files selected for processing (1)
docs/inference/set-up-sub-agent.mdx
| Set `VLM_DEMO_DIR` to the local `vlm-demo` directory from the demo assets, then run the patch helper: | ||
|
|
||
| ```bash | ||
| export VLM_DEMO_DIR=/path/to/nemoclaw-demos/vlm-demo | ||
| python3 "$VLM_DEMO_DIR/vlm-subagent/openclaw-patch.py" "$NVIDIA_API_KEY" < /tmp/openclaw.json > /tmp/openclaw.updated.json | ||
| ``` | ||
|
|
||
| The helper reads `/tmp/openclaw.json` from standard input, adds the Omni provider and `vision-operator` entry, and writes the patched config to `/tmp/openclaw.updated.json`. | ||
| Do not commit `/tmp/openclaw.updated.json` or any other file that contains a real API key. |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -euo pipefail
helper=$(fd -a 'openclaw-patch.py' . | head -n1)
sed -n '1,220p' "$helper"
rg -n --context 2 'argparse|sys\.argv|NVIDIA_API_KEY|openclaw-patch' "$(dirname "$helper")"Repository: NVIDIA/NemoClaw
Length of output: 103
🏁 Script executed:
git ls-files | grep -i 'openclaw-patch\|vlm-demo' | head -20Repository: NVIDIA/NemoClaw
Length of output: 41
🏁 Script executed:
fd -type f -name '*patch*.py' | grep -v node_modules | head -20Repository: NVIDIA/NemoClaw
Length of output: 230
🏁 Script executed:
rg -l 'openclaw-patch' --type pythonRepository: NVIDIA/NemoClaw
Length of output: 90
🏁 Script executed:
rg -i 'vlm-demo|openclaw-patch' --max-count 20Repository: NVIDIA/NemoClaw
Length of output: 3377
🏁 Script executed:
cat docs/inference/set-up-sub-agent.mdx | head -100Repository: NVIDIA/NemoClaw
Length of output: 6305
🌐 Web query:
openclaw-patch.py NVIDIA_API_KEY brevdev nemoclaw-demos vlm-demo usage
💡 Result:
The term openclaw-patch.py refers to a specific utility script provided within the brevdev/nemoclaw-demos repository [1][2], designed to help users configure and patch OpenClaw environments, particularly for setting up advanced sub-agents like the Vision Language Model (VLM) demo [3][2]. Usage Summary: 1. Context and Purpose: The script is part of the vlm-demo and openclaw-omni-demo workflows [1][3][2]. It is used to programmatically modify the OpenClaw configuration (openclaw.json) to include auxiliary providers, such as the NVIDIA Omni provider, and to update agent configurations for task-specific delegation [3][2]. 2. NVIDIA API Key: To use the NVIDIA provider (required for these demos), you must set the NVIDIA_API_KEY environment variable [4][3]. This key is obtained from build.nvidia.com and follows the nvapi- prefix format [4][5][6]. OpenClaw natively recognizes this variable for authentication without needing explicit provider configuration in many cases [4]. 3. Patching Workflow: When running the VLM or Omni sub-agent demos, the workflow typically involves: - Using the provided openclaw-patch.py script to automate the injection of the sub-agent provider and agent list settings into your local openclaw.json [3][2]. - Ensuring the sandbox environment is correctly configured with the necessary network policies and credentials [3][7][2]. - Validating the setup via provided verification scripts (e.g., verify-omni-demo.sh) [3]. Important Technical Notes: - Config Management: OpenClaw has evolved its configuration management. While older or community workflows like those in brevdev/nemoclaw-demos use custom scripts like openclaw-patch.py [2], recent versions of OpenClaw have introduced a native openclaw config apply command to handle JSON5 configuration patches directly [8]. - Plugin Caveats: Be aware that some older versions of the NVIDIA provider plugin had issues with correctly persisting API keys, which could lead to validation errors in models.json [9]. Ensure your OpenClaw installation is up to date to avoid these issues. - Security: Never share or commit your NVIDIA_API_KEY to public repositories [5]. Use environment variables to keep keys out of shell history and configuration files whenever possible [4].
Citations:
- 1: https://github.com/brevdev/nemoclaw-demos
- 2: https://docs.nvidia.com/nemoclaw/latest/inference/set-up-sub-agent.html
- 3: https://github.com/brevdev/nemoclaw-demos/blob/main/openclaw-omni-demo/README.md
- 4: https://docs.openclaw.ai/providers/nvidia
- 5: https://gist.github.com/naturalmoods/4f2241efef935606c772c38de7359a70
- 6: https://docs.nvidia.com/nemoclaw/latest/deployment/brev-web-ui.html
- 7: https://github.com/brevdev/nemoclaw-demos/blob/main/hermes-omni-demo/hermes-omni-guide.md
- 8: feat: add config apply patch command openclaw/openclaw#74429
- 9: [Bug]: NVIDIA provider plugin omits apiKey field, silently breaks pi-coding-agent's models.json validation openclaw/openclaw#73013
🌐 Web query:
github.com brevdev nemoclaw-demos vlm-subagent openclaw-patch.py
💡 Result:
The reference to openclaw-patch.py in the context of brevdev/nemoclaw-demos likely relates to automated scripts for configuring or patching OpenClaw environments. The brevdev/nemoclaw-demos repository provides a collection of guides and demo setups for users who have completed the initial installation of NemoClaw [1]. Within this repository, specifically in the openclaw-omni-demo project, there is a focus on configuring sub-agents, such as the Nemotron Omni vision sub-agent [1][2]. While the repository contains several scripts to automate these setups—such as apply-omni-subagent.sh, verify-omni-demo.sh, and fix-spark-gateway.sh [2]—the specific filename openclaw-patch.py is not listed as a primary, documented component of the main demo directory structure [2][3]. However, OpenClaw-related patching and configuration scripts are common in the ecosystem; for instance, the mahsumaktas/openclaw-patchkit repository utilizes various Python-based patching strategies and scripts for maintaining OpenClaw environments [4][5]. Additionally, there is a documented apply_patch tool within the OpenClaw framework used for structured file changes [6], and other community packs have historically included files such as ensure-openclaw-postfix-patch.py [7]. If you are looking for specific functionality related to patching an OpenClaw instance for a VLM sub-agent, the recommended approach is to use the scripts/apply-omni-subagent.sh provided in the openclaw-omni-demo folder, which handles the necessary modifications to openclaw.json, policy.yaml, and workspace agent files [2].
Citations:
- 1: https://github.com/brevdev/nemoclaw-demos
- 2: https://github.com/brevdev/nemoclaw-demos/blob/main/openclaw-omni-demo/README.md
- 3: https://github.com/brevdev/nemoclaw-demos/blob/main/hermes-omni-demo/hermes-omni-guide.md
- 4: https://github.com/mahsumaktas/openclaw-patchkit
- 5: https://github.com/mahsumaktas/openclaw-patchkit/blob/main/README.md
- 6: https://documentation.openclaw.ai/tools/apply-patch
- 7: https://raw.githubusercontent.com/bkochavy/openclaw-postfix-pack/main/install.sh
Use an environment variable instead of a positional argument for the API key.
The search results confirm a security best practice: "Never share or commit your NVIDIA_API_KEY to public repositories. Use environment variables to keep keys out of shell history and configuration files whenever possible."
Passing "$NVIDIA_API_KEY" as a positional argument in the command line exposes the secret in shell history and process listings. Update the docs to show the helper accepting the key via the NVIDIA_API_KEY environment variable instead:
export VLM_DEMO_DIR=/path/to/nemoclaw-demos/vlm-demo
export NVIDIA_API_KEY=your-api-key
python3 "$VLM_DEMO_DIR/vlm-subagent/openclaw-patch.py" < /tmp/openclaw.json > /tmp/openclaw.updated.jsonAlso verify with the vlm-demo maintainers that the script supports environment variable input, or confirm whether the recommended approach is to use apply-omni-subagent.sh from the openclaw-omni-demo folder instead.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@docs/inference/set-up-sub-agent.mdx` around lines 79 - 87, The command
example in the documentation passes the NVIDIA_API_KEY as a positional argument
to the openclaw-patch.py script, which exposes the secret in shell history and
process listings. Update the code block to instead export NVIDIA_API_KEY as an
environment variable before running the script, and remove the "$NVIDIA_API_KEY"
positional argument from the python3 command invocation. Verify with the
vlm-demo maintainers that the openclaw-patch.py script properly supports reading
the API key from the NVIDIA_API_KEY environment variable, or confirm if the
recommended approach is to use apply-omni-subagent.sh from the
openclaw-omni-demo folder instead.
Summary
Clarifies the task-specific sub-agent setup guide so readers know they need an installed NemoClaw host and a running sandbox before using Docker-based config edits.
The guide now also fills in the missing runnable steps for patching
openclaw.json, uploading sub-agent credentials, and verifying hot reload.Related Issue
Fixes #5077
Changes
docker execworkflow and a fail-fast guard whenSANDBOX_CTRis empty.openclaw-patch.pyhelper to create/tmp/openclaw.updated.json.auth-profiles.json, set permissions, and verify thevision-operatorsub-agent through logs andagents list.Type of Change
Verification
npx prek run --from-ref main --to-ref HEADpassesnpm testpasses (broad runtime changes only)npm run docsbuilds without warnings (doc changes only)Verification run:
npm run docspassed with 0 errors and 1 existing Fern upgrade warning.git diff --check main...HEADpassed.Signed-off-by: Miyoung Choi miyoungc@nvidia.com
Summary by CodeRabbit