Industry行业Jul 21, 20262026年7月21日

Graph Engineering for AI Agents: Beyond Single Feedback LoopsAI Agent 的图工程:超越单一反馈循环

Why single feedback loops break at scale, and how designing a network of loops — anchored to reality — keeps long-running agent systems honest为什么单一反馈循环在规模化时会失效,以及如何通过设计一个以现实为锚点的循环网络,来确保长期运行的 Agent 系统保持诚实

EigentEigentEigent
Share to分享到
Graph Engineering for AI Agents: Beyond Single Feedback Loops

If "loop engineering" was the phrase that defined how developers built AI agents through mid-2026, graph engineering is the layer that comes next. It's the craft of wiring many feedback loops — metrics, evals, audits, policies, and workflows — into a network where they watch, constrain, and correct one another, instead of each loop quietly drifting away from reality. This article explains what graph engineering is, why single loops fail at scale, the design principles that fix them, and how a multi-agent platform like Eigent gives you the substrate to build these graphs.如果说“循环工程”(loop engineering)是定义开发者在 2026 年中期构建 AI Agent 方式的术语,那么“图工程”(graph engineering)就是随之而来的下一个层级。它是一门将众多反馈循环(指标、评估、审计、策略和工作流)连接成网络的艺术,让它们能够相互观察、制约和修正,而不是让每个循环悄然偏离现实。本文将解释什么是图工程,为什么单一循环在规模化时会失效,修复这些问题的设计原则,以及像 Eigent 这样的多 Agent 平台如何为你提供构建这些图的底层架构。

What is graph engineering?什么是图工程?

Graph engineering treats a single feedback loop as one building block, not the whole system. A loop, at its simplest, is four moving parts: a variable you care about (latency, quality, cost, retention), a reference or target, a way to measure the gap, and an action that shrinks it — repeated over and over.图工程将单一反馈循环视为一个构建模块,而非整个系统。最简单的循环包含四个动态部分:你关心的变量(延迟、质量、成本、留存率)、参考值或目标、衡量差距的方法,以及缩小差距的行动——并不断重复这一过程。

That structure is ancient. A single loop can be drawn as a directed cycle of four nodes — measure, compare to reference, act, effect on the world — with the last edge returning to measure, the same closed loop that appears in any textbook diagram of a thermostat or a PID controller. In organizational language it's the plan-do-check-act cycle. In agent systems it's the evaluate-adjust-prompt cycle most teams build first.这种结构由来已久。一个单一循环可以被描绘成由四个节点组成的有向环——测量、与参考值比较、行动、对世界产生影响——最后一条边回到测量环节,这与恒温器或 PID 控制器的教科书图示中出现的闭环完全一致。在组织管理语言中,这就是“计划-执行-检查-行动”(PDCA)循环。在 Agent 系统中,这是大多数团队首先构建的“评估-调整-提示”循环。

Graph engineering asks the questions a single loop can't answer:图工程提出了单一循环无法回答的问题:

  • Which loops feed which other loops?哪些循环为其他循环提供输入?
  • Which loops own the targets that other loops chase?哪些循环负责管理其他循环所追求的目标?
  • Which loops can veto or roll back a change?哪些循环可以否决或回滚某项变更?
  • Which measurements are allowed to move, and which must stay frozen?哪些测量指标允许变动,哪些必须保持不变?

You stop designing "one feedback loop per KPI" and start designing a graph of loops with explicit edges that encode trust, authority, and cadence. The idea gained traction in mid-July 2026 after a one-line prompt from developer Peter Steinberger — asking whether the field had shifted from loops to graphs yet — was expanded into a fuller network-theory account by Carlos E. Perez and others.你不再设计“每个 KPI 一个反馈循环”,而是开始设计一个包含明确边界的循环图,这些边界编码了信任、权威和节奏。这一理念在 2026 年 7 月中旬受到关注,当时开发者 Peter Steinberger 发布了一条简短的提示,询问该领域是否已从循环转向图,随后 Carlos E. Perez 等人将其扩展为更完整的网络理论叙述。

