Field note · Agent architecture · July 2026
Graph engineering: the control plane above AI agent loops
Prompts shape a turn. Loops sustain a worker. Graphs coordinate an operation by making roles, state, authority, failure routes and human control explicit.
Prompt
One turn The instruction and context shape one response.Loop
Persistent effort The agent acts, evaluates and retries until a stop condition.Graph
Coordinated operation Specialists, deterministic checks and humans share explicit state and authority.The nine-word question
On 17 July 2026, Peter Steinberger asked whether the industry was still talking about loops or had shifted to graphs. The post travelled because it named a problem builders were already feeling: one agent can keep working, but a serious outcome usually depends on several kinds of work, several checks and at least one accountable decision.
“Are we still talking loops or did we shift to graphs yet?”
Peter Steinberger
Graph engineering is still an emerging label, not a settled discipline. The underlying practice is real: graph-based orchestration, state machines, dependency planning, multi-agent delegation and durable workflows already exist. The useful question is not whether a new title wins. It is what becomes visible when coordination is designed as a first-class system.
Prompts, loops and graphs are nested, not replaced
A prompt defines the local instruction for one model turn. A loop lets an agent observe, act, evaluate and try again. A graph connects multiple loops and deterministic steps into an operation with explicit dependencies, branches, gates and end states.
What should this model do now?
How does this worker continue until the result is acceptable or the budget ends?
Who works, who verifies, what unlocks the next capability and where does a human retain authority?
The loop was not wrong. It was promoted into a node. A graph may contain a research loop, a coding loop, an evaluator loop and a recovery loop. What changes is that no single loop is allowed to silently become the whole operating model.
What a production graph actually contains
Boxes and arrows are not enough. A production graph needs contracts that survive model changes, retries, partial failures and human handoffs.
- Nodes do bounded work.A node can be an AI agent, deterministic function, API call, test suite, database operation or human review.
- Edges carry more than control.They move typed data, authority, deadlines, trace context and failure routes.
- State lives outside the chat.Accepted facts, artifacts, decisions and checkpoints need durable ownership and versioning.
- Gates decide whether work may continue.Schema validation, policy, security tests, budgets and approvals should not depend on the worker judging itself.
- Cycles repair without erasing history.Failed work can return to a responsible node with evidence about what failed and what may change.
- Terminal states are explicit.Done, rejected, expired, compensated, blocked and needs-human are different operational outcomes.
The worker, reviewer and evaluator pattern
For substantial work, I prefer three separate responsibilities rather than one agent repeatedly approving its own output.
Worker
Researches, writes, implements or fixes. It owns producing the artifact.
Independent reviewer
Looks for weak reasoning, missing evidence, shortcuts, security concerns and false completion. It should not share the worker’s incentives or hidden assumptions.
Evaluator
Checks whether the requested outcome is complete, whether the reviewer found the material risks and whether deterministic release criteria pass.
This is not automatically three language models. The reviewer may be static analysis, a test harness or a specialist model. The evaluator may combine rules, environment assertions, trace inspection and human judgment. The graph should choose the cheapest reliable mechanism for each decision.
Graph engineering is bigger than a graph framework
LangGraph makes nodes, edges, shared state, checkpointing, interrupts and subgraphs explicit. OpenAI’s Agents SDK exposes manager-style orchestration, agents as tools and handoffs. Anthropic documents routing, parallelisation, orchestrator-worker and evaluator-optimizer patterns. Temporal can own durable state, retries and recovery when work must survive infrastructure failure. A2A provides task-oriented edges between independently operated agents.
These are implementation choices. Graph engineering sits one level higher. It defines the operation’s topology, node contracts, authority model, evidence requirements, persistence boundary, failure semantics and cost model before selecting a runtime.
As capability grows, failure moves to the edges
Single-agent failures are usually visible in one trace. Graph failures hide between components.
- Coordination debtMore agents produce more handoffs, queues, schemas and ambiguous ownership.
- Context contaminationOne node can pass stale, irrelevant or adversarial material into another node’s trusted context.
- Authority leakageA worker may gain an action indirectly through a downstream node that has broader permissions.
- Runaway branchingParallel exploration can multiply model, tool and infrastructure cost faster than value.
- Partial successSome branches may complete while another fails, leaving inconsistent external state.
- Evaluation circularityAgents that author the work, define the rubric and grade the result can manufacture confidence rather than evidence.
That is why graph observability must reconstruct the full path: which node acted, which state it read, which policy applied, what it produced, what failed and why the next edge was selected.
A practical graph engineering checklist
- Node contract
What exact input, output, side effects, permissions, timeout and quality threshold belong to this node?
- Edge contract
What event or verified condition permits transition, and what typed artifact moves forward?
- State ownership
Which system owns operational truth, what is checkpointed and what is safe to replay?
- Context boundary
What can this node see, what must be summarised and what must never enter model context?
- Authority boundary
Which actions can be proposed, simulated, approved or executed, and by whom?
- Failure semantics
Retry, reroute, compensate, quarantine, reject or escalate are different decisions.
- Budget
Define limits for tokens, tools, wall-clock time, branches, retries and external spend.
- Evidence
Specify the tests, traces, sources and approvals required before the graph can claim success.
How I would apply it to agentic software delivery
In my private research on controlled autonomous delivery, the safe public pattern is a graph of bounded responsibilities rather than an unrestricted coding agent.
Workers operate in isolated worktrees or sandboxes. Hooks and narrow MCP tools constrain what they can access. CI, security scanning and independent review produce evidence. Humans retain authority for material architecture decisions and production promotion. Observability and rollback close the operation after release.
This public description intentionally stops at the control surface. The proprietary graph definitions, policies, prompts, evaluation rubrics and optimisation logic remain private.
When not to build a graph
Most tasks do not need a multi-agent organisation. A single agent with clear tools, a bounded loop and deterministic validation is easier to understand and cheaper to run.
Add graph complexity only when the work has real dependency structure, parallelisable specialists, distinct authority boundaries, long-lived state or independent assurance requirements. Every new node must buy measurable speed, quality, safety or recoverability.
Executive takeaway
Prompt engineering improves instructions. Loop engineering improves persistence. Graph engineering improves coordination and accountability.
The competitive advantage will not come from drawing more nodes. It will come from encoding how the organisation divides work, verifies evidence, limits authority, survives failure and knows when a human must take control.
Primary reading
- Peter Steinberger · “Are we still talking loops or did we shift to graphs yet?”
- Peter Steinberger · Designing loops that prompt coding agents
- Anthropic · Building effective agents
- Anthropic · How we built our multi-agent research system
- Anthropic · Demystifying evals for AI agents
- LangGraph · Graph orchestration overview
- LangGraph · Persistence and recovery
- OpenAI Agents SDK · Agent orchestration
- Temporal · Durable execution
- A2A v1.0 · Agent interoperability and delegation