Back to Blog

Graph Engineering vs Loop Engineering: What Changed

8 min read

Graph Engineering vs Loop Engineering: What Changed

Graph engineering is loop engineering applied to multiple connected agents instead of one. Same trigger, same task, same success criteria — except every subtask becomes its own agent running its own loop, and those loops talk to each other. Last month the buzzword was loop engineering. Before that, context engineering. Graph engineering is the new one, and unlike most of the naming churn in this space, it actually describes something real.

Here's the thing though: you probably don't need it for most of what you build. I'll show you exactly what it is, the three scenarios where it earns its complexity, and how to tell when you're just adding infrastructure for no reason.

What Is Loop Engineering?

Before graph engineering makes any sense, you need loop engineering, because graph engineering is just an extension of it.

Every loop has exactly three parts:

  • The trigger — how the thing starts. Ideally autonomous: it runs at a set time every day, or it fires on an event. If you're pressing a button, it isn't a loop yet.
  • The task — what it actually does.
  • The success criteria — how you know it did the job correctly. If it failed, the loop runs again from the beginning.

That third part is where most people's automations fall apart. You told the agent to do something. How do you know it worked? Without an answer to that, you don't have a loop — you have a scheduled prompt.

Ideally you also store every run and its data somewhere, which is what lets you bolt on a self-improvement layer later. But at bare bones: trigger, task, test. All automatic.

A Concrete Loop: The Morning Report

Here's one I actually run. It generates a morning report every day.

  • Trigger: 7:00 AM, every day.
  • Task: check YouTube, Twitter, and Reddit for what's trending in AI, check my email, then consolidate all of it into one report.
  • Success criteria: the report has to cover specific topic areas, hit a length threshold, and include links.

One agent does all of it. That's loop engineering, and for a long time that was the whole game.

Notice that success here is a little murky. "Is this report good?" is subjective. I handled that by giving the loop explicit criteria to measure against — topic coverage, length, links — instead of asking it to vibe-check its own work.

What Is Graph Engineering?

Graph engineering takes that same task and splits it across multiple specialized agents that are connected to one another, where each agent runs its own complete loop.

Take the exact same morning report. Same trigger, 7:00 AM. But now instead of one agent doing everything:

  • One agent looks at YouTube.
  • One agent looks at Twitter.
  • One agent looks at Reddit.
  • One agent handles Gmail.

Each of those agents gathers its required information and synthesizes it on its own. Then each sends its synthesis to a report agent, which collects all four outputs and further synthesizes them into the final report.

You can push it one step further and add a review agent — an agent whose only job is to look at the generated report, compare it against your definition of success, and decide: send this back through the loop, or push it to production.

That's graph engineering. Nodes doing work, edges carrying results between them.

Why Does Adding More Agents Make It Better?

The obvious objection: "all you did was add a bunch of agents." Correct. But the reason matters.

Every task in the graph is now its own loop-engineered construct. The YouTube agent isn't just a step in a pipeline — it has all three loop components on its own:

  1. Trigger — still 7:00 AM.
  2. Task — find AI information on YouTube and synthesize it.
  3. Success criteria — and this is where it gets interesting.

In the single-agent version, success was one high-level judgment on the whole report. In the graph version, you define success at every step of the journey. For the YouTube agent specifically, that might be:

  • At least five sources.
  • Synthesis of at least two paragraphs.
  • A "so what" attached to every single source and every piece of information found.

You cannot write criteria that specific for one agent doing ten things at once. The verification has to stay vague because the task is vague. Break the work into atomic pieces and suddenly each piece can be verified precisely.

That buys you three things:

  • Higher quality. One agent doing one thing has a relatively clean context window compared to one agent juggling ten things. Less noise in, better output out.
  • More speed. Four agents working in parallel finish faster than one agent working through four tasks sequentially. That's not a subtle difference — it's the difference between four sequential passes and one.
  • Easier debugging. You can tell instantly whether you have a YouTube problem or a Reddit problem. In the single-agent version, the report comes back bad and you're stuck asking "where along the path did we screw this up?"

The whole thing is just a bunch of loops wired together.

When Should You Use Graph Engineering Instead of a Simple Loop?

Be honest: you don't always need a complicated multi-agent setup. You just don't. Most of the time a simple loop is more than enough.

There are three scenarios where a graph earns its keep.

1. You're Hitting Context Problems

