skillfed

nemo-relay

Python bindings for the NeMo Relay agent runtime.

nemo-relay v0.7.3 626.6K downloads/30d#5,688 on PyPI121
Permissive license Apache-2.0 Active released

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-relay

uv

uv add nemo-relay

poetry

poetry add nemo-relay

Installing 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

Development Status :: 4 - BetaIntended Audience :: DevelopersProgramming Language :: Python :: 3Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Rust

Tags

agent runtime pythonllm execution scope managementmiddleware for tool callsobservability agent frameworkagent lifecycle eventspython agent instrumentationllm call guardrails
agent-runtimeobservabilitymiddleware

More Artificial Intelligence packages