Skip to content
Artwork for Learn AI in Bits
Learn AI in Bits · August 19 · 5 min

022 - Loop Engineering vs. Graph Engineering

AI agent systems are moving beyond a single model repeatedly calling tools. Two useful concepts for understanding that evolution are loop engineering and graph engineering. Loop engineering focuses on the behavior of an individual agent over time. An agent receives context, chooses an action or tool call, observes the result, and decides what to do next. The engineering challenge is making that cycle reliable: defining progress, providing useful feedback, handling failures, managing context, setting budgets, and deciding when the agent should stop. OpenAI's Codex documentation describes the agent loop as the core logic that orchestrates the user, model, and tools. OpenAI also notes that a single turn can contain many model-and-tool iterations and that context-window management becomes an important responsibility. Graph engineering addresses a different problem: coordinating a larger system of steps, agents, tools, branches, dependencies, and shared state. Instead of leaving every next action to one agent, the system can represent the workflow explicitly as a graph. Nodes can represent tasks or specialized agents, while edges describe dependencies or transitions. For example, a research system might have separate research, data-analysis, writing, and review nodes. Research and data analysis could run in parallel, their results could feed a writing node, and the draft could move to a review node. If the reviewer finds a problem, the graph can route the work back for revision. The important distinction is that loop engineering is primarily about iteration and behavior, while graph engineering is about structure and coordination. They are complementary. A node inside a graph can contain its own agent loop. The graph determines when that node runs, what it receives, and where its output goes; the loop determines how the agent works through its assigned task. The term "graph engineering" is still emerging rather than a universally standardized discipline. Many underlying techniques have existed for years in workflow orchestration, state machines, directed graphs, DAGs, and multi-agent systems. What is new is applying the graph-engineering framing directly to increasingly complex AI agent systems. A paper published August 21, 2026, "Graph Engineering in the Era of LLM Agents: From Individual Intelligence to System Intelligence," explicitly proposes graph engineering as an emerging paradigm for organizing complex agent systems. The paper argues that some tasks require heterogeneous expertise, parallel execution, independent verification, and persistent state that can exceed the organizational capacity of a single agent. REFERENCES OpenAI — Unrolling the Codex agent loop https://openai.com/index/unrolling-the-codex-agent-loop/ OpenAI — The next evolution of the Agents SDK https://openai.com/index/the-next-evolution-of-the-agents-sdk/ OpenAI — Harness engineering: leveraging Codex in an agent-first world https://openai.com/index/harness-engineering/ OpenAI — An open-source spec for Codex orchestration: Symphony https://openai.com/index/open-source-codex-orchestration-symphony/ Anthropic — Harness design for long-running application development https://www.anthropic.com/engineering/harness-design-long-running-apps Feng et al. — Graph Engineering in the Era of LLM Agents: From Individual Intelligence to System Intelligence https://arxiv.org/abs/2608.21156 Macedo — What makes prompts a graph: necessary and sufficient conditions for prompt graph engineering https://arxiv.org/abs/2607.27578 Voice narration is AI-generated.

0:00-5:14

transcript

No transcript — this publisher did not publish one.

show notes


AI agent systems are moving beyond a single model repeatedly calling tools. Two useful concepts for understanding that evolution are loop engineering and graph engineering.


Loop engineering focuses on the behavior of an individual agent over time. An agent receives context, chooses an action or tool call, observes the result, and decides what to do next. The engineering challenge is making that cycle reliable: defining progress, providing useful feedback, handling failures, managing context, setting budgets, and deciding when the agent should stop. OpenAI's Codex documentation describes the agent loop as the core logic that orchestrates the user, model, and tools. OpenAI also notes that a single turn can contain many model-and-tool iterations and that context-window management becomes an important responsibility.


Graph engineering addresses a different problem: coordinating a larger system of steps, agents, tools, branches, dependencies, and shared state. Instead of leaving every next action to one agent, the system can represent the workflow explicitly as a graph. Nodes can represent tasks or specialized agents, while edges describe dependencies or transitions.


For example, a research system might have separate research, data-analysis, writing, and review nodes. Research and data analysis could run in parallel, their results could feed a writing node, and the draft could move to a review node. If the reviewer finds a problem, the graph can route the work back for revision.


The important distinction is that loop engineering is primarily about iteration and behavior, while graph engineering is about structure and coordination. They are complementary. A node inside a graph can contain its own agent loop. The graph determines when that node runs, what it receives, and where its output goes; the loop determines how the agent works through its assigned task.


The term "graph engineering" is still emerging rather than a universally standardized discipline. Many underlying techniques have existed for years in workflow orchestration, state machines, directed graphs, DAGs, and multi-agent systems. What is new is applying the graph-engineering framing directly to increasingly complex AI agent systems.


A paper published August 21, 2026, "Graph Engineering in the Era of LLM Agents: From Individual Intelligence to System Intelligence," explicitly proposes graph engineering as an emerging paradigm for organizing complex agent systems. The paper argues that some tasks require heterogeneous expertise, parallel execution, independent verification, and persistent state that can exceed the organizational capacity of a single agent.


REFERENCES

OpenAI — Unrolling the Codex agent loop

https://openai.com/index/unrolling-the-codex-agent-loop/

OpenAI — The next evolution of the Agents SDK

https://openai.com/index/the-next-evolution-of-the-agents-sdk/

OpenAI — Harness engineering: leveraging Codex in an agent-first world

https://openai.com/index/harness-engineering/


OpenAI — An open-source spec for Codex orchestration: Symphony

https://openai.com/index/open-source-codex-orchestration-symphony/


Anthropic — Harness design for long-running application development

https://www.anthropic.com/engineering/harness-design-long-running-apps


Feng et al. — Graph Engineering in the Era of LLM Agents: From Individual Intelligence to System Intelligence

https://arxiv.org/abs/2608.21156


Macedo — What makes prompts a graph: necessary and sufficient conditions for prompt graph engineering

https://arxiv.org/abs/2607.27578


Voice narration is AI-generated.