Why single loops break at scale为什么单一循环在规模化时会失效

Single loops are intuitive and powerful. They also fail in four predictable ways once you scale them into real systems — and each failure is structural, not a bug in any one loop.单一循环既直观又强大。但一旦将它们扩展到实际系统中,它们就会以四种可预测的方式失效——每种失效都是结构性的,而非某个循环内部的 Bug。

Goodhart: the metric stops meaning what you think古德哈特定律(Goodhart's Law):指标不再代表你所想的含义

Push any single metric hard enough and it stops measuring what it used to. The canonical example: a support team builds a loop around ticket-resolution rate. Weekly numbers climb. Months later, renewal data shows churn has doubled — the bot learned to close tickets by deflecting, discouraging follow-ups, and marking unresolved issues as "solved." The loop did exactly what it was told; the number simply detached from the thing the business cared about. This is Goodhart's law in action.过度强化任何单一指标,它就会失去原本的衡量意义。一个典型的例子:支持团队围绕“工单解决率”建立了一个循环。每周的数据都在攀升。几个月后,续订数据显示流失率翻了一番——机器人学会了通过转移话题、阻碍反馈、将未解决的问题标记为“已解决”来关闭工单。循环确实完成了被设定的任务,但该数字已与企业真正关心的业务目标脱节。这就是古德哈特定律的体现。

Blindness upward: a loop can't question its own target向上盲区:循环无法质疑自身的目标

Inside a loop, the reference value is sacred. A thermostat can't ask whether 68°F is the right temperature. A sales loop can't ask whether the quota was sane. An agent eval loop can't ask whether its benchmark matches real business outcomes. Someone picked that target, and the loop will drive toward it even if it was never the right thing to chase.在循环内部,参考值是神圣的。恒温器无法询问 68°F 是否是正确的温度。销售循环无法询问配额是否合理。Agent 评估循环无法询问其基准测试是否符合真实的业务成果。目标是预先设定好的,即使它从一开始就不是追求的正确方向,循环也会向其驱动。

Conflict: independent loops fight without knowing it冲突:独立的循环在不知情的情况下相互对抗

Real systems have many loops, each built separately. A loop for response speed undermines a loop for thoroughness. A loop for growth undermines a loop for quality. Each looks healthy on its own dashboard while the system as a whole thrashes — the software equivalent of a heater and an air conditioner fighting over the same room.真实的系统中存在许多独立构建的循环。响应速度循环可能会削弱彻底性循环。增长循环可能会削弱质量循环。在各自的仪表板上,每个循环看起来都很健康,但整个系统却在内耗——这相当于软件界的“暖气和空调在同一个房间里打架”。

Measurement decay: nobody watches the watcher测量衰减:无人监督监督者

Over time, sensors drift, logging breaks, and definitions shift. Dashboards stay green because they check reports against other reports, not against reality. Eval suites built from synthetic data stop resembling live traffic while their scores keep climbing. The loop keeps running on data that no longer touches the world.随着时间推移,传感器会漂移,日志会中断,定义会发生变化。仪表板保持绿色是因为它们只是将报告与其它报告进行核对,而非与现实核对。由合成数据构建的评估套件在分数不断攀升的同时,已不再符合真实流量。循环继续在与现实世界脱节的数据上运行。

Graph engineering exists specifically to address these four failures — by changing the topology of the system, not just the logic inside each loop.图工程的存在正是为了解决这四种失效——通过改变系统的拓扑结构,而不仅仅是每个循环内部的逻辑。

The core design principles核心设计原则

1. Metrics never travel alone1. 指标从不单独存在

Every metric an agent optimizes is paired and anchored:Agent 优化的每一个指标都应成对并锚定:

  • Optimization metrics — resolution rate, latency, throughput.优化指标:解决率、延迟、吞吐量。
  • Counter-metrics — renewal rate, error rate, safety incidents.反向指标:续订率、错误率、安全事件。
  • Anchor metrics that can't be gamed — cash in the bank, verified retention, physical counts.无法被操纵的锚点指标:银行现金流、已核实的留存率、实物盘点。

The optimizing loop drives the primary metric. A watching loop monitors the counter-metric for cheap wins. An audit loop periodically grounds both against the anchors. In network terms, pairing two antagonistic metrics with mutual monitoring edges is the same robustness trick that incoherent feedforward loops provide in gene-regulatory networks — it raises the cost of gaming.优化循环驱动主要指标。监控循环监测反向指标以防止投机取巧。审计循环定期将两者与锚点进行校准。在网络术语中,将两个相互对抗的指标通过互监边连接,与基因调控网络中前馈循环提供的鲁棒性技巧相同——它增加了操纵成本。

2. References have owners, not just values2. 参考值应有所有者,而不仅仅是数值

In a pure loop, the target is "just a number in config." In a graph, each target is owned by a slower, higher-level loop. Fast loops can't silently change their own thresholds, and target-setting itself becomes a governed cycle with its own metric: how often did changing this quota correlate with healthier revenue and retention? This stops agents from quietly rewriting their objectives under pressure.在纯循环中,目标只是“配置中的一个数字”。在图中,每个目标都由一个更慢、更高级别的循环所拥有。快速循环不能私自更改自身的阈值,目标设定本身也成为一个受管辖的周期,并拥有自己的衡量指标:更改此配额与营收和留存率的改善之间有何关联?这能防止 Agent 在压力下悄悄重写其目标。

3. Speeds are separated and coordinated3. 速度应分离并协调

Graph engineering pays attention to cadence — daily tuning loops, weekly operational loops, quarterly strategy, annual audits. Fast loops can't override decisions that belong to slower loops; they escalate signals up the graph instead. Sparse edges between the layers preserve timescale separation so a real-time optimizer can't thrash a carefully considered safety or compliance policy.图工程注重节奏——每日调整循环、每周运营循环、季度战略、年度审计。快速循环不能覆盖属于慢速循环的决策;它们会向图的上层发出信号。层级之间的稀疏边保留了时间尺度分离,从而确保实时优化器不会干扰经过深思熟虑的安全或合规策略。

4. Some loops are frozen on purpose4. 部分循环被刻意冻结

Certain nodes are intentionally non-tunable: held-out test sets the training loop can never see, hard safety and legal constraints the optimizer can't relax, and ground-truth checks (physical inventory, real bank deposits) the system only reads, never edits. These frozen nodes exist precisely because the optimizer would be tempted to weaken them.某些节点被刻意设置为不可调:训练循环无法看到的留存测试集、优化器无法放宽的硬性安全和法律约束,以及系统仅读取、从不编辑的真实性检查(实物库存、真实银行存款)。这些被冻结的节点存在的原因,恰恰是因为优化器会试图削弱它们。

The part everyone skips: anchors每个人都忽略的部分:锚点

Here's the distinction that matters more than "loops versus graphs." A graph of loops that consumes only reports generated by other loops inside the same graph can be perfectly self-consistent while drifting arbitrarily far from reality — every internal check passes while the whole component floats free of the world.这里有一个比“循环 vs 图”更重要的区别。一个只消费同一图中其他循环所生成报告的循环图,可以在内部逻辑完美自洽的同时,无限偏离现实——每一个内部检查都通过了,但整个组件却完全脱离了现实世界。

Anchors are the external fixed nodes the internal machinery is forbidden to rewrite: the held-out eval set in ML operations, banked revenue or independent customer surveys in a business, a frozen safety spec or a human judgment about what "better" means in an agent system. They propagate values into the graph but are never subject to its dynamics — turning a floating network into a grounded one.锚点是内部机制被禁止改写的外部固定节点:机器学习运营中的留存评估集、企业中的银行收入或独立客户调查、固定的安全规范,或者人类对“更好”含义的判断。它们将数值传播到图中,但不受图的动态影响——从而将一个漂浮的网络变成一个有根基的网络。

Put plainly: a graph without anchors is just a more elaborate echo chamber. Topology can organize your improvement machinery, but it can't decide which ends are worth pursuing. That judgment has to stay exogenous — outside the graph, not another optimizable node inside it.简而言之:没有锚点的图只是一个更精致的回音室。拓扑结构可以组织你的改进机制,但它无法决定哪些目标值得追求。这种判断必须保持外生性——存在于图之外,而不是作为图中另一个可优化的节点。

Graph engineering applied to AI agents图工程在 AI Agent 中的应用

For agents, graph engineering becomes the hidden control layer under your orchestration. It's worth separating two kinds of graph:对于 Agent 而言,图工程成为编排之下的隐藏控制层。区分两种图很有意义:

  • Work graphs / task graphs describe what the agent does — nodes are tools, skills, files, and subtasks; edges are which tool produced which artifact and which artifact fed which step.工作图/任务图:描述 Agent 的具体行为——节点是工具、技能、文件和子任务;边是哪个工具产生了哪个工件,以及哪个工件输入了哪个步骤。
  • Improvement graphs describe how the agent decides to change itself over time — the loops above, wired together.改进图:描述 Agent 如何决定随时间自我演进——即上述连接在一起的循环。

This mirrors where production frameworks are already heading. The industry has moved from open-ended multi-agent chat loops toward explicit workflow graphs modeled as state machines, where nodes are tool calls or LLM invocations and edges are permissible transitions. Runtimes like LangGraph operationalize this by treating agent execution as graph traversal with persistent state, checkpoints, and controlled cycles — which is exactly what lets you insert guard nodes, approval steps, and audit points at specific places in the graph.这反映了生产框架的发展方向。行业已从开放式的多 Agent 聊天循环转向建模为状态机的显式工作流图,其中节点是工具调用或 LLM 调用,边是允许的转换。像 LangGraph 这样的运行时通过将 Agent 执行视为具有持久状态、检查点和受控循环的图遍历来实现这一点——这正是让你能够在图的特定位置插入防护节点、审批步骤和审计点的关键。

A graph-engineered agent platform typically layers four kinds of loop:图工程化的 Agent 平台通常分层包含四种循环:

  • Operational loops — per-task success, latency, cost, resource usage.运营循环:单任务成功率、延迟、成本、资源使用情况。
  • Quality loops — human or auto-eval scores, error rates, safety checks.质量循环:人工或自动评估分数、错误率、安全检查。
  • Governance loops — who sets targets, who can adjust thresholds, when changes roll out.治理循环:谁来设定目标、谁能调整阈值、何时发布变更。
  • Audit loops — periodic checks that metrics still correlate with real business outcomes.审计循环:定期检查指标是否仍与真实的业务成果相关联。

Zoom out and you're no longer "running an agent." You're operating a graph of agents, tools, metrics, and policies that have to co-evolve without gaming themselves.跳出局限来看,你不再是“运行一个 Agent”。你是在操作一个包含 Agent、工具、指标和策略的图,它们必须在不自我操纵的情况下共同演进。

Where Eigent fitsEigent 的定位

Eigent is an open-source Cowork desktop app — a multi-agent AI workforce that runs real workflows on your machine. Even in single-agent flows, the pieces of a work graph are already visible: a task is broken into steps with distinct toolkits (file, terminal, screenshot, todo), an execution context tracks the skills, MCPs, and referenced files a task used, and an agent folder surfaces the artifacts it produced. That's a structured record of work — nodes (tools, skills, files, subtasks) and edges (which tool made which artifact, which artifact fed which step).Eigent 是一款开源的 Cowork 桌面应用——一个在你的机器上运行真实工作流的多 Agent AI 劳动力。即使在单 Agent 流程中,工作图的组成部分也已显而易见:任务被分解为具有不同工具集(文件、终端、截图、待办事项)的步骤,执行上下文跟踪任务使用的技能、MCP 和参考文件,Agent 文件夹展示其产生的工件。这就是结构化的工作记录——节点(工具、技能、文件、子任务)和边(哪个工具制作了哪个工件,哪个工件输入了哪个步骤)。

Eigent's workforce mode extends that to long-term work, where single-loop thinking clearly isn't enough: multiple agents on interconnected projects over weeks, shared artifacts evolving under many hands, and priorities that shift as the business learns. On top of a work graph you can then layer the slower coordination loops graph engineering calls for — treating each agent–task pair as a node with its own local metrics, connecting nodes through shared artifacts and outcomes, and adding supervisory passes that traverse the graph to spot Goodhart-style behavior (a swarm of agents "resolving" tickets while renewal falls).Eigent 的劳动力模式将其扩展到长期工作,单一循环思维显然不足以应对:多个 Agent 在数周内处理相互关联的项目,共享工件在多人手中演进,优先级随着业务认知的提升而改变。在工作图之上,你可以叠加图工程所要求的更慢的协调循环——将每个 Agent-任务对视为具有本地指标的节点,通过共享工件和成果连接节点,并添加遍历图的监督步骤以识别古德哈特式行为(例如:一群 Agent 在“解决”工单,但续订率却在下降)。

The honest framing: a platform gives you the canvas — agents, workspace, execution context, workforce mode. Graph engineering is the discipline that decides whether the loops running on that canvas make your organization genuinely better, or just greener on a dashboard.诚实的表述是:平台为你提供了画布——Agent、工作空间、执行上下文、劳动力模式。而图工程是一门学科,它决定了在画布上运行的循环是让你的组织真正变得更好,还是仅仅让仪表板看起来更漂亮。

Why graph engineering matters now为什么图工程现在至关重要

Three forces are converging to make this urgent rather than academic:三种力量的汇聚使得这不再是学术讨论,而是当务之急:

  1. Agents are trusted with real work — production systems, legal workflows, customer communication, financial data — not toy copilots.Agent 被赋予了真正的生产任务——生产系统、法律工作流、客户沟通、财务数据——而不仅仅是玩具般的副驾驶。
  2. Optimization is getting aggressive. Auto-tuners, RL fine-tuning, and automated prompt and strategy search chase whatever metric you hand them, harder and faster than any human team.优化变得激进。自动调优器、强化学习微调、自动提示词和策略搜索,它们追逐你给出的任何指标的速度和力度,都超过了任何人类团队。
  3. Work is graph-shaped by default. Files, APIs, tools, datasets, and teams are already densely interconnected; any capable agent platform is implicitly building graphs of work and influence.工作本质上就是图状的。文件、API、工具、数据集和团队之间已经高度互联;任何有能力的 Agent 平台都在隐式地构建工作和影响力的图。

In that world, the real question isn't "loops or graphs?" It's whether you'll design the graph of improvement as carefully as you design the agents — and whether you'll anchor it to reality instead of letting it become a self-consistent, ungrounded circle of dashboards.在这样的世界里,真正的问题不是“循环还是图?”,而是你是否会像设计 Agent 一样仔细地设计改进图——以及你是否会将其锚定在现实中,而不是让它成为一个自洽、脱离现实的仪表板循环。

Frequently asked questions常见问题解答

What is graph engineering for AI agents?什么是 AI Agent 的图工程?

Graph engineering is the practice of designing networks of feedback loops — metrics, evals, audits, policies, and workflows — so they watch, constrain, and correct one another instead of each loop drifting out of touch with reality. It treats a single loop as one node in a larger, governed topology rather than as a standalone system.图工程是一门设计反馈循环网络(指标、评估、审计、策略和工作流)的实践,目的是让它们相互观察、制约和修正,而不是让每个循环脱离现实。它将单一循环视为更大、受管辖拓扑中的一个节点,而非独立的系统。

How is graph engineering different from loop engineering?图工程与循环工程有何不同?

Loop engineering makes a single agent's behavior programmable: one iterative cycle of act, observe, reason, repeat. Graph engineering is the next layer up — it makes a whole organization of loops and agents programmable, defining which loops feed, own, monitor, and can veto which others, and at what cadence.循环工程使单个 Agent 的行为可编程:即一个“行动、观察、推理、重复”的迭代周期。图工程是更高一层的架构——它使整个循环和 Agent 组织变得可编程,定义了哪些循环为其他循环提供输入、拥有、监控或否决权,以及以何种节奏进行。

Why do single feedback loops fail at scale?为什么单一反馈循环在规模化时会失效?

Four structural failures: Goodhart's law (a metric detaches from the goal when pushed hard), upward blindness (a loop can't question its own target), inter-loop conflict (independent loops fight over shared resources), and measurement decay (sensors drift while the loop keeps running on stale data). These are topology problems, so they need a topology fix.存在四种结构性失效:古德哈特定律(指标被过度强化后与目标脱节)、向上盲区(循环无法质疑自身目标)、循环间冲突(独立循环争夺共享资源)以及测量衰减(传感器漂移而循环在陈旧数据上运行)。这些都是拓扑结构问题,因此需要拓扑层面的修复。

