nemo-relay
Python bindings for the NeMo Relay agent runtime.
What it is and what it does
nemo-relay is a Python binding for a portable agent runtime written in Rust, designed to give Python applications structured execution contexts for agent, tool, and LLM work. It provides scope trees, middleware for guardrails and request rewriting, lifecycle event streams, and observability hooks—all aligned with the same runtime semantics used by the Rust and Node.js versions of the library.
The package is built for teams that need to add agent instrumentation and policy enforcement to existing Python frameworks without a full framework migration. It exposes public modules for scope management, tool and LLM helpers, middleware APIs, subscribers and exporters (including OpenTelemetry), and optional integrations with LangChain, LangGraph, and Deep Agents. Event delivery is asynchronous, and the runtime supports serialization to JSON and ATIF (Agent Trajectory Interchange Format) for downstream observability systems.
Use it for:
- Wrap LangChain or LangGraph agent callbacks with guardrails and observability without rewriting the orchestration layer.
- Emit structured lifecycle events (scope creation, tool calls, LLM requests) to OpenTelemetry or custom subscribers for monitoring and compliance.
- Intercept and rewrite tool or LLM requests at runtime to enforce policies, sanitize payloads, or inject context.
- Group agent and tool execution into a scope tree from Python code to track causality and ownership across concurrent work.
- Integrate agent observability into existing Python applications while maintaining the same runtime semantics across Rust, Node.js, and Python codebases.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
nemo-relay wraps a shared Rust runtime to give Python applications an agent execution framework with scope management, middleware, lifecycle events, and observability for tool and LLM calls.
Yes, if you are building Python agents and need structured execution scopes, middleware, or observability without a framework rewrite. The package is actively maintained, supports current Python versions, has no known vulnerabilities, and carries a permissive license. Install friction is medium due to compiled wheels, but pre-built binaries are available for common platforms. Start with the base package and add optional integrations (langchain, langgraph) only if you use those frameworks.
Install
nemo-relay on PyPI
pip
pip install nemo-relayuv
uv add nemo-relaypoetry
poetry add nemo-relayInstalling nemo-relay
Before you install
Medium install friction due to compiled wheels; actively maintained with release on 2026-08-14 and 121 repository stars. Supports current Python versions (3.11, 3.12, 3.13) across multiple platforms (macOS, Linux, Windows, including ARM architectures).
License in practice
Apache-2.0 permissive license allows use in commercial and proprietary projects with minimal restrictions; attribution required.
Quickstart
import nemo_relay
def on_event(event):
print(f"{event.kind} {event.name}")
nemo_relay.subscribers.register("printer", on_event)
with nemo_relay.scope.scope("demo-agent", nemo_relay.ScopeType.Agent) as handle:
nemo_relay.scope.event("initialized", handle=handle, data={"binding": "python"})
nemo_relay.subscribers.flush()
Requires Python 3.11 or later; subscriber event delivery is asynchronous, so flush() must be called before reading output or exiting.
Verify before relying
- Whether optional integrations (langchain, langgraph, deepagents) are pre-installed or require separate installation steps beyond the extras syntax.
- Performance characteristics and latency overhead of the Rust runtime wrapper for high-throughput agent workloads.
- Compatibility guarantees with specific versions of LangChain, LangGraph, or other framework dependencies listed in extras.
Package facts
| License | Apache-2.0 (permissive) |
| Python support | supports the current Python release (>=3.11) |
| Install friction | medium — platform-specific wheel |
| Runtime dependencies | none |
| Maintenance | actively maintained — 0 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 626,569/month — #5,688 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: nemo_relay-0.7.3-cp311-abi3-macosx_11_0_arm64.whl; nemo_relay-0.7.3-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl; nemo_relay-0.7.3-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl; nemo_relay-0.7.3-cp311-abi3-musllinux_1_2_aarch64.whl; nemo_relay-0.7.3-cp311-abi3-musllinux_1_2_x86_64.whl; nemo_relay-0.7.3-cp311-abi3-win_amd64.whl; nemo_relay-0.7.3-cp311-abi3-win_arm64.whl
Keywords: agents, ai, llm, middleware, nemo-relay, observability, runtime, tools
Tags
More Artificial Intelligence packages
LiteLLM provides a unified Python interface to…
permissive · top 100 on PyPI
huggingface-hubClient library and CLI tool for downloading,…
permissive · top 100 on PyPI
langchainLangChain provides a framework for building…
permissive · top 1,000 on PyPI
hf-xethf-xet provides chunk-based deduplication and…
permissive · top 1,000 on PyPI
tokenizersTokenizers converts raw text into token…
permissive · top 1,000 on PyPI
transformersTransformers provides a unified framework for…
permissive · top 1,000 on PyPI
nvidia-nat-langchainIntegrates LangChain and LangGraph with…
permissive · top 15,000 on PyPI
nvidia-nat-opentelemetryAdds OpenTelemetry observability…
permissive · top 15,000 on PyPI
nvidia-nat-evalProvides evaluation components and CLI commands…
permissive · top 15,000 on PyPI
nvidia-nat-atifProvides ATIF schema models for the NVIDIA NeMo…
permissive · top 15,000 on PyPI
nvidia-nat-coreNVIDIA NeMo Agent Toolkit is a…
permissive · top 15,000 on PyPI
fabricatioFabricatio is a Python library for building…
permissive · top 15,000 on PyPI
nemoguardrailsAdds programmable guardrails to LLM-based…
permissive · top 15,000 on PyPI
nvidia-nat-mcpIntegrates MCP (Model Context Protocol) servers…
permissive · top 15,000 on PyPI
conductor-pythonBuild durable Conductor agents, workflows, and…
permissive · top 15,000 on PyPI
nemo-gymNeMo Gym provides infrastructure for building,…
permissive · top 5,000 on PyPI