A lightweight, async-first workflow orchestration engine with a premium "Command Center" frontend. Designed for building, running, and visualizing agentic workflows with ease.
Features • Installation • Usage • Frontend • Architecture
- Graph-Based Execution: Define workflows as directed graphs with Nodes (steps) and Edges (logic).
- Cyclic Graphs: Native support for loops (e.g., "Review -> Fix -> Review" cycles).
- Conditional Branching: Dynamic path selection based on state.
- Async Native: Fully asynchronous execution core supporting
async defnodes. - State Management: Shared dictionary-based state passed between all nodes.
- WebSocket Streaming: Real-time event streaming for live visualization of step execution.
- Persistence: SQLite-backed storage for run history and state recovery.
- Tool Registry: Simple decorator-based system for registering agent tools.
- REST API: Full FastAPI suite for creating runs and querying logic.
git clone https://github.com/yourusername/minimal-workflow-engine.git
cd minimal-workflow-enginepip install -r requirements.txtpython3 -m uvicorn app.main:app --reload --port 8000The application will start at http://localhost:8000
Access the MonitorOS-style dashboard at http://localhost:8000.
- Source Code Input: Edit the python code you want the agent to review.
- Neural Topology: A real-time visualizer showing the active node in the workflow graph.
- System Terminal: Live log stream of the execution process via WebSockets.
- Updated Code: The final output generated by the agent.
- Open the dashboard.
- Modify the code in the left "Source Code" panel.
- Click INITIALIZE AGENT.
- Watch the graph light up and logs stream as the "Code Review Agent" analyzes your code.
- See the improvements in the right "Updated Code" panel.
You can also interact with the engine purely via curl or HTTP clients.
curl -X POST "http://127.0.0.1:8000/graph/run" \
-H "Content-Type: application/json" \
-d '{
"graph_id": "code-review-v1",
"initial_state": {
"code": "def hello(): print("world")"
}
}'GET /graph/state/{run_id}The project follows a clean, modular structure:
app/
├── main.py # Application Entry & Endpoints
├── engine.py # Core Graph Execution Logic
├── db.py # Database Persistence Layer
├── registry.py # Tool/Function Registry
├── workflows/ # Workflow Definitions
│ └── code_review.py # Sample "Code Review" Graph
└── static/ # Frontend Assets
├── index.html # Command Center Layout
├── style.css # Premium Glassmorphism Styles
└── script.js # WebSocket & UI Logic
The engine comes pre-loaded with a Code Review Workflow:
- Extract: Parses the input Python code.
- Analyze: Checks complexity and style.
- Issues?: Decides if the code needs improvement (Branching).
- Improve: Modifies the code (adding types, docstrings) if needed.
- Loop: Re-analyzes the new code until it passes checks.