Diagram-based AI workflow generation built on AbstractCore
Project description
AbstractFlow
Diagram-Based AI Workflow Generation
WIP - Core workflow engine and visual editor are implemented and ready for use!
AbstractFlow is an innovative Python library that enables visual, diagram-based creation and execution of AI workflows. Built on top of AbstractCore, it provides an intuitive interface for designing complex AI pipelines through interactive diagrams.
Monorepo note (Abstract Framework)
This repository is the Abstract Framework monorepo. The implementation in abstractflow/abstractflow/* (Flow/FlowRunner/compiler) and abstractflow/abstractflow/visual/* (VisualFlow models + portable executor) is aligned with docs/architecture.md.
Some parts of this README (and abstractflow/pyproject.toml / abstractflow/CHANGELOG.md) were originally written for a standalone placeholder package and may be out of sync with the monorepo implementation. See docs/architecture.md and planned backlog docs/backlog/planned/093-framework-packaging-alignment-flow-runtime.md.
๐ฏ Vision
AbstractFlow aims to democratize AI workflow creation by providing:
- Visual Workflow Design: Create AI workflows using intuitive drag-and-drop diagrams
- Multi-Provider Support: Leverage any LLM provider through AbstractCore's unified interface
- Real-time Execution: Watch your workflows execute in real-time with live feedback
- Collaborative Development: Share and collaborate on workflow designs
- Production Ready: Deploy workflows to production with built-in monitoring and scaling
๐ Planned Features
Core Capabilities
- Diagram Editor: Web-based visual editor for workflow creation
- Node Library: Pre-built nodes for common AI operations (text generation, analysis, transformation)
- Custom Nodes: Create custom nodes with your own logic and AI models
- Flow Control: Conditional branching, loops, and parallel execution
- Data Transformation: Built-in data processing and transformation capabilities
AI Integration
- Universal LLM Support: Works with OpenAI, Anthropic, Ollama, and all AbstractCore providers
- Tool Calling: Seamless integration with external APIs and services
- Structured Output: Type-safe data flow between workflow nodes
- Streaming Support: Real-time processing for interactive applications
Deployment & Monitoring
- Cloud Deployment: One-click deployment to major cloud platforms
- Monitoring Dashboard: Real-time workflow execution monitoring
- Version Control: Git-based workflow versioning and collaboration
- API Generation: Automatic REST API generation from workflows
๐๏ธ Architecture
AbstractFlow is built on a robust foundation:
โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ
โ Diagram UI โ โ Workflow Engine โ โ AbstractCore โ
โ โโโโโโ โโโโโโ โ
โ Visual Editor โ โ Execution Logic โ โ LLM Providers โ
โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ
- Frontend: React-based diagram editor with real-time collaboration
- Backend: Python workflow execution engine with FastAPI
- AI Layer: AbstractCore for unified LLM provider access
- Storage: Workflow definitions, execution history, and metadata
๐จ Use Cases
Business Process Automation
- Customer support ticket routing and response generation
- Document analysis and summarization pipelines
- Content creation and review workflows
Data Processing
- Multi-step data analysis with AI insights
- Automated report generation from raw data
- Real-time data enrichment and validation
Creative Workflows
- Multi-stage content creation (research โ draft โ review โ publish)
- Interactive storytelling and narrative generation
- Collaborative writing and editing processes
Research & Development
- Hypothesis generation and testing workflows
- Literature review and synthesis automation
- Experimental design and analysis pipelines
๐ ๏ธ Technology Stack
- Core: Python 3.10+ (aligns with AbstractRuntime)
- AI Integration: AbstractCore for LLM provider abstraction
- Web Framework: FastAPI for high-performance API server
- Frontend: React with TypeScript for the diagram editor
- Database: PostgreSQL for workflow storage, Redis for caching
- Deployment: Docker containers with Kubernetes support
๐ฆ Installation
# Clone the repository
git clone https://github.com/lpalbou/AbstractFlow.git
cd AbstractFlow
# Install core dependencies
pip install -e .
# Or install with web editor dependencies
pip install -e .[server]
# Development installation (includes tests)
pip install -e .[dev]
Dependencies
AbstractFlow requires:
- Python 3.10+ (aligns with AbstractRuntime)
- AbstractRuntime - Workflow execution engine
- AbstractCore - LLM provider abstraction
For the visual editor:
- Node.js 18+ (for frontend)
- FastAPI, uvicorn, websockets (for backend)
๐ Quick Start
Programmatic API
from abstractflow import Flow, FlowRunner
# Create a flow
flow = Flow("my-workflow")
# Add function nodes
def double(x):
return x * 2
def add_ten(x):
return x + 10
flow.add_node("double", double, input_key="value", output_key="doubled")
flow.add_node("add_ten", add_ten, input_key="doubled", output_key="result")
# Connect nodes
flow.add_edge("double", "add_ten")
flow.set_entry("double")
# Execute the flow
runner = FlowRunner(flow)
result = runner.run({"value": 5})
print(result) # {"value": 5, "doubled": 10, "result": 20}
With Agents
from abstractflow import Flow, FlowRunner
from abstractagent import create_react_agent
# Create an agent
planner = create_react_agent(provider="ollama", model="qwen3:4b-instruct-2507-q4_K_M")
# Create flow with agent node
flow = Flow("agent-workflow")
flow.add_node("plan", planner, input_key="task", output_key="plan")
flow.set_entry("plan")
# Run
runner = FlowRunner(flow)
result = runner.run({"task": "Plan a weekend trip to Paris"})
print(result["plan"])
Nested Flows (Subflows)
# Create a subflow
inner_flow = Flow("processing")
inner_flow.add_node("step1", lambda x: x.upper())
inner_flow.add_node("step2", lambda x: f"[{x}]")
inner_flow.add_edge("step1", "step2")
inner_flow.set_entry("step1")
# Use subflow in parent flow
outer_flow = Flow("main")
outer_flow.add_node("preprocess", lambda x: x.strip())
outer_flow.add_node("process", inner_flow) # Subflow as node
outer_flow.add_node("postprocess", lambda x: x + "!")
outer_flow.add_edge("preprocess", "process")
outer_flow.add_edge("process", "postprocess")
outer_flow.set_entry("preprocess")
runner = FlowRunner(outer_flow)
result = runner.run({"input": " hello "})
๐ฅ๏ธ Visual Workflow Editor
AbstractFlow includes a state-of-the-art web-based visual editor inspired by Unreal Engine Blueprints:
Features
- Blueprint-Style Nodes: Drag-and-drop nodes with typed, colored pins
- Real-time Execution: Watch workflows execute with live node highlighting via WebSocket
- Monaco Code Editor: Write custom Python code directly in nodes
- Type-Safe Connections: Pin type validation prevents incompatible connections
- Export/Import: Save and load workflows as JSON
Blueprint-Style Pin Types
| Type | Color | Shape | Description |
|---|---|---|---|
| Execution | White #FFFFFF |
โท Triangle | Flow control |
| String | Magenta #FF00FF |
โ Circle | Text data |
| Number | Green #00FF00 |
โ Circle | Integer/Float |
| Boolean | Red #FF0000 |
โ Diamond | True/False |
| Object | Cyan #00FFFF |
โ Circle | JSON objects |
| Array | Orange #FF8800 |
โก Square | Collections |
| Agent | Blue #4488FF |
โฌก Hexagon | Agent reference |
| Any | Gray #888888 |
โ Circle | Accepts any type |
Built-in Node Categories
- Core: Agent, Subflow, Python Code
- Math: Add, Subtract, Multiply, Divide, Modulo, Power, Abs, Round, Min, Max
- String: Concat, Split, Join, Format, Uppercase, Lowercase, Trim, Substring, Length, Replace
- Control: If/Else, Compare, NOT, AND, OR
- Data: Get Property, Set Property, Merge Objects
Running the Visual Editor
# 1. Create virtual environment and install dependencies
cd abstractflow
python3 -m venv .venv
source .venv/bin/activate
# Prefer editable installs over PYTHONPATH hacks so dependency wiring matches real installs.
pip install -e "../abstractcore[tools]"
pip install -e "../abstractruntime[abstractcore]"
pip install -e "../abstractagent"
pip install -e ".[server,agent]"
# 2. Start backend server (run from web/ so `backend.*` is importable)
cd web
uvicorn backend.main:app --port 8080 --reload
# 3. In a new terminal, start frontend dev server
cd abstractflow/web/frontend
npm install
npm run dev
Then open http://localhost:3000 in your browser.
Production mode (serve frontend from backend):
# Build frontend
cd web/frontend && npm run build && cd ../..
# Run backend only (serves frontend from dist/)
cd web
uvicorn backend.main:app --port 8080
# Open http://localhost:8080
Project Structure
web/
โโโ backend/ # FastAPI backend
โ โโโ main.py # App entry with CORS, static files
โ โโโ models.py # Pydantic models (VisualNode, VisualEdge, VisualFlow)
โ โโโ routes/
โ โ โโโ flows.py # Flow CRUD endpoints
โ โ โโโ ws.py # WebSocket for real-time execution
โ โโโ services/
โ โโโ executor.py # VisualFlow โ AbstractFlow conversion
โ โโโ builtins.py # 26 built-in function handlers
โ โโโ code_executor.py # Sandboxed Python execution
โโโ frontend/ # React + TypeScript frontend
โ โโโ src/
โ โ โโโ components/
โ โ โ โโโ Canvas.tsx # React Flow canvas
โ โ โ โโโ NodePalette.tsx # Categorized node picker
โ โ โ โโโ PropertiesPanel.tsx
โ โ โ โโโ Toolbar.tsx # Run/Save/Export/Import
โ โ โ โโโ nodes/
โ โ โ โโโ BaseNode.tsx # Blueprint-style node
โ โ โ โโโ CodeNode.tsx # Monaco editor node
โ โ โโโ hooks/
โ โ โ โโโ useFlow.ts # Zustand state management
โ โ โ โโโ useWebSocket.ts # Real-time updates
โ โ โโโ types/
โ โ โ โโโ flow.ts # TypeScript types, PIN_COLORS
โ โ โ โโโ nodes.ts # Node templates
โ โ โโโ styles/ # Dark theme CSS
โ โโโ package.json
โโโ requirements.txt # Backend Python dependencies
๐ฏ Roadmap
Phase 1: Foundation โ Complete
- Core workflow engine (Flow, FlowNode, FlowEdge)
- Basic node types (Agent, Function, Subflow)
- Flow compilation to WorkflowSpec
- FlowRunner execution via Runtime
- State passing between nodes with dot notation
Phase 2: Visual Editor โ Complete
- Web-based diagram editor with React Flow
- Blueprint-style pins with colors and shapes
- 26 built-in function nodes (math, string, control, data)
- Custom Python code nodes with Monaco editor
- Export/Import JSON functionality
- Real-time execution updates via WebSocket
Phase 3: Advanced Features (Planned)
- Custom node development SDK
- Advanced flow control (loops, parallel execution)
- Monitoring and analytics dashboard
- Cloud deployment integration
Phase 4: Enterprise (Planned)
- Enterprise security features
- Advanced monitoring and alerting
- Multi-tenant support
- Professional services and support
๐ค Contributing
We welcome contributions from the community! Once development begins, you'll be able to:
- Report bugs and request features
- Submit pull requests for improvements
- Create and share workflow templates
- Contribute to documentation
๐ License
AbstractFlow will be released under the MIT License, ensuring it remains free and open-source for all users.
๐ Related Projects
- AbstractCore: The unified LLM interface powering AbstractFlow
- AbstractCore Documentation: Comprehensive guides and API reference
๐ Contact
For early access, partnerships, or questions about AbstractFlow:
- GitHub: Issues and Discussions (coming soon)
- Email: Contact through AbstractCore channels
- Website: www.abstractflow.ai (coming soon)
AbstractFlow - Visualize, Create, Execute. The future of AI workflow development is here.
Built on top of AbstractCore
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.0.tar.gz.
File metadata
- Download URL: abstractflow-0.3.0.tar.gz
- Upload date:
- Size: 147.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
24970b9a7971a48c7808c15d4591bb7674ac4dd4f29232d7ae075b47b9b15f7d
|
|
| MD5 |
d834beebf0a906d3989d4a14ff833b1a
|
|
| BLAKE2b-256 |
22976ed051ed11f99284b487afff61ac0843abd05cddbd316e1da74ece5054a6
|
File details
Details for the file abstractflow-0.3.0-py3-none-any.whl.
File metadata
- Download URL: abstractflow-0.3.0-py3-none-any.whl
- Upload date:
- Size: 98.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6640d489744dd4412764db4ec8bcb2647347679e67c1a8446de85e6fedcba9af
|
|
| MD5 |
13f84a0a3e1de44c7a1d96a6b7071bc4
|
|
| BLAKE2b-256 |
c42c86b05cc680bf6060d5836cec118f6e1aabe19b6a06b2bb69d464dd26075f
|