Skip to content
Closed
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
artifacts/
workspace/
18 changes: 18 additions & 0 deletions plugins/nemo-agents/examples/calculator-agent/fabric/agent.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
config_format: nemo-agents-spec-v1
name: nat-simple-calculator
description: Invoke the NAT simple calculator workflow through NeMo Fabric.

default_harness: nat

harnesses:
nat:
kind: nat
settings:
config_file: ./workflow.yml

environment:
workspace: ./workspace
artifacts: ./artifacts

telemetry:
enabled: false
26 changes: 26 additions & 0 deletions plugins/nemo-agents/examples/calculator-agent/fabric/workflow.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
function_groups:
calculator:
_type: calculator

functions:
current_datetime:
_type: current_datetime

llms:
llm:
_type: nim
model_name: nvidia/nemotron-3-nano-30b-a3b
temperature: 0.0
max_tokens: 1024
chat_template_kwargs:
enable_thinking: false

workflow:
_type: react_agent
tool_names:
- calculator
- current_datetime
llm_name: llm
verbose: false
parse_agent_response_max_retries: 3
use_native_tool_calling: true
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
artifacts/
workspace/
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# NAT Through NeMo Fabric

This example keeps the NAT workflow YAML authoritative and invokes it through
the Platform-owned NAT Fabric adapter.

From the repository root:

```bash
uv pip install -e "plugins/nemo-agents[fabric]"
export NVIDIA_API_KEY="<your NVIDIA API key>"

nemo agents invoke \
--agent-config plugins/nemo-agents/examples/email-phishing-analyzer/fabric/agent.yaml \
--input "Subject: Verify your account. Send your password immediately."
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
config_format: nemo-agents-spec-v1
name: nat-email-phishing-analyzer
description: Invoke the NAT email phishing analyzer through NeMo Fabric.

default_harness: nat

harnesses:
nat:
kind: nat
settings:
config_file: ./workflow.yml

environment:
workspace: ./workspace
artifacts: ./artifacts

telemetry:
enabled: false
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
functions:
email_phishing_analyzer:
_type: email_phishing_analyzer
llm: llm

llms:
llm:
_type: openai
api_key: ${NVIDIA_API_KEY}
base_url: https://integrate.api.nvidia.com/v1
model_name: nvidia/nemotron-3-nano-30b-a3b
temperature: 0.0
max_tokens: 1024

workflow:
_type: react_agent
tool_names:
- email_phishing_analyzer
llm_name: llm
verbose: false
parse_agent_response_max_retries: 3
additional_instructions: The final response should indicate that the email is either "phishing" or "benign".
use_native_tool_calling: true
44 changes: 38 additions & 6 deletions plugins/nemo-agents/examples/nemo-agent-config/README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,48 @@
# Fabric-Backed Agent Config

This Platform-owned config invokes Codex or Hermes through NeMo Fabric. Run the
commands below from the repository root.
These Platform-owned configs invoke Codex, Hermes, or NAT through NeMo Fabric.
Run the commands below from the repository root.

Fabric dependencies are currently optional so the default workspace does not
force other Fabric consumers onto the `0.1.0a1` SDK API before they migrate.
force other Fabric consumers onto the prerelease SDK API before they migrate.
Install them explicitly before local Fabric smoke tests:

```bash
uv pip install -e "plugins/nemo-agents[fabric]"
```

## NAT

The plugin install includes the Platform-packaged calculator and email phishing
NAT components. Their workflow YAML remains the source of truth; the adjacent
`agent.yaml` only selects the Platform-owned NAT Fabric adapter.

Run the calculator workflow:

```bash
export NVIDIA_API_KEY="<your NVIDIA API key>"

nemo agents invoke \
--agent-config plugins/nemo-agents/examples/calculator-agent/fabric/agent.yaml \
--input "What is 12 multiplied by 8?"
```

Run the email phishing analyzer:

```bash
export NVIDIA_API_KEY="<your NVIDIA API key>"

nemo agents invoke \
--agent-config plugins/nemo-agents/examples/email-phishing-analyzer/fabric/agent.yaml \
--input "Subject: Verify your account. Send your password immediately."
```

To use another NAT workflow, keep its config and relative resources under the
Platform `agent.yaml` directory and set `harness.settings.config_file` to that
workflow. Install any package that exposes workflow-specific `nat.components`
into the same Python environment. Keep those packages on the same NAT release
as the `nvidia-nat-*` packages installed by NeMo Agents.

## Codex

Authenticate Codex, leave `default_harness: codex` in `agent.yaml`, and run:
Expand All @@ -30,10 +62,10 @@ Hermes Agent has dependencies that conflict with the Platform environment, so
install it with the Fabric adapter in a separate Python 3.12 environment:

```bash
uvx uv@0.9.14 venv --python 3.12 .venv-hermes
uvx uv@0.9.14 --no-config pip install \
uv venv --python 3.12 .venv-hermes
uv --no-config pip install \
--python .venv-hermes/bin/python \
"nemo-fabric-adapters-hermes==0.1.0a1" \
"nemo-fabric-adapters-hermes==0.1.0a20260724" \
"hermes-agent==0.19.0"

export HERMES_ADAPTER_PYTHON="$PWD/.venv-hermes/bin/python"
Expand Down
14 changes: 11 additions & 3 deletions plugins/nemo-agents/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,11 @@ fabric = [
# to the 0.1.0a1+ config-first SDK API and Fabric packaging is stable across Platform environments.
# TODO(AIRCORE-897): Move this to a stable Fabric version before release once available.
# TODO(AIRCORE-897): Add the `relay` extra once nemo-evaluator-sdk's nemo-relay pin allows >=0.5.
"nemo-fabric[runtime]==0.1.0a1",
"nemo-fabric-adapters-codex==0.1.0a1",
"nemo-fabric-adapters-hermes==0.1.0a1; python_version < '3.14'",
# Installed third-party adapter discovery requires the first Fabric build after NVIDIA/NeMo-Fabric#108.
"nemo-fabric[runtime]==0.1.0a20260724",
"nemo-fabric-adapters-common==0.1.0a20260724",
"nemo-fabric-adapters-codex==0.1.0a20260724",
"nemo-fabric-adapters-hermes==0.1.0a20260724; python_version < '3.14'",
]
container = [
"jinja2>=3.1",
Expand Down Expand Up @@ -94,6 +96,9 @@ packages = [
"vendor/openclaw_agent_adapter/src/nat_openclaw_agent_adapter",
]

[tool.hatch.build.targets.wheel.shared-data]
"src/nemo_agents_plugin/fabric/adapters/nat/fabric-adapter.json" = "share/nemo-fabric/adapters/nemo-platform-nat/fabric-adapter.json"


[tool.uv.sources]
nemo-platform = { workspace = true }
Expand All @@ -105,6 +110,9 @@ nemo-agents-example-email-phishing = { workspace = true }
[tool.pytest.ini_options]
testpaths = ["tests"]
asyncio_mode = "auto"
markers = [
"integration: high-level tests that exercise installed runtime boundaries",
]
# "src" puts nemo_agents_plugin on sys.path. nemo-platform is resolved
# from the workspace — run `uv sync` at the repo root before running these tests.
pythonpath = ["src"]
Expand Down
Loading