Prompt Engineering vs Loop Engineering vs Graph Engineering: What Changes at Each Layer

Prompt Engineering vs Loop Engineering vs Graph Engineering: What Changes at Each Layer

Three terms now compete for the same line in AI engineering job descriptions. Prompt engineering is the established one. Loop engineering entered the AI vocabulary in late 2025 and dominated developer discussion through June 2026. Graph engineering followed roughly six weeks later.

They get used interchangeably. Should they be?

The three are not competing techniques. They are three different units of control, stacked. A prompt controls one model response. A loop controls one agent’s behavior cycle. A graph controls the organization of many agents. Each layer preserves the layer beneath it. A prompt does not disappear once a loop is built around it. it stops being the thing typed by hand.

This article separates the three: what gets designed at each layer, what the published claim says about when the higher layers pay for themselves, and where the skepticism is warranted.

One task, three layers

Interactive explainer · 01

One task, three layers — watch what changes

The three terms are not competing techniques. They are three different units of control. Here is the same job handled at each layer, step by step. Orange dots mark the moments a human is required.

Task
Fix the failing tests in the auth module, then open a pull request.

Layer 1

Prompt engineering

You control one model response. You are the loop.

    Your turns 0 · Model calls 0

    Layer 2

    Loop engineering

    You control one agent’s cycle. The loop does the prompting.

      Your turns 0 · Model calls 0

      Layer 3

      Graph engineering

      You control how many agents are organised.

        Your turns 0 · Nodes 0 · Parallel 0

        What actually differs

          Prompt Loop Graph
        Unit of control One model response One agent’s behaviour cycle An organisation of agents
        What you write Instructions, examples, output format Trigger, tools, stop condition, retry budget Nodes, edges, shared state, failure routes
        Who says “again?” A human, every turn A verifier the loop calls itself A routing rule written in advance
        Where it breaks Ambiguous or overstuffed instruction It cannot tell done from stuck Context never crossed an edge you forgot to draw
        Enough when One shot, a person reads the result Repetitive, machine-checkable, one domain Cross-domain work with parallel branches
        Illustrative walkthrough · step counts are not benchmarks
        Built by Marktechpost

        The stack, in order

        Each step in the progression was named in practice before it appeared in vendor documentation.

        1. Prompt engineering covers writing and structuring the instruction for a single call. Anthropic’s guidance is to separate a system prompt into labeled sections — background information, instructions, tool guidance, output description — delineated with XML tags or Markdown headers. The recommendation is to supply the minimal set of information that fully specifies the expected behavior. Minimal does not mean short.
        2. Context engineering came next. Anthropic describes it as the natural progression of prompt engineering. The question moves from finding the right words to deciding what configuration of tokens belongs in the window at all. Context is a finite resource, and the engineering problem is optimizing the utility of those tokens against model constraints.
        3. Harness engineering covers the environment a single agent runs inside: files, tools, memory, feedback.
        4. Loop engineering sits one floor above the harness. A June 2026 arXiv paper on agentic AI in building engineering, Buildrix, sets out the same four-step progression explicitly — prompt, then context, then harness, then loop — with the final layer defining how a system repeatedly observes, acts, verifies and recovers.
        5. Graph engineering is the newest label and the least settled. One enterprise writeup notes that the term’s provenance is unresolved and that it collides with an older knowledge-graph usage of the same word. The underlying practice, graph-based orchestration, has a documented lineage in multi-agent systems research.

        Layer 1: Prompt Engineering

        The defining assumption is that a human is present at every iteration. A prompt is written, the model responds, the output is judged, the prompt is revised.

        That assumption is what breaks. High volume. Multi-step tasks. No human available to grade the output. Results that feed the next step automatically. Any one of these, and the prompt alone stops being sufficient.

        Nothing about the prompt got worse. The surrounding conditions changed.

        Prompt engineering also does not vanish inside the higher layers. Anthropic’s multi-agent research writeup reports that prompt engineering was the primary lever for fixing coordination failures. Early versions spawned 50 subagents for simple queries, and the fix was prompting rather than topology.

        Prompt engineering, explained

        Interactive explainer · 02 · Layer 1

        What prompt engineering is

        Prompt engineering is designing the text of a single call to a model. One input, one forward pass, one output — and a human who reads the result and decides whether to run it again. That last part is the assumption everything above this layer exists to remove.

        Prompt
        what you write

        Model
        one forward pass

        Response
        one output

        you

        you judge it, then rewrite the prompt yourself

        Swipe the diagram sideways →

        The cycle exists here too — but you are the one closing it, every single turn.

        Anatomy of a prompt

        Tap a section. Anthropic’s guidance is to delineate parts with XML tags or Markdown headers rather than writing one undifferentiated block.





        What this section does

        Background information

        The assumption that breaks

        Prompt engineering assumes a human is present at every iteration. Tap a condition to see what happens when that stops being true.




        Layer 1 of 3 · the layer most tasks stop at
        Built by Marktechpost

        Layer 2: loop engineering

        The framing is that a coding agent is a brute-force tool for finding solutions. The craft is designing the goal, the tools and the loop and not only the prompt.

        The term reached mainstream developer discussion in June 2026, after a widely shared post argued that engineers should stop prompting coding agents and start designing the loops that prompt them. The Claude Code team at Anthropic described the same shift on stage that week.

        The most detailed public breakdown identifies five primitives, plus a sixth element that holds them together:

        1. Automations: a schedule or event that performs discovery and triage without supervision
        2. Worktrees: isolation so parallel agents cannot edit the same files
        3. Skills: project knowledge written down once in a SKILL.md, rather than re-explained every session
        4. Plugins and connectors: MCP-based access to the issue tracker, database or staging API
        5. Sub-agents: a maker/checker split, since the model that wrote the code grades it too generously
        6. State: a markdown file or board outside the conversation, because the model forgets between runs

        Two in-session features are very important. /loop re-runs on a cadence. /goal runs until a written condition is actually true, with a separate small model checking after each turn — so the agent that wrote the code is not the agent grading it. Both Claude Code and the Codex app ship equivalents.

        The cycle is not the hard part. The stop condition is. A loop that cannot mechanically distinguish done from stuck does not fail loudly. It keeps spending tokens.

        Loop engineering, explained

        Interactive explainer · 03 · Layer 2

        What loop engineering is

        Loop engineering is designing the system that prompts the agent, instead of prompting it yourself. The prompt does not disappear — it becomes a component inside a cycle that decides when to fire, what counts as passing, and when to stop trying. The skill was named in September 2025 and became the dominant developer topic in June 2026.

        The cycle

        Four phases and a memory. Press run to watch one complete, then force a failure to see why the guardrails exist.

        0
        ITERATION

        trigger
        cron / event / goal

        act
        tools + edits

        verify
        tests / 2nd model

        decide
        retry or exit



        Run log

        Everything below happens with nobody watching. That is the whole point, and the whole risk.

        Idle. Press “Run the loop”.

        A loop needs a stopping rule it can evaluate without you. Without one it does not fail loudly — it just keeps spending.

        What you actually build

        A working loop needs five primitives plus a place to remember things. Both Claude Code and the Codex app now ship all six. Tap one.






        Layer 2 of 3 · illustrative simulation, not measured
        Built by Marktechpost