nemo-helix
AGENTS.md138 starsChanged 20 days agoApache-2.0View on GitHub
NeMo Helix is NVIDIA's toolkit for making the agents you ship safer, more accurate, and cheaper to run. If a user asks you to set up, try, build, evaluate, harden, or optimize an agent inside this repo, you MUST use the skills defined in packages/nemo_helix_ext/src/nemo_helix_ext/skills/. Read the relevant skill file directly and follow it step by step. User-facing skills in packages/nemo_helix_ext/src/nemo_helix_ext/skills/: Plugin-owned skills under plugins/*/src/*/skills/ handle their own routing for customization, guardrails, evaluations, optimization, data designer, anonymizer, garak, and Compass…
- Reads credentials
- Installs packages
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.
Of the AGENTS.md files we read, the 31,774 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository18 other files it gives its agents.
- docs/AGENTS.mdAGENTS.md
- web/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- web/CLAUDE.mdCLAUDE.md
- .cursor/rules/dot-files.mdcCursor rule
- .cursor/rules/nemo-helix.mdcCursor rule
- .cursor/rules/uv.mdcCursor rule
- .cursor/rules/writing-docs.mdcCursor rule
- add-studio-feature-flagSkill
- contributor-create-prSkill
- create-release-notesSkill
- data-designer-skill-refreshSkill
- data-designer-version-bumpSkill
- nhx-cliSkill
- release-test-scopeSkill
- studio-devSkill
- nemo-data-designer-pluginSkill
- nemo-evals-pluginSkill
The file
Show its rules and text
We split this AGENTS.md into the rules it gives an agent
41 rules. About 0 are common, 11 are distinctive, and 30 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈11
Distinctive · estimate
This author's own choices. Worth a look.
30
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 10
If a user asks you to set up, try, build, evaluate, harden, or optimize an agent inside this repo, you MUST use the skills defined in …
- Very specific: line 14
Read packages/nemo_helix_ext/src/nemo_helix_ext/skills/<skill-name>/SKILL.md as a file and follow the instructions in order.
- Distinctive: line 16
If a step changes system state (installs something, starts a service, deploys an agent), run the verification step the skill specifies …
- Very specific: line 17
If you are unsure which skill applies, read packages/nemo_helix_ext/src/nemo_helix_ext/skills/nemo-skill-selection/SKILL.md and let it …
- Very specific: line 21
DO NOT invoke any plugin-based skill, /skill-name slash command, or globally-installed assistant for these requests.
- Distinctive: line 22
DO NOT brainstorm a solution from scratch when a NeMo skill claims the task.
- Very specific: line 24
DO NOT improvise CLI flags.
- Distinctive: line 25
DO NOT report a task complete if you cannot verify it.
- Distinctive: line 44
If you are inside a sandboxed coding-agent environment (macOS sandbox, CI container, restricted shell):
- Distinctive: line 47
If a step requires capabilities you do not have, stop and tell the user what is missing.
- Very specific: line 73
Always pass -s to git commit (DCO sign-off).
- Distinctive: line 79
When squashing commits, use one of these safe methods:
- Very specific: line 100
Before doing anything that requires a running NeMo Helix (nemo services, nemo agents invoke, etc.), follow SETUP.md.
- Very specific: line 104
When working with the NeMo CLI (nemo), always check available skills first before exploring --help.
- Very specific: line 108
Keep executable GitHub Actions helpers in .github/scripts/.
- Very specific: line 109
Keep workflow actions/github-script blocks as thin adapters.
- Very specific: line 110
Run make check-github-scripts to test, lint, and format-check GitHub JavaScript helpers locally.
- Very specific: line 111
Run flox activate --dir tools/actionlint -- actionlint to validate GitHub workflow and action syntax.
- Very specific: line 119
Don't put __init__.py files in packages.
- Very specific: line 123
Always prefer concrete type hints over string based ones.
- Very specific: line 124
Use nemo_helix_plugin typed clients (NemoClient, AsyncNemoClient, and service clients built with XClient.from_client(client)) in service, …
- Distinctive: line 128
Use uv exclusively for Python package management in all projects.
- Distinctive: line 132
All Python dependencies must be installed, synchronized, and locked using uv
- Distinctive: line 133
Never use pip, pip-tools, poetry, or conda directly for dependency management
- Very specific: line 142
Run a Python script with uv run <script-name>.py
- Very specific: line 143
Run Python tools like Pytest with uv run pytest or uv run ruff
- Distinctive: line 159
Run it whenever you modify:
- Distinctive: line 175
When verifying solutions, prefer to write unit tests instead of executing python snippets.
- Very specific: line 176
Don't put an __init__.py file in test directories.
- Very specific: line 180
Use the ty tool for type checking:
- Very specific: line 181
Check all files: uv run --frozen ty check
- Very specific: line 194
Update and validate licenses: make update-licenses
- Very specific: line 204
Check policy WASM is up-to-date: make check-policy
- Very specific: line 228
Ensure all pre-commit hooks pass by running uv run pre-commit run -a.
- Very specific: line 235
All unit tests: make test-unit
- Very specific: line 237
All tests (unit + integration): make test-all
- Very specific: line 260
Python bootstrap: Run make bootstrap-python from repo root (creates .venv, runs uv sync --frozen --all-packages).
- Very specific: line 266
Before any nemo CLI command against a local instance, set:
- Very specific: line 272
Check for an existing instance before starting (lsof -iTCP:8080 -sTCP:LISTEN or nemo workspaces list).
- Very specific: line 279
Wait for readiness: curl -sf http://localhost:8080/health/ready → {"status":"ready"}.
- Very specific: line 287
Docker: Not required for core platform smoke tests.
≈ “Common” is an estimate: at least 1 in 5 of the 40,246 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
<!-- SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. --><!-- SPDX-License-Identifier: Apache-2.0 -->NeMo Helix
NeMo Helix is NVIDIA's toolkit for making the agents you ship safer, more accurate, and cheaper to run.
How to help users in this repo
If a user asks you to set up, try, build, evaluate, harden, or optimize an agent inside this repo, you MUST use the skills defined in packages/nemo_helix_ext/src/nemo_helix_ext/skills/. Read the relevant skill file directly and follow it step by step.
DO
- Read
packages/nemo_helix_ext/src/nemo_helix_ext/skills/<skill-name>/SKILL.mdas a file and follow the instructions in order. - Stay on the path the skill defines. If the skill calls a
nemoCLI command, run that exact command. If it points at areferences/file, read it. - If a step changes system state (installs something, starts a service, deploys an agent), run the verification step the skill specifies before moving on. Do not claim a step succeeded without verifying.
- If you are unsure which skill applies, read
packages/nemo_helix_ext/src/nemo_helix_ext/skills/nemo-skill-selection/SKILL.mdand let it route you.
DO NOT
- DO NOT invoke any plugin-based skill,
/skill-nameslash command, or globally-installed assistant for these requests. The repo skills are authoritative. A globally-installed skill (brainstorming, planning, code-review, etc.) will give the wrong answer because it does not know NeMo. - DO NOT brainstorm a solution from scratch when a NeMo skill claims the task. The skill already has the answer.
- DO NOT write Python, Pydantic AI, LangChain, or other agent framework code from scratch when a shipped skill covers the request. Skills will tell you the supported way to connect the agent to NeMo Helix. For a new agent build,
nemo-build-agentuses LangChain Deep Agents through Fabric. Work on a NAT workflow only when the user explicitly asks to maintain or migrate an existing one. - DO NOT improvise CLI flags. Only use flags documented in the skill or shown in
nemo <subcommand> --help. - DO NOT report a task complete if you cannot verify it. If a verification step fails or times out, surface what you saw and ask the user to confirm before continuing.
Available skills
User-facing skills in packages/nemo_helix_ext/src/nemo_helix_ext/skills/:
nemo-skill-selection: entry point. Use when the user's intent is broad or unclear.setup: verifies that NeMo Helix is installed and running. If install is missing, tells the user how to run the CLI install (make bootstrap+nemo setup). Install itself is CLI-only. Do not attempt to install NeMo via skill-driven pip; the workspace dependency graph and credential handling are not reliably automatable inside a sandbox.nemo-build-agent: builds a tested LangChain Deep Agent from approved requirements, then packages and registers it through Fabric.nemo-try-agent: test a deployed agent or chat with a model.nemo-intake: instrument agents, choose an ingest format, upload/query telemetry, and attach evaluator results.nemo-experiments-upload: publish named evaluation runs and scores to the Experiments leaderboard.nemo-status: read-only health dashboard.nemo-teardown: guided shutdown with confirmation.
Plugin-owned skills under plugins/*/src/*/skills/ handle their own routing for customization, guardrails, evaluations, optimization, data designer, anonymizer, garak, and Compass telemetry analysis.
Working in a sandboxed environment
If you are inside a sandboxed coding-agent environment (macOS sandbox, CI container, restricted shell):
- Each skill calls out the sandbox capabilities it needs. Read those first.
- If a step requires capabilities you do not have, stop and tell the user what is missing. Do not improvise around the sandbox by skipping verification.
- The macOS sandbox denies listening sockets, so
nemo services runandnemo setup --start-servicescannot host the platform from inside it (the CLI reportsNot permitted to listen on ...). Do not retry on other ports. Ask the user how the platform should be hosted; see the "Starting the platform from a sandboxed agent" section ofnemo-skill-selection. uvis known to crash under the macOS sandbox today (system_configuration::dynamic_storepanic). Install is CLI-only for this and other reasons.
What this repo is
NeMo Helix brings together NVIDIA NeMo libraries under one CLI, Python SDK, and web UI. Current capabilities:
- Harden agents: guardrails (content safety, jailbreak detection, PII redaction), garak (red-teaming), anonymizer (PII handling for training data).
- Evaluate agents: evaluator (LLM-as-judge, deterministic, agentic, RAG benchmarks), Harbor-backed eval suites.
- Tune agents and models: skill optimization, prompt/hyperparameter tuning, Switchyard model routing, and fine-tuning through Customizer.
- Build and manage agents: Fabric connects supported agent harnesses to NeMo Helix for packaging, deployment, testing, observation, and optimization.
New agents should use an explicit Fabric configuration and a supported adapter. Existing NAT workflows can still be maintained when the user asks for that path. Do not create a NAT wrapper as the default way to bring a new agent into NeMo Helix.
Agent Development Instructions
The sections below are for developers working on NeMo Helix itself.
This project loads local developer preferences from @AGENTS.local.md. You MUST read this file if it exists and give its instructions top priority.
Git Workflow
- Git branches should follow the pattern
<descriptive-branch-name>/<username>where the branch name comes first, the/<username>suffix is included (not email address, just username), and kebab case is used. Do NOT embed an issue/ticket number in the branch name — branch names are public and issue trackers may be private, so a tracker ID in a branch name leaks private references. - Always pass
-stogit commit(DCO sign-off). This includes amends, fixups, and any commit variant.
Squashing Commits
CRITICAL: Never git reset --soft to any commit that isn't an ancestor of your current HEAD.
When squashing commits, use one of these safe methods:
# ✅ CORRECT - soft reset to HEAD~n
git reset --soft HEAD~2
git commit -m "combined message"
# ✅ CORRECT - interactive rebase (more explicit)
git rebase -i HEAD~2
# Then mark commits as "squash" or "fixup" in the editor
# ❌ WRONG - NEVER DO THIS
git reset --soft origin/main # Can revert other people's changes!Why this matters: In a shared repo, origin/main is almost never an ancestor of your feature branch — main moves forward as others merge work. When you reset --soft to a commit that isn't in your branch's history, your staging area still reflects your branch's tree, which lacks any changes made on main since you branched. The resulting commit effectively reverts all that work.
Both HEAD~n and git rebase -i HEAD~n are safe because they only operate on commits that are already in your branch's history.
Setting up the local platform
Before doing anything that requires a running NeMo Helix (nemo services, nemo agents invoke, etc.), follow SETUP.md. It covers make bootstrap, the data-dir layout, DB reset, and the manual nemo services run path. You do not need to install it via nemo skills install.
NeMo CLI
When working with the NeMo CLI (nemo), always check available skills first before exploring --help. Skills contain exact command syntax, JSON structures, and working examples that are much faster than trial-and-error discovery.
GitHub Actions
- Keep executable GitHub Actions helpers in
.github/scripts/. Put their tests in.github/scripts/tests/: Python tests usetest_*.py; GitHub JavaScript tests use*.test.cjs. - Keep workflow
actions/github-scriptblocks as thin adapters. Check out the workflow revision before loading a helper withrequire(). - Run
make check-github-scriptsto test, lint, and format-check GitHub JavaScript helpers locally. - Run
flox activate --dir tools/actionlint -- actionlintto validate GitHub workflow and action syntax.
Building a Studio plugin web UI
A plugin can ship a web UI that Studio loads at runtime and renders inside its own React tree — sharing Studio's React, router, and KUI design system rather than bundling its own. Before writing or reviewing plugin web code, read plugins/example-plugin/web/AGENTS.md: it holds the contract (a Root component + navItems, externalized shared deps, KUI + theme tokens, auth rules) and is the canonical template to copy.
Writing Python Code
- Don't put
__init__.pyfiles in packages. Instead prefer implicit namespace packages.
Python Style notes
- Always prefer concrete type hints over string based ones. DO NOT import these types under TYPE_CHECKING. Instead prefer to import the types a regular import when possible.
- Use
nemo_helix_plugintyped clients (NemoClient,AsyncNemoClient, and service clients built withXClient.from_client(client)) in service, plugin, package, and test code. Name variables holding typed clientsclient,async_client, or service-specific names such asfiles_client,jobs_client, ormodels_client, neversdk.
Python Package Management
- Use uv exclusively for Python package management in all projects.
Package Management Commands
- All Python dependencies must be installed, synchronized, and locked using uv
- Never use pip, pip-tools, poetry, or conda directly for dependency management
Use these commands:
- Install dependencies:
uv add <package> - Remove dependencies:
uv remove <package> - Sync dependencies:
uv sync
Running Python Code
- Run a Python script with
uv run <script-name>.py - Run Python tools like Pytest with
uv run pytestoruv run ruff - Launch a Python repl with
uv run python
SDK
The published nemo-helix wheel is defined by packages/nemo_helix/pyproject.toml, which bundles the nemo CLI (packages/nemo_helix_ext), the typed clients (packages/nemo_helix_plugin), runtime packages, plugins, and services from source at build time (see packages/nemo_helix/BUNDLING.md). The legacy generated nemo_helix module was deleted; all platform code uses the typed NemoClient/AsyncNemoClient stack in nemo_helix_plugin.
The OpenAPI spec at openapi/openapi.yaml is the source of truth for the platform's HTTP API routes. It is regenerated locally from the FastAPI service code (no cloud credentials required).
Update the OpenAPI spec:
make refresh-openapi- Regenerateopenapi/openapi.yamlfrom API definitions
Update web SDK / CLI:
make update-sdk- Regenerate the OpenAPI spec and TypeScript web SDK (Orval), refresh thenemo-helixwheel metadata (make vendor), and regenerate the CLI reference docs.
When to run make refresh-openapi:
Run it whenever you modify:
- API endpoints (routes, methods, parameters, responses)
- Data models or schemas
- Files in these paths:
packages/nhx_common/src/nhx_common/datamodel/packages/nhx_common/src/nhx_common/api/- Service API files:
services/*/src/*/api/
Note: OpenAPI generation also runs as a pre-commit hook (manual stage) when API files change.
Changing SDK types
The generated nemo_helix package is no longer present. If a previously generated type or client changes, use the corresponding typed client from nemo_helix_plugin instead and migrate consumers to it.
Testing Python Code
- When verifying solutions, prefer to write unit tests instead of executing python snippets.
- Don't put an
__init__.pyfile in test directories. tests are not modules.
Type Checking
Use the ty tool for type checking:
- Check all files:
uv run --frozen ty check
Type checking runs automatically in CI via the lint:uv job.
Linting
Python Style (Ruff):
- Lint all files:
uv run ruff check - Format check all files:
uv run ruff format --check - Lint single file:
uv run ruff check path/to/file.py - Format single file:
uv run ruff format path/to/file.py
Licenses:
- Update and validate licenses:
make update-licenses
OpenAPI Spec:
- Validate OpenAPI spec:
script/generate-openapi-spec.sh - Or use:
make refresh-openapi
SDK Validation:
- Update SDK:
make update-sdk
OPA Policy:
- Check policy WASM is up-to-date:
make check-policy - Build policy WASM:
make build-policy
Linting runs automatically in CI via GitHub Actions in .github/workflows/ci.yaml; Studio web linting is covered by .github/workflows/studio-ci.yaml.
Pre-commit Hooks
Pre-commit hooks run automatically before commits and pushes to ensure code quality. They can also be run manually.
Run all hooks manually:
uv run pre-commit run -a- Run all pre-commit hooks
What the hooks do:
- Ruff linter - Automatically fixes linting issues in Python code (excludes SDK)
- Ruff formatter - Formats Python code (excludes SDK)
- Type checking (ty) - Runs type checks on Python code (may need manual fixes)
- uv lock - Automatically updates
uv.lockwith the platform uv version whenpyproject.tomlchanges - uv lock check - Verifies
uv.lockis in sync withpyproject.toml - Helm Docs Container - Runs
helm-docscontainer to regenerate Helm documentation ink8s/helm/README.md - Check merge conflicts - Detects merge conflict markers
- OpenAPI generator (manual stage) - Regenerates OpenAPI spec when API files change
- Check policy WASM (pre-push only) - Verifies OPA policy WASM is up-to-date
Before attempting to commit:
Ensure all pre-commit hooks pass by running uv run pre-commit run -a. A clean run (no changes) means you're ready to commit. Type checking errors may require manual fixes.
Testing services
Running Tests
All tests:
- All unit tests:
make test-unit - Integration tests:
make test-integration - All tests (unit + integration):
make test-all
Specific tests:
- Specific service tests:
make test-unit-<service>(e.g.,make test-unit-evaluator) - Specific package:
make test-package PACKAGE=<package_name>(e.g.,make test-package PACKAGE=nhx_common) - Single test file:
uv run --frozen pytest path/to/test_file.py -v - Single test function:
uv run --frozen pytest path/to/test_file.py::test_function_name -v
Test utilities:
- Watch mode (re-run on changes):
make test-watch - With coverage report:
make test-coverage(generates HTML report inhtmlcov/index.html) - Debug mode:
make test-debug - Re-run failed tests:
make test-failed
Note: E2E tests are currently disabled. Use make test-unit iteratively, then make test-integration for comprehensive verification.
Cursor Cloud specific instructions
Bootstrap prerequisites
- Toolchain: Install Flox before running
make bootstrap; Make activates it as needed. For a preinstalled host toolchain, install the versions printed bymake toolchain-versionsand useTOOLCHAIN=system. - uv version: Root
pyproject.tomlspecifies the supported minimum for source checkout bootstrap.make toolchain-versionsreports the exact version used foruv.lockupdates, Flox, platform containers, and CI. - Native build deps:
make bootstrap-pythonbuildsannoy(vianemoguardrails). Install system headers once per VM image:sudo apt-get install -y python3-dev build-essential. - Python bootstrap: Run
make bootstrap-pythonfrom repo root (creates.venv, runsuv sync --frozen --all-packages). See SETUP.md for the full playbook. - Studio (optional):
make bootstrap-studiouses the Node.js/pnpm versions pinned in the Flox environment, so a VM shipping an older Node does not need upgrading. API services still run without Studio assets. For a preinstalled host toolchain, install the versions printed bymake toolchain-versionsand useTOOLCHAIN=system. - Docker: Not needed for dependency bootstrap. It is required for the control plane's default local operating mode (
nemo setup --start-servicesor defaultnemo services run) because deployments default to the Docker executor; remote/CLI-only and configs that omit or reconfigure deployments do not require it. See docs/get-started/local-docker-and-executors.mdx.
Running the platform
Before any nemo CLI command against a local instance, set:
export NHX_BASE_URL=http://localhost:8080Check for an existing instance before starting (lsof -iTCP:8080 -sTCP:LISTEN or nemo workspaces list). To start all default services in the background, use a tmux session:
tmux -f /exec-daemon/tmux.portal.conf new-session -d -s nemo-helix -c /workspace -- \
'export NHX_BASE_URL=http://localhost:8080 && uv run nemo services run --service-group all --controller-group all --port 8080'Wait for readiness: curl -sf http://localhost:8080/health/ready → {"status":"ready"}.
Minimal subset for inference-focused work (documented in SETUP.md): uv run nemo services run --services entities,models,inference-gateway,secrets --controllers models.
Lint and test
Standard commands from repo root (see sections above): uv run ruff check, uv run --frozen ty check, make test-unit, make test-package PACKAGE=<name>.
- Docker: Not required for core platform smoke tests. One
nhx_commonconfig test expects Docker and sets runtime tononewhen Docker is unavailable. - Inference providers:
nemo setup,nemo chat, and agent invoke require an API key (NVIDIA_API_KEY,OPENAI_API_KEY, etc.). Core APIs (workspaces, secrets, hello-world, entities) work without provider credentials.
Quick smoke verification
export NHX_BASE_URL=http://localhost:8080
curl -sf http://localhost:8080/health/ready
curl -sf http://localhost:8080/apis/hello-world/v2/workspaces/default/hello
uv run nemo workspaces listDoes it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

