NVIDIA NeMo Agent Toolkit Core Library

raw JSON →
1.6.0 verified Fri May 01 auth: no python

Core library for NVIDIA NeMo Agent Toolkit, providing foundational components for building, training, and deploying conversational AI agents. Current version 1.6.0, requires Python 3.11+. Release cadence is irregular, tied to NeMo framework updates.

pip install nvidia-nat-core
error ModuleNotFoundError: No module named 'nvidia_nat_core'
cause Package not installed or installed with wrong name.
fix
Run pip install nvidia-nat-core.
error ImportError: cannot import name 'NeMoAgent' from 'nvidia_nat_core'
cause Outdated version where the class had a different name.
fix
Upgrade to latest version: pip install --upgrade nvidia-nat-core.
error RuntimeError: Agent initialization failed: 'api_key' is required
cause Missing NVIDIA API key.
fix
Set the environment variable NVIDIA_API_KEY or provide api_key in AgentConfig.
deprecated The `nat_core` top-level import is deprecated; use `nvidia_nat_core` instead.
fix Change `import nat_core` to `from nvidia_nat_core import ...`.
breaking Requires Python 3.11+. Older Python versions will cause installation failure.
fix Upgrade Python to 3.11 or higher.
gotcha API key must be set via environment variable `NVIDIA_API_KEY` or passed in config; otherwise agent creation fails silently.
fix Set `NVIDIA_API_KEY` environment variable or pass `api_key` in `AgentConfig`.

Initialize an agent with config and query.

from nvidia_nat_core import NeMoAgent
from nvidia_nat_core.config import AgentConfig

config = AgentConfig(model="meta/llama-3.1-8b", api_key=os.environ.get('NVIDIA_API_KEY', ''))
agent = NeMoAgent(config)
response = agent.query("Hello, how are you?")
print(response)