Typeflow is a modern visual workflow engine for Python, enabling developers to design, validate, and execute fully type-safe workflows using a clean drag-and-drop editor.
Typeflow brings together:
- A Python-first workflow compiler
- A React Flow–powered visual editor
- A modular, deterministic execution engine
This allows you to build complex, reliable systems using Python functions, classes, and AI-assisted logic — all represented visually as nodes.
This repository contains both:
- The
typeflowPython package - The Next.js-based visual editor shipped with it
For documentation, click on this link: Typeflow
Design pipelines using a friendly React Flow UI — fully offline, local, secure.
Every node input/output uses Python type hints, validated at compile-time.
Use plain Python:
@node()for function nodes@node_classfor full object-oriented visual programming
Typeflow compiles the DAG → generates Python code → executes deterministically.
Watch every node execute in real-time inside the editor.
Typeflow is built with modular LLM integration in mind — ideal for agents, ETL/ML pipelines, decision graphs, and reasoning flows.
root/
│
├── editor/ # Next.js (React Flow) visual editor
│ ├── app/
│ ├── components/
│ ├── hooks/
│ ├── lib/
│ ├── types/
│ └── public/
│
└── typeflow/ # Python package
├── src/typeflow/
│ ├── cli/ # Typer CLI commands (setup, create-node, validate…)
│ ├── core/ # Compiler & script generator
│ ├── sdk/ # Node + node_class decorators
│ ├── server/ # FastAPI backend for editor
│ └── utils/ # Internal utilities
├── tests/
├── pyproject.toml
└── README.md
Install Typeflow from PyPI:
pip install typeflowappCreate a new Typeflow project:
typeflow setup my_app
cd my_app
source .venv/bin/activate # macOS/Linux
# or
.\.venv\Scripts\activate # WindowsStart the visual editor:
typeflow start-uiClone this repo:
git clone https://github.com/SrabanMondal/typeflow.git
cd typeflowcd typeflow
poetry installRun CLI in dev mode:
poetry run typeflow --helpRun tests:
pytestcd editor
npm install
npm run devYou should also have a Typeflow backend running from a project:
typeflow start-uiThe editor will automatically connect to the backend via its FastAPI routes.
| Concept | Description |
|---|---|
| Function Nodes | Simple Python functions wrapped in @node() |
| Class Nodes | True visual OOP: instantiate objects, access fields, call methods, pass objects through graph |
| DAG Compiler | Reads workflow.json → validates & type-checks → generates Python executor |
| Editor | Drag nodes, connect edges, inspect values, run workflows live |
| Pure Local Execution | No cloud, no telemetry — fully offline and transparent |
Documentation is generated using MkDocs.
After cloning:
cd typeflow
poetry install
poetry run mkdocs serveDocs include:
- Getting started
- Function/class node guides
- Workflow building
- Editor usage
- Advanced examples
- Contribution standards
You can view this repository to see a real example of Ai agent created using typeflow framework, which you can install using typeflow and run it.
We welcome contributions for:
- Node system enhancements
- Editor UI/UX improvements
- New CLI commands
- Compiler improvements
- AI/LLM integrations
- Tests & typing improvements
- Workflow execution optimizations
See:
Licensed under GNU General Public License.
See LICENSE for details.
Typeflow combines:
- The power & simplicity of Python
- The clarity of type-safe architecture
- The expressiveness of visual programming
- The modularity of AI-driven development
Together forming a new direction for AI-ready workflow systems.