---
title: "当 Multi-agent 不再是一团乱麻"
url: "https://zuey.me/articles/khi-multi-agent-khong-con-la-mo-hon-don?lang=zh"
locale: zh
access: members
full_text: false
published_at: "2026-05-09T02:00:00.000Z"
tags: ["Claude Code", "AI Agents", "AI", "Marketing", "编程"]
translations:
  en: "https://zuey.me/articles/khi-multi-agent-khong-con-la-mo-hon-don.md?lang=en"
  vi: "https://zuey.me/articles/khi-multi-agent-khong-con-la-mo-hon-don.md?lang=vi"
  ko: "https://zuey.me/articles/khi-multi-agent-khong-con-la-mo-hon-don.md?lang=ko"
  ja: "https://zuey.me/articles/khi-multi-agent-khong-con-la-mo-hon-don.md?lang=ja"
---
# 当 Multi-agent 不再是一团乱麻

> AI coding 的瓶颈已经不是模型，而是人的注意力。拆解 Factory 的 Missions：写在代码之前的 validation contract、串行胜过并行，以及为每个角色挑对模型。

> **INFO:** Luke Alvoeiro 在 AI Engineer London 的分享——今年最值得一读的 multi-agent coding 演讲之一，尤其适合正在用 ClaudeKit 这类 agent orchestration 框架的朋友。