Specifically context rot. If you're asking one agent to loop over and over, and each loop has it doing four, five, six, seven, eight tasks, and the context window after each run is landing in the 300,000 to 500,000 token range — split up the work.

There's no reason to accept degraded output from a bloated context window when you don't have to. That's a self-inflicted quality tax.

2. You Need an Independent Review

At some point every real loop has to judge success. The question to ask: can the agent that created the thing be trusted to judge the thing?

For a morning report, probably yes. It's not high-stakes and the standard is fairly subjective anyway. Self-review is fine.

But if the output is high-stakes and you want a second pair of eyes, that's when you bring in an entirely separate agent to review it. And it doesn't have to be another Claude Code agent — it could be something like GPT-5.6. Cross-model review is a graph pattern by definition: two different systems, connected, with the second one gating the first.

3. Timing Matters

If speed is a requirement, sequential is the wrong shape. Why would one agent look at YouTube, then Twitter, then Reddit, then Gmail — one after another — when those four jobs have nothing to do with each other?

Claude Code doesn't even work that way. Run deep research and it doesn't crawl sources one at a time. It deploys a large fleet of subagents at once. Virtually everything Claude Code produces with ultra code and dynamic workflows is some form of graph engineering: multiple agents collecting information, multiple agents synthesizing, multiple agents doing adversarial review of what was gathered. At no point are those setups relying on a single loop. They're a connection of looped agents.

When Should You Not Use Graph Engineering?

Most of the time. If your task doesn't fall into one of those three categories — context rot, independent review, parallel speed — there's no reason to reach for it.

Graph engineering is one tool in the toolbox, not an upgrade you apply to everything. The downside is real: you're adding complicated steps and complicated infrastructure to something that may not need any of it. More agents means more moving parts, more places for a handoff to fail, and more setup cost before you get your first output.

If you don't know whether your particular task needs it, the answer is probably no.

How Do You Actually Build One?

Start from the loop you already have and ask where it's failing.

  1. Write down your existing loop's three parts. Trigger, task, success criteria. If you can't state the success criteria in one sentence, that's your first problem — and it's not a graph problem.
  2. Find the tasks that don't depend on each other. In the morning report, YouTube, Twitter, Reddit, and Gmail are fully independent. Those are your parallel nodes.
  3. Give each node its own success criteria. Not "find good stuff" — "at least five sources, two-paragraph synthesis, a so-what per source." Specific enough to check mechanically.
  4. Add a synthesis node. Something has to collect the outputs and turn them into the actual deliverable.
  5. Decide whether you need a review node. High-stakes or objectively-checkable output? Add it, ideally with a different model. Subjective and low-stakes? Skip it.

That's the whole build. You're not learning a new framework — you're taking loops you already understand and connecting them.

Frequently Asked Questions

What is the difference between loop engineering and graph engineering?

Loop engineering is a single agent running a trigger → task → success-criteria cycle. Graph engineering breaks that same work into multiple connected agents, where each agent runs its own complete loop with its own success criteria and passes its output to the next node. Graph engineering is an evolution of loop engineering, not a replacement for it.

Is graph engineering just a new buzzword?

No. The naming churn is real — context engineering, then loop engineering, now graph engineering — but this one describes an actual architecture: multiple agents, each with its own loop, connected to one another. It won't apply to everything you build, but it's a concept worth understanding, especially if you work with complex loops.

When is a single-agent loop good enough?

Almost always. If your context window isn't bloating, the agent can reasonably judge its own output, and speed isn't a hard requirement, a simple loop wins on setup cost and maintenance. Reach for a graph only when you hit one of the three trigger scenarios.

How do I know if I have a context rot problem?

Watch your token count per run. If each loop iteration is pushing your context window into the 300,000-500,000 token range because one agent is handling four to eight tasks, quality is already degrading. Splitting the tasks across separate agents keeps each context window relatively clean.

Does Claude Code use graph engineering?

Yes. Deep research deploys a large fleet of subagents in parallel rather than researching sources one at a time. Ultra code and dynamic workflows follow the same pattern — multiple agents collecting information, multiple agents synthesizing it, and multiple agents running adversarial review on the results.


If you want to go deeper into agent architecture and loop design, join the free Chase AI community for templates, prompts, and live breakdowns. And if you're serious about building with AI, check out the paid community, Chase AI+, for hands-on guidance on how to make money with AI.