feat(policy): add opt-in Tavily web-search preset for Deep Agents Code (#5621) - #5651
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughAdds a new ChangesTavily opt-in preset, docs, and tests
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (1)
docs/get-started/quickstart-langchain-deepagents-code.mdx (1)
59-59: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winFix sentence-per-line and colon punctuation style in the added prose.
Line 59 uses a colon between clauses (not to introduce a list), and Line 70 has multiple sentences on one source line. Split into one sentence per line and use periods unless a list follows.
As per path instructions, "Colons should only introduce a list" and "One sentence per line in source." As per coding guidelines, "Keep one sentence per line in Markdown and MDX source files."
Also applies to: 70-70
🤖 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/get-started/quickstart-langchain-deepagents-code.mdx` at line 59, In the sentence beginning with "NemoClaw does not enable Tavily or LangSmith by default for this harness," replace the colon that separates clauses with a period to create two separate sentences, as colons should only introduce lists. Additionally, review the content around this area (including line 70) and ensure all prose follows the one-sentence-per-line rule by splitting any lines containing multiple sentences into separate lines, with each sentence on its own line.Sources: Coding guidelines, Path instructions
🤖 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/get-started/quickstart-langchain-deepagents-code.mdx`:
- Around line 65-67: The CLI command examples in the policy-add tavily commands
use the concrete alias nemoclaw instead of the placeholder $$nemoclaw. For
shared OpenClaw/Hermes documentation, replace all instances of nemoclaw with
$$nemoclaw in the command examples to ensure the rendered docs display the
correct command name per variant. This applies to the lines shown in the diff as
well as line 75.
In `@test/policies.test.ts`:
- Around line 182-184: The test checking the Tavily opt-in policy only verifies
api.tavily.com and Python path with expect(tavily).toContain() assertions, which
leaves it vulnerable to regressions in Node and Curl scoping. Add additional
expect(tavily).toContain() assertions after the existing Python path check to
also verify that the Tavily policy includes Node and Curl entries, ensuring the
full preset contract is enforced in the test.
---
Nitpick comments:
In `@docs/get-started/quickstart-langchain-deepagents-code.mdx`:
- Line 59: In the sentence beginning with "NemoClaw does not enable Tavily or
LangSmith by default for this harness," replace the colon that separates clauses
with a period to create two separate sentences, as colons should only introduce
lists. Additionally, review the content around this area (including line 70) and
ensure all prose follows the one-sentence-per-line rule by splitting any lines
containing multiple sentences into separate lines, with each sentence on its own
line.
🪄 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: 848de151-9528-406c-a482-d9ca4ba863ec
📒 Files selected for processing (3)
docs/get-started/quickstart-langchain-deepagents-code.mdxnemoclaw-blueprint/policies/presets/tavily.yamltest/policies.test.ts
|
CodeRabbit feedback addressed (commit The |
|
✨ Thanks for adding the opt-in Tavily web-search preset that opens egress to api.tavily.com:443 for the Deep Agents Code harness. This proposes a way to enable web search via nemoclaw policy-add tavily while keeping Tavily and LangSmith denied by default in the default policy. Related open issues: |
NVIDIA#5621) Deep Agents Code ships Tavily/LangSmith deny-by-default (PR NVIDIA#5197). This adds the opt-in path for Tavily web search: - New maintained policy preset nemoclaw-blueprint/policies/presets/tavily.yaml that opens egress to api.tavily.com:443 only, scoped to the python3/node/curl binaries (dcode traffic is attributed to the sandbox python3 interpreter). - Quickstart now documents the concrete enable flow (`nemoclaw <name> policy-add tavily`), where the Tavily credential is supplied at runtime (never baked into managed config/image), and how to remove it. - LangSmith is explicitly documented as not yet supported: no preset opens api.smith.langchain.com and no supported mechanism injects LANGSMITH_API_KEY. - Test asserts the preset declares api.tavily.com and that the Deep Agents Code default policy still denies both Tavily and LangSmith, plus updates the known preset-name list. Live egress validation (that enabling the preset actually reaches api.tavily.com through OpenShell) and the formal decision on LangSmith support remain for the live e2e environment and maintainers. Signed-off-by: Abhimanyu Kumar <abhimanyukumar7290@gmail.com>
…n test Extend the Tavily opt-in test to also assert the Node and Curl binary entries, so the test fails if any of the preset's binary scoping regresses, not just Python. Signed-off-by: Abhimanyu Kumar <abhimanyukumar7290@gmail.com>
policies.test.ts is at its legacy size budget (2753 lines), so the codebase-growth guardrail blocks any growth. Move the Tavily opt-in assertions (preset endpoint + binary scoping, and Deep Agents Code default-deny of Tavily/LangSmith) into a new test/tavily-preset.test.ts, keeping only the required "tavily" entry in the expected preset-name list in policies.test.ts so it stays within budget. Signed-off-by: Abhimanyu Kumar <abhimanyukumar7290@gmail.com>
e3da567 to
763e917
Compare
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 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/get-started/quickstart-langchain-deepagents-code.mdx`:
- Around line 59-72: Update the quickstart prose so colons are used only to
introduce lists, not as clause punctuation or to precede standalone command
blocks. In the section describing NemoClaw/Tavily, rephrase the sentence after
the harness mention to remove the trailing colon and adjust the “Preview the
endpoints…” and “Remove the access…” lead-ins so they flow without a colon,
while keeping the command examples under the existing `tavily` policy guidance
intact.
- Line 70: Split the multi-sentence text in the quickstart MDX docs so each
sentence is on its own source line, following the one-sentence-per-line style
guide; update the affected prose near the described `tavily`/runtime API key
guidance and any other matching sentence-packed line in the same section so the
formatting is consistent.
🪄 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: 4c3fdbcf-0fe6-4c17-b67b-de6ecaf7f956
📒 Files selected for processing (2)
docs/get-started/quickstart-langchain-deepagents-code.mdxnemoclaw-blueprint/policies/presets/tavily.yaml
🚧 Files skipped from review as they are similar to previous changes (1)
- nemoclaw-blueprint/policies/presets/tavily.yaml
…et test The Deep Agents Code default-policy exclusion of api.tavily.com and api.smith.langchain.com is already asserted in langchain-deepagents-code-image.test.ts, so the duplicate source-text assertions here only tripped the source-shape budget (static-checks). Also apply the quickstart doc-style nits: clause/code-block colons to periods and one sentence per line. Signed-off-by: Abhimanyu Kumar <abhimanyukumar7290@gmail.com>
There was a problem hiding this comment.
🧹 Nitpick comments (1)
docs/get-started/quickstart-langchain-deepagents-code.mdx (1)
82-82: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueRemove the emphasis from this routine status note.
not a supported integrationis routine prose, so bolding it reads like LLM-style emphasis rather than a warning. LLM pattern detected.Suggested edit
-LangSmith tracing is **not a supported integration** for this managed harness yet. +LangSmith tracing is not a supported integration for this managed harness yet.As per path instructions, "Unnecessary bold on routine instructions" should be flagged.
🤖 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/get-started/quickstart-langchain-deepagents-code.mdx` at line 82, Remove the bold emphasis from the routine status note in the quickstart markdown so it reads as plain prose instead of a warning. Update the text in the relevant documentation snippet to keep the message about LangSmith tracing and the managed harness unchanged, but render “not a supported integration” without emphasis. Locate the wording in the quickstart content and adjust only the markdown styling, not the meaning.Source: Path instructions
🤖 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.
Nitpick comments:
In `@docs/get-started/quickstart-langchain-deepagents-code.mdx`:
- Line 82: Remove the bold emphasis from the routine status note in the
quickstart markdown so it reads as plain prose instead of a warning. Update the
text in the relevant documentation snippet to keep the message about LangSmith
tracing and the managed harness unchanged, but render “not a supported
integration” without emphasis. Locate the wording in the quickstart content and
adjust only the markdown styling, not the meaning.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: 2492e51f-2fc2-4a23-a57a-0dce34c0ad45
📒 Files selected for processing (2)
docs/get-started/quickstart-langchain-deepagents-code.mdxtest/tavily-preset.test.ts
Manual PR Review Advisor resultThis PR Review Advisor analysis was run manually via Run: https://github.com/NVIDIA/NemoClaw/actions/runs/28206227058 PR Review AdvisorThe Tavily preset is opt-in and avoids default credential persistence, but its security boundary is broad and only string-tested. Required before merge
Resolve or justify before merge
In-scope improvements
Test follow-ups to resolve or justify
What looks good
|
…y-preset # Conflicts: # test/e2e/e2e-cloud-experimental/checks/06-deepagents-code-python-egress.sh # test/langchain-deepagents-code-image.test.ts
NVIDIA#5621) (NVIDIA#5651) Closes NVIDIA#5621 Fixes NVIDIA#5739 Adds the opt-in path for Tavily web search in the LangChain Deep Agents Code harness, which ships with Tavily and LangSmith denied by default. - New maintained `tavily` policy preset (`nemoclaw-blueprint/policies/presets/tavily.yaml`) that opens egress to `api.tavily.com:443` only, scoped to the `python3`/`node`/`curl` binaries (the harness's network calls are attributed to the sandbox `python3` interpreter). - The quickstart documents the enable flow (`nemoclaw <name> policy-add tavily`), supplying the Tavily credential at runtime (it is not baked into the managed config or image), and how to remove it. - LangSmith tracing is documented as not yet supported: no preset opens `api.smith.langchain.com` and no supported mechanism injects `LANGSMITH_API_KEY`. - A test asserts the preset declares `api.tavily.com` and that the Deep Agents Code default policy still denies both Tavily and LangSmith; the preset-name list is updated accordingly. Signed-off-by: Abhimanyu Kumar <abhimanyukumar7290@gmail.com> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added an opt-in Tavily web search access policy preset to enable controlled outbound requests. * **Documentation** * Expanded guidance for optional features: Tavily is now explicitly opt-in (including runtime API key handling and how to remove the policy). * Clarified that LangSmith tracing is not supported in the managed harness, and that no presets enable it. * **Tests** * Added/updated tests to verify the Tavily preset includes the expected outbound domain and allowed execution paths, and to ensure default policy additions do not reference Tavily or LangSmith endpoints. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Signed-off-by: Abhimanyu Kumar <abhimanyukumar7290@gmail.com> Co-authored-by: Carlos Villela <cvillela@nvidia.com>
Closes #5621
Fixes #5739
Adds the opt-in path for Tavily web search in the LangChain Deep Agents Code harness, which ships with Tavily and LangSmith denied by default.
tavilypolicy preset (nemoclaw-blueprint/policies/presets/tavily.yaml) that opens egress toapi.tavily.com:443only, scoped to thepython3/node/curlbinaries (the harness's network calls are attributed to the sandboxpython3interpreter).nemoclaw <name> policy-add tavily), supplying the Tavily credential at runtime (it is not baked into the managed config or image), and how to remove it.api.smith.langchain.comand no supported mechanism injectsLANGSMITH_API_KEY.api.tavily.comand that the Deep Agents Code default policy still denies both Tavily and LangSmith; the preset-name list is updated accordingly.Signed-off-by: Abhimanyu Kumar abhimanyukumar7290@gmail.com
Summary by CodeRabbit
New Features
Documentation
Tests