Diagram-based, durable AI workflows for AbstractFramework. Drag-and-drop visual editor with portable .flow bundles, recursive subflows, and multi-agent orchestration. Works standalone or through AbstractGateway API routes.
# Launch the visual editor (no repo clone needed)
pip install abstractgateway abstractflow
export ABSTRACTGATEWAY_AUTH_TOKEN=dev-token
abstractgateway serve --port 8080
# In a second terminal
npx @abstractframework/flow --gateway-url http://127.0.0.1:8080
AbstractFlow is a workflow authoring and orchestration layer for the AbstractFramework ecosystem. It provides a programmatic Python API, a portable VisualFlow JSON format, and a browser-based visual editor (React) that works through AbstractGateway API routes.
A browser-based visual editor. Drag nodes from the palette, wire connections, configure providers and models per node. Works standalone or through AbstractGateway via pure API routes.
Workflows are defined as JSON documents following the VisualFlow schema (Pydantic models). Package as .flow bundles and deploy anywhere. Host-independent execution.
Flow and FlowRunner provide a programmatic API for building and running workflows in Python. Create nodes with lambdas, wire edges, and execute with durable stores. Alternatively, interact via AbstractGateway API routes from any language.
Visual workflow authoring inspired by UE4 Blueprint. Build multimodal, multi-agent orchestrations with drag-and-drop.
Multimodal dialogue flow — text, voice, and image at every turn
Multi-agent self-check loop — specialized orchestration patterns
Single-turn output — text response + generated voice + generated image in one turn
A rich node palette for building complex AI pipelines visually, with full durable execution support.
LLM Call, Agent, Tool Call, Code, Conditional, Loop, Subflow, On Flow Start/End, Emit Event, and media nodes (Generate Image, Generate Video, Generate Voice, Generate Music, Transcribe Audio).
Agent nodes with configurable provider, model, tools, and max iterations. Build self-correcting loops with intent analyzers, executors, and reviewers. Each agent can use a different model.
Compose complex pipelines from reusable sub-workflows. Each subflow runs as a durable child run with its own ledger. Subflow nodes can reference any flow in the registry.
Execute Python code within flows using RestrictedPython sandboxing. Transform data, validate outputs, and implement custom logic directly in the visual editor.
Package flows + subflows into portable .flow zip archives. Bundle, inspect, unpack via CLI. Deploy to any gateway with version management and metadata.
Generate images, edit images, create videos, synthesize voice, and compose music directly in workflows. Media nodes use Gateway catalog discovery with auto or explicit provider selection.
Flows can declare interface markers like abstractcode.agent.v1 for host-specific IO contracts. Validation and scaffolding ensures flows meet contract requirements.
Flows can block on external input (ask_user, wait_event, wait_until). Waiting runs are persisted and resume exactly where they left off when input arrives.
The visual editor renders runs with step-by-step traces, media artifact previews (image, video, audio players), progress events for long media jobs, and raw JSON inspection.
Use the visual editor for diagram-based authoring, or build workflows programmatically. Both paths work through Python code or through AbstractGateway API routes from any language.
# Terminal 1: Start the gateway
pip install abstractgateway abstractflow
export ABSTRACTGATEWAY_AUTH_TOKEN=dev-token
abstractgateway serve --port 8080
# Terminal 2: Launch the editor UI
export ABSTRACTGATEWAY_AUTH_TOKEN=dev-token
npx @abstractframework/flow --gateway-url http://127.0.0.1:8080
# Open http://localhost:3003
# Gateway capabilities: http://localhost:8080/api/gateway/discovery/capabilities
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")
result = FlowRunner(flow).run({"value": 5})
print(result)
# {"success": True, "result": 20}
import json
from abstractflow.visual import VisualFlow, execute_visual_flow
with open("my-flow.json", "r", encoding="utf-8") as f:
vf = VisualFlow.model_validate(json.load(f))
result = execute_visual_flow(vf, {"prompt": "Hello"}, flows={vf.id: vf})
print(result)
# Pack a bundle from a VisualFlow JSON
abstractflow bundle pack web/flows/ac-echo.json --out /tmp/ac-echo.flow
# Inspect bundle metadata
abstractflow bundle inspect /tmp/ac-echo.flow
# Unpack to a directory
abstractflow bundle unpack /tmp/ac-echo.flow --dir /tmp/ac-echo
pip install abstractflow
VisualFlow models, bundle helpers, CLI. Works standalone or through AbstractGateway API routes. Python 3.10+.
pip install "abstractflow[apple]"
Full host profile with local execution, Agent nodes, MLX support, and all non-NVIDIA capabilities.
pip install "abstractflow[gpu]"
Full GPU-capable host profile with vLLM, HuggingFace, Diffusers, and CUDA support.
The public API is intentionally small. AbstractFlow delegates compilation and runtime execution to AbstractRuntime.
from abstractflow import (
Flow, # Flow IR
FlowNode, # Node definition
FlowEdge, # Edge definition
FlowRunner, # Execution + output
compile_flow, # Compiler shim
)
from abstractflow.visual import (
VisualFlow, # Pydantic model
VisualNode, # Node schema
VisualEdge, # Edge schema
NodeType, # Node types enum
PinType, # Pin types enum
execute_visual_flow, # Run + return
create_visual_runner,# Advanced runner
)
from abstractflow.workflow_bundle import (
pack_workflow_bundle,
inspect_workflow_bundle,
unpack_workflow_bundle,
)
from abstractflow.visual.interfaces import (
ABSTRACTCODE_AGENT_V1,
validate_visual_flow_interface,
apply_visual_flow_interface_scaffold,
)
The React editor discovers capabilities from the gateway and uses them for node configuration, media catalog selection, and run execution.
# The editor reads capabilities from:
GET /api/gateway/discovery/capabilities
# Key contracts:
# capabilities.contracts.flow_editor — VisualFlow CRUD/publish
# capabilities.contracts.common — runs, ledger, artifacts
# assistant.media.generated_image — image generation nodes
# assistant.media.edited_image — image editing nodes
# assistant.media.generated_video — video generation nodes
# assistant.media.generated_voice — voice synthesis nodes
# assistant.media.generated_music — music generation nodes
# common.readiness — surface readiness overlay
# Bundle management
abstractflow bundle pack <root.json> --out <output.flow> [--flows-dir <dir>]
abstractflow bundle inspect <bundle.flow>
abstractflow bundle unpack <bundle.flow> --dir <output_dir>
# Start the editor backend (dev/compat)
abstractflow serve [--port 3003] [--gateway-url http://...]