![当 Multi-agent 不再是一团乱麻](https://media.zuey.me/blog/2026/1a2af0aa-pasted-image-20260509160049.png)

### 给忙碌人士的 TL;DR

Luke Alvoeiro——此前打造了 **Goose**（Block 的开源 coding agent，现已捐赠给 AI Agentic AI Foundation），目前在 **Factory** 负责核心 agent harness——刚刚展示了一个名为 **Missions** 的 multi-agent 架构，在生产环境中连续运行了 **16 天**，其中一个 Slack 克隆项目达到了 **90% test coverage**。Factory 刚完成 1.5 亿美元 C 轮融资，估值 15 亿美元（Khosla Ventures 领投，Sequoia/Blackstone 跟投），客户包括 Nvidia、Adobe、Morgan Stanley、EY、MongoDB、Bayer、Adyen。

> **TIP:** 核心论点：**如今软件工程的瓶颈不再是模型的智能，而是人的注意力（human attention）。**

### 1. 问题：为什么再优秀的工程师一天也只能推进几个任务？

![当 Multi-agent 不再是一团乱麻](https://media.zuey.me/blog/2026/5e84a8f1-pasted-image-20260509160115.png)

Luke 开场的观察非常贴近现实：即使是最强的工程师，每天也只能推进几个任务，哪怕 backlog 里有 50 个 feature。为什么？每个任务都需要注意力，每个 commit 都需要 review。今天的模型已经聪明到能解决这 50 个任务——但人类没有足够的带宽去监督它们。

这个论点值得细品。过去几年，所有关于 AI coding 的讨论都围绕 benchmark：哪个模型写的代码更干净、修 bug 更快。但如果 Luke 说得对，那么**竞争优势已经从模型层转移到了 orchestration 层**——这也正是 Factory 押注 15 亿美元的论点。

Factory 给自己提出的问题：*"What if a human decides what to build and then a system figures out how to do so?"* 一个 agent 可以跑上几小时、几天，你只需要回来验收结果。

### 2. Multi-agent 的 5 种模式分类——给混乱起个名字

这场演讲最有价值的贡献之一，是一套**分类法（taxonomy）**，给那些零散的模式起了名字。正如 Luke 所说，这个领域 "is a bit of a mess"——每个框架都有自己的术语和主张。五种模式：

![当 Multi-agent 不再是一团乱麻](https://media.zuey.me/blog/2026/7ccc0bd9-pasted-image-20260509160132.png)

| 模式 | 本质 | 典型用例 |
| --- | --- | --- |
| **Delegation** | Parent agent 派生 child agent，接收返回结果 | Sub-agents、coding 工具（最简单，大家最先做的就是它） |
| **Creator-Verifier** | 一个 agent 构建，另一个 agent 检查 | Code review——全新的 context 比带有 "cost bias" 的 agent 更容易发现 bug |
| **Direct Communication** | Agent 之间不经协调者直接对话 | 很难做对，因为状态分散，没有 single source of truth |
| **Negotiation** | Agent 围绕共享资源进行协商 | 多个 agent 同时修改代码库同一部分时——最好是 positive-sum |
| **Broadcast** | 一个 agent 向多个 agent 发送信息 | 状态更新、共享约束——不起眼，但对连贯性必不可少 |

**Delegation** 模式正是 Anthropic 在 [orchestrator-workers cookbook](https://platform.claude.com/cookbook/patterns-agents-orchestrator-workers) 中描述的——一个中心 LLM 分析任务，动态拆分子任务，再委派给专门的 worker。这也是 Anthropic 在他们的 [multi-agent research system](https://www.anthropic.com/engineering/multi-agent-research-system) 中使用的模式，在内部评测中**相比单 agent 的 Claude Opus 4 提升了 90.2%**。

Luke 强调的一个要点：**negotiation 不一定是对抗性的**。最好的用例是 positive-sum trading——agent 之间实现双赢。对那些曾以为 multi-agent = 相互竞争的 agent 的人（比如我）来说，这是个新鲜的视角。

### 3. Missions：5 种模式用了 4 种 + 3 角色架构

![当 Multi-agent 不再是一团乱麻](https://media.zuey.me/blog/2026/bc2800bc-pasted-image-20260509160224.png)

Missions 是 **delegation + creator-verifier + broadcast + negotiation** 的组合（没有 direct communication——这是有意为之，后面会解释）。工作流程：

```mermaid
flowchart LR
  A["用户描述目标"] --> B["通过对话确定范围"]
  B --> C["批准计划"]
  C --> D["系统运行数小时、数天"]
```

*Missions 的工作流程*

核心是 **3 角色架构**：

```mermaid
flowchart LR
  O["Orchestrator: 计划 + validation contract"] --> W["Worker: 逐个实现 feature"]
  W --> H["Structured handoff"]
  H --> V["Validators: scrutiny + user testing"]
  V -->|"未通过"| F["Follow-up features"]
  F --> W
  V -->|"通过"| N["下一个 milestone"]
```

*Missions 的 3 个角色与验证循环*

#### 3.1. Orchestrator——负责规划

当你描述目标时，orchestrator 充当一个 **sounding board**：提出战略性问题，澄清模糊的需求，并产出一份包含以下内容的计划：

#### Features

需要构建的功能。

#### Milestones

各个检查点。

#### Validation contract

在写任何一行代码之前定义什么是 "done"。

最后这一项是核心创新。我会在第 4 部分再回来讲。

#### 3.2. Workers——负责实现

每个 feature 分配给一个拥有 **clean context, no accumulated baggage** 的 worker。Worker 读 spec、实现、通过 Git 提交。下一个 worker 继承一个干净的代码库。

这就是 Missions 选择**串行执行（serial execution）**的原因（第 5 部分会分析）——不是不想并行，而是因为代码库是共享状态。

#### 3.3. Validators——负责验证

大多数系统只跑 lint、type check、测试，也许再加个 code review。**Missions 做了所有这些，外加行为验证（behavior validation）**——不只是"代码语法对不对"，而是"这个功能是否真的端到端可用"。

### 4. Validation contract——Missions 最重要的改进

这是我觉得最有实际价值的部分，也是我已经应用到 ClaudeKit 里的部分。

#### 问题：在实现之后才写的测试没用

![当 Multi-agent 不再是一团乱麻](https://media.zuey.me/blog/2026/bfb2db82-pasted-image-20260509160255.png)

Luke 一针见血地点出了 vibe coding 中一个常见的反模式：

> "An agent builds a feature. It writes some tests. The tests pass. There's full coverage. But the tests were shaped by the code, not by what the code was attempting to actually do. **Tests written after implementation don't catch bugs. They confirm decisions.**"
>
> — Luke Alvoeiro

这句话值得裱起来挂在墙上。当同一个 agent 既写代码又写测试时，测试只是在为 agent 已经做出的决定作证——而不是对正确性的独立检查。

这也正是近期学术论文指出的问题：在 [Nexus 框架（arxiv 2510.26423）](https://arxiv.org/pdf/2510.26423) 中，作者称之为 *"specification-based oracles that verify correctness against intended behavior rather than existing implementation"*——而他们不得不搭建一整套 multi-agent pipeline，只为解决 test oracle synthesis（*）这个问题。

> **INFO:** （*）**Test Oracle Synthesis**（测试预言合成）：自动生成 **Test Oracle** 的过程——Test Oracle 是用来判定一个软件测试用例通过（pass）还是失败（fail）的机制。

#### 解决方案：在写代码之前写好 validation contract

Validation contract 是**在规划阶段、写任何代码之前**编写的。它**独立于实现**来定义正确性。对于复杂项目，它可能包含**数百条 assertion**，每个 feature 分配到一条或多条。所有 feature 加起来必须覆盖全部 assertion。

这个想法并不完全新鲜——它是**测试驱动开发（Test-Driven Development）**应用在 agent 上的变体。

Jeff Monnette 在 2025 年 6 月的一篇 Medium 文章中称之为 "Test-Driven Agentic Development"：*"Behavioral test suites... become the behavioral specification that agents must satisfy."* Dev.to 上的 AppDeploy 最近也采用了相同的理念：*"the catch is execution: the same agent that builds the feature will cut corners when it runs the plan. So you split responsibilities: generation can be shared, **verification must be independent**."*

---

*Phần còn lại dành cho thành viên có quyền đọc toàn bài (Knowledges, Kết hợp, Cộng đồng) — see plans at https://zuey.me/pricing*
