React Native TV Logo
Published on

Graph Engineering: The Next Level of AI Agent Orchestration

Ler em português →

Authors
  • avatar
    Name
    Davidson Simões
    Twitter
    @davidsonsimoes
    Occupation

    Software Developer (BR) @ Davidson / W2BIT

Graph engineering is the practice of designing an AI agent system as an explicit graph: nodes that do bounded work, edges that decide what may run next, shared state, checkpoints and human approval points. It is the layer that sits above prompts, context and single-agent loops.

TL;DR

  • Graph engineering means designing an AI system as an explicit graph of agents, deterministic code, tools, evaluators and humans, connected by edges that say what may run next, all reading and writing a shared, typed state.
  • The label is new (it spread in mid-2026) and still means different things to different people. The most common meaning is the execution graph: who runs, in what order, under which conditions, and who can stop it.
  • It does not replace prompt engineering or context engineering. It coordinates them.
  • Multi-agent graphs can beat a single agent by a wide margin on parallel, research-heavy work, but they cost several times more tokens. On tasks with few parallel steps, a well-built single agent is usually the better choice.
  • The engineering effort goes into the edges: routing rules, retry limits, checkpoints and approval gates.

What graph engineering is

An agent on its own is a loop: the model reasons, calls a tool, reads the result and decides what to do next. That loop works well for a single, bounded task. It starts to fail when the work needs several kinds of expertise at once, steps that can run in parallel, or state that has to survive a crash, a pause for human review or a long-running job.

Graph engineering answers that by making the structure explicit. A July 2026 guide on Analytics Vidhya defines it as the design of nodes, dependencies, state transitions, execution routes, validation gates, recovery paths and control boundaries inside an agentic system. In practice, an application becomes an executable graph whose nodes can be an LLM call, a full agent, a plain function, a database query or a person approving something.

A research survey published on arXiv in August 2026 frames the same idea as a step in a longer progression: from prompt engineering, to context engineering, to harness and loop engineering, and now to graphs that coordinate many agents toward a shared goal. The authors call the result system intelligence: the ability of a multi-agent system to organize its parts into a coherent whole, rather than relying on one very capable agent.

From prompt engineering to graph engineering: each layer contains the previous ones

Each layer contains the previous ones. Graph engineering coordinates prompts, context and single-agent loops; it does not replace them.

Where the term comes from, and what it is not

The phrase is recent and not yet settled. An article from puppyone in late July 2026 identifies three competing meanings:

  1. Execution or orchestration graph. Agents, code, tools, routers and human checkpoints connected by allowed transitions. This is the meaning used in this article.
  2. Graph of loops and controls. Evaluators, retries, policy checks and audits that influence each other. An emerging framing, not a settled one.
  3. Knowledge, context or memory graph. Entities and facts linked by typed relationships, sometimes with time and provenance.

Two clarifications avoid most of the confusion. A graph database stores data but does not schedule agents. GraphRAG uses graph structure to improve retrieval, but it does not orchestrate multi-agent work. Graph engineering can use either of them as a node, but it is a different thing.

The building blocks

Every execution graph is made of the same small set of parts. Getting each one right matters more than the choice of framework.

Anatomy of an execution graph: router, parallel workers, merge, evaluator, human approval, checkpoints and shared state

