Skip to main content

Python bindings for the NeMo Flow agent runtime.

Project description

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, and adaptive runtime behavior.
  • 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

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.typed
  • nemo_flow.codecs

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.1.0rc5-cp311-abi3-win_arm64.whl (3.5 MB view details)

Uploaded CPython 3.11+Windows ARM64

nemo_flow-0.1.0rc5-cp311-abi3-win_amd64.whl (3.7 MB view details)

Uploaded CPython 3.11+Windows x86-64

nemo_flow-0.1.0rc5-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.8 MB view details)

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

nemo_flow-0.1.0rc5-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (3.6 MB view details)

Uploaded CPython 3.11+manylinux: glibc 2.17+ ARM64

nemo_flow-0.1.0rc5-cp311-abi3-macosx_11_0_arm64.whl (4.0 MB view details)

Uploaded CPython 3.11+macOS 11.0+ ARM64

File details

Details for the file nemo_flow-0.1.0rc5-cp311-abi3-win_arm64.whl.

File metadata

File hashes

Hashes for nemo_flow-0.1.0rc5-cp311-abi3-win_arm64.whl
Algorithm Hash digest
SHA256 600f4bc41fa2e475e9ae8acaf2e443aa31ea4bf891e85cf192d0089eb85b61cf
MD5 310fc2cb0ee0e337f5a90b818592c136
BLAKE2b-256 fb6fd9185fa4f179a0a3219aa7f3a1f93ed47713d9eb905c760e5d5519d4d84f

See more details on using hashes here.

Provenance

The following attestation bundles were made for nemo_flow-0.1.0rc5-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.1.0rc5-cp311-abi3-win_amd64.whl.

File metadata

  • Download URL: nemo_flow-0.1.0rc5-cp311-abi3-win_amd64.whl
  • Upload date:
  • Size: 3.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.1.0rc5-cp311-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 4a4f7fd8c8bbf7c7a898c0b2219be216e5a3428cd2a5ca303111862a7ec4cf72
MD5 eb391e2c2f6ed29fb456501d4932db2a
BLAKE2b-256 4aaffbf59f847b30557e7922ae000ff6e638e676490c2c7fc9a99fe94c6dec79

See more details on using hashes here.

Provenance

The following attestation bundles were made for nemo_flow-0.1.0rc5-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.1.0rc5-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for nemo_flow-0.1.0rc5-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 7e7b4b3559c739f594534aabf76998ffc2f1a4b900f430c4f543a3617dc9db90
MD5 24778da5bc3f417b94e96262ad05f83b
BLAKE2b-256 ef4eea0cd549c2d23159b9eb7cdcd816aa1130ccc83ac3681a63dc96717fdb31

See more details on using hashes here.

Provenance

The following attestation bundles were made for nemo_flow-0.1.0rc5-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.1.0rc5-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for nemo_flow-0.1.0rc5-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 65b037d8de522fb761d6f9453d87ab4a5fe2bae0a6a7c4d2faab37e9bbb0ea9f
MD5 0a80f5e589d6c3eb921ba3889b4f206b
BLAKE2b-256 c15df393a436cd67d4988bf579eac1f0710811b747024be132f07c9982fbb962

See more details on using hashes here.

Provenance

The following attestation bundles were made for nemo_flow-0.1.0rc5-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.1.0rc5-cp311-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for nemo_flow-0.1.0rc5-cp311-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 8dc387684af282dbd63ab91d20894506680f58614c544f1fb9311706715b3b53
MD5 205fcebbd60bb88ea5338358fa226de6
BLAKE2b-256 07733bd8411c9dcf181ab85bfcbe47f30f7ef7114e3d075c7dfc146899258a12

See more details on using hashes here.

Provenance

The following attestation bundles were made for nemo_flow-0.1.0rc5-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