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

Uploaded CPython 3.11+Windows ARM64

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

Uploaded CPython 3.11+Windows x86-64

nemo_flow-0.1.0-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.0-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.0-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.0-cp311-abi3-win_arm64.whl.

File metadata

  • Download URL: nemo_flow-0.1.0-cp311-abi3-win_arm64.whl
  • Upload date:
  • Size: 3.5 MB
  • Tags: CPython 3.11+, Windows ARM64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for nemo_flow-0.1.0-cp311-abi3-win_arm64.whl
Algorithm Hash digest
SHA256 5e20f3eba98f485dd0b3aacd59a71368137648f9315d60ed17bc0cb7ba0e3ec0
MD5 4204353b5280cb5ad82a1097a8a451f5
BLAKE2b-256 042a81ae22a63db2fd1635a83043ebe671fc18327b9c0873601efbfb1526ca14

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: nemo_flow-0.1.0-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.0-cp311-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 ee17c893f543304a32d4a3c8fa6f0892f27c92f068f0ea3d7108853cee13674f
MD5 77276fa31ef003b15922692749117121
BLAKE2b-256 e7c620c2a95c60cde60fc11d90d4523f8e9a57312a60b64dafc46fefa241e6e0

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for nemo_flow-0.1.0-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 b4b44b9ffd3b69744dbb37ca4a4813982f41ada79d28089191d77ce7f797b012
MD5 96f6a1837a730696fbecb1fbac185fcc
BLAKE2b-256 ecca3de7ff316aba0fdee0f077d1e7642e10d9dc87840f4737053047ec00a9ad

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for nemo_flow-0.1.0-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 b437788cea723d5d7271c8001359b73962543253a28710b82a35a19f0abe0671
MD5 a807b8f33260038aa2cbac5c24781cd8
BLAKE2b-256 4c33d251565cdbabf80ab0dd28f3f485bacf4782928ba5dcc56fc69dd2898a73

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for nemo_flow-0.1.0-cp311-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 2763690978b94ea84b4cdb8d137c88376ff24420e5959d2eba315bbcd949a03e
MD5 72b76f8e6a4f9de0dae892054ac5867f
BLAKE2b-256 5e2e2ccd2c9cccea62abafb135ce4f04ad5d3210f63b50d6d12e5ce9347cd13c

See more details on using hashes here.

Provenance

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