A minimal execution graph: a router fans work out to parallel workers, a reducer merges their results, an evaluator either approves, sends the work back (with a retry limit) or escalates to a human.

  • Nodes are bounded units of work. A node can be a model call, an agent with tools, a function or a human decision. Business rules that are already known (a price table, a store's submission checklist) belong in deterministic code, not in a prompt.
  • Edges describe what may run next. They can be direct, conditional, parallel, looping, error-handling or human-controlled.
  • State is a typed record that travels through the graph: the goal, the plan, the artifacts produced so far, evaluation scores and decisions. Passing structured state instead of full conversation transcripts keeps each node's context small and focused.
  • Reducers define how parallel updates to the same field are merged, so two workers never silently overwrite each other.
  • Routes and guards pick the next edge. Hard constraints live in code: "if the grounding score is below 0.8, go back to research" is a rule, not a suggestion to a model.
  • Checkpoints snapshot the state so a run can resume after a failure, pause for approval, be replayed or be inspected later.
  • Loops (revise, retry, call a tool again) are cycles inside the graph, and every one of them needs a stop condition.
  • Human-in-the-loop interrupts pause execution where a person has to approve. Good systems make these risk-based instead of asking for approval on every step.

The Analytics Vidhya guide sums up the shift in one line: "The agents fill the nodes. The engineering lives in the edges."

The patterns underneath

Most graphs are combinations of a few workflow patterns that Anthropic described in its December 2024 guide to building effective agents:

  • Prompt chaining: a task split into sequential steps, with checks between them.
  • Routing: classify the input, then send it to a specialized path.
  • Parallelization: run independent subtasks at the same time, or run the same task several times and compare (voting).
  • Orchestrator-workers: a central model breaks the work down, delegates pieces and combines the results.
  • Evaluator-optimizer: one model produces, another evaluates and sends feedback, in a loop.

The same guide makes a distinction that still holds: in a workflow, models and tools follow predefined code paths; in an agent, the model decides its own process. A graph lets you mix both on purpose: fixed paths where the process is known, agentic nodes where judgment is needed.

What it costs, and when not to use it

The strongest public evidence for multi-agent graphs comes from Anthropic's June 2025 write-up of its research feature. A lead agent (Claude Opus 4) coordinating parallel subagents (Claude Sonnet 4) outperformed a single Opus 4 agent by 90.2% on the company's internal research evaluation. The same article reports the price: agents use roughly four times the tokens of a chat, and multi-agent systems roughly fifteen times. In their analysis, token usage alone explained about 80% of the performance differences.

The article is also explicit about where the approach is a poor fit: tasks where the result does not justify the cost, work where every agent needs the same context, and tasks with few parallelizable steps, which, according to the authors, includes most coding.

Anthropic's March 2026 article on harness design for long-running apps shows the trade-off in a software project. A single agent built a retro game maker in about 20 minutes for around $9, but the core game did not work. A planner, generator and evaluator harness took about six hours and $200, and produced a working application. The author's main lesson applies to any graph: each component encodes an assumption about what the model cannot do alone, so remove components one at a time and keep only the ones that are load-bearing.

A practical rule: start with one well-instrumented agent. Add a node only when you can name the failure it fixes, and measure whether it fixes it.

A reference flow for multi-platform Smart TV development

At W2BIT our work is Smart TV and OTT apps, which makes the problem a natural fit for a graph. The same feature often has to ship on Samsung Tizen and LG webOS (web apps, usually React) and on Roku, which uses its own language, BrightScript, and the SceneGraph UI framework. The platforms share requirements but not code, and each one has its own store review.

This is the reference graph we use to reason about that kind of work:

Reference flow: one feature built for Tizen, webOS and Roku by parallel workers, verified by build checks and a device QA evaluator, then reviewed and submitted by humans

One feature, three TV platforms. Agents do the parallel work; deterministic checks and device QA decide whether it moves forward; people own code review and store submission.

  1. A planner agent turns the ticket into a short spec and a "done" contract: the acceptance criteria per platform, written before any code exists. The contract is saved as a file and checkpointed.
  2. Platform workers run in parallel, one per platform. Each gets only the context it needs: the contract, its platform's code base and its platform's conventions. The Roku worker does not need the React components, and vice versa.
  3. Build, lint and unit tests are deterministic nodes. A failure here never reaches a model for interpretation; it goes straight back to the worker that caused it.
  4. A device QA evaluator checks what matters on TV: remote-control focus navigation, memory over a long session and playback behavior. Failing criteria go back as targeted fixes to the specific worker, with a retry limit.
  5. People own the irreversible steps: code review and store submission. Those edges are human-controlled by design.

The graph does not make the engineer optional. It moves the engineer's attention from typing every line to designing the contract, the checks and the gates, and to reviewing what the graph produced.

A checklist before you build one

  • Name the failure first. What can't a single agent do here: parallel work, isolated contexts, verification, long runtime?
  • Keep known rules in code. Routing, thresholds, checklists and retry limits are code, not prompts.
  • Use typed state, not transcripts. Each node should see the smallest context that lets it do its job.
  • Bound every loop. A maximum number of revisions, a budget and an exit path to a human.
  • Checkpoint durably. Frameworks such as LangGraph save state per thread through checkpointers, which enables human review, time travel and recovery; use a persistent store (for example Postgres) in production.
  • Put humans where the risk is. Approval gates on irreversible or high-impact actions, not on every step.
  • Observe the graph, not just the calls. Log every transition, score and decision, so you can see which edge failed.
  • Measure cost per outcome. Tokens, time and money per finished task, compared with the simpler version.

A word on frameworks: LangGraph is the most common hands-on choice, and Google ADK and Microsoft Agent Framework cover similar ground. Plain code with queues, a database and a state machine also works. The graph is a design decision first and a library choice second.

What is still unsolved

The arXiv survey is candid about the gaps. Most systems today adapt within a fixed structure; very few revise the structure itself based on accumulated evidence. The authors separate systems that are merely graph-shaped from those that are graph-engineered, which requires explicit structural objectives, graph-level observability, controlled changes to the graph and evidence of lasting improvement. Open problems include keeping meaning aligned between agents, governing who may change the graph, evaluation, privacy and safe self-improvement.

That is a useful bar for any team adopting the idea: drawing boxes and arrows is easy; showing that the graph measurably beats the simpler design is the engineering.

FAQ

What is graph engineering in AI?

Graph engineering is the design of an AI system as an explicit graph of agents, deterministic code, tools, evaluators and people, connected by edges that define what may run next and sharing a typed state. It covers routing, parallel work, retry loops, checkpoints and human approval points.

Is graph engineering the same as LangGraph, GraphRAG or a knowledge graph?

No. LangGraph is one framework for building execution graphs. GraphRAG uses graph structures to improve retrieval, and a knowledge graph stores linked facts. Graph engineering is the design discipline; those can be tools or nodes inside it.

How is graph engineering different from prompt engineering and context engineering?

Prompt engineering shapes a single model call, and context engineering controls what each call sees. Graph engineering coordinates many calls, agents, functions and people across a whole task. A good graph still depends on good prompts and good context in every node.

When should you not use a multi-agent graph?

When the task has few steps that can run in parallel, when every agent would need the same full context, or when the extra cost is not justified by the result. Anthropic reports that multi-agent systems use around fifteen times the tokens of a chat, and that most coding tasks have few parallelizable steps.

How does W2BIT use agents in Smart TV development?

We use agents for parallel, well-specified work, such as implementing the same feature for Tizen, webOS and Roku against a written acceptance contract, and keep deterministic checks, device QA criteria and human review between the agents and anything that ships.

Sources

  1. Harsh Mishra, "Graph Engineering for AI Agents: Beyond the Single-Agent Loop," Analytics Vidhya, July 28, 2026. https://www.analyticsvidhya.com/blog/2026/07/graph-engineering/
  2. Yuyuan Feng et al., "Graph Engineering in the Era of LLM Agents: From Individual Intelligence to System Intelligence," arXiv:2608.21156, August 21, 2026. https://arxiv.org/abs/2608.21156
  3. puppyone, "What Is Graph Engineering for AI Agents? Execution Graphs, Context Graphs, and Loops," July 30, 2026. https://www.puppyone.ai/en/blog/graph-engineering-ai-agents-map
  4. Anthropic, "Building effective agents," December 19, 2024. https://www.anthropic.com/engineering/building-effective-agents
  5. Anthropic, "How we built our multi-agent research system," June 13, 2025. https://www.anthropic.com/engineering/multi-agent-research-system
  6. Anthropic, "Harness design for long-running apps," March 24, 2026. https://www.anthropic.com/engineering/harness-design-long-running-apps
  7. LangChain, "LangGraph persistence" (documentation). https://docs.langchain.com/oss/python/langgraph/persistence