Graph Engineering: The Next Step After Prompts and Loops
Prompt engineering told AI what to do. Loop engineering kept it working. Graph engineering connects the whole operation.
Prompt engineering told the model what to do. Loop engineering taught it to keep working. Graph engineering decides who works, who checks, what happens next, and where a human takes control.
On July 17, Peter Steinberger posted one question:
It travelled because builders recognized the problem immediately. We had finally learned how to keep one agent working without writing the next prompt ourselves. Then we discovered that ten good loops still leave one person carrying results between them, deciding what starts next, checking which output can be trusted and restarting whatever failed.
The work became autonomous. The coordination did not.
I had already run into this in my own setup. For serious tasks, I stopped using one agent and began using three.
The first is the worker. It researches, writes, builds or fixes.
The second is the invigilator. It does not help the worker. It sees the output with fresh eyes and looks for weak reasoning, missing evidence, shortcuts and fake completion.
The third is the evaluator. It checks both of them. Did the worker complete the task? Did the invigilator catch the important problems? Is the result ready, or should it return for another round?
That is the practical jump from a loop to a graph.
A prompt produces an answer.
A loop pursues a pass condition.
A graph runs the operation
The loop was not wrong. It was promoted.
A loop remains one of the best structures in AI. Give an agent a goal, let it act, test the result, return the failure, and stop when the test passes or the budget ends.
Anthropic’s evaluator–optimizer pattern uses exactly this shape: one model generates while another evaluates and feeds back corrections.
The weakness appears when the work contains several goals.
A launch may need research, copy, code, legal review and approval. A code change may need architecture analysis, implementation, security review, tests and release. A customer request may need classification, policy lookup, account data, a decision and a human sign-off.
You can build a loop for each part. But somebody still has to connect them.
Graph engineering turns that hidden coordination into a visible system:
Nodes do work. A node can be an agent, script, API call, test, database query or human review.
Edges decide what happens next. They carry data, dependencies, permissions and failure routes.
State remembers what happened outside any single chat window.
Gates decide whether work may continue.
Cycles send failed work back without restarting everything.
Terminal states say done, rejected, expired or needs a human.
Inside the full guide: how Graph Engineering moves beyond prompts and loops, how to build worker–reviewer–evaluator systems, run parallel checks, route failures, add human approval, define node contracts, choose the right model for each job, build it in Claude Code or LangGraph, and stop the whole system from becoming confidently wrong.




