All of Pulse

Graph, loop, harness, context, prompt: the order that makes AI stick

ExponenLabs5 min read

Most AI projects start at the bottom. Someone finds a good prompt, then wires it to a tool, then gives it some documents, and eventually wonders why the result never quite became part of how the business works.

We go the other way. Five layers, worked from the top down, and then a loop back to the top. It is the method behind everything we do, whether we are changing how a business runs or building an AI product, and it is the reason we call the result AI-native rather than AI-assisted.

The five layers, in one line each

  1. Map the work (graph engineering). How does work actually flow: every step, decision, hand-off and owner?
  2. Close the loops (loop engineering). How will we know a change helped, and who reads that every cycle?
  3. Build the harness (harness engineering). What can the agent do, what can it see, what does it cost, and how do we stop it?
  4. Feed it your knowledge (context engineering). What does the agent need to know about this business to do the step well?
  5. Tune the instructions (prompt engineering). How is it told to do this one step?

Then: it improves itself. What each loop learns updates the map.

Why the order matters

Each layer makes the next one cheap to get right. Skip one and the layers below it end up compensating, badly.

Without a map, you automate the wrong thing. The most common failure we see is an automation bolted onto one task. It works. Then the step after it breaks, because nobody looked at what that step expected to receive, or the work now piles up at a person who was never told it was coming. The map is not a diagram for a slide. It is the list of steps, who owns each, where decisions sit and where work waits. It is also where you find the steps that should not exist at all, which is usually the cheapest win in the whole project.

Without a loop, you cannot tell whether it worked. Every process we change gets one number — cycle time, error rate, cost per case — and a named person who reads it every week. If the number does not move, the change did not help, however impressive the demo was. This is the layer that turns "we deployed an agent" into "we cut the time to quote from two days to four hours", or into an honest "it made no difference, switch it off".

Without a harness, it is not safe to switch on. The harness is everything around the model: the tools it can call, the data it can read and write, the permissions it holds, the spend cap, the off switch, the log, and the point where a person signs off before anything reaches a customer. We wrote about this layer in detail in harness, loop and graph engineering, explained, and about the spend side in what a sane agent spend cap looks like.

Without context, the AI knows the internet, not your business. Your price list, your policies, how you handled the last ten awkward cases, the exceptions everyone knows and nobody wrote down. Context engineering is the work of finding that knowledge, cleaning it up and structuring it so an agent can reach the right piece at the right step.

Only then, the prompt. With a mapped step, a measure, a harness and the right context, the instructions for a step are usually short and easy to get right. That is why prompting goes last: not because it does not matter, but because it is the easiest layer to change once the others are in place, and the hardest one to rescue a project with when they are not.

Design top-down, debug bottom-up

If you have read our piece on harness, loop and graph, you will notice it recommends the opposite order: harness first, then loop, then graph. That is not a contradiction. That piece is about fixing an agent that half works, where the fastest diagnosis starts at the environment the model runs in and works outward. This piece is about designing a business that runs on agents, where you have to know what the work is before you can decide what any agent should do.

Design from the top. Debug from the bottom. Both are true at once.

The loop back to the top

The sixth step is the one that makes it compound. Every cycle, the measures show something: an exception an agent handled badly, a step that still waits on a person, a hand-off that is no longer needed. That finding does not stay in a report. It updates the map, and the change flows down through the loop, the harness, the context and the instructions.

People call this recursive self-improvement, which sounds grander than it is. In practice it is a weekly meeting with a number on the screen and the authority to change the map. The difference from a normal improvement project is that nobody has to start one. The loop is already running, and the client's own team runs it.

What it looks like in the first 90 days

  • Weeks 1–2, map the work. We join the standups and decisions, map how the work actually flows, and write a plan and a cost the owner can defend.
  • Weeks 3–6, the next four layers. Measures and feedback on the chosen process, the agents with their guardrails, the knowledge they need, and the instructions. The first AI-run process goes live, measured and capped.
  • Weeks 7–12, hand over the loop. The team is trained as we build and takes over the weekly loop. The map, the agents, the playbook and the data are already in their accounts.

Working with us

If the change you want is in how the business runs, this is what a fractional CAIO does with us. If it is in a product you are building, it is the same method, led by a Forward Deployed CTO. The Method page shows what each layer leaves you with in both cases.

Not ready to talk? Get your free AI operating plan in two minutes. It is a first map of where AI fits in your business, and it runs in your browser.

Make your business AI-native, starting this month.

You speak to the senior lead who would do the work. If we are not the right fit, we will say so.