Diagram-based AI workflow generation built on AbstractCore
Project description
AbstractFlow
Diagram-based, durable AI workflows for Python.
AbstractFlow is part of the AbstractFramework ecosystem and is built on:
- AbstractRuntime: durable runs, waits, subworkflows, stores
- AbstractCore: providers/models/tools (used via runtime integrations)
It provides:
- A small programmatic API (
Flow,FlowRunner) for building and running flows in Python. - A portable workflow format (
VisualFlowJSON) + helpers to execute it from any host (abstractflow.visual). - A Gateway-first visual editor app in
web/(React frontend +/api/gateway/*proxy).
Project status: Pre-alpha (pyproject.toml: Development Status :: 2 - Pre-Alpha). Expect breaking changes.
Evidence (code): abstractflow/runner.py, abstractflow/visual/executor.py, abstractflow/cli.py, web/backend/routes/ws.py.
Diagram (how it fits together)
flowchart LR
UI[Visual editor UI<br/>npx @abstractframework/flow] <-->|/api/gateway/*| GW[AbstractGateway<br/>runs/ledger/artifacts/bundles]
HOST[Any host process<br/>CLI / server / notebook] --> VF[VisualFlow models<br/>abstractflow/visual/models.py]
HOST --> RUN[create_visual_runner / execute_visual_flow<br/>abstractflow/visual/executor.py]
RUN --> RT[AbstractRuntime Runtime]
RT -->|effects| AC[AbstractCore]
RT --> STORES[(Run/Ledger/Artifacts stores)]
Docs
Published documentation: https://www.lpalbou.info/AbstractFlow/
- Getting started: docs/getting-started.md
- API (high-level): docs/api.md
- Architecture: docs/architecture.md
- FAQ: docs/faq.md
- VisualFlow JSON format: docs/visualflow.md
- CLI: docs/cli.md
- Visual editor: docs/web-editor.md
- Docs index: docs/README.md
Installation
pip install abstractflow
Requirements: Python 3.10+ (pyproject.toml: requires-python).
Optional extras (declared in pyproject.toml):
- Host profiles for local programmatic/VisualFlow execution compatibility (
Flow,FlowRunner,execute_visual_flow, workflow bundles):pip install "abstractflow[apple]"orpip install "abstractflow[gpu]" - Full host profiles:
- Apple-capable:
pip install "abstractflow[apple]" - GPU-capable:
pip install "abstractflow[gpu]"
- Apple-capable:
abstractflow[apple]andabstractflow[gpu]both include gateway proxy + local compatibility stack.- Agent nodes (Visual Agent node support):
pip install "abstractflow[agent]" - Documentation site tools:
pip install "abstractflow[docs]"
Quickstart (programmatic)
# Requires: `abstractflow[apple]` or `abstractflow[gpu]`
from abstractflow import Flow, FlowRunner
flow = Flow("linear")
flow.add_node("double", lambda x: x * 2, input_key="value", output_key="doubled")
flow.add_node("add_ten", lambda x: x + 10, input_key="doubled", output_key="final")
flow.add_edge("double", "add_ten")
flow.set_entry("double")
print(FlowRunner(flow).run({"value": 5}))
# {"success": True, "result": 20}
Quickstart (execute a VisualFlow JSON)
import json
from abstractflow.visual import VisualFlow, execute_visual_flow
# Requires: `abstractflow[apple]` or `abstractflow[gpu]`
with open("my-flow.json", "r", encoding="utf-8") as f:
vf = VisualFlow.model_validate(json.load(f))
print(execute_visual_flow(vf, {"prompt": "Hello"}, flows={vf.id: vf}))
If your flow uses subflows, load all referenced *.json into the flows={...} mapping (see docs/getting-started.md).
Visual editor (Gateway-first)
The visual editor talks to AbstractGateway. The Flow server keeps the Gateway bearer token server-side while proxying browser requests.
# Terminal 1: Gateway
pip install "abstractgateway[http]" abstractflow
export ABSTRACTGATEWAY_AUTH_TOKEN=dev-token
abstractgateway --port 8080
# Terminal 2: editor UI (static server + /api/gateway proxy)
export ABSTRACTGATEWAY_AUTH_TOKEN=dev-token
npx @abstractframework/flow --gateway-url http://127.0.0.1:8080
Open:
- UI: http://localhost:3003
- Gateway capabilities: http://localhost:8080/api/gateway/discovery/capabilities
The abstractflow serve/FastAPI host is a Gateway proxy by default. Its old local /api/flows, /api/ws, and /api/runs compatibility routes are available only when ABSTRACTFLOW_ENABLE_LOCAL_RUNTIME=1 is set. See docs/web-editor.md and docs/architecture.md.
CLI (WorkflowBundle .flow)
abstractflow bundle pack web/flows/ac-echo.json --out /tmp/ac-echo.flow
abstractflow bundle inspect /tmp/ac-echo.flow
abstractflow bundle unpack /tmp/ac-echo.flow --dir /tmp/ac-echo
See docs/cli.md and abstractflow/cli.py.
Related projects
- AbstractFramework: https://github.com/lpalbou/AbstractFramework
- AbstractRuntime: https://github.com/lpalbou/abstractruntime
- AbstractCore: https://github.com/lpalbou/abstractcore
- AbstractAgent (optional): https://github.com/lpalbou/AbstractAgent
Repo policies
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- Security: SECURITY.md
- Acknowledgments: ACKNOWLEDGMENTS.md
- License: LICENSE
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file abstractflow-0.3.9.tar.gz.
File metadata
- Download URL: abstractflow-0.3.9.tar.gz
- Upload date:
- Size: 158.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a7d67b3db58fbc97dfd0ef82ec349a10541dc67be189f6b580cbaebc7e8282ee
|
|
| MD5 |
2e0b23ee342fc26ab49e709995e23bf7
|
|
| BLAKE2b-256 |
29fe63707852e46a2622e007a08ef1b1b89e5534e1c8dde6533392be97599699
|
Provenance
The following attestation bundles were made for abstractflow-0.3.9.tar.gz:
Publisher:
release.yml on lpalbou/AbstractFlow
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
abstractflow-0.3.9.tar.gz -
Subject digest:
a7d67b3db58fbc97dfd0ef82ec349a10541dc67be189f6b580cbaebc7e8282ee - Sigstore transparency entry: 1510054107
- Sigstore integration time:
-
Permalink:
lpalbou/AbstractFlow@d373832a471803eeb9b219eb0b5dddce4c29b54b -
Branch / Tag:
refs/heads/main - Owner: https://github.com/lpalbou
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@d373832a471803eeb9b219eb0b5dddce4c29b54b -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file abstractflow-0.3.9-py3-none-any.whl.
File metadata
- Download URL: abstractflow-0.3.9-py3-none-any.whl
- Upload date:
- Size: 102.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
89f770a742af44680791734da4f0a03d644e5e6243738cc48c4f0aba4ae0b4fc
|
|
| MD5 |
e66b075fbcc803274c9dee58d267f731
|
|
| BLAKE2b-256 |
bc1113e606e76673b4d79cf974648e69b6f63659dd0f746ae7b4e3bdaecca2cb
|
Provenance
The following attestation bundles were made for abstractflow-0.3.9-py3-none-any.whl:
Publisher:
release.yml on lpalbou/AbstractFlow
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
abstractflow-0.3.9-py3-none-any.whl -
Subject digest:
89f770a742af44680791734da4f0a03d644e5e6243738cc48c4f0aba4ae0b4fc - Sigstore transparency entry: 1510054179
- Sigstore integration time:
-
Permalink:
lpalbou/AbstractFlow@d373832a471803eeb9b219eb0b5dddce4c29b54b -
Branch / Tag:
refs/heads/main - Owner: https://github.com/lpalbou
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@d373832a471803eeb9b219eb0b5dddce4c29b54b -
Trigger Event:
workflow_dispatch
-
Statement type: