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
- Grok Build ships triple daily updates: first-party MCP server, persistent subagents push toward full agent workspace — elonmusk · 2026-09-08
- A 'block first, generate second' AI video tool seeks feedback on its 3D pre-vis workflow — KeyCod3923 · 2026-09-08
- Mastra launches remote filesystem support for agents across S3, GCS, Azure and more — glcst · 2026-09-08
- How GPT-6 Astra's computer use loop powers its viral Blender 3D world generation — iamrobotbear · 2026-09-08
- Open-source Google Workspace CLI lets AI run your Gmail, Docs and Calendar — Aizkmusic · 2026-09-08
- Dev uses GPT-6 Astra to run local Windows AAA games like Skyrim on an iPad mini — ammaar · 2026-09-08