Skip to content

Commit ef69409

Browse files
authored
Forward-merge release/1.3 into develop (#919)
## Description This is a manual forward merge of #895 due to merge conflicts Closes #895 ## By Submitting this PR I confirm: - I am familiar with the [Contributing Guidelines](https://github.com/NVIDIA/NeMo-Agent-Toolkit/blob/develop/docs/source/resources/contributing.md). - 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. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - New Features - MCP: session-aware client, configurable token storage (incl. object stores), new client config; deprecated legacy mcp_tool. - Observability: workflow run/trace IDs, traceparent/header ingestion, enriched span attribution. - Agents/CLI: usage metrics in responses; improved workflow scaffolding with prerelease-aware installs and updated templates. - Docker: build args for Python/UV/NAT across images. - Documentation - Overhauled notebooks (new Getting Started/BYO Agent/Tools & Agents/Observability; removed older notebooks). - Expanded CLI reference (MCP, Object Store, Optimize, GPU sizing). - Secure token storage guide; install extras; contributor ulimit note. - Refactor - Chat models: typed roles, split choices (streaming vs non-streaming), updated defaults. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
2 parents 7c80936 + fb2d93c commit ef69409

File tree

128 files changed

+9444
-3796
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

128 files changed

+9444
-3796
lines changed

ci/scripts/documentation_checks.sh

Lines changed: 31 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,37 @@
1717
set +e
1818

1919
# Intentionally excluding CHANGELOG.md as it immutable
20-
DOC_FILES=$(git ls-files "*.md" "*.rst" | grep -v -E '^(CHANGELOG|LICENSE)\.md$' | grep -v -E '^nv_internal/')
20+
DOC_FILES=$(git ls-files "*.md" "*.rst" | grep -v -E '^(CHANGELOG|LICENSE)\.md$')
21+
NOTEBOOK_FILES=$(git ls-files "*.ipynb")
2122

22-
vale ${DOC_FILES}
23+
if [[ -v ${WORKSPACE_TMP} ]]; then
24+
MKTEMP_ARGS=""
25+
else
26+
MKTEMP_ARGS="--tmpdir=${WORKSPACE_TMP}"
27+
fi
28+
29+
EXPORT_DIR=$(mktemp -d ${MKTEMP_ARGS} nat_converted_notebooks.XXXXXX)
30+
if [[ ! -d "${EXPORT_DIR}" ]]; then
31+
echo "ERROR: Failed to create temporary directory" >&2
32+
exit 1
33+
fi
34+
35+
jupyter nbconvert -y --log-level=WARN --to markdown --output-dir ${EXPORT_DIR} ${NOTEBOOK_FILES}
36+
if [[ $? -ne 0 ]]; then
37+
echo "ERROR: Failed to convert notebooks" >&2
38+
rm -rf "${EXPORT_DIR}"
39+
exit 1
40+
fi
41+
42+
CONVERTED_NOTEBOOK_FILES=$(find ${EXPORT_DIR} -type f -name "*.md")
43+
44+
vale ${DOC_FILES} ${CONVERTED_NOTEBOOK_FILES}
2345
RETVAL=$?
46+
47+
if [[ "${PRESERVE_TMP}" == "1" ]]; then
48+
echo "Preserving temporary directory: ${EXPORT_DIR}"
49+
else
50+
rm -rf "${EXPORT_DIR}"
51+
fi
52+
2453
exit $RETVAL

ci/scripts/path_checks.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,8 +162,8 @@
162162
),
163163
# ignore notebook-relative paths
164164
(
165-
r"^examples/notebooks/retail_sales_agent/.*configs/",
166-
r"^\./retail_sales_agent/data/",
165+
r"^examples/notebooks/",
166+
r".*(configs|data|src).*",
167167
),
168168
(
169169
r"^examples/frameworks/haystack_deep_research_agent/README.md",

ci/vale/styles/config/vocabularies/nat/accept.txt

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,14 @@ Authlib
2525
[Cc]hatbot(s?)
2626
# clangd is never capitalized even at the start of a sentence https://clangd.llvm.org/
2727
clangd
28+
Colab
2829
CMake
2930
[Cc]omposability
3031
[Cc]omposable
3132
Conda
3233
concurrencies
3334
config
34-
Configurability
35+
[Cc]onfigurability
3536
[Cc]oroutine(s?)
3637
CPython
3738
[Cc]ryptocurrenc[y|ies]
@@ -56,6 +57,7 @@ Dynatrace
5657
[Ee]val
5758
[Ee]xplainability
5859
Faiss
60+
Gantt
5961
[Gg]eneratable
6062
GitHub
6163
glog
@@ -65,7 +67,9 @@ groundedness
6567
[Gg]ranularities
6668
[Hh]ashable
6769
[Hh]yperparameter(s?)
70+
impactful
6871
[Ii]nferencing
72+
[Ii]nterquartile
6973
isort
7074
Jira
7175
jsonlines
@@ -114,6 +118,7 @@ Pydantic
114118
PyPI
115119
pytest
116120
[Rr]edis
121+
[Rr]eimplement(ing)?
117122
[Rr]einstall(s?)
118123
[Rr]eplatform(ing)?
119124
[Rr]epo
@@ -135,6 +140,7 @@ Tavily
135140
[Tt]okenization
136141
[Tt]okenizer(s?)
137142
triages
143+
[Uu]ncomment
138144
[Uu]nencrypted
139145
[Uu]nittest(s?)
140146
[Uu]nprocessable
@@ -150,4 +156,4 @@ zsh
150156
Zep
151157
Optuna
152158
[Oo]ptimizable
153-
[Cc]heckpointed
159+
[Cc]heckpointed

docker/Dockerfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ ARG NAT_VERSION
2222

2323
FROM --platform=$TARGETPLATFORM ${BASE_IMAGE_URL}:${BASE_IMAGE_TAG}
2424

25+
ARG PYTHON_VERSION
26+
ARG UV_VERSION
27+
ARG NAT_VERSION
28+
2529
COPY --from=ghcr.io/astral-sh/uv:${UV_VERSION} /uv /uvx /bin/
2630

2731
ENV PYTHONDONTWRITEBYTECODE=1

docs/source/conf.py

Lines changed: 44 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -27,32 +27,60 @@
2727
# add these directories to sys.path here. If the directory is relative to the
2828
# documentation root, use os.path.abspath to make it absolute, like shown here.
2929

30+
import glob
3031
import os
3132
import shutil
3233
import subprocess
3334
import typing
35+
from pathlib import Path
3436

3537
if typing.TYPE_CHECKING:
3638
from autoapi._objects import PythonObject
3739

38-
CUR_DIR = os.path.dirname(os.path.abspath(__file__))
39-
DOC_DIR = os.path.dirname(CUR_DIR)
40-
ROOT_DIR = os.path.dirname(os.path.dirname(CUR_DIR))
41-
NAT_DIR = os.path.join(ROOT_DIR, "src", "nat")
4240

43-
# Work-around for https://github.com/readthedocs/sphinx-autoapi/issues/298
44-
# AutoAPI support for implicit namespaces is broken, so we need to manually
45-
# construct an nat package with an __init__.py file
46-
BUILD_DIR = os.path.join(DOC_DIR, "build")
47-
API_TREE = os.path.join(BUILD_DIR, "_api_tree")
41+
def _build_api_tree() -> Path:
42+
# Work-around for https://github.com/readthedocs/sphinx-autoapi/issues/298
43+
# AutoAPI support for implicit namespaces is broken, so we need to manually
4844

49-
if os.path.exists(API_TREE):
50-
shutil.rmtree(API_TREE)
45+
cur_dir = Path(os.path.abspath(__file__)).parent
46+
docs_dir = cur_dir.parent
47+
root_dir = docs_dir.parent
48+
nat_dir = root_dir / "src" / "nat"
49+
plugins_dir = root_dir / "packages"
5150

52-
os.makedirs(API_TREE)
53-
shutil.copytree(NAT_DIR, os.path.join(API_TREE, "nat"))
54-
with open(os.path.join(API_TREE, "nat", "__init__.py"), "w") as f:
55-
f.write("")
51+
build_dir = docs_dir / "build"
52+
api_tree = build_dir / "_api_tree"
53+
dest_dir = api_tree / "nat"
54+
55+
if api_tree.exists():
56+
shutil.rmtree(api_tree.absolute())
57+
58+
os.makedirs(api_tree.absolute())
59+
shutil.copytree(nat_dir, dest_dir)
60+
dest_plugins_dir = dest_dir / "plugins"
61+
62+
for sub_dir in (dest_dir, dest_plugins_dir):
63+
with open(sub_dir / "__init__.py", "w", encoding="utf-8") as f:
64+
f.write("")
65+
66+
plugin_dirs = [Path(p) for p in glob.glob(f'{plugins_dir}/nvidia_nat_*')]
67+
for plugin_dir in plugin_dirs:
68+
src_dir = plugin_dir / 'src/nat/plugins'
69+
if src_dir.exists():
70+
for plugin_subdir in src_dir.iterdir():
71+
if plugin_subdir.is_dir():
72+
dest_subdir = dest_plugins_dir / plugin_subdir.name
73+
shutil.copytree(plugin_subdir, dest_subdir)
74+
package_file = dest_subdir / "__init__.py"
75+
if not package_file.exists():
76+
with open(package_file, "w", encoding="utf-8") as f:
77+
f.write("")
78+
79+
return api_tree
80+
81+
82+
API_TREE = _build_api_tree()
83+
print(f"API tree built at {API_TREE}")
5684

5785
# -- Project information -----------------------------------------------------
5886

@@ -87,7 +115,7 @@
87115
"sphinxmermaid"
88116
]
89117

