Skip to main content

A lightweight Python framework for readable multi-agent pipelines.

Project description

Orchflow

Orchflow is a lightweight Python framework for readable multi-agent pipelines. It gives you sequential, parallel, and conditional orchestration without making you model everything as a graph.

from orchflow import Flow, StepContext, step


@step
async def research(input: str, context: StepContext) -> str:
    return f"research about {input}"


@step
async def write(input: str, context: StepContext) -> str:
    return f"draft based on {context.previous}"


result = await Flow([research, write]).run("agent orchestration")
print(result.output)

Watch the same flow while it runs:

async for event in Flow([research, write]).events("agent orchestration"):
    print(event.type, event.step_name)

Why

Plain Python chaining is easy to read but thin on retries, parallelism, and tracing. Heavy graph runtimes are powerful but can feel like too much for simple pipelines. Orchflow aims for the middle: small API, predictable state, useful traces, and offline-testable agent workflows.

Features

  • Sequential flows
  • Parallel step groups
  • Conditional routing
  • Retry policies
  • Shared run state
  • Flat structured traces
  • Live flow events with Flow.events(...)
  • Public Agent with optional LiteLLM support
  • Offline testing helpers under orchflow.testing

Install

pip install orchflow

Optional LiteLLM-backed agents:

pip install "orchflow[litellm]"

Development

uv sync --extra dev
uv run pytest
uv run ruff check
uv run ruff format --check
uv run pyright

Publishing

Publish to TestPyPI first with the manual GitHub Actions workflow in .github/workflows/publish-testpypi.yml. Real PyPI releases are tag-based through .github/workflows/publish-pypi.yml.

See docs/publishing.md for the full release process.

Source Of Truth

Project decisions live in AGENTS.md. Implementation follows that document.

Project details


Download files

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

Source Distribution

orchflow-0.2.0.tar.gz (153.5 kB view details)

Uploaded Source

Built Distribution

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

orchflow-0.2.0-py3-none-any.whl (12.5 kB view details)

Uploaded Python 3

File details

Details for the file orchflow-0.2.0.tar.gz.

File metadata

  • Download URL: orchflow-0.2.0.tar.gz
  • Upload date:
  • Size: 153.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for orchflow-0.2.0.tar.gz
Algorithm Hash digest
SHA256 83c73fb8aaa33aedf525d928b1e80b7daaae54fdec1a52ab307220ad2f6138f8
MD5 121e4f3f420f085af177cf1e53f66dab
BLAKE2b-256 367c347c00741a94bab2ed9a37d0a895fe3a4b4e1eebc247fb8c4a854d628102

See more details on using hashes here.

Provenance

The following attestation bundles were made for orchflow-0.2.0.tar.gz:

Publisher: publish-pypi.yml on awesome-pro/orchflow

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

File details

Details for the file orchflow-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: orchflow-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 12.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for orchflow-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d666bdfd6fb483193bf124d379cfecad282a7016735661979d580a86a42b49fa
MD5 1c95b914c94fe0e9e9bf47985e23cfc2
BLAKE2b-256 fa741328474f7ad757730ab71421f4d7106dbe69c297fa3890228d2dc6b0d334

See more details on using hashes here.

Provenance

The following attestation bundles were made for orchflow-0.2.0-py3-none-any.whl:

Publisher: publish-pypi.yml on awesome-pro/orchflow

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