On July 18, OpenClaw founder Peter Steinberger dropped a one-liner on X:
Are we still talking loops or did we shift to graphs yet?
The replies went off. But most of the debate was noise. So I want to lay out what each layer does, why it exists, and how they stack.
One engine, five layers
A large language model generates the next chunk of output based on whatever information sits in front of it. Powerful, yes. But "powerful" and "able to finish complex work alone" are two different things.
Think of it as a car engine. The engine provides force. It has no idea where to go, where it currently is, which roads are open, or whether the passenger arrived.
From that starting point, every engineering layer that followed solves a specific gap the engine can't cover on its own.
Prompt Engineering: tell the engine where to go
You have an engine. First step: give it a destination.
Prompt Engineering translates human intent into something the model can execute. Goal, role, format, constraints.
But "drive to Denver" still leaves the driver without a map, GPS signal, or fuel gauge. The destination is clear. The path is a guess.
So what else does the model need to know right now to make a good next move?
Context Engineering: show the car where it is
Context Engineering fills in the map, the GPS coordinates, the dashboard instruments, the road conditions.
You select content for the model's limited context window: conversation history, project files, tool specs, external references, previous results. Too little context and the model guesses. Too much and it drowns in irrelevant information, like navigating Denver with a Miami street map loaded.
Context and Prompt serve different jobs. The prompt expresses the destination. Context describes the current world.
Even with both in place, the model only "knows what to do." Without controls, permissions, and rules, it still can't take safe action in the real world.
Harness Engineering: build the car around the engine
The Harness is the runtime wrapping the model: tool interfaces, permissions, sandboxes, memory, task state, logs, tests, validators.
If the model is the engine, the Harness is the full vehicle. It defines what the engine can drive, how far the steering wheel turns, who hits the brakes when the car goes off-road, and how you confirm the passenger reached the right address.
At this layer, something changes. You stop hoping the model "acts smart" and start using external structure to contain mistakes, record evidence, and verify outcomes. The model becomes an executor operating within defined boundaries, not an advisor floating suggestions.
But roads have traffic jams. Tool calls fail. Results miss the bar. A static prompt, static context, and static tool setup can't handle surprises.
Loop Engineering: from one output to closed-loop control
Loop Engineering makes the AI cycle through observe, judge, act, check. The driver keeps scanning the road and adjusting the wheel instead of locking the steering at departure and hoping for the best.
Prompt sets the target. Context updates the position. Harness provides the controls. Loop connects all three into a feedback cycle that can self-correct.
That's the line between an agent and a chatbot. An agent doesn't stop at one answer. It keeps working based on what happened after it acted.
But a loop handles one car approaching one destination. When tasks involve multiple actors, parallel routes, and interdependent outcomes, a single loop isn't enough.
One car can loop its way through traffic. A city can't run on every driver deciding their next turn in isolation.
Graph Engineering: from driving one car to running the traffic network
Graph Engineering operates one level up.
You split the task into nodes and edges. You specify which steps must finish first, which can run in parallel, where to fall back on failure, when to hand off to a different agent, and which intersections require human approval before the light turns green.
Loop manages local behavior. Graph manages global coordination. Loop is the driving feedback cycle inside one car. Graph is the road network, traffic lights, and dispatch system across the city.
Graphs don't replace loops. A single graph can contain many loops. Context and validation keep running at every node. All of it sits inside the Harness.
Five layers, stacking:
- Prompt gives the destination
- Context provides position and road conditions
- Harness provides the vehicle and safety boundaries
- Loop lets the vehicle correct course on feedback
- Graph coordinates routes and collaboration across the whole city
The shift underneath
From Prompt Engineer to Graph Engineer, engineers push more responsibility out of the model and into the system around it.
Early on, people tried to make the model produce correct output in one shot by writing a better prompt. Over time, builders accepted that model intelligence alone can't cover information management, tool permissions, state persistence, error recovery, and multi-agent collaboration.
So they moved reliability from inside the model to the surrounding system:
- The model can't remember everything, so you build Context.
- The model isn't safe by default, so you build the Harness.
- The model won't get it right on the first try, so you build the Loop.
- Multiple loops won't self-organize, so you build the Graph.
Complex work becomes reliable when you surround every step with structure that constrains, feeds back, validates, and coordinates.
AI engineering didn't advance because models learned to draw flowcharts. It advanced because builders stopped betting the whole pipeline on the model's improvisation.