90-
autoapi_dirs = [API_TREE]
118+
autoapi_dirs = [str(API_TREE.absolute())]
91119

92120
autoapi_root = "api"
93121
autoapi_python_class_content = "both"

docs/source/quick-start/installing.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,14 +36,18 @@ To install these first-party plugin libraries, you can use the full distribution
3636

3737
- `nvidia-nat[adk]` or `nvidia-nat-adk` - [Google ADK](https://github.com/google/adk-python)
3838
- `nvidia-nat[agno]` or `nvidia-nat-agno` - [Agno](https://agno.com/)
39+
- `nvidia-nat[all]` or `nvidia-nat-all` - Pseudo-package for installing all optional dependencies
3940
- `nvidia-nat[crewai]` or `nvidia-nat-crewai` - [CrewAI](https://www.crewai.com/)
4041
- `nvidia-nat[data-flywheel]` or `nvidia-nat-data-flywheel` - [NeMo DataFlywheel](https://github.com/NVIDIA-AI-Blueprints/data-flywheel)
42+
- `nvidia-nat[ingestion]` or `nvidia-nat-ingestion` - Additional dependencies needed for data ingestion
4143
- `nvidia-nat[langchain]` or `nvidia-nat-langchain` - [LangChain](https://www.langchain.com/), [LangGraph](https://www.langchain.com/langgraph)
4244
- `nvidia-nat[llama-index]` or `nvidia-nat-llama-index` - [LlamaIndex](https://www.llamaindex.ai/)
45+
- `nvidia-nat[mcp]` or `nvidia-nat-mcp` - [Model Context Protocol (MCP)](https://modelcontextprotocol.io/)
4346
- `nvidia-nat[mem0ai]` or `nvidia-nat-mem0ai` - [Mem0](https://mem0.ai/)
4447
- `nvidia-nat[mysql]` or `nvidia-nat-mysql` - [MySQL](https://www.mysql.com/)
4548
- `nvidia-nat[opentelemetry]` or `nvidia-nat-opentelemetry` - [OpenTelemetry](https://opentelemetry.io/)
4649
- `nvidia-nat[phoenix]` or `nvidia-nat-phoenix` - [Arize Phoenix](https://arize.com/docs/phoenix)
50+
- `nvidia-nat[profiling]` or `nvidia-nat-profiling` - Additional dependencies needed for profiling
4751
- `nvidia-nat[ragaai]` or `nvidia-nat-ragaai` - [RagaAI Catalyst](https://raga.ai/)
4852
- `nvidia-nat[redis]` or `nvidia-nat-redis` - [Redis](https://redis.io/)
4953
- `nvidia-nat[s3]` or `nvidia-nat-s3` - [Amazon S3](https://aws.amazon.com/s3/)

0 commit comments

Comments
 (0)