Earn the graph
Aha: use a graph for coordination complexity, not because graphs look advanced.
Trap: wrapping a linear workflow in nodes.
Keep: graph/no-graph decision record
When one loop grows branches, retries, parallel workers and approvals, stop hiding the workflow inside prompts. Draw the system and engineer every transition.
Model complex agentic work as explicit nodes, edges, state, routes, guards, joins, recovery paths and human authority gates.
A working maker-checker loop or any multi-step AI workflow. Complete Harness Engineering first if your workflow still lacks durable state or verification.
Draw your existing loop, define contracts and shared state, then add routing, parallelism, recovery and authority deliberately.
A graph definition, state schema, node contracts, routing table, failure policy, run trace and a capstone workflow you can reason about.
Use the shared Field Guide Lab Method. Compare graph complexity against the simpler loop/workflow baseline before deciding the graph earned its cost.
You may be thinking: “My workflow is getting complex, so I should put every step into a graph.” A graph is useful only when it makes responsibility, state, routing and authority clearer. Drawing boxes around an unclear workflow gives you a more impressive picture of the same ambiguity.
Graph Engineering is not about adding agents. It is about making system decisions explicit. The important questions are: who owns this state, why did this route happen, who may veto it, what evidence allows the next transition, and what happens when two locally correct loops conflict?
Inject one missing-information case and one conflicting-output case. You should be able to explain, from recorded state and explicit rules, why the graph took each route, who had authority at each transition and what evidence allowed or blocked progress.
| Part | Meaning |
|---|---|
| Node | One bounded responsibility with known inputs and outputs. |
| Edge | An allowed transition from one node to another. |
| State | The shared information that survives between nodes. |
| Router | The rule that decides which edge is taken next. |
| Guard | A condition that blocks or redirects unsafe or invalid progress. |
| Join | The rule for reconciling parallel results. |
| Human gate | A deliberate return of authority to a person. |
| Anchor | External ground truth that prevents the graph from redefining success for itself. |
Graph Engineering starts when relationships between responsibilities become the thing you need to engineer. You can implement the graph in ordinary code first; the architectural discipline matters more than the orchestration framework.
| Signal | Graph may help | Probably keep it simpler |
|---|---|---|
| Flow shape | Branches, backtracks, approvals, conflicting paths | Mostly linear sequence |
| State | Intermediate state must be persisted/recovered | Input → deterministic output |
| Work units | Several independently useful responsibilities | One bounded responsibility |
| Verification | Different nodes can be accepted independently | Only final outcome matters |
| Economics | Coordination benefit exceeds review/complexity cost | Orchestration costs more than it saves |
A 20-step line can be a script. A 5-node system with branches, vetoes and recovery may need a graph. Complexity is not step count.
| Workflow | Graph |
|---|---|
| Mostly predefined path | Stateful conditional routing |
| Known sequence of steps | Branches, loops and backtracking |
| Routing is mostly deterministic | Several independently useful responsibilities |
| Final output is the main acceptance point | Nodes can be verified and recovered independently |
| Ordinary code/workflow engine may be clearer | Dynamic joins, recovery and authority edges justify explicit graph structure |
Drawing nodes does not make something Graph Engineering. The graph earns its complexity when state, routing, recovery and coordination become first-class problems.
The labs move from “do we need a graph?” to contracts, coordination, governance, global outcomes and operating cost.
Aha: use a graph for coordination complexity, not because graphs look advanced.
Trap: wrapping a linear workflow in nodes.
Keep: graph/no-graph decision record
Responsibility, private context, tools, side effects, output and failure state.
Trap: nodes share assumptions nobody wrote down.
Keep: node contract table
Aha: shared transcript is not shared state.
Trap: two nodes use the same field differently.
Keep: state.schema.json
Aha: “the agent decides” can hide the most important edge.
Prove: explain each conditional route from visible state.
Keep: routing / guard table
Trap: workers share writes or depend on each other’s unfinished output.
Prove: isolated responsibilities with explicit outputs.
Keep: fan-out plan
Aha: fan-out is easy; reconciliation is the engineering.
Trap: “combine these answers.”
Keep: join / conflict policy
Trap: every failure becomes retry.
Prove: injected failure reaches a controlled next state.
Keep: failure-routing matrix
Aha: approval is useful only when the human has evidence and real choices.
Trap: rubber-stamp approval.
Keep: approval contract
Aha: agent count is not maturity.
Trap: role-play agents with overlapping responsibility.
Keep: role registry
Aha: node success is not system success.
Trap: every metric comes from the graph itself.
Keep: anchor / global-objective map
Make one loop improve its local metric while harming another outcome, then test whether the system can question a goal that is no longer correct.
Look out: proxy capture, nobody owning the global goal, or a loop that optimizes forever without permission to question the target.
Keep: conflict / Goodhart / goal-review cases
Aha: generation parallelizes faster than judgment.
Look out: review, merge and coordination become the bottleneck.
Keep: orchestration-cost record
Record state, route reason, authority, side effects, retries and evidence.
Prove: reconstruct a disputed outcome.
Keep: graph run trace
Inject missing info, verification failure, conflicting outputs, node failure and a global-objective conflict.
Prove: every route and stop has an owner and reason.
Keep: operating graph pack
START
↓
PLAN
↓
MAKE
↓
VERIFY ── fail ──→ REPAIR ──→ VERIFY
│
pass
↓
HUMAN GATE ── reject ──→ REPAIR
│
approve
↓
DONE
The diagram is not the implementation. Its job is to force hidden behavior into named responsibilities and explicit routes before framework code obscures the design.
Node: VERIFY
Input:
- proposed_change
- acceptance_criteria
- repository_state
May:
- run tests
- inspect changed files
- read logs
May not:
- silently rewrite requirements
- approve on confidence alone
Output:
- status: pass | fail | blocked
- evidence[]
- reasons[]
- recommended_next_route
Parallel agents often look impressive because several workers return quickly. The difficult part is deciding how conflicting outputs become one next state.
| Join rule | Use when | Risk |
|---|---|---|
| All required | Every check must pass. | One weak worker can block progress. |
| Quorum | Independent judgments can be aggregated. | Majority can still be confidently wrong. |
| First valid | Any solution satisfying a hard verifier is acceptable. | May prefer speed over quality. |
| Rank then select | Several valid options need comparison. | Ranking criteria become critical. |
| Conflict escalation | Disagreement itself is important evidence. | Requires a deliberate human/reviewer path. |
If you cannot explain why the graph took an edge using visible state and an explicit rule, that decision is still hiding inside an agent.
This is where Graph Engineering becomes Run AI. A graph may execute every node successfully and still optimize the wrong thing. Booking agents can maximize appointments while show-up quality falls. Content agents can maximize output while brand trust falls. Support agents can minimize handling time while repeat contacts rise.
Node success is not system success. Run AI needs anchors outside the graph: actual sales, customer outcomes, error rates, human review, operational incidents or another source of ground truth that the graph cannot redefine for itself.
Continue in Run AI: trust, ownership, recovery, trace, measure and release →