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.
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.
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
- 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
- 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
- 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
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
- Customer support ticket routing and response generation
- Document analysis and summarization pipelines
- Content creation and review workflows
- Multi-step data analysis with AI insights
- Automated report generation from raw data
- Real-time data enrichment and validation
- Multi-stage content creation (research β draft β review β publish)
- Interactive storytelling and narrative generation
- Collaborative writing and editing processes
- Hypothesis generation and testing workflows
- Literature review and synthesis automation
- Experimental design and analysis pipelines
- Core: Python 3.8+ with AsyncIO support
- 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
# 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]AbstractFlow requires:
- Python 3.8+
- AbstractRuntime - Workflow execution engine
- AbstractCore - LLM provider abstraction
For the visual editor:
- Node.js 18+ (for frontend)
- FastAPI, uvicorn, websockets (for backend)
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}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"])# 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 "})AbstractFlow includes a state-of-the-art web-based visual editor inspired by Unreal Engine Blueprints:
- 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
| 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 |
- 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
# 1. Create virtual environment and install dependencies
cd abstractflow
python3 -m venv .venv
source .venv/bin/activate
pip install -e . # Install abstractflow
pip install -r web/requirements.txt # Install FastAPI, uvicorn, websockets
# 2. Start backend server (from abstractflow root)
PYTHONPATH=web:../abstractruntime/src:../abstractcore uvicorn backend.main:app --port 8080 --reload
# 3. In a new terminal, start frontend dev server
cd abstractflow/web/frontend
npm install
npm run devThen 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/)
PYTHONPATH=web:../abstractruntime/src:../abstractcore uvicorn backend.main:app --port 8080
# Open http://localhost:8080web/
βββ 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
- 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
- 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
- Custom node development SDK
- Advanced flow control (loops, parallel execution)
- Monitoring and analytics dashboard
- Cloud deployment integration
- Enterprise security features
- Advanced monitoring and alerting
- Multi-tenant support
- Professional services and support
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
AbstractFlow will be released under the MIT License, ensuring it remains free and open-source for all users.
- AbstractCore: The unified LLM interface powering AbstractFlow
- AbstractCore Documentation: Comprehensive guides and API reference
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