Skip to main content

Trustworthy orchestration for LLM-powered agents with predictable routing, immutable state, and zero dependencies

Reason this release was yanked:

documentation was incorrect

Project description

ClearFlow

Trustworthy orchestration for LLM-powered agents. Predictable routing. Immutable state. Single termination enforced.

License: MIT Python 3.13+

For Production Agents

If you're building LLM-powered agents for mission and life-critical systems - financial trading bots, medical diagnostic assistants, industrial control systems, autonomous code generators, security incident responders - you understand the challenges of working with probabilistic AI systems.

You need predictable foundations. ClearFlow provides explicit, trustworthy orchestration so your framework isn't another source of surprises.

What We Actually Do

We provide a trustworthy orchestration framework for connecting LLM calls and other async operations in your agents.

What we guarantee:

  • Static orchestration - Given a node outcome, the next step is always predictable
  • Type-safe generics - Full mypy/pyright strict validation
  • Immutable state - State objects cannot be mutated, only transformed
  • Single termination - Every flow has exactly one endpoint, enforced at build time
  • No hidden behavior - What you define is what executes

What we DON'T guarantee:

  • Deterministic execution (your nodes can do anything)
  • Consistent timing or ordering of async operations
  • Protection from failures in your node implementations
  • Any behavior of the LLMs or external services you call

Verify Our Claims

  • 100% test coverage: Run ./quality-check.sh
  • Type safety: Check clearflow/init.py - no Any, no type: ignore
  • Minimal codebase: 191 lines in clearflow/__init__.py
  • Zero dependencies: Check dependencies = [] in pyproject.toml
  • Immutable types: All dataclasses use frozen=True
  • Single termination: See enforcement in _StartedWithFlow.build() method

Get Started

# Clone and install locally (package not yet published)
git clone https://github.com/consent-ai/ClearFlow.git
cd ClearFlow
pip install -e .

See examples/chat for a working example showing the core patterns.

Early Stage Notice

ClearFlow is young (v0.x) and focused. We do one thing well: provide trustworthy orchestration for LLM-powered agents. We're the foundation layer - you bring your own LLM integrations and agent logic.

Philosophy

We believe:

  • Explicit is better than implicit - Every route and transformation is visible
  • Type safety prevents errors - Catch issues at development time, not in production
  • Immutability aids debugging - Trace exactly how state changes through your flow
  • Constraints enable confidence - Single termination means predictable completion

ClearFlow is a minimal orchestration layer that does exactly what you tell it to do - nothing more, nothing less.

Acknowledgments

ClearFlow was inspired by PocketFlow's elegant Node-Flow-State pattern and its proof that powerful workflow systems can be built with minimal code. We've adopted their core concepts and naming conventions while adding functional patterns, type safety, and immutability constraints needed for mission-critical systems.

License

MIT

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

clearflow-0.0.1.tar.gz (30.1 kB view details)

Uploaded Source

Built Distribution

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

clearflow-0.0.1-py3-none-any.whl (6.1 kB view details)

Uploaded Python 3

File details

Details for the file clearflow-0.0.1.tar.gz.

File metadata

  • Download URL: clearflow-0.0.1.tar.gz
  • Upload date:
  • Size: 30.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for clearflow-0.0.1.tar.gz
Algorithm Hash digest
SHA256 175aca492cf84d05c24dc458805e40bc35e4cad664fca57b5f76498381d32c70
MD5 d4912db694b2634c6319a684f1eda794
BLAKE2b-256 b07d6a4a79d4ae363ac06f9707e42b43db3b14d628e9823d389b07afeb1ffb66

See more details on using hashes here.

Provenance

The following attestation bundles were made for clearflow-0.0.1.tar.gz:

Publisher: release.yml on consent-ai/ClearFlow

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

File details

Details for the file clearflow-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: clearflow-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 6.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for clearflow-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 7ccfb395b7a774d5cee034f93f08da70c5776c726fe750fda349443a2544e37d
MD5 bccd5bf763b5e0151ac5cc22fe723c51
BLAKE2b-256 678b4897680a48b52395271dd285fe9a41f81ec0b457af656be1c4093dea5304

See more details on using hashes here.

Provenance

The following attestation bundles were made for clearflow-0.0.1-py3-none-any.whl:

Publisher: release.yml on consent-ai/ClearFlow

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