Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 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
2 changes: 1 addition & 1 deletion examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ application-facing Python SDK contract:
- resolving relative workspace and skill paths with `base_dir`;
- running maintained Hermes Agent, Codex, Claude, and Deep Agents adapters through the Python SDK.

Start with:
Complete the [code-review setup](code_review_agent/README.md#set-up), then run:

```bash
just build-all
Expand Down
31 changes: 22 additions & 9 deletions examples/code_review_agent/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,19 @@ just build-all
```

The default variant uses Hermes Agent with an NVIDIA-hosted model. Follow the
[Hermes Agent quick start](../../README.md#quick-start-hermes-agent) to install
Hermes Agent, then set `NVIDIA_API_KEY` and `ADAPTER_PYTHON` as described there.
[Hermes Agent adapter setup](../../adapters/hermes/README.md) with Python
3.11-3.13, then set `NVIDIA_API_KEY`. If Hermes Agent is installed in a
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Outdated
separate environment, select its interpreter only for the Hermes command:

The config also demonstrates a harness-native GitHub MCP server. Set
`GITHUB_MCP_URL` when you want to use that server; the review prompt below does
not require it.
```bash
ADAPTER_PYTHON="$PWD/.tmp/hermes-venv/bin/python" \
.venv/bin/python -m examples.code_review_agent \
--input "Reply with exactly: fabric works"
Comment thread
zhongxuanwang-nv marked this conversation as resolved.
Outdated
```

Do not export a Hermes-only `ADAPTER_PYTHON` globally before running the Codex,
Comment thread
zhongxuanwang-nv marked this conversation as resolved.
Outdated
Claude, or Deep Agents variants. Those variants use the project interpreter
unless you select another interpreter explicitly.

## Inspect the plan

Expand Down Expand Up @@ -67,7 +74,11 @@ Add `--relay` to any variant to enable the Relay ATOF and ATIF configuration:

Relay requirements depend on the selected adapter. The Codex and Claude
adapters require an external `nemo-relay` CLI in the supported `0.6.x` range;
the Python package named `nemo-relay` does not install that command.
the Python package named `nemo-relay` does not install that command. Hermes
Comment thread
zhongxuanwang-nv marked this conversation as resolved.
Outdated
Agent and Deep Agents require the Relay Python package in their selected
adapter environment. Refer to the
[installation guide](../../docs/getting-started/install.mdx#install-nemo-relay)
for the current compatibility requirements.

```bash
.venv/bin/python -m examples.code_review_agent \
Expand All @@ -89,15 +100,17 @@ application-owned composition:
from examples.code_review_agent import (
BASE_DIR,
hermes_config,
with_fabric_managed_github_mcp,
with_opensandbox,
with_relay,
)

config = hermes_config()
relay_config = with_relay(config)
sandbox_config = with_opensandbox(config)
github_config = with_fabric_managed_github_mcp(config)
```

Each function returns a deep copy. `config`, `relay_config`, and
`sandbox_config` can therefore be planned or run independently with
`base_dir=BASE_DIR`.
Each function returns a deep copy. The four configs can therefore be planned or
run independently with `base_dir=BASE_DIR`. Set `GITHUB_MCP_URL` before running
`github_config`; the default smoke does not configure or contact that server.
9 changes: 0 additions & 9 deletions examples/code_review_agent/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,6 @@ def base_config() -> FabricConfig:
telemetry=TelemetryConfig(),
)
config.add_skill_path(SKILL_PATH)
config.add_mcp_server(
"github",
transport="streamable-http",
url="${GITHUB_MCP_URL}",
exposure="harness_native",
)
return config


Expand Down Expand Up @@ -122,7 +116,6 @@ def codex_config() -> FabricConfig:
workspace=WORKSPACE,
artifacts="./artifacts/codex",
)
config.remove_mcp_server("github")
config.remove_skill_path(SKILL_PATH)
return config

Expand All @@ -149,7 +142,6 @@ def deepagents_config() -> FabricConfig:
workspace=WORKSPACE,
artifacts="./artifacts/deepagents",
)
config.remove_mcp_server("github")
config.remove_skill_path(SKILL_PATH)
return config

Expand Down Expand Up @@ -188,7 +180,6 @@ def claude_config() -> FabricConfig:
workspace=WORKSPACE,
artifacts="./artifacts/claude",
)
config.remove_mcp_server("github")
config.remove_skill_path(SKILL_PATH)
return config

Expand Down
8 changes: 0 additions & 8 deletions examples/code_review_agent/skills/code-review/README.md

This file was deleted.

14 changes: 14 additions & 0 deletions examples/code_review_agent/skills/code-review/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
name: code-review
description: Review Python changes for correctness risks and missing test coverage.
---

# Code Review

1. Read the changed implementation and its nearest tests.
2. Identify correctness, error-handling, and compatibility risks before style issues.
3. Cite the smallest relevant file and line range for each finding.
4. Suggest the narrowest correction and a focused regression test.

If no correctness issue is present, say so directly and identify any remaining
test-coverage uncertainty.
6 changes: 6 additions & 0 deletions examples/harbor/calculator/.gitignore
Comment thread
zhongxuanwang-nv marked this conversation as resolved.
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# SPDX-FileCopyrightText: Copyright (c) 2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0

