Loops vs. Graphs, clearly explained!
Hanako
Visit on X@hanakoxbt16K followers
73,867 views
Loops vs. Graphs, clearly explained!
loops are great, but they have a ceiling:
a loop makes one unit of work better. it cannot decide which units exist.
so you end up with a very good agent running the wrong three steps, in the wrong order, one at a time.
Graph engineering fixes this by moving the decision up a layer: what runs, what runs at the same time, and what never runs at all.
you need both. here's how it works:
a graph splits your system into two kinds of decision.
↳ inside a unit: the loop. produce, check, correct, repeat until green
↳ between units: the graph. split, fan out, merge, gate, send back
Prompts → Context → Harness → Loops → Graphs
you get parallel work, isolated contexts, and steps that stop running when nothing needs them.
the trick is being selective about what becomes a node.
only spend a model where judgment lives. merging, ranking, deduping and schema checks are edges, and edges are code.
free, instant, and they cannot be argued out of a verdict. a graph where every edge is an agent pays rent on its own wiring.
one thing to know before you scale it.
a graph has two return paths, and almost everyone builds one.
↳ the correction edge is short. a gate rejects one unit back to the step that produced it, and it fixes the run you are in
↳ the learning edge is long. an accepted result goes back to the splitter as a constraint, and it fixes every run after
skip the second and you get a graph that is fast and never gets smarter. next week it starts from the same place with the same blind spots.
and a smaller one that eats whole nights: when a unit fails, return that unit, not the batch.
send back four slices because one failed and you have just rewritten three correct ones. do it twice in a run and the run never converges.
below i have quoted my full guide on graph engineering. it covers the three topologies, the verifier patterns, and where the gate should actually open.
save this and read it below ↓
Comments
Comments from the original post on X (Twitter)
No comments yet
