# What is graph engineering? How to design AI agent workflows that run in parallel

URL: https://opcaios.org/en/blog/graph-engineering-la-gi
Date: 2026-10-24
Author: Lê Quốc Nghĩa

Graph engineering is the skill of drawing an AI workflow into a diagram made of nodes (each node is a task) and arrows (which task must wait for which), so that tasks that don't depend on each other run at the same time. Instead of arranging steps in a long line, you split them into multiple parallel branches and then merge the results. The workflow runs faster, has fewer failure points, and has a place to put independent verification steps for each result.

![Diamond diagram: split the task, run in parallel, independent verification, merge results](https://opcaios.org/images/blog/graph-engineering/so-do.webp)
*The "diamond" model in graph engineering: split the task, run in parallel, check with a different AI, merge back. Diagram: OPCAIOS.*

*This post is based on the idea in "Graph Engineering explained: what it is, when to use it and when not to" by [Anatoli Kopadze (@AnatoliKopadze)](https://x.com/AnatoliKopadze/status/2080668775796314331) on X (24/7/2026). OPCAIOS rewrites it with our own presentation, adds Vietnam examples and real experience. The numbers on speed and cost are from the original author; OPCAIOS has not independently verified them.*

## What is graph engineering?

Graph engineering is designing an AI workflow as a graph: a plan drawn out so you can see two things—what tasks need to be done and which task must wait for which. The concept has only two parts.

- **Node:** a single task done by one AI agent, with one thing going in and one thing coming out. Example: research a competitor's price, write a draft, verify a claim.
- **Edge:** an arrow connecting two nodes, meaning the later task needs the result of the earlier one so it must wait. The arrow only makes sense when real data flows through it.

For a node to be useful in the graph, it needs a "contract": a task with clear limits, defined input and fixed output shape. A node that returns a free-form paragraph can only be read by a person; a node that returns a fixed shape—for example price, package, source, date—then the next node can read it straight away without guessing. The idea is not new: workflow orchestration systems have used dependency diagrams for many decades, and what is new is only applying it to AI agents. According to Anatoli Kopadze's post on X (24/7/2026), a sequential 40-step workflow may have only 3 to 5 real dependencies when redrawn; this number is the author's illustrative estimate, OPCAIOS has not verified it. For example, 3 nodes that research competitors can run at the same time then feed into 1 draft.

## What is a fake edge and how do you find it?

A fake edge is an arrow in the workflow but no data flows through it, so waiting there just wastes time. The test is only one question, asked at each step: does this step really need the result of the step right before it? If yes, keep the order. If no, the two tasks can run at the same time.

Example: the request "check file A for errors, then check file B for errors" reads like a chain, but checking file B does not use the result of file A at all. The two tasks run one after the other only because the person who wrote it typed them in that order. Run them in parallel, and total time equals the time of the slower file, not the sum of both files added together.

Almost any workflow has two or three fake edges. The original author estimates a sequential 40-step workflow may shrink to only 3–5 real dependencies when redrawn, meaning from several minutes down to several seconds with the same amount of work. This is the author's illustrative estimate, not a measurement; actual speed depends on each workflow. The lesson still holds: the bottleneck is usually how you arrange things, not the AI model.

## The diamond model: split work, verify, merge results

The diamond model is the most common design pattern in graph engineering, made up of three stages: splitting work into multiple parallel branches (fan out), merging and reducing results using regular code (reduce), then having a final agent write an answer from the merged data (synthesize). Between the first and second stage there is usually an additional verification step. The original post by Anatoli Kopadze on X (24/7/2026) presents this model.

The diamond appears in most serious agent systems. The deep research feature of many AI assistants runs exactly by this pattern: one agent plans research angles, multiple sub-agents gather in parallel, results are verified, then a single report reaches the user. A hypothetical example: 1 agent splits a topic into 3 research angles, 3 sub-agents gather in 10 minutes instead of 30 minutes sequentially, one agent verifies then one agent writes the report. Once you see this pattern, the question shifts from "how do I make the agent take more steps" to "where do I split, where do I merge", and the second question opens up new possibilities.

Two design tips come with it: use cheap models for dull nodes (gathering, extracting), use strong models at nodes needing judgment (verifying, synthesizing); and make the merge step run as code, because code doesn't use tokens. On how to pick models by task, see the post [Which AI model should I pick?](/blog/chon-model-ai).

## Why must the verifier have its own context?

The verifier must be a separate agent, starting from empty context, because AI grading its own work tends to be too lenient on itself. According to original author Anatoli Kopadze (X, 24/7/2026), AI's self-evaluation experiments show the model misses most of its own errors; OPCAIOS has not independently verified this claim. A hypothetical example: [Claude](/tien-ich/claude) writes a code snippet then grades itself 10 out of 10, while another Claude starting from empty context finds 2 bugs.

A verifier sharing the conversation thread with the worker is no longer real verification. A graph where all agents share one context is a single-loop pretending to be a graph: broken in the old way, just slower and more expensive.

Principles for the verification node:

1. **Input is only the claim to verify**, without the worker's conversation history.
2. **Fresh context, empty**, has never seen the work being graded.
3. **Verify by real signals:** not "the agent said it's done" but "the test suite actually ran through".
4. **Split into three angles:** is it correct, is it novel, is the source real. Three different angles catch what ten identical angles miss.

## Where does the graph break?

The graph breaks in three places: context overflow, false independence, and silent dead nodes, each with a specific fix. For example, a 200-node graph dumping all 200 raw results into 1 final step will exceed Claude or [ChatGPT](/tien-ich/chatgpt)'s context limit before synthesis even starts.

**Context overflow.** Spawning thousands of nodes then pouring all results into one final step will exceed the context limit before synthesis begins. Fix: merge in layers, split results into batches, summarize each batch then merge the summaries, never merge raw data piles.

**False independence.** Two nodes look independent because the instructions don't mention each other, but they write to the same file or call the same rate-limited API. That's a hidden edge. Fix: give each agent its own workspace, for example each agent its own git worktree, and check shared resources not just shared data.

**Silent dead nodes.** In a sequence, one failed step stops the whole sequence, uncomfortable but easy to spot. In a graph, one dead node among two hundred nodes can slip into a complete-looking report. Fix: each merge step counts results received versus expected, and warns when short instead of running on half the data.

## When Not to Use Graphs

Graphs buy you breadth, they don't buy you better judgment. For example, fixing one bug in one file takes 5 minutes with an agent, while building a graph only adds coordination overhead. When the work isn't broad, a straight line has never been the problem. Skip graphs in these cases:

- **Small or single tasks,** like adding a function or fixing a bug: coordination only adds cost, one agent does it faster and cheaper.
- **You want to review each step:** graphs are built to run wide while you're away, tight control goes against that purpose.
- **You don't know what you're looking for yet:** exploration works better with an agent you steer than a team locked into a plan.
- **Steps actually depend on each other:** forcing a graph into sequential work only wastes money without getting faster.

A quick way to tell is the fake edge test: if you can't find two tasks with no arrow between them, there's no graph to build, and a loop is enough.

## Cost and "anchors": graphs are only honest when there's something undeniable

Graphs cost more than a normal conversation, because coordination gets cheaper but agents still use tokens and a team of agents uses a lot. According to Anatoli Kopadze (X, 24/7/2026), a public example used this approach to rewrite a large software runtime in about 11 days with up to 64 agents running at once, costing around $165,000 in usage and needing a designer and continuous oversight; OPCAIOS has not verified this number. The lesson isn't in the number but in two things: set hard limits on agent count in the first run, and track costs before scaling up.

More important is the **anchor**. A graph made of checking nodes reading each other's reports can still be "consistent but unverified": audit matches data against data, but both come from one system. Graph structure doesn't buy truth on its own. You need anchors that can't be argued with: tests that actually ran and passed, revenue that actually hit the bank, customers who actually stayed. Graphs are only honest when measured against things that can't be negotiated.

## Is the OPCAIOS Auto SEO Article Process a graph?

Yes, the OPCAIOS Auto SEO Article Process is a small graph and completely sequential. This is our real experience, not a made-up example, and it runs once a day on the OPCAIOS website. The auto SEO article each day runs: pick a topic, write an outline, write the article, score SEO and GEO (rewrite once if the score is low), then a separate AI call only reads the finished article and lists claims that need human review, like numbers, prices, dates.

Two points of the process match the lesson above. The step that lists claims is a checker with its own context: that AI doesn't see the writing process, only reads the result. And there's a human review gate: all articles stay in draft form, the reviewer clicks agree and it goes live; AI doesn't post on its own. The process is sequential because each step needs the result of the step before, true to the spirit of the fake edge test: no work is worth splitting in parallel, so no need to force it into a wide graph.

## How do you write a "graph spec" in Vietnamese?

A graph spec is a request block you send to Claude Code or a similar tool, describing the goal, parallel tasks, merge steps, check steps, where to save, and review gates, so the agent builds the right process. For example in drafting an SEO article, the reviewer is still the last step. A made-up example: 3 parallel tasks, 1 merge step, 1 checker, and 1 review gate, running with a limit of 3 agents on the first run:

```
GOAL: one draft article ready to rank for topic [topic]

PARALLEL TASKS:
  1. what high-ranking pages cover right now
  2. what real questions users actually ask about the topic
  3. what those pages missed
MERGE:    three results into one outline, then write a full draft
CHECK:    one independent verifier, empty context, mark every claim
          with no source
SAVE:     the draft/ folder, write the marked claims list at the top of the file
REVIEW GATE: never post anything on its own
```

According to the original author, with Claude Code you can start a request with the word "workflow" to have the tool build a whole agent team from one sentence; this feature changes by tool version, so check the current [Claude Code](/tien-ich/claude-code) documentation. Whatever tool you use, the principle stays the same. First, the first run has a small limit (say 20 files), each agent gets its own space, reports the count of results back, and you stay the final reviewer.

## Where to Start on an Evening

The cheapest way to start needs no new tools, just paper and pen:

1. Draw the AI process you're using as boxes connected by arrows.
2. At each arrow, ask: does the next step really use the result of the previous one? Delete arrows that don't carry data.
3. Group boxes with no dependencies into a layer that runs in parallel, then add a merge step.
4. Place a context checker before the merge step, and a real anchor point (a test case, data from the source system).
5. Run a trial on a small part, record the cost, then scale up.

If you build the process using a tool like [n8n](/tien-ich/n8n) or a script calling [API](/blog/api-la-gi), the same principles apply: run independent branches in parallel, count results at the merge step, and keep a review gate before irreversible actions.

## Frequently Asked Questions

### How does graph engineering differ from loops?
A loop is an agent improving something repeatedly: try, check, adjust, do again. Graph engineering connects many loops and many tasks into a network, where check and fix nodes feed into each other instead of one agent grading itself.

### Do I need to know programming to do graph engineering?
Not to understand and design, since drawing a diagram and asking "is there a real dependency" needs only paper and pen. To run it, you use ready-made tools like Claude Code, n8n, or [Make](/tien-ich/make); writing code is only needed if you want fine control.

### Is an agent graph always faster than a sequential process?
No. A graph is faster when the work has many independent parts. If steps truly depend on each other or the work is small, a graph just adds coordination cost without being faster.

### How do I avoid a graph costing money unexpectedly?
Set hard limits on the number of agents and files per run at first, track the cost of one run before scaling, and use cheap models for dull nodes. The merge step should run as code rather than AI.

### Where should I start learning?
Start with a mock test on a process you're already using. If you want to build an AI process for a small team, check out [OPCAIOS's AI application training course](/services/dao-tao-ung-dung-ai).

*Source: ideas and sample data from a post by [@AnatoliKopadze on X](https://x.com/AnatoliKopadze/status/2080668775796314331) (24/7/2026), not independently verified; the Automatic SEO Post example is from OPCAIOS's experience.*
