Registered users can read the full content for free
Register as a Gaohf Library member to read the complete e-book online for free and enjoy a better reading experience.
Page
1
(This page has no text content)
Page
2
GRAPH ENGINEERING for Agentic AI Systems Design the topology. Don't inherit it. Ken Huang CEO, DistributedApps.ai DistributedApps.ai Kindle edition · 2026 Graph Engineering for Agentic AI Systems · 1
Page
3
Copyright Graph Engineering for Agentic AI Systems Ken Huang Copyright © 2026 DistributedApps.ai. All rights reserved. Published by DistributedApps.ai. No part of this publication may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, electronic, mechanical, photocopying, recording, or otherwise, without the prior written permission of DistributedApps.ai, except for brief quotations in critical reviews and certain other noncommercial uses permitted by copyright law. This Kindle edition is prepared from the Graph Engineering manuscript. Companion code for the homework and ports lives at GitHub under kenhuangus/graph-engineering. First Kindle edition: September 2026. Publisher: https://distributedapps.ai Companion code: https://github.com/kenhuangus/graph-engineering Graph Engineering for Agentic AI Systems · 2
Page
4
About the Author Ken Huang, CEO of DistributedApps.ai Ken Huang is a prolific book author and researcher in AI applications and Agentic AI Security, serving as CEO and Chief AI Officer at DistributedApps.ai. He is Co-Chair of AI Safety groups at the Cloud Security Alliance and the OWASP AIVSS project, AIUC-1 member and Co-Chair of the AI STR Working Group at the World Digital Technology Academy. He is an EC Council instructor and Adjunct Professor at the University of San Francisco, teaching GenAI Security and Agentic AI security for data scientists, respectively. He coauthored OWASP's Top 10 for LLM Applications and contributes to the NIST Generative AI Public Working Group. His books are published by Springer, Cambridge, Wiley, Packt, and China Machine Press, including Securing AI Agents, LLM Design Patterns, Generative AI Security, Agentic AI Theories and Practices, Beyond AI and The Handbook for Chief AI Officers. A frequent global speaker, he engages at major technology and policy forums. SubStack: https://substack.com/@kenhuangus LinkedIn: https://www.linkedin.com/in/kenhuang8 GitHub: https://github.com/kenhuangus ORCID: https://orcid.org/0009-0004-6502-3673 Google Scholar: https://scholar.google.com/citations?user=3dZ6e8QAAAAJ&hl=en DistributedApps.ai: https://distributedapps.ai Companion code: https://github.com/kenhuangus/graph-engineering Graph Engineering for Agentic AI Systems · 3
Page
5
(This page has no text content)
Page
6
Forewords 1. Prof. Yale Li Foreword Agentic AI systems are moving from demonstrations into operational environments where actions carry financial, legal, and safety consequences. In those environments, the structure of the system is not a secondary detail. It determines which components may act, which transitions are permitted, what state is shared across a run, and which steps require human authorization before they become irreversible. When that structure remains implicit, it is still present. It simply remains unowned. This book addresses that problem directly. Ken Huang defines graph engineering as the work of declaring the topology of an agent system: the specialized nodes, the legal edges, the shared run state, the points where work may fan out and rejoin, and the gates that sit on irreversible actions. He separates execution graphs from knowledge graphs and from learned computational graphs, so practitioners stop treating three different objects as one method. He also insists on refusal criteria. Not every task needs a multi-node graph. Many failures begin when teams add agents and edges before they can name the handoff those edges must carry. That stance aligns with lessons I have carried across more than three decades in digital technology and cybersecurity, including service as Global Chief Security Architect at Microsoft, International Chief Security Officer at Huawei Technologies, and Chief Technology Architect at IBM Global Services, and with the work I now lead as Co-Founder and Executive Chairman of the World Digital Technology Academy (WDTA) and Chairman of the Cloud Security Alliance Greater China Region (CSA GCR). The World Digital Technology Academy is an international non-governmental organization established in April 2023 in Geneva, Switzerland. Aligned with the values and vision of the United Nations, WDTA aims to spearhead digital norms and standards, drive technological innovation, and foster global cooperation to support a sustainable digital economy for all. Our guiding principle is Speed, Safety, Sharing (3S): Speed the Innovation, so digital governance keeps pace with technological change; Safety for All, so trust, responsibility, and safety remain central to digital systems, especially artificial intelligence and data governance; and Share Global Gains, so digital inclusion advances and no one is left behind. WDTA advances the responsible development, governance, and sharing of digital technologies so that innovation benefits everyone safely and equitably. Graph Engineering for Agentic AI Systems · i
Page
7
Safe and trustworthy agent systems require more than strong models. They require explicit control paths, durable memory design with provenance, production controls for partial failure and cost, and security analysis that treats topology itself as a governance artifact. A system whose safety depends only on a live model response is not governed. A system whose allowed paths, principals, and approval gates are declared and verifiable can be reviewed, audited, and improved, which is the same accountability standard institutions and governments require when cybersecurity advice must support real decisions. Ken writes from that practical standard. He has long contributed to AI safety and security communities, including as Co-Chair of the AI Safety, Trust, and Responsibility (AI STR) Working Group at WDTA, and as Adjunct Professor at the University of San Francisco. Across fourteen chapters, this book moves from definition and anatomy through patterns and frameworks, then into production operations, computer-science grounding, security and identity, evaluation of walks rather than only final text, and a closing argument for keeping explicit topology after industry labels change. Readers who build, operate, secure, or govern agent systems will find a continuous line of judgment rather than a catalog of vendor features. I am glad that WDTA and Packt are jointly publishing this work. Technical publishing at this intersection should serve practitioners who need portable methods, and institutions that need accountable digital systems. Graph engineering, as presented here, is one of those methods. It gives teams a vocabulary for design review, a discipline for deciding when not to expand topology, and a security view that begins with reachability, shared state, and authorized principals. I recommend this book to engineers, architects, security leaders, product owners, and policymakers who are responsible for agentic systems that must remain operable under real constraints. Draw the graph. Version it. Operate it. That is how agent systems become infrastructure rather than improvisation. Prof. Yale Li Co-Founder and Executive Chairman, World Digital Technology Academy (WDTA) Chairman, Cloud Security Alliance Greater China Region (CSA GCR) Foreign Academician, Ukrainian Academy of Engineering Sciences (UAES) Geneva, Switzerland Graph Engineering for Agentic AI Systems · ii
Page
8
2. Matthew Versaggi Foreword I previously wrote forewords for Ken Huang’s Springer books Agentic AI: Theories and Practices (https://link.springer.com/book/10.1007/978-3-031-90026-6) and Humanoid Robots and Physical AI: Reshaping Work, Society, and Human Purpose (https://link.springer.com/book/10.1007/978-3-032-33669-9). Those volumes established how agentic systems think, coordinate, and act in digital and physical settings. I am writing this Packt foreword because ownership of agent topology is now the practical gap between a compelling demo and a system an organization can operate, audit, and defend. Most organizations do not fail at agentic AI because they lack a model. They fail because they cannot say, with precision, how an agent system is allowed to run. Nodes appear. Tools get wired in. A second agent is added when the first prompt grows long. Retries, handoffs, shared state, and human approvals arrive later, usually under deadline pressure. By then the topology already exists. The team simply does not own it. Ken Huang’s Graph Engineering for Agentic AI Systems treats that ownership problem as the engineering job. Graph engineering, as he defines it, is the work of declaring the specialized nodes, the legal edges, the shared run state, the places work may fan out and rejoin, and the gates that sit on irreversible steps. He separates execution graphs from knowledge graphs and from learned computational graphs, which is essential. Conflating those objects wastes quarters and produces design reviews that cannot decide what is being designed. He also insists on refusal. Not every task needs a multi-node graph. Many production failures begin when teams expand topology before they can name the handoff. That discipline matches what I have seen across more than thirty years in AI, including senior leadership in Fortune-scale healthcare technology, founding and maturing a College of Artificial Intelligence, chairing patent review boards, and serving as a Presidential Innovation Fellow in AI. Whether the domain is clinical operations, claims, provider systems, robotics workflows, or enterprise automation, agent systems that matter touch money, identity, policy, and irreversible action. In those environments, topology is not a slide decoration. It is a control surface. Reachability, shared-state risk, and human gates are security and governance questions as much as they are orchestration questions. I write again for Packt because this book continues the Springer conversation into production craft: how to declare legal paths, version them, secure them, and evaluate walks rather than only final text. Across fourteen chapters Ken moves from definition and Graph Engineering for Agentic AI Systems · iii
Page
9
anatomy through patterns and frameworks, into production operations, computer-science grounding, security and identity, verification, and a closing argument for keeping explicit topology after industry labels change. I am glad this work is being published jointly by the World Digital Technology Academy and Packt. Draw the graph. Version it. Operate it. That is how agent systems become accountable infrastructure. Matthew Versaggi Presidential Innovation Fellow in AI 3. Iftach Orr Foreword When multi-agent systems leave the demo and touch production tools, the failure mode I see most often is not a weak model. It is an undeclared topology. Teams add planners, implementers, reviewers, and tool nodes and so on, but then discover that nobody owns which edges are legal, what artifact each edge must carry, which principal each node acts as, or which exception path runs when a node fails. The graph is still there. It is just improvisation dressed up as architecture. Ken Huang’s Graph Engineering for Agentic AI Systems makes that structure an engineering object. He treats graph engineering as the multi-agent layer of the agent harness: fan out only when one loop is not enough, and only inside a control plane. Nodes get one job. Edges are contracts for typed artifacts and scoped authority, not forwarded chat. Exception edges have owners. Identity, memory provenance, observability, interrupt paths, evaluation gates, and token budgets apply per node, not as an afterthought on the final response. He also separates execution graphs from knowledge graphs and from learned computational graphs, and he teaches refusal: many tasks never need a multi-node graph. That framing matches the work we do at Alice securing generative and agentic systems for large technology companies, and the work I co-lead on the OWASP Agentic Skills Top 10. Skills, plugins, MCP servers, hooks, and CLI tools are edges to capability. They join a graph as attack surface: malicious skills, supply-chain compromise, over-privileged tools, weak isolation, and untrusted external instructions. Static prompt tests do not catch those failures. You need declared topology, runtime policy, and evaluation of walks under multi- turn, multi-tool conditions. Graph Engineering for Agentic AI Systems · iv
Page
10
Ken writes as both practitioner and standards contributor, including as Adjunct Professor at the University of San Francisco and as a leader in OWASP and AI safety communities. The book gives security and platform teams a shared vocabulary for design review: reachability, shared state, authorized principals, and gates on irreversible actions. I recommend it to engineers, architects and CISOs, who must place agent graphs into workflows where actions carry real consequences. Draw the graph. Version it. Enforce it at the edge. Then decide whether the fan-out has earned its autonomy. Iftach Orr Co-Founder and CTO, Alice Co-Lead, OWASP Agentic Skills Top 10 and OWASP AIVSS 4. Dr. Melan Xu Foreword Digital transformation is accelerating across governments, industry, and academia. Agentic AI is part of that acceleration. Yet speed alone is not progress. When multi-agent systems act on tools, data, and irreversible decisions, security and governance must sit inside the design, not beside it as an afterthought. Ken Huang’s Graph Engineering for Agentic AI Systems gives practitioners a concrete way to make that design explicit. The book treats agent topology as something teams must declare and own: which nodes may act, which edges are legal, what shared state travels with a run, where work may fan out and rejoin, and which steps require human authorization. It separates execution graphs from knowledge graphs and from learned computational graphs, which prevents a common and costly category error in design reviews. It also teaches refusal. Many tasks never need a multi-node graph. Owning topology includes knowing when not to expand it. That discipline matters to the communities I serve. As Executive Director of the World Digital Technology Academy (WDTA), and as Secretary-General of the Cloud Security Alliance Greater China Region, I work with experts and partners who must turn AI capability into accountable practice. WDTA’s principle of Speed, Safety, and Sharing requires methods that can be taught, reviewed, and applied across institutions. Explicit agent graphs support that requirement. They make reachability, shared-state risk, and approval gates inspectable. They give security and standards communities a structure they can audit. They give engineering teams a vocabulary that survives vendor change. Graph Engineering for Agentic AI Systems · v
Page
11
Ken contributes to this work as Co-Chair of WDTA’s AI Safety, Trust, and Responsibility (AI STR) Working Group, and as Adjunct Professor at the University of San Francisco. His writing reflects the same priorities that guide WDTA and CSA collaboration: clear definitions, operable controls, and security as a foundational pillar of digital systems. I am pleased that WDTA and Packt are jointly publishing this book. It strengthens the global knowledge base for agentic AI engineering and complements our shared commitment to research, standards, and professional capacity building. My guiding principle is sincerity in purpose and clarity in knowledge. This book serves that standard. It asks readers to draw the graph, version it, and operate it with judgment. I recommend it to engineers, architects, security professionals, educators, and institutional leaders who are responsible for agentic systems that must remain trustworthy under real operational constraints. Dr. Melan Xu Executive Director World Digital Technology Academy (WDTA) Secretary-General, Cloud Security Alliance Greater China Region (CSA GCR) Graph Engineering for Agentic AI Systems · vi
Page
12
(This page has no text content)
Page
13
Contents Chapter 1. Graph Engineering Is Topology You Own Chapter 2. Execution Graphs and Memory Graphs Chapter 3. The Graph Under the Harness Chapter 4. Anatomy of an Agent Graph Chapter 5. When Not to Build a Graph Chapter 6. Patterns That Earn Their Nodes Chapter 7. Frameworks You Can Ship an Agent Graph On Chapter 8. Knowledge Graphs as Memory Chapter 9. Operating Graphs in Production Chapter 10. The Computer Science of Agent Graphs Chapter 11. Security, Identity, and Governance of Agent Graphs Chapter 12. Graph Intelligence Is Not the Runtime Chapter 13. Testing, Evaluation, and Verification of Agent Graphs Chapter 14. Keep the Graph After the Name Fades Index Graph Engineering for Agentic AI Systems · 4
Page
14
Chapter 1. Graph Engineering Is Topology You Own This chapter names the job before we name the week. Graph engineering, as we use it in this book, is the work of declaring how an agent system is allowed to run. You pick the specialized nodes, the edges that are legal, the shared state that travels with the run, the places work can fan out and join, and the gates that sit on irreversible steps. A loop is that picture with one worker and an edge back to itself. We add structure when one cycle cannot hold the job. The question we keep asking is whether you designed that structure or allowed it to happen. Allowed-to- happen is how most demos get built. You start with a prompt, add a tool, add a retry, add a second agent because the first one got long, and never write the topology down. Designing too soon is the mistake we catch on the other side of the room: a five-node graph for "summarize this PDF." One hides the graph. The other invents nodes the work does not pay for. On 18 July 2026 at 00:34:54 UTC, Peter Steinberger asked whether we were still talking loops or had shifted to graphs yet (Steinberger, 2026). Twelve words, and no library or product behind them. We read that sentence as a public name for a decision builders were already making inside LangGraph, AutoGen GraphFlow, and ADK's Workflow Runtime. We use the name in this book. We do not pretend the name invented the skill. 1.1 The job is topology When we draw a loop, we set the goal and the bar, and the agent picks the path. When we draw a graph, we declare the valid paths and the checks along them. Residual freedom lives inside nodes. If we cannot name the handoff, we do not have a graph yet. The topology is still undefined. The one move a single loop cannot make is fan-out then join. Sequence, retry, and revise live inside one worker. Two specialists at once, then a synthesizer, then a read-only reviewer, then a human on the refund: that is a graph we can draw, version, and test. If the work still fits in one cycle, we finish the loop. By early 2026 that cycle already had a name. Franziska Hinkelmann defined loop engineering on 8 March 2026 (Hinkelmann, 2026). Addy Osmani's June article turned the practice into a parts list a working engineer could implement (Osmani, 2026). Geoffrey Huntley's Ralph pattern is a bash cycle that feeds output and errors back until acceptance criteria clear (Huntley, 2025). We care about a shift to graphs once we already know what the loop is. We also need you to notice a collision that kept showing up that week, because it still shows up in reviews. People used one word for an execution graph, a knowledge graph, and a learned graph. A knowledge graph stores entities and typed facts. A learned graph, a GNN or a graph transformer, is trained offline and is not a runtime. Chapter 2 is where we separate them. Here we only need you to see the mix-up, so you do not take a GraphRAG course and think you learned LangGraph. Figure 1.1 is how we read 18 to 20 July 2026: posts and quote-posts, not a shipped runtime. We drew it so you can see a noun arrive. Then put the figure down and treat topology as the artifact you own. Figure 1.1: The week as a naming graph, not a runtime. Posts are nodes. Quote-posts and replies are edges. Nothing in this picture is a shipped capability. The dashed edge to Linear is coincidence of naming, not architecture. Graph Engineering for Agentic AI Systems · 5
Page
15
1.2 What we kept from that week We are not going to reconstruct the timeline. View counts, clock arguments, and who quote-posted whom do not change what you should build. We kept three claims, because they are the ones we still use when we look at a system. Graph Engineering for Agentic AI Systems · 6
Page
16
Dale Everett said loops are just shitty graphs. We agree with the topology, and we would say it more politely. A while-loop is a control-flow graph with one node and an edge back to itself. A retry loop is the same graph with a bound. Graphs are not a successor to loops any more than trees are a successor to linked lists. The single loop was the degenerate case we settled for while agents were still too unreliable to sit next to each other. Figure 1.2 is that picture: one worker, then the extra nodes a job has to earn. Figure 1.2: A loop is the one-worker-node degenerate case of an agent graph. The interesting question is not whether loops are graphs. They are. The interesting question is which additional nodes, edges, and state the work actually demands. Shared run state is omitted so the topology stays readable. David Khourshid said the same thing from the state-machine side: a loop is a directed cyclic graph, and next month there will be another noun. That matches a warning we already believed. If a graph-engineering article never mentions state machines, you are reading marketing, not engineering. The new payload is a model that fails in non-deterministic ways, which makes the old picture more necessary, not less. Graph Engineering for Agentic AI Systems · 7
Page
17
Harrison Chase asked the staff-engineer question we still hear in planning meetings (Chase, 2026): is this basically just LangGraph? The idea is not new, and LangGraph is not the only implementation. LangGraph is a low-level orchestration framework for long-running stateful agents: StateGraph, nodes, edges, compile, checkpointers, interrupts, Send. If you have used it, you have been doing the job under a name that shipped years earlier. Microsoft AutoGen had GraphFlow. Google ADK made a graph Workflow Runtime the substrate in 2.0. Anthropic's December 2024 essay listed prompt chaining, routing, parallelization, orchestrator-workers, and evaluator-optimizer as graph topologies written in prose (Anthropic, 2024). What was new in mid-2026 was a shared name for decisions those frameworks already asked of you: what are the nodes, what are the edges, what is in the state. The discriminator we take from that week is Shann Holmberg's (Holmberg, 2026). In a loop we set the goal and the bar, and the agent picks the path. In a graph we declare the valid paths and the checks along them. Some edges still get decided at runtime. The agent's freedom lives inside each node instead of across the whole job. You do not have to like Holmberg's wording. You do need to know who owns the topology. Figure 1.3 is that discriminator as control flow. Figure 1.3: Holmberg's discriminator, drawn as control flow. The loop leaves path selection inside the agent. The graph encodes permitted paths as edges; residual freedom lives inside nodes. A graph is not the absence of agent judgment. Graph Engineering for Agentic AI Systems · 8
Page
18
We keep one product observation and then we are done with the week as sociology. The same day Chase posted, Linear shipped a product called Loops (Linear, 2026). Under the hood it is a graph: a trigger is an edge, the run history is a trace, and publish-versus-draft is a human gate. Users did not want to engineer a graph. They wanted a recurring workflow they could read, bound, and inspect. That is the right product instinct, and it is the opposite of renaming a working loop because a sentence went around. LangChain's retrospective, two days later, is the other thing we kept (Runkle and Chase, 2026). Agent graphs in production are usually not DAGs, because you need cycles for retry, missing information, revision, repeated tool use, and human pause. Loops are simple graphs, not alternatives to graphs. Dynamic transitions matter, because you do not know fan-out cardinality in advance, which is why Send exists. Those three sentences carry more engineering weight than the rest of the posts combined. They are also, as LangChain says, things the team learned from years of building. Graph Engineering for Agentic AI Systems · 9
Page
19
1.3 This did not start in July Origin stories are a tax viral posts pay, and they are almost always wrong. The phrase "graph engineering" did not begin at 00:34:54 UTC on 18 July 2026. We want the lineage as vocabulary, not as a founding myth that makes you rewrite a working system. The phrase ancestor we use is a paper. In January 2024, Tal Ridnik, Dedy Kredo, and Itamar Friedman posted Code Generation with AlphaCodium: From Prompt Engineering to Flow Engineering as arXiv:2401.08500 (Ridnik et al., 2024). AlphaCodium argued that a single prompt is the wrong unit for generating code that has to pass tests. You want a flow: generate, run tests, iterate, and only then call the thing done. LangChain launched LangGraph in the same month as a library for cyclical agent graphs, not DAGs, explicitly to support flow engineering. Then comes the post the week forgot. Itamar Friedman, on 29 February 2024: "When building real world AI empowered systems, we see a shift from prompt engineering to flow (/graph) engineering." Two years and four months before Steinberger's question, a practitioner looking at production systems had already named the move. He put "flow" first and "graph" in parentheses, which is how practitioners introduce a word they are not sure will stick. He was describing what happens when you stop treating the prompt as the artifact and start treating the path as the artifact. The serious essay we lean on is Josh C. Simmons, 4 July 2026, We Are Entering the Graph Engineering Phase (Simmons, 2026). Explicit graphs instead of implicit loops. Production pressure as the reason the implicit loop fails: audit trails, resumability, approval gates, spend ceilings. The skill shift from talking to models to systems work: state machines, idempotency, failure domains. Simmons says this is the oldest discipline in distributed computing, and that half the arrivals think they invented it. He cites LangGraph 1.0, Microsoft Agent Framework 1.0, Hu Wei's Structured Graph Harness paper (Hu, 2026), a January 2026 agentic-AI survey that discusses flow engineering (Arunkumar et al., 2026), Temporal and Prefect, and A2A. The serious essay got almost no attention. A sarcastic one-liner two weeks later produced courses within six days. If you want a founding text that is actually a text, read Simmons. If you want the tweet that lit the fuse, read Steinberger. Do not confuse the two. A week after Simmons and a week before Steinberger, Mike posted the ladder the timeline wanted: prompt, context, harness, loop, next is graph. We report that column as an empirical claim about what people said. We do not use it as an architecture. Prompt engineering had been a job posting since 2023. Context engineering had been Anthropic's name for the tokens in a finite window. Harness engineering was the 2025-into-2026 word for tools, memory, files, and scaffolding. Loop engineering had just had its summer. Graph was the cell the column pointed at next. We defend a narrow claim. Between 2023 and mid-2026, practitioner discourse named five layers in public, in roughly that order, and in July 2026 a large audience used "graph engineering" as the name of the outermost cell. That is a claim about vocabulary. It is not a claim that each layer retired the one before it. It is not a claim that Steinberger proposed the column. It is not the organizing truth of this book. 1.4 Harness is the paradigm. Graph is a sibling. The frame we use in this book is deliberate. Steinberger did not say it. Holmberg, Chase, and Khourshid did not say it. We state it once so later chapters can use it without re-litigating the column. Graph Engineering for Agentic AI Systems · 10
Page
20
The 2026 shift that deserves the word paradigm is treating prompt-to-context-to-harness-to-loop-to-graph as a replacement ladder. At the top is a shift from software engineering, in the sense of deterministic systems fully specified in advance, to harness engineering: non-deterministic agentic systems constrained, verified, and steered at runtime. Under that umbrella we treat sibling disciplines, not rungs: prompt, context, loop, graph, and memory. This book is the topology book. The other four appear only where they bear on nodes, edges, shared state, fan-out and fan-in, and gates. A classical software system is specified before it runs. An agentic system is not that object. The model is non- deterministic. It will invent an action, skip a step, declare victory early, or route work down a path you did not intend. The engineering job moves from writing the behavior in advance to constraining, verifying, and steering the behavior while it is happening. That job already had a name before July's joke: harness engineering. Agent = Model + Harness. Birgitta Böckeler's 2 April 2026 essay on martinfowler.com, Harness engineering for coding agent users (Böckeler, 2026), is the one we use. An inner harness ships with the model. An outer harness is what you assemble on top: instruction files, MCP servers, custom skills. Guides steer before the agent acts. Sensors observe the result. Each of those may be computational, linters and tests, or inferential, an LLM-as-judge. That taxonomy is about steering non-determinism at runtime. It is the paradigm. Graph engineering does not replace it. Under the umbrella, the siblings do different jobs. Prompt engineering designs the instruction for a single model call. Every node that calls a model is still a completion. Graphs make prompts load-bearing in a new way: the router prompt, the worker prompt, and the reviewer prompt are now three different objects, and a coordination failure is often still a prompt failure. Anthropic's multi-agent research system is the existence proof we come back to (Anthropic, 2025): the topology was a graph, and the primary lever for fixing coordination failures was still language. Context engineering designs which tokens occupy a finite window. Every node has a window. The graph decides which artifacts cross a node boundary. Cognition's warning that actions carry implicit decisions is a context claim wearing an architecture title (Yan, 2025). Loop engineering designs the cycle one agent repeats: observe, act, verify, stop. A node that is a full agent run is a loop. A graph of nodes that cannot stop is a distributed spend problem. Mastering the loop is the interior of a competent node, not last season's fashion. Graph engineering, this book's subject, designs topology. Which specialized nodes exist. Which edges are allowed. What shared run state travels. Where work fans out and how it joins. Where a gate sits: a test, a policy, a budget, a human. The unit of control is the organization of work, not the cycle inside one worker. Memory engineering designs what the system remembers across runs: entities, facts, typed and temporal relations, provenance. That is a different graph. July 2026 used one noun for both. We will not. Figure 1.4 is the lens we use for the whole book. Figure 1.4: The organizing lens of this book, not Steinberger's claim. We use harness engineering as the organizing framework. Prompt, context, loop, graph, and memory are siblings under it. In this book, graph engineering is topology. Edges from the umbrella are not a sequence; the dashed edge marks this book's scope. Graph Engineering for Agentic AI Systems · 11
The above is a preview of the first 20 pages. Register to read the complete e-book.
AI Reading Assistant
Whole-book reading guide from stratified index samples; jump to passages in the text
AI guide
【One-Line Pitch】
A practical framework for treating agentic AI systems as explicit, versioned topologies—nodes, edges, shared state, and gates—rather than improvised prompt chains. Best for engineers, architects, security leads, and product owners who must build, operate, or govern agents that stay accountable under real constraints.
【Book Arc】
- **Opening (~0%–10%)**: Frames the core problem—most agent demos "allow" their structure to happen rather than designing it—and introduces graph engineering as the discipline of declaring how a system is allowed to run. Positions it under the broader umbrella of harness engineering.
- **Early (~10%–32%)**: Disambiguates the overloaded word "graph" across five distinct objects (task/execution graph, knowledge graph, learned graph, execution trace, improvement graph), then grounds the execution graph in a minimal typed Python runtime with a bounded walk.
- **Middle (~39%–48%)**: Traces how the "named unit" of control widened over time—prompt → context → environment → loop → topology—and argues these are siblings, not a replacement ladder. Includes the memory sibling that the public timeline neglected.
- **Late**: Moves into production operations, security and identity, and evaluation of walks rather than only final text (excerpts do not cover these chapters in detail).
- **Ending**: Closes with an argument for keeping explicit topology even as industry labels change, and a final emphasis on the operator rather than the architecture.
【Key Takeaways】
- **Topology is a governance artifact** (Opening): Safety that depends only on a live model response is not governed. Declared, verifiable paths, principals, and approval gates can be reviewed and audited—the same accountability standard institutions demand.
- **Design vs. accident is the central question** (Opening): Demos accrete tools, retries, and agents without writing the topology down; over-design invents nodes the work doesn't pay for. Graph engineering asks which you did.
- **"Graph" means at least five different things** (Early): Task graph (declared, versioned), knowledge graph (persists across runs), learned graph (model-ranked edges), execution trace (what actually happened), and improvement graph (loops auditing loops). Confusing them causes real bugs—e.g., treating a chat log as memory.
- **A graph without a bound is self-inflicted denial of service** (Early): The toy runtime caps steps deliberately; the bound is the point, not an afterthought.
- **Don't store business facts as control-flow edges** (Early): Wiring a "supersedes" successor so a ticket "knows" something is a category error—facts belong in the memory graph, not the allowlist.
- **Siblings, not a ladder** (Middle): Prompt, context, loop, graph, and memory engineering each do different jobs. You can be excellent at topology and still lose at a sibling—Anthropic's multi-agent system fixed coordination failures through language, not more boxes.
- **Every edge is a window** (Middle): The graph decides which artifacts cross a node boundary; context engineering is a per-node concern the topology must respect.
- **The architecture can't tell intent from avoidance** (Middle): Two engineers can implement the same structure and get opposite outcomes—one to move faster on understood work, the other to avoid understanding it. Hence the book closes on the operator.
【Reading Tips】
- **Deep-read the disambiguation material early**: The five-objects distinction is the book's load-bearing vocabulary; skim later if you already know which graph you mean in meetings.
- **Treat the toy `ExecGraph` as a type check, not a template**: The author says so explicitly—don't benchmark its sequential, first-successor walk against real fan-out.
- **Skim the timeline/history sections if you lived them**: The prompt→context→loop→graph progression is context-setting; the design judgment is in the topology and failure discussions.
- **Use the diagnostic questions as a checklist**: The "what is the join / what is the failure / what would you delete if the bill doubled" sequence is a reusable design-review tool—copy it before your next architecture review.
- **Note the coverage gap**: Production operations, security/identity, and walk-based evaluation are named but thinly excerpted here; plan to read those chapters in full.
【Coverage Limits】
This guide is built from stratified excerpts covering roughly the first half of the book (opening through the sibling-disciplines discussion); the production, security, and evaluation chapters are referenced but not detailed, so claims about them are deliberately general.
Passage locations
Page 7
th reachability, shared state, and authorized principals. I recommend this book to engineers, architects, security leaders, product owners, and policymakers...
View in text
Page 20
text, loop, graph, and memory are siblings under it. In this book, graph engineering is topology. Edges from the umbrella are not a sequence; the dashed edge...
View in text
Excerpt 3
ing" if "refund" in s.ticket.lower() else "other" return s def draft_reply(s: ExecState) -> ExecState: Graph Engineering for Agentic AI Systems · 36 because...
View in text
Excerpt 4
e boxes will fill themselves. I drew it so you stop hoping. Graph Engineering for Agentic AI Systems · 49 Every node that calls a model is still a completion...
View in text
Recommended for You
{{#thumbnailUrl}}
{{/thumbnailUrl}}
{{^thumbnailUrl}}
{{/thumbnailUrl}}
Loading recommended books...
Failed to load, please try again later
Tip the Site
Scan the WeChat Pay or Alipay code to tip. No login required.
WeChat Pay
Alipay