Skip to main content

Python bindings for the NeMo Flow agent runtime.

Reason this release was yanked:

`nemo-flow` is now `nemo-relay`

Project description

License GitHub Release Codecov PyPI npm node npm wasm Crates.io Crates.io Ask DeepWiki

NeMo Flow Python Package

nemo-flow is the NeMo Flow package for Python applications. It gives Python code access to a portable agent runtime for execution scopes, middleware, plugins, lifecycle events, adaptive behavior, and observability around tool and LLM calls.

The package wraps the shared Rust runtime, so Python applications use the same runtime semantics as the Rust and Node.js surfaces.

Why Use It?

  • 🧭 Own execution context in Python: Group agent, tool, and LLM work into one scope tree from Python application code.
  • 🛡️ Package policy around callbacks: Use guardrails and intercepts to block work, sanitize observability payloads, rewrite requests, or wrap execution.
  • 📡 Emit one lifecycle stream: Send runtime events to in-process subscribers, ATIF, OpenTelemetry, or OpenInference workflows.
  • 🧩 Integrate without a framework migration: Wrap framework or provider callbacks while preserving the application’s orchestration model.

What You Get

  • Scope, tool, and LLM helpers: Managed boundaries that emit lifecycle events and run middleware in a consistent order.
  • Middleware APIs: Guardrails and intercepts for tool and LLM requests, responses, and execution.
  • Subscribers and exporters: Event consumers for observability and diagnostics.
  • Plugin and typed helpers: Public modules for plugins, codecs, typed wrappers, adaptive runtime behavior, and observability plugin configuration.
  • Shared Rust runtime semantics: Python behavior aligned with the Rust and Node.js surfaces.

Installation

Install the published package with uv:

uv add nemo-flow

If you are not using uv, install it with pip:

pip install nemo-flow

Optional Dependencies

LangChain Integration

LangChain integration is available with the langchain extra:

# With uv
uv add "nemo-flow[langchain]"

# With pip
pip install "nemo-flow[langchain]"

LangGraph Integration

LangGraph integration is available with the langgraph extra, this builds upon and includes the langchain extra as well.

# With uv
uv add "nemo-flow[langgraph]"

# With pip
pip install "nemo-flow[langgraph]"

LangChain NVIDIA Integration

The LangChain NVIDIA extra builds upon the langchain extra adding a compatible version of the langchain-nvidia-ai-endpoints package.

# With uv
uv add "nemo-flow[langchain-nvidia]"

# With pip
pip install "nemo-flow[langchain-nvidia]"

To install this along with the langgraph extra, use:

# With uv
uv add nemo-flow[langgraph,langchain-nvidia]
# With pip
pip install nemo-flow[langgraph,langchain-nvidia]

Getting Started

Register a subscriber, create a scope, and emit a mark event:

import nemo_flow


def on_event(event) -> None:
    print(f"{event.kind} {event.name}")


nemo_flow.subscribers.register("printer", on_event)

with nemo_flow.scope.scope("demo-agent", nemo_flow.ScopeType.Agent) as handle:
    nemo_flow.scope.event("initialized", handle=handle, data={"binding": "python"})

nemo_flow.subscribers.deregister("printer")

Package Surface

The public package modules are:

  • nemo_flow.scope
  • nemo_flow.tools
  • nemo_flow.llm
  • nemo_flow.guardrails
  • nemo_flow.intercepts
  • nemo_flow.subscribers
  • nemo_flow.plugin
  • nemo_flow.adaptive
  • nemo_flow.observability
  • nemo_flow.typed
  • nemo_flow.codecs

Integrations

  • nemo_flow.integrations.langchain
  • nemo_flow.integrations.langgraph

The compiled extension is exposed as nemo_flow._native.

Documentation

NeMo Flow Documentation: https://nvidia.github.io/NeMo-Flow

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

nemo_flow-0.2.0rc2-cp311-abi3-win_arm64.whl (4.5 MB view details)

Uploaded CPython 3.11+Windows ARM64

nemo_flow-0.2.0rc2-cp311-abi3-win_amd64.whl (4.7 MB view details)

