The Problem
Agent runtimes currently lack shared primitives for scope management, lifecycle events, and middleware across tool and LLM calls. Teams building or integrating coding agents must either piece together ad-hoc observability or accept opaque execution trails with no structured control surface. This repo addresses that gap by providing a multi-language runtime explicitly designed for scope, policy, plugins, and lifecycle events—without requiring changes to existing agent stacks.
What This Does
NeMo-Relay is a multi-language agent runtime and library (1261 files total) written primarily in Rust (584 files), with Python (119), Go (64), and TypeScript (36) bindings. The codebase is organized into crates: core (core runtime primitives), adaptive (adaptive execution), and cli (command-line tooling). A fourth crate, cli/assets/pi-extension, ships a TypeScript extension point. The repository exposes five publishable crates on crates.io (nemo-relay, nemo-relay-adaptive, nemo-relay-cli) and corresponding npm/pypi packages.
The architecture follows a crate pattern: core defines the foundation, adaptive builds scope-and-policy on top, and cli provides the user-facing entry point. Go and Python integrations live in separate subdirectories, while the skills/ folder contains operational runbooks (maintenance, CI, packaging, observability) rather than application code.
How It Is Wired
Execution flows through a small, well-defined set of entry points. The CLI boots from crates/cli/src/main.rs, which delegates to crates/cli/src/lib.rs. The core runtime is initialized from crates/core/src/lib.rs, and the adaptive layer from crates/adaptive/src/lib.rs. Plugin schemas, including the detected secret-shaped paths in crates/cli/src/plugins/schema/secrets.rs, are validated at startup. The CLI also serves a TypeScript extension at crates/cli/assets/pi-extension/index.ts for editor/plugin integration.
The call graph is linear: CLI → core crate → adaptive crate → plugin schema validation → runtime execution. No cycles were detected in the mapped entries. The widest blast radius resides in crates/core/src/lib.rs, which is depended on by all three primary crates; a change there ripples across the Rust runtime, Python bindings, and Go bindings simultaneously.
How To Use It
Setup: Install the CLI from PyPI (pip install nemo-relay-cli-bin) or via the install script (curl -fsSL https://raw.githubusercontent.com/NVIDIA/NeMo-Relay/main/install.sh | sh). Python users can pull the matching CLI with pip install "nemo-relay[cli]". The Rust crates are consumed via cargo add nemo-relay et al.
Configuration: No secret keys are required for local trajectory recording. The repo contains a secrets schema (crates/cli/src/plugins/schema/secrets.rs) that validates secret-shaped paths—verify this file against your environment before running the CLI.
Running it: Start a recorded agent run with nemo-relay record --local-exporter or invoke the Python API to instrument LLM/tool calls. The CLI writes raw events and a normalized trajectory file to disk for later inspection.
Real-World Use
A team integrating Claude Code can install the CLI, enable the local observability exporter, and route agent runs through Relay. After the run, Relay emits raw event JSONs and a trajectory file that can be fed into evaluation pipelines or OpenTelemetry backends. The Go and Python bindings allow framework integrations (LangChain, LangGraph, Deep Agents) to hook into scope management without modifying their core loops.
Code Health & Issues
- Low/Security: Secret-shaped paths present in
crates/cli/src/plugins/schema/secrets.rs—the code-health audit will confirm or clear them. - Test coverage: 391 test files found across the crates; the adaptive and core modules have the densest unit test suites.
- Documentation: 159 doc files present; the
docs/folder and crate-level READMEs are the primary surfaces.
Beyond the measured findings: the repository is MIT-licensed (SPDX: Apache-2.0), CI runs on GitLab with multiple job families (ci.yaml, ci_go.yml, ci_node.yml), and no license file was detected in the clone root—verify LICENSE exists at the repo root before redistribution.
The Bottom Line
NeMo-Relay delivers a functional, multi-language runtime for agent scope and lifecycle management with a clean crate architecture and solid test coverage. The Rust core is the primary dependency surface, and the secret-schema file merits a look before deployment. It is best suited for teams building or integrating coding agents who need structured execution trails without forking their entire stack. Teams already heavily invested in a single language or framework may find the multi-language surface area broader than needed.