Inside GraphWorkflow: Kahn's algorithm, frozen plans, and runtime overhead near zero
KyeGomezB · x · 2026-09-08
GraphWorkflow compiles once and sweeps many times: at compile time it infers entry/exit points from node degrees, computes topological generations via Kahn's algorithm, builds predecessor/successor maps in a single edge-list pass, and freezes everything into a per-layer execution plan.
At runtime the graph backend (NetworkX or rustworkx, with Rust computing generations) is entirely out of the hot path — the loop just sweeps the frozen plan with a shared lazy thread pool, and singleton layers execute inline.
The same diamond workflow takes 20 lines vs 40 in LangGraph: no typed schemas, reducers, or explicit START/END wiring (50% less code).
More from coding & agent
- Shift-1 router cuts coding agent spend up to 55% while keeping SWE-bench accuracy — ypatil125 · 2026-10-27
- StackChan robot performs a drama skit via Hermes agent and GPT-Luna-6 — alexcovo_eth · 2026-10-27
- Prompt your agents at the grammar, noun, and verb level for saner interfaces — arvindsatya1 · 2026-10-27
- Infini-AI Lab open-sources Hermit, a framework for agent harness evolution and continual learning — BeidiChen · 2026-10-27
- Meta FAIR's Self-Direction turns agent failures into reusable LoRA skills, +13.8pp on Terminal-Bench — karen_ullrich · 2026-10-27
- Dev ships 1000+ commits with agents by pushing straight to main, no complex orchestration — Dimillian · 2026-10-27