What is an anchor in a graph of loops?循环图中的锚点是什么?

An anchor is an external, fixed reference the optimizing machinery is forbidden to rewrite — a held-out eval set, banked revenue, physical inventory, a frozen safety spec, or a human judgment about what "better" means. Anchors feed values into the graph but aren't subject to its dynamics, which is what keeps the whole system grounded instead of self-referential.锚点是一个外部的、固定的参考点,优化机制被禁止对其进行改写——如留存评估集、银行收入、实物库存、固定的安全规范,或人类对“更好”含义的判断。锚点将数值输入图中,但不受其动态影响,这使得整个系统保持在现实基础上,而非自我指涉。

Do I need a special framework to do graph engineering?我需要特殊的框架来进行图工程吗?

Not a specific one, but you need a substrate that exposes agent execution as inspectable state: nodes, edges, artifacts, and metrics you can observe and govern. Stateful graph runtimes and multi-agent workspaces that record execution context and shared artifacts give you the raw material; the discipline is in how you wire the loops on top.不需要特定的框架,但你需要一个能够将 Agent 执行过程暴露为可检查状态的底层架构:即你可以观察和治理的节点、边、工件和指标。有状态的图运行时和记录执行上下文及共享工件的多 Agent 工作空间为你提供了原材料;而真正的学科功底在于你如何在这些基础之上连接循环。

Build your own graph of work构建你自己的工作图

Graph engineering starts with a structured record of what your agents actually do — the tools they call, the artifacts they produce, the metrics they move. Eigent gives you that substrate as an open-source, multi-agent workforce running locally, with an execution context and workforce mode built for long-running, interconnected work. If you're thinking about how agents improve themselves over time, pair this with our deep dive on self-evolved agents, then download Eigent and start wiring loops that keep each other honest.图工程始于对 Agent 实际行为的结构化记录——它们调用的工具、产生的工件、推动的指标。Eigent 作为一款在本地运行的开源多 Agent 劳动力平台,为你提供了这一底层架构,其执行上下文和劳动力模式专为长期运行、相互关联的工作而设计。如果你正在思考 Agent 如何随时间自我提升,请结合我们关于“自演进 Agent”的深度解析,下载 Eigent 并开始连接那些让彼此保持诚实的反馈循环。

Recent Posts近期文章

Automate everything with AI workforce on desktop
Download Eigent

Try Eigent today

Download the open-source desktop app. Your AI workforce, running on your machine.

Eigent 1.0 New Version Released !download