runs/
task/environment/vendor/
task/environment/.vendor.*/
14 changes: 8 additions & 6 deletions examples/harbor/calculator/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ uv run --extra runtime --extra harbor harbor run \
--ak fabric_adapter_id=nvidia.fabric.hermes \
--ak fabric_config_base_dir=/opt/fabric-calculator \
--ak fabric_workspace=/app \
--ak 'fabric_harness_settings={"cwd":"/app","base_url":"https://integrate.api.nvidia.com/v1","max_iterations":20}' \
--ak 'fabric_harness_settings={"base_url":"https://integrate.api.nvidia.com/v1","max_iterations":20}' \
--ae "NVIDIA_API_KEY=$NVIDIA_API_KEY" \
--job-name fabric-hermes \
--jobs-dir "$RUNS_DIR" \
Expand All @@ -110,7 +110,7 @@ uv run --extra runtime --extra harbor harbor run \
--ak fabric_config_base_dir=/opt/fabric-calculator \
--ak fabric_workspace=/app \
--ak fabric_telemetry=relay \
--ak 'fabric_harness_settings={"cwd":"/app","base_url":"https://integrate.api.nvidia.com/v1","max_iterations":4,"terminal_timeout":120}' \
--ak 'fabric_harness_settings={"base_url":"https://integrate.api.nvidia.com/v1","max_iterations":4,"terminal_timeout":120}' \
--ae "NVIDIA_API_KEY=$NVIDIA_API_KEY" \
--job-name fabric-hermes-relay \
--jobs-dir "$RUNS_DIR" \
Expand All @@ -135,8 +135,9 @@ find "$RUNS_DIR/fabric-hermes-relay" \
## 4. Claude

The Claude Agent SDK supplies its compatible Claude Code executable. Harbor
passes the API key into the task environment; NeMo Fabric forwards only the model's
configured credential variable to Claude.
passes the API key into the task environment. NeMo Fabric forwards the supported
Claude authentication variables selected by the adapter; this command uses
`ANTHROPIC_API_KEY`.

```bash
: "${ANTHROPIC_API_KEY:?Export ANTHROPIC_API_KEY before running Claude}"
Expand Down Expand Up @@ -173,8 +174,9 @@ uv run --extra runtime --extra harbor harbor view "$RUNS_DIR"
```

Check NeMo Fabric status, harness and adapter identity, runtime and invocation IDs,
artifacts, telemetry, Harbor exceptions, and reward. A successful smoke run has
NeMo Fabric status `succeeded` and Harbor mean reward `1.0`.
artifacts, telemetry, Harbor exceptions, and reward. A successful calculator run
has one completed trial, zero errored trials, NeMo Fabric status `succeeded`, and
Harbor mean reward `1.0`.

After the runs, remove the generated build-context copy:

Expand Down
9 changes: 5 additions & 4 deletions examples/harbor/prepare_swebench.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,10 @@ repo_root="$(git rev-parse --show-toplevel)"
bundle_dir="$repo_root/examples/harbor/swebench"
wheelhouse="$bundle_dir/.wheelhouse"
relay_root="$bundle_dir/.relay"
relay_cli_version="0.6.0"

if [[ "$(uname -m)" != "x86_64" ]]; then
echo "This SWE-Bench example currently targets x86_64 task images." >&2
if [[ "$(uname -s)" != "Linux" || "$(uname -m)" != "x86_64" ]]; then
echo "This SWE-Bench example currently requires an x86_64 Linux host." >&2
exit 1
fi

Expand All @@ -46,14 +47,14 @@ docker run --rm \

# TEMP: Keep only this block if PyPI wheels land before Relay CLI distribution.
relay_version="$({ "$relay_root/bin/nemo-relay" --version 2>/dev/null || true; })"
if [[ "$relay_version" != "nemo-relay 0.5.0" ]]; then
if [[ "$relay_version" != "nemo-relay $relay_cli_version" ]]; then
docker run --rm \
--user "$(id -u):$(id -g)" \
-e CARGO_HOME=/tmp/cargo \
-e CARGO_TARGET_DIR=/tmp/target \
-v "$relay_root:/out" \
rust:1.94-bullseye \
cargo install nemo-relay-cli --version 0.5.0 --locked --force --root /out
cargo install nemo-relay-cli --version "$relay_cli_version" --locked --force --root /out
fi

# TEMP: Record the source-built meta-wheel path for installation in the task.
Expand Down
2 changes: 1 addition & 1 deletion examples/harbor/swebench/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export RUNS_DIR="$PWD/.tmp/harbor/fabric-swebench"
```

The preparation script builds the native runtime in a manylinux2014 container,
builds the standalone Relay 0.5.0 CLI in Debian Bullseye, and writes the exact
builds the standalone Relay 0.6.0 CLI in Debian Bullseye, and writes the exact
task-local package requirement to `.fabric-package`. The generated files are
ignored by Git. The uploaded bundle contains adapter descriptors, the example
MCP server, generated wheels, and Relay; it does not contain a persisted
Expand Down
6 changes: 6 additions & 0 deletions examples/harbor/swebench/sample-artifacts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,9 @@ Each harness directory contains:

Use these samples to compare Harbor's canonical trajectory with Relay's direct
ATOF and ATIF output before running the example yourself.

The checked-in trajectories record Relay 0.5.0 and the earlier
`nvidia/nemotron-3-nano` model identifier because they are historical evidence
from the original runs. New runs use the compatible Relay CLI version pinned by
[`prepare_swebench.sh`](../../prepare_swebench.sh) and the model selected in the
current walkthrough; do not treat sample metadata as installation guidance.
Loading
Loading