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

Uploaded CPython 3.11+Windows ARM64

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

Uploaded CPython 3.11+Windows x86-64

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

File metadata

File hashes

Hashes for nemo_flow-0.1.0rc4-cp311-abi3-win_arm64.whl
Algorithm Hash digest
SHA256 3b63402103e2ff35776abd7ab68b6ccf52869a919a9d35390fb36f0aa64ed832
MD5 d085a99e8ac8f366318ab80838ae8b9a
BLAKE2b-256 3f05356b0ca4b72044281e65bda6f3abdb929e5b0db88427184caa32fe1ae058

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: nemo_flow-0.1.0rc4-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.0rc4-cp311-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 dd045fd3ca939ba7524e36eb38c149e38d07e8fe7a670b3892c18a4a64f6bb34
MD5 c8c006009c35f5de2722e25585042c80
BLAKE2b-256 a4110f8400210a4d432486ce4d85cc7ae6f1643761307e53c4f842e660971997

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for nemo_flow-0.1.0rc4-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 b6497dfb6b62e97288e94c6984343698c73999d50664da086e19d439f67d00f2
MD5 3289fe62545b529768dedf2db5b279f3
BLAKE2b-256 1954ff7e8f5376d21c9ceba8ad60f6b9737e4c8670d3a7262ca0f4971be7c6e4

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for nemo_flow-0.1.0rc4-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 475cc1ed09dd36537c916f6effd65eefaac9837d17f2f57f5f318abe639cb17e
MD5 c42af989aa22674155c878ce13cb5ac1
BLAKE2b-256 f98deba2e10ff0e826f1c388fcf4743953007a8c6b0811e32e5bac0acfdcaaf7

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for nemo_flow-0.1.0rc4-cp311-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 ab604e86af40f3eec4cc3959d8ac23207a69541673b032b34b39f572e9767a6f
MD5 2d1a452d4683d7e8f48e665841492cfd
BLAKE2b-256 3b9efd273b06bb40a68ca4f36c686a8161ceb8d5dfa069f5fffb57822dbea872

See more details on using hashes here.

Provenance

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