Skip to content

feat(tavily_weather): add example workflow for Tavily plugin#1940

Open
lakshyaag-tavily wants to merge 3 commits into
NVIDIA:developfrom
lakshyaag-tavily:feat/tavily-weather-example
Open

feat(tavily_weather): add example workflow for Tavily plugin#1940
lakshyaag-tavily wants to merge 3 commits into
NVIDIA:developfrom
lakshyaag-tavily:feat/tavily-weather-example

Conversation

@lakshyaag-tavily
Copy link
Copy Markdown

@lakshyaag-tavily lakshyaag-tavily commented May 15, 2026

Description

Adds examples/tavily_weather/, a minimal smoke-test workflow demonstrating the new framework-neutral Tavily integration published as nemo-agent-toolkit-tavily on PyPI.

The example wires a LangChain ReAct agent (Claude Sonnet 4.6 via LiteLLM) to the tavily function group from the new package, exposing tavily__search and tavily__extract (with crawl and map excluded via the group's exclude field).

This is the user-facing companion to the framework-neutral Tavily subpackage tracked in #1900 - the package itself ships externally on PyPI and is not vendored into this repo, so this PR only adds the example workflow that depends on it.

Closes #1900

By Submitting this PR I confirm:

  • I am familiar with the Contributing Guidelines.
  • We require that all contributors "sign-off" on their commits. This certifies that the contribution is your original work, or you have rights to submit it under the same license, or a compatible license.
    • Any contribution which contains commits that are not Signed-Off will not be accepted.
  • When the PR is ready for review, new or existing tests cover these changes.
  • When the PR is ready for review, the documentation is up to date with these changes.

Summary by CodeRabbit

  • New Features

    • Added a runnable weather-search example demonstrating an agent using a search tool to return structured results followed by a natural-language answer.
  • Documentation

    • Added a README and example configuration with environment setup and run instructions, workflow details, expected agent behavior, and response format.

Review Change Stack

…ly plugin

Signed-off-by: Lakshya Agarwal <lakshya.agarwal@tavily.com>
@copy-pr-bot
Copy link
Copy Markdown

copy-pr-bot Bot commented May 15, 2026

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 15, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 1fddf9ac-2b9b-4faf-9c84-bede231fb5af

📥 Commits

Reviewing files that changed from the base of the PR and between a9d43b2 and 0c6a7c8.

📒 Files selected for processing (2)
  • examples/tavily_weather/pyproject.toml
  • pyproject.toml
🚧 Files skipped from review as they are similar to previous changes (1)
  • examples/tavily_weather/pyproject.toml

Walkthrough

Adds a self-contained example project (examples/tavily_weather/) that wires a Tavily function group into a React-agent workflow using an Anthropic LLM, provides package build metadata and local editable source mappings, includes an SPDX header, and documents environment setup and run instructions.

Changes

Tavily Weather Example

Layer / File(s) Summary
Workflow configuration
examples/tavily_weather/src/nat_tavily_weather/configs/config.yml
Defines a React agent workflow that uses the tavily function group (excluding crawl and map), references an Anthropic LLM via LiteLLM, enables verbose mode, and sets parse_agent_response_max_retries to 3.
Example package pyproject and build config
examples/tavily_weather/pyproject.toml
Adds setuptools-based build backend and setuptools_scm settings, PEP 621 project metadata (name, Python requirement, description/keywords/classifiers), runtime dependencies (nvidia-nat[langchain], nemo-agent-toolkit-tavily), and uv source mapping for local nvidia-nat.
README and package init header
examples/tavily_weather/README.md, examples/tavily_weather/src/nat_tavily_weather/__init__.py
Adds usage README describing TAVILY_API_KEY/ANTHROPIC_API_KEY, uv run nat run invocation, expected tool call behavior, and an SPDX license header in __init__.py.
Top-level pyproject integration
pyproject.toml
Adds nat_tavily_weather to the repository extras examples list and a [tool.uv.sources] mapping pointing nat_tavily_weather to examples/tavily_weather with editable = true.

🎯 2 (Simple) | ⏱️ ~10 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: adding an example workflow for the Tavily plugin. It follows imperative mood, uses the feat prefix convention, and is well within the 72-character guideline at 60 characters.
Linked Issues check ✅ Passed The PR fulfills issue #1900's objectives by demonstrating the framework-neutral Tavily integration via a working example that configures the tavily function group, references individual tools, and documents expected behavior.
Out of Scope Changes check ✅ Passed All changes are scoped to adding the tavily_weather example and its dependencies; no unrelated modifications to existing code or functionality are present.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


Comment @coderabbitai help to get the list of available commands and usage tips.

@lakshyaag-tavily lakshyaag-tavily marked this pull request as ready for review May 15, 2026 15:13
@lakshyaag-tavily lakshyaag-tavily requested review from a team as code owners May 15, 2026 15:13
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🧹 Nitpick comments (1)
examples/tavily_weather/README.md (1)

10-19: ⚡ Quick win

Clarify the working directory for command execution.

The --config_file path is relative to the example directory, but the coding guidelines prefer examples to be runnable from the repository root. Consider adding a note specifying the working directory.

📝 Suggested improvement
 ## Run
 
+From the `examples/tavily_weather/` directory, run:
+
 ```bash
 export TAVILY_API_KEY=...
 export ANTHROPIC_API_KEY=...

Alternatively, if you prefer commands to be executable from the repository root, update the path:

-  --config_file src/nat_tavily_weather/configs/config.yml \
+  --config_file examples/tavily_weather/src/nat_tavily_weather/configs/config.yml \
🤖 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 `@examples/tavily_weather/README.md` around lines 10 - 19, The README's example
command uses a relative --config_file path
(src/nat_tavily_weather/configs/config.yml) but doesn't state the expected
working directory, causing confusion when running uv run nat run; update the
README to explicitly state the working directory (e.g., "run this command from
the examples/tavily_weather directory") or change the --config_file value to an
absolute/repo-root-relative path (e.g.,
examples/tavily_weather/src/nat_tavily_weather/configs/config.yml) so the uv run
nat run invocation and the --config_file reference are correct when executed
from the repository root.
🤖 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 `@examples/tavily_weather/pyproject.toml`:
- Around line 27-38: Add the new example name "nat_tavily_weather" to the root
pyproject.toml's examples array; locate the examples list in the root
pyproject.toml and insert "nat_tavily_weather" in alphabetical order among the
other example names so the examples array includes this project (refer to the
example project name nat_tavily_weather defined in the
examples/tavily_weather/pyproject.toml).
- Line 41: The file pyproject.toml is missing a final newline; update the file
that contains the dependency line "nvidia-nat = { path = \"../..\", editable =
true }" so that the file ends with a single newline character (ensure exactly
one trailing newline at EOF) and save the file.

---

Nitpick comments:
In `@examples/tavily_weather/README.md`:
- Around line 10-19: The README's example command uses a relative --config_file
path (src/nat_tavily_weather/configs/config.yml) but doesn't state the expected
working directory, causing confusion when running uv run nat run; update the
README to explicitly state the working directory (e.g., "run this command from
the examples/tavily_weather directory") or change the --config_file value to an
absolute/repo-root-relative path (e.g.,
examples/tavily_weather/src/nat_tavily_weather/configs/config.yml) so the uv run
nat run invocation and the --config_file reference are correct when executed
from the repository root.
🪄 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: 9324183b-8248-4e3d-9073-da7c33751763

📥 Commits

Reviewing files that changed from the base of the PR and between 7b0a225 and a9d43b2.

⛔ Files ignored due to path filters (1)
  • examples/tavily_weather/uv.lock is excluded by !**/*.lock
📒 Files selected for processing (4)
  • examples/tavily_weather/README.md
  • examples/tavily_weather/pyproject.toml
  • examples/tavily_weather/src/nat_tavily_weather/__init__.py
  • examples/tavily_weather/src/nat_tavily_weather/configs/config.yml

Comment thread examples/tavily_weather/pyproject.toml
Comment thread examples/tavily_weather/pyproject.toml
lakshyaag-tavily and others added 2 commits May 15, 2026 11:20
Signed-off-by: Lakshya Agarwal <lakshya.agarwal@tavily.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Signed-off-by: Lakshya Agarwal <lakshya.agarwal@tavily.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Tavily tools as a framework-agnostic, fully functional Tavily-owned subpackage repo

1 participant