Uploaded CPython 3.11+Windows x86-64

nemo_flow-0.2.0rc2-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (4.8 MB view details)

Uploaded CPython 3.11+manylinux: glibc 2.17+ x86-64

nemo_flow-0.2.0rc2-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (4.6 MB view details)

Uploaded CPython 3.11+manylinux: glibc 2.17+ ARM64

nemo_flow-0.2.0rc2-cp311-abi3-macosx_11_0_arm64.whl (5.1 MB view details)

Uploaded CPython 3.11+macOS 11.0+ ARM64

File details

Details for the file nemo_flow-0.2.0rc2-cp311-abi3-win_arm64.whl.

File metadata

File hashes

Hashes for nemo_flow-0.2.0rc2-cp311-abi3-win_arm64.whl
Algorithm Hash digest
SHA256 e250abc90dc5ac7f36881af433de5bc28e0bcdc0f3b26376192217191aa9876a
MD5 9df1dc50d0e5e99e6cc25b72548696ad
BLAKE2b-256 26a85f66fd34d7bfff219817ace2be3ca0ef422cf86c29a8a02b7e2f1f596234

See more details on using hashes here.

Provenance

The following attestation bundles were made for nemo_flow-0.2.0rc2-cp311-abi3-win_arm64.whl:

Publisher: ci.yaml on NVIDIA/NeMo-Flow

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file nemo_flow-0.2.0rc2-cp311-abi3-win_amd64.whl.

File metadata

  • Download URL: nemo_flow-0.2.0rc2-cp311-abi3-win_amd64.whl
  • Upload date:
  • Size: 4.7 MB
  • Tags: CPython 3.11+, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for nemo_flow-0.2.0rc2-cp311-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 95c61c8fa3118c9f88371046915b9d9ad9adc38732ac545ce75954f099ff4f43
MD5 8993e132dbc9d635bcaed4bbe17b9517
BLAKE2b-256 ff4d8358e7804b967ff306b14d81cef952a6b812ae1780cdd9fb17467aeeab2b

See more details on using hashes here.

Provenance

The following attestation bundles were made for nemo_flow-0.2.0rc2-cp311-abi3-win_amd64.whl:

Publisher: ci.yaml on NVIDIA/NeMo-Flow

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file nemo_flow-0.2.0rc2-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for nemo_flow-0.2.0rc2-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 dc54350ec1ecea0f346518ce9dd5016f413d60ca90afd3d6dd8d7ba56ac809d6
MD5 88a39d73a3e8620ba4dcf6b58f145b57
BLAKE2b-256 5539b3e2985e1f23c5de3907ac1af9311d30eaf9a430f9433ab677253ee1cc7d

See more details on using hashes here.

Provenance

The following attestation bundles were made for nemo_flow-0.2.0rc2-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: ci.yaml on NVIDIA/NeMo-Flow

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file nemo_flow-0.2.0rc2-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for nemo_flow-0.2.0rc2-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 708c69b00c575d5ca66040819024306c0c040eddc6e172cc82b03f3bc56b896e
MD5 5ca5ad681fd518c80a140cf6331e7f69
BLAKE2b-256 ab8b9b8addbac50b2c90b6bb941ea6a151c976c8a891e0b96a65122aa11d8761

See more details on using hashes here.

Provenance

The following attestation bundles were made for nemo_flow-0.2.0rc2-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:

Publisher: ci.yaml on NVIDIA/NeMo-Flow

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file nemo_flow-0.2.0rc2-cp311-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for nemo_flow-0.2.0rc2-cp311-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 ffb4cd9a0ad1b344f82f20ec1c81728af2511e23c1f031253c6b0dfcf73bef12
MD5 d9130138deaf7415a07a8df2fcc96010
BLAKE2b-256 3cea56dca1571e9c9032ed0d0543991cdbc1f6952a781455d544fdb106475ca7

See more details on using hashes here.

Provenance

The following attestation bundles were made for nemo_flow-0.2.0rc2-cp311-abi3-macosx_11_0_arm64.whl:

Publisher: ci.yaml on NVIDIA/NeMo-Flow

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page