Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions examples/tavily_weather/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<!--
SPDX-FileCopyrightText: Copyright (c) 2025-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
SPDX-License-Identifier: Apache-2.0
-->

# Tavily Weather (LangChain ReAct + Anthropic)

Smoke-test workflow for the `nemo-agent-toolkit-tavily` package. A LangChain ReAct agent runs against Claude Sonnet 4.6 (via LiteLLM) with the Tavily tools (`search`, `extract`).

## Run

```bash
export TAVILY_API_KEY=...
export ANTHROPIC_API_KEY=...

uv run nat run \
--config_file src/nat_tavily_weather/configs/config.yml \
--input "What is the weather in San Francisco right now?"
```

## What to expect

The agent should make a single `tavily__search` tool call with a query like `"current weather San Francisco"`, receive structured search results, and produce a natural-language answer with the temperature/conditions.
42 changes: 42 additions & 0 deletions examples/tavily_weather/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# SPDX-FileCopyrightText: Copyright (c) 2025-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

[build-system]
build-backend = "setuptools.build_meta"
requires = ["setuptools>=64", "setuptools-scm>=8", "setuptools_dynamic_dependencies>=1.0.0"]

[tool.setuptools_scm]
git_describe_command = "git describe --long --first-parent"
root = "../.."

[tool.setuptools.packages.find]
where = ["src"]

[project]
name = "nat_tavily_weather"
dynamic = ["version"]
requires-python = ">=3.11,<3.14"
description = "Tavily + LangChain ReAct + Anthropic example workflow"
keywords = ["ai", "agents", "tavily", "anthropic"]
classifiers = ["Programming Language :: Python"]

dependencies = [
"nvidia-nat[langchain]",
"nemo-agent-toolkit-tavily",
]
Comment thread
coderabbitai[bot] marked this conversation as resolved.

[tool.uv.sources]
[tool.uv.sources]
nvidia-nat = { path = "../..", editable = true }
Comment thread
lakshyaag-tavily marked this conversation as resolved.
2 changes: 2 additions & 0 deletions examples/tavily_weather/src/nat_tavily_weather/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# SPDX-FileCopyrightText: Copyright (c) 2025-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# SPDX-FileCopyrightText: Copyright (c) 2025-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0

function_groups:
tavily:
_type: tavily
exclude: [crawl, map]

llms:
anthropic_llm:
_type: litellm
# Routed via litellm; uses ANTHROPIC_API_KEY from env.
model_name: anthropic/claude-sonnet-4-6

workflow:
_type: react_agent
llm_name: anthropic_llm
tool_names:
# Group reference auto-expands to selected tools
- tavily
verbose: true
parse_agent_response_max_retries: 3
Loading