--- id: nemo-relay version: "0.7.3" license: Apache-2.0 license_treatment: permissive maintenance: active --- # nemo-relay — Python bindings for the NeMo Relay agent runtime. License: permissive · Maintenance: active · Downloads: 626.6K/mo ## 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 above — 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 pip install nemo-relay uv add nemo-relay 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_current - Install friction: medium - Maintenance: active - Downloads: 626.6K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags agent runtime python, llm execution scope management, middleware for tool calls, observability agent framework, agent lifecycle events, python agent instrumentation, llm call guardrails, agent-runtime, observability, middleware [View on SkillFed](https://skillfed.io/packages/nemo-relay) · [View on PyPI](https://pypi.org/project/nemo-relay/)