读见

多智能体设计模式、反模式及制造业经验 | Amazon Web Services

原题Taxonomy of multi-agent design patterns, anti-patterns, and lessons from manufacturing | Amazon Web Services

约 15 分钟约 3,568 字原文英文已翻译

读前速览

4 个要点

本文全面梳理多智能体设计模式与反模式,并借鉴制造业原则,指导团队为分布式 AI 系统选择合适的协调架构。

  1. 多智能体协调本质上是分布式系统问题,需要采用结构化设计模式。

    约 88% 的 AI 试点项目未能投入生产;当协调开销超过收益时,两个模型协同工作反而会表现更差。团队需要采用系统化方法,避免依赖式交接不断放大风险。

  2. 第 1 层模式提供构建时定义的确定性控制流;第 2 层模式则以更高成本换取运行时灵活性。

    第 1 层包括顺序流水线、条件工作流、条件路由和并行工作流,均具备可预测性且易于调试。第 2 层包括基于计划的编排、交接模式、对话驱动模式以及辩论/共识模式,适用于难以预测的任务,但会增加 token 消耗、延迟和调试复杂度。

  3. 5 种反模式会持续浪费预算:上帝智能体、无界迭代、自然语言契约、过早采用多智能体,以及缺少防护的客户联系。

    这些做法在设计时看似合理,实际却会导致 token 成本虚高、错过时机窗口或决策偏离。上帝智能体集中使用过多工具;无界迭代缺少硬性停止条件;自然语言契约容易造成理解偏差;过早采用多智能体带来不必要的协调成本;缺少防护的客户联系则可能因幻觉造成现实伤害。

  4. 决策树和对比图表可帮助团队选择满足需求的最简单架构。

    决策树首先判断是否需要执行文本生成以外的操作,接着确认解决路径是否已知、是否需要不同领域的专业能力,以及是否有必要进行探索。第 1 层模式以较低至中等的构建成本实现较高的确定性;只有在工作过程中才会出现子任务时,才应使用第 2 层模式。

完整摘要

本文将多智能体协调视为分布式系统问题,探讨 AI 试点项目失败率居高不下的原因,并提出双层模式分类法:第 1 层(确定性控制流)包括顺序流水线、条件工作流、条件路由和并行工作流;第 2 层(自主模式)包括基于计划的编排、交接模式、对话驱动模式以及辩论/共识模式。文章随后指出了 5 种浪费预算的反模式:上帝智能体、无界迭代、自然语言契约、过早采用多智能体,以及缺少防护的客户联系。最后,文章提供决策树和对比图表,帮助团队选择满足需求的最简单架构,并将其与具体制造业用例对应起来。

目录 · 19 节

查看原文

企业团队正在构建多智能体系统,而早期实现效果不佳时,原因很少出在模型上。多智能体协调本质上是一个分布式系统问题,而许多着手解决这一问题的团队尚未形成处理分布式系统问题的直觉。Enterprise teams are building multi-agent systems, and when early implementations fall short, the cause is rarely the model. Multi-agent coordination is a distributed systems problem, and many teams taking it on haven’t yet built distributed systems instincts.

不同来源的数据基本一致:约 88% 的 AI 试点项目从未进入生产环境。斯坦福以人为本人工智能研究院(Stanford HAI)证明,当协调开销超过协作收益时,两个模型协作的表现可能不如任一模型单独运行。趋势很明显:团队增加复杂度的速度,超过了建立理解的速度。若每一步的可靠性均为 95%,10 步的端到端可靠性就只有 59.9%,而 20 步则只有 35.8%。这个示意模型假设流程是严格串行的,且没有重试,但总体趋势不变:每一次依赖性交接都会放大风险。The numbers are consistent across sources: ~88% of AI pilots never reach production. Stanford HAI demonstrated that two models can perform worse collaborating than either alone when coordination overhead exceeds the benefit. The pattern is clear: teams are adding complexity faster than they build understanding. Ten steps that are each 95 percent reliable deliver only 59.9 percent end-to-end reliability, and 20 steps deliver 35.8 percent. This illustrative model assumes a strictly sequential chain with no retries, but the direction holds: each dependent handoff multiplies risk.

在这篇文章中,你将学习如何判断一个用例是否需要多个智能体、如何选择协调模式,以及如何尽早发现代价高昂的反模式。你还将了解节拍时间、安全边界、边缘数据和班次周期如何影响架构设计。In this post, you learn how to decide whether a use case needs multiple agents, choose a coordination pattern, and spot costly anti-patterns early. You also see how takt time, safety boundaries, edge data, and shift cycles shape the architecture.

多智能体协调模式Multi-agent coordination patterns

协调模式分为两个层级,具体取决于流程由谁控制。在第 1 层中,由你定义流程路径。Coordination patterns fall into two tiers, based on who controls the flow. In Tier 1, you define the path.

在 Tier 2 中,模型会在运行时选择执行路径。这种灵活性适用于无法预先定义步骤的工作,但会增加 token 消耗、延迟和调试成本。实际操作中,通常先从 Tier 1 开始,只有当任务的子任务在执行过程中逐渐显现时,才将其转到 Tier 2。In Tier 2, the model chooses the path at runtime. That flexibility handles work whose steps you can’t define in advance, at a higher cost in tokens, latency, and debugging. The practical default is to start with Tier 1 and move a task to Tier 2 only when its subtasks emerge during the work.

第 1 层:模式(确定性控制流)Tier 1: Patterns (deterministic control flow)

1.1 顺序流水线:实现线性执行的编排模式,其中每个节点的输出都会传递给下一个节点(A -> B -> C),支持按顺序处理,并确保执行时序可预测。1.1 Sequential Pipeline: Orchestration patterns that implement linear execution where each node’s output feeds into the next node (A -> B -> C) supporting ordered processing with predictable execution timing

在下图中,输入流经智能体 A(提取),然后是智能体 B(转换),接着是智能体 C(验证),最后输出。用户在构建时定义了这一顺序,运行时不会做出任何决策。因此,这条流水线易于调试和测试,成本也可预测。典型的适用场景包括文档处理、提取、转换和加载(ETL)链,以及保修索赔分流。In the following diagram, input flows to agent A (extract), then agent B (transform), then agent C (validate), and then output. The user defines that order at build time, and nothing is decided at runtime. As a result, the pipeline is straightforward to debug and test, and its cost is predictable. Typical fits include document processing, extract, transform, and load (ETL) chains, and warranty-claim triage.

Sequential pipeline: input flows through extract, transform, and validate agents to output

图 1:顺序流水线中,每个智能体的输出都会传递给下一个智能体,依次完成提取、转换和验证。Figure 1: Sequential pipeline where each agent’s output feeds the next, from extract to transform to validate

1.2 条件工作流:基于逻辑的边根据条件选择下一个节点,因此工作流可以分支,并将每种情况导向不同的路径。1.2 Conditional Workflow: Logic-based edges select the next node by condition, so the workflow can branch and send each case down a different path.

在下图中,用户请求先交给智能体 A(编写代码),再交给智能体 B(测试代码)。通过/失败检查会将通过的任务交给智能体 D(部署)。未通过的任务则退回智能体 A 重试,最多重试 N 次,之后升级给人工处理。编排层会强制执行这一上限,例如通过 AWS Step Functions 的迭代次数限制,从而避免循环演变成本文后文所述的无界迭代反模式。In the following diagram, a user request goes to agent A (write code) and then to agent B (test code). A pass/fail check sends passing work to agent D (deploy). Failing work loops back to agent A for a retry, up to a maximum of N times, and then escalates to a human. The orchestration layer enforces that cap, for example through an AWS Step Functions iteration limit, which keeps the loop from becoming the unbounded iteration anti-pattern described later in this post.

Conditional workflow where passing work from the test agent deploys and failing work loops back to the write agent

图 2:条件工作流会在升级至人工处理前,最多重试失败 N 次。Figure 2: Conditional workflow that retries failures up to N times before escalating to a human

1.3 条件路由器:1.3 Conditional Router:

分类步骤会检查输入并将其导向相应的处理路径。每个请求只会执行一条路径。适用于基于意图的分发、质量关卡决策、客户咨询路由和异常分诊。A classification step examines the input and directs it to the appropriate processing path. Only one path is executed per request. Best for intent-driven dispatch, quality-gate decisions, customer inquiry routing, and anomaly triage.

下图展示了分类器读取一位工厂主管的请求,并将其发送给且仅发送给一名专员。有关零件是否符合规格的问题会发送给质量智能体,逾期未进行的设备维护会发送给维护智能体,班次变更则会发送给排班智能体。这一决策在入口处作出。The following diagram shows a plant supervisor’s request being read by a classifier and sent to exactly one specialist. Questions about whether parts meet spec go to the Quality Agent, overdue equipment services go to the Maintenance Agent, and shift changes go to the Scheduling Agent. This decision is made at the entry point.

Conditional router sending each request down a single classified processing path

图 3:条件路由器,每个请求运行一条路径,并在升级至人工处理前进行有限次数的重试Figure 3: Conditional router that runs one path per request, with bounded retries before human escalation

1.4 并行工作流:一项任务拆分为多个相互独立的子任务,由多个处理器同时执行,每个处理器处理各自的数据。所有处理器完成后,通过汇聚步骤合并结果;如果某条路径失败,只重试该路径。最适用于多源分析、批处理,以及可拆分为多个独立部分的工作。1.4 Parallel Workflow: A task splits into independent subtasks that run simultaneously across handlers, each on its own data. A fan-in step combines the results when all handlers complete, and a failure in one path retries only that path. Best for multi-source analysis, batch processing, and work that decomposes into independent pieces.

在下图中,研究协调器将任务拆解后,分派给三个并发运行的专业代理:金融数据代理、地缘政治代理和物流代理,每个代理分别分析自己的数据源。随后,汇总步骤会等待三个代理全部完成,再综合结果、解决冲突并对发现进行排序。延迟取决于速度最慢的单个代理,而不是三个代理耗时之和。In the following diagram, a research orchestrator decomposes the task and dispatches it to three specialist agents that run concurrently: a financial data agent, a geopolitical agent, and a logistics agent, each analyzing its own source. A combined step waits for all three, then synthesizes the results, resolves conflicts, and ranks the findings. Latency equals the slowest single agent rather than the sum of all three.

Parallel workflow fanning out to financial, geopolitical, and logistics agents that run concurrently

图 4:并行分发给专业智能体,随后通过汇总步骤综合并排序结果Figure 4: Parallel fan-out to specialist agents followed by a fan-in step that synthesizes and ranks the results

第 2 级:自主模式(由 LLM 决定控制流)Tier 2: Autonomous patterns (LLM-determined control flow)

在自主模式中,控制流由 AI 模型本身在运行时决定,而非由开发者预先定义。智能体会读取任务状态,推理所需操作,并通过共享上下文进行协作,而不是遵循固定路径;其行为涵盖从结构化编排到完全涌现行为的广阔范围。In autonomous patterns, control flow is determined at runtime by the AI model itself, not predefined by developers. Agents read task state, reason about what’s needed and coordinate through shared context rather than fixed paths spanning a spectrum from structured orchestration to fully emergent behavior.

2.1 基于计划的编排2.1 Plan-based orchestration

在基于计划的编排中,单个编排器代理充当项目经理。编排器维护一份明确的任务计划,其中包含任务分配和依赖关系,并能查看所有上下文;每个工作代理则只接收与自己相关的部分。编排器根据当前计划动态分配工作,并集中监控进度。其关键设计选择是让工作代理保持无状态且彼此独立。即使某个工作代理失败,也不会影响其他代理。编排器只重试失败的工作代理,而不是整个工作流。In plan-based orchestration, a single orchestrator agent acts as a project manager. The orchestrator maintains an explicit task plan with assignments and dependencies, sees all context while each worker receives only its slice, distributes work dynamically against the current plan, and monitors progress centrally. Key design choice is that the workers are stateless and independent. If one fails, it doesn’t contaminate others. The orchestrator retries only the failed worker, not the entire workflow.

下图展示了规划器智能体如何将任务拆解为明确的计划,并将每个步骤分派给工作者智能体。每个步骤都会交给专门的工作者(研究智能体、分析智能体和报告智能体),他们只能看到分配给自己的部分。The following diagram shows how a planner agent decomposes a task into an explicit plan and dispatches each step to a worker’s agent. Each step goes to a dedicated worker (a research agent, an analysis agent, and a report agent) that sees only its assigned slice.

Plan-based orchestration where a planner agent dispatches steps to research, analysis, and report workers

图 5:基于计划的编排,由规划器代理将每个步骤分配给无状态工作代理Figure 5: Plan-based orchestration with a planner agent assigning each step to a stateless worker agent

2.2 交接模式2.2 Handoff pattern

智能体掌握的信息有限且局部,并通过点对点委派进行协作。每个智能体都会根据任务以及自己所了解的其他智能体,自主决定何时将控制权移交给谁。控制权移交时,状态也会一并传递:每次移交都包含经过验证的任务状态、支撑该状态的证据,以及尚未解决的问题,让接收方能够接着推进,而不是重新解读摘要。仅通过对话传递内容,不算真正的交接。Agents operate with limited, local knowledge and coordinate through peer-to-peer delegation. Each makes local decisions about when and to whom to transfer control, based on the task and the agents it knows. Control passes with state: each transfer carries validated task state, the evidence behind it, and any unresolved questions, so the receiving agent continues rather than reinterpreting a summary. A handoff that moves only through the conversation is not a handoff.

在下图中,客户服务代理会将控制权及其上下文一并移交给技术支持代理或账单代理;技术支持代理还可以进一步将任务移交给高级工程师。每个代理只知道自己可以移交给哪些少数同伴。In the following diagram, a customer service agent transfers control, together with its context, to either a technical support agent or a billing agent, and technical support can hand off further to a senior engineer. Each agent knows only the small set of peers it can transfer to.

Handoff pattern where a customer service agent transfers control to a technical support or billing agent

图 6:通过本地委派在对等代理之间传递已验证状态的交接模式Figure 6: Handoff pattern passing validated state between peer agents through local delegation

2.3 对话驱动模式2.3 Conversation-driven pattern

在对话驱动模式(也称为群聊模式)中,所有智能体都参与同一场对话,协作流程通过轮流发言自然形成,而非依赖明确计划或结构化交接。这种模式模拟了人类团队协作:所有人都能看到讨论内容,并在适当的时候参与其中。In conversation-driven patterns (also known as group chat patterns), all agents participate in a shared conversation where orchestration emerges through turn-taking rather than explicit plans or structured handoffs. This mirrors human team collaboration where everyone can see the discussion and contribute when appropriate.

在下图中,智能体选择机制决定轮到谁发言;智能体 A、B 和 C 都会向同一段共享对话中添加内容,每一轮都由一条消息和一次工具调用组成。选择机制负责安排轮次,而状态则隐含地存在于对话历史中。In the following diagram, an agent-selection mechanism decides whose turn it is, and agents A, B, and C each add to one shared conversation, where every turn is a message plus a tool call. The selection mechanism sets the turn-taking, and state lives implicitly in the conversation history.

Conversation-driven pattern where a selection mechanism gives turns to agents A, B, and C in a shared conversation

图 7:对话驱动模式,由轮流交互选择下一个代理,状态保存在对话中Figure 7: Conversation-driven pattern where turn-taking selects the next agent and state lives in the conversation

控制流特征:Control flow characteristics:

  • 可见性:广播模式下,所有代理都能看到共享对话中的所有消息。
    Visibility: Broadcast all agents observe all messages in the shared conversation.
  • 决策:根据对话上下文选择下一位发言者,而非依据预先制定的计划。
    Decision making: Next speaker selected based on conversation context, not predetermined plans.
  • 状态管理:隐含在对话历史中。
    State management: Implicit in the conversation history.
  • Turn-taking: Determined by selection mechanisms (round-robin, AI-driven)
    • Round-robin. Agents take turns in a fixed, repeating order until a termination condition is met, which keeps it predictable.
    • AI-driven. A model selects the next speaker from the conversation context rather than a fixed order.

2.4 辩论/共识2.4 Debate/consensus

多个智能体独立评估同一输入,再通过多数表决、裁判智能体或在意见不一致时升级处理来协调结论。与对话驱动的模式不同,这些智能体在确定立场之前看不到彼此的推理,因此意见分歧能够提供有价值的信息,而不是促使大家趋同于彼此的看法。Multiple agents independently evaluate the same input, and their conclusions are reconciled by majority, by a judge agent, or by escalation when they disagree. Unlike a conversation-driven pattern, the agents do not see each other’s reasoning before committing to a position, which is what makes disagreement informative rather than socially convergent.

谨慎使用。辩论是这里代价最高的模式;在感知类任务中,它增加的是延迟,而不是准确性(参见下文反模式 3 中的质量检验案例)。仅将其用于高风险、低频次的决策——在这类决策中,判断错误的代价高于多花时间审议的代价。Use it sparingly. Debate is the most expensive pattern here, and on perceptual tasks it buys latency rather than accuracy (see the quality-inspection case in anti-pattern 3 that follows). Reserve it for high-stakes, low-volume decisions where being wrong costs more than deliberating.

混合方法Hybrid approaches

在实践中,大多数生产系统会根据任务分解组合多种模式:In practice, most production systems combine several patterns based on task decomposition:

  • 对可预测且已充分理解的组件使用工作流模式。
    Use workflow patterns for predictable, well-understood components.
  • 在灵活性和适应能力至关重要的场景中应用自主模式。
    Apply autonomous patterns where flexibility and adaptation are essential.
  • 在所有编排类型中一致地实现任务管理模式(终止、委派)。
    Implement task management patterns (termination, delegation) consistently across all orchestration types.
  • 设计分层组合,让复杂智能体在内部的不同层级采用不同的模式。
    Design hierarchical compositions where complex agents internally use different patterns at different layers.

核心原则:模式与任务相匹配。根据每项任务的固有特征和系统的可靠性要求选择编排方法,而不是强行让所有任务都采用同一种模式。The governing principle: pattern-to-task alignment. Match the orchestration approach to each task’s inherent characteristics and your system’s reliability requirements rather than forcing everything through a single pattern.

浪费预算的反模式Anti-patterns that burn budget

以下五种反模式在设计阶段看起来都合情合理,但之后都会以令牌成本虚高、错过节拍时间窗口,或决策悄然偏离生产现场实际情况的形式暴露出来。Each of the following five anti-patterns looks reasonable at design time, and each surfaces later as an inflated token cost, a missed takt-time window, or a decision that has quietly drifted out of sync with the plant floor.

1. 上帝智能体1. God agent

一个代理通过单个提示词负责整体设备效率(OEE)分析、可编程逻辑控制器(PLC)诊断和维护,并配备 15 个或更多工具。随着工具数量增加,工具选择的效果会下降,故障也变得难以追溯。One agent owns overall equipment effectiveness (OEE) analysis, programmable logic controller (PLC) diagnostics, and maintenance behind a single prompt with 15 or more tools. Tool selection degrades as tools grow, and failures become hard to attribute.

解决方案:将代理可用的工具限制在五个以内,例如 OEE 分析代理、故障诊断代理和维护文档起草代理。The fix: Bounded agents of five tools or fewer, such as an OEE analyst, a fault diagnostician, and a maintenance drafter.

2. 无界迭代2. Unbounded iteration

智能体会陷入“再试一次”的循环,且没有明确的停止条件。四智能体系统在进行一次重试之前,可能会消耗多得多的 token,而且没有任何一次调用会触发警报。重试只会放大协同故障,而不会修复它们。The agent loops on “try again” with no hard stop. A four-agent system can burn a significantly higher number of tokens before a single retry, and no one call trips an alarm. Retries multiply coordination failures rather than fixing them.

解决方案:在代码中设置硬性迭代上限,为每个 agent 设置 token 上限,并接入可触发自动停止的预算警报。由基础设施强制执行限制。模型不会自行停止。The fix: Hard iteration ceiling in code, per-agent token ceiling, budget alarm wired to an automatic stop. Infrastructure enforces limits. The model will not stop itself.

3. 自然语言合同3. Natural-language contracts

代理之间以没有固定模式的自由文本互相传递信息。每经过一次转手,解读就会变得更确定:“可能表明存在磨损”变成“确认存在磨损”,继而变成维护工单。偏差发生在代理之间,而那里恰恰最难追踪。Agents hand each other free-text prose with no schema. Interpretation hardens at every hop: “could indicate wear” becomes “confirmed wear” becomes a maintenance order. The drift happens between agents, where tracing is thinnest.

4. 过早引入多智能体4. Premature multi-agent

明明一个配备工具组的代理就能胜任,却采用了多代理架构。每增加一个代理,都会带来并非线性增长的协调成本;代理数量达到四个左右后,收益便趋于平缓。大多数“专家”不过是同一个模型换了身马甲。Multi-agent where one agent with tool groups would do. Each agent adds a coordination tax that is not linear, and the gains flatten around four. Most “specialists” are one model in different costumes.

修复方案:至少需要两个不同的模型、不同的工具访问权限、并发执行以及真正的相互依赖。少于两个模型的话,一个配备操作组的智能体就能完成。The fix: Needs at least two different models, different tool access, concurrent execution, and real interdependency. Fewer than two, and one agent with action groups does it.

测试是:一个智能体能否通过切换工具来处理各个阶段?如果可以,那就不是多智能体问题。The test: can one agent handle the phases by switching tools? Then it is not a multi-agent problem.

5. 未受保护的客户联系方式5. Unguarded customer contact

代理会在未经审批的情况下触发现实世界中的操作(发送电子邮件、安排上门服务、调整机器参数)。幻觉会蔓延到物理世界,不可逆的操作会不断叠加,责任也会从退款升级为产品责任。The agent triggers real-world actions (email, service visits, machine parameters) with no approval step. Hallucinations cross into the physical world, irreversible actions compound, and liability escalates from a refund to product liability.

修复方案:纵深防御:推荐 → Amazon Bedrock Guardrails → Schema 验证 → 业务规则 → 人工审批 → 执行。The fix: Defense in depth: recommendation → Amazon Bedrock Guardrails → schema validation → business rules → human approval → execution.

智能体输出触达客户的每个环节,或安全系统触发的每个环节,都是信任边界。Every point where agent output reaches a customer, or a safety system is a trust boundary.

选择一种架构Choosing an architecture

了解这些模式与反模式后,架构选择归结为一系列简短的问题。With the patterns and anti-patterns in view, the architecture choice comes down to a short sequence of questions.

  1. 该任务是否需要文本生成之外的操作?将直接调用模型作为基准,只有在有实际评估依据时才增加编排。总结文档或根据规范生成代码,通常都不需要这样做。
    Does the task require action beyond text generation? Treat a direct model call as the baseline and add orchestration only for a measured reason. Summarizing documents or generating code from a specification rarely supplies one.
  2. 解决方案路径是否预先已知?如果你能写下每一步按什么顺序发生,那就根本不存在“需要多少个代理”的决策。真正的选择很简单:是使用一个会调用工具的代理,还是采用 Tier 1 工作流。
    Is the solution path known in advance? If you can write down what happens in what order, you don’t have a “how many agents” decision at all. Your real choice is simpler: a single agent that calls tools, or a Tier 1 workflow.
  3. 这项工作是否需要真正不同的专业知识?存在成熟交接机制的独立领域,可以由专门的代理分别负责。单一领域应由一个代理负责,无论它需要多少种工具。
    Does the work require genuinely distinct expertise? Separate domains with established handoffs justify specialized agents. A single domain belongs to one agent, no matter how many tools it needs.
  4. 只有通过探索才能找到解决方案吗?如果行动序列已知,并且可以按执行—验证循环运行,那么这项工作就属于单个智能体,即使它会动态规划步骤也是如此。只有当子任务本身是在工作过程中逐步发现时,Tier 2 才值得付出额外的成本、延迟和调试负担。
    Does the solution emerge only through exploration? When the action sequence is known and can run as an act-and-validate loop, it belongs to a single agent, even one that plans its steps dynamically. Tier 2 earns its added cost, latency, and debugging burden only when the subtasks themselves are discovered in the course of the work.

下面的决策树将这四个问题转化为一条可供你从上到下依次遵循的路径。The following decision tree turns these four questions into a path you can follow from top to bottom.

Decision tree for choosing an architecture based on whether a task needs actions, a known path, distinct expertise, or exploration

图 8:选择最简单架构的决策树,从单次模型调用到 Tier 2 多智能体模式Figure 8: Decision tree for choosing the simplest architecture, from a single model call to a Tier 2 multi-agent pattern

该决策树首先判断任务是否需要执行文本生成之外的操作。如果不需要,只需调用一个简单模型即可。如果需要,决策树会进一步判断解决方案是否成熟,能否表示为工作流。对于已有成熟解决方案的任务,若能从专业知识或领域分工中受益,则采用 Tier 1 多智能体工作流(流水线、扇出或路由器);其他任务则交由配备工具和操作组的单个智能体处理。对于解决方案尚不明确的任务,只有涉及探索或会产生重大副作用的任务才会进入 Tier 2,采用自主多智能体模式。其指导原则是:选择能够满足需求的最简单架构。The tree starts by asking whether the task requires actions beyond text generation. If it doesn’t, a simple model call is enough. If it does, the tree asks whether the solution is well known and can be expressed as a workflow. On the known solution side, work that benefits from specialized expertise or domain separation go to a Tier 1 multi-agent workflow (a pipeline, fan-out, or router). Everything else goes to a single agent with tools and action groups. On the unknown-solution side, only tasks that involve exploration or significant side effects go to Tier 2 for autonomous multi-agent patterns. The rest stays with a single agent. The guiding principle is to choose the simplest architecture that meets your requirements.

下表从四个方面比较这些模式:何时使用、智能体之间的控制流、结果的确定性,以及构建和运行成本。构建成本采用相对尺度,并非估算值。The following chart compares the patterns on four things: when to reach for each one, how control flows between agents, how deterministic the result is, and what it costs to build and operate. Build cost is a relative scale, not an estimate.

Chart comparing the patterns by when to use them, control flow, determinism, and build cost

图 9:按用例、控制流、确定性和相对构建成本对模式进行比较Figure 9: Comparison of the patterns by use case, control flow, determinism, and relative build cost

Tier 1 模式的确定性得分较高,构建成本较低到中等。Tier 2 模式将更多路径交由模型决定,而基于计划的编排构建成本最高。如果你能在运行前把控制流画在白板上,就从 Tier 1 开始。Tier 1 patterns score high on determinism at low to moderate build cost. Tier 2 patterns give more of the path to the model, and plan-based orchestration costs the most to build. If you can draw the control flow on a whiteboard before runtime, start with Tier 1.

应用:将模式映射到制造业应用场景Applied: Mapping patterns to manufacturing use cases

Use Case Pattern Rationale
Shift handoff summarization Sequential Pipeline Linear: raw logs → summary → report
Multi-station root-cause analysis Plan-Based Orchestrator Dynamic: subtasks discovered during analysis
Real-time quality gate Conditional Router + Edge Agent In-cycle: local model decides. Agent reasoning off path
Predictive maintenance scheduling Parallel Fan-Out/Fan-In Independent models per asset class
Engineering change order impact Debate/Consensus High stakes: adversarial review justified
Supplier communication drafting Sequential + Human Gate Must not auto-send (see Unguarded Customer Contact)
Cross-plant optimization Plan-Based Orchestrator Multi-source: dynamic queries. Solver does allocation

制造业视角:改变决策考量的四项约束The manufacturing lens: Four constraints that change the calculus

制造业并非通用型企业 IT 环境,而四项约束让这笔账变得格外严苛。Manufacturing is not a generic enterprise IT environment, and four constraints make that arithmetic unforgiving.

约束 1:生产线延迟 = 直接收入损失Constraint 1: Production-line latency = direct revenue loss

汽车车身车间由机器人将车身焊接在一起,通常每小时生产 60 辆车。40 多个工位中的每个工位都有 60 秒的节拍时间,之后生产线才会前进。推理延迟若出现在工位的作业周期中,就会占用这 60 秒;而瓶颈工位的延误会拖慢整条生产线。即使产能降低 2%,也可能对年度收入造成重大影响。Automotive body shops, where robots weld the vehicle body together, typically run at 60 jobs per hour. Each of their over 40 stations has a 60-second takt time before the line advances. Inference latency that sits on a station’s cycle path eats into those 60 seconds, and a delay at the bottleneck station slows the whole line. Even a 2 percent throughput reduction can translate to significant annual revenue impact.

架构上的启示:应按 p99 而非平均值来规划延迟预算。真正会让生产线停摆的是长尾延迟。为每个智能体提供一个亚秒级、确定性的回退方案,并使其与风险相匹配:Architecture implication: budget latency at p99, not average. The tail is what stops the line. Give every agent a sub-second deterministic fallback, and match it to the risk:

  • 建议/质量标记:将带有标记的零件送至生产线末端进行检查。
    Advisory/quality-flagging: Pass the part with a flag for end-of-line review.
  • 安全关键:应采取遏制措施或确定性停止,而非继续。
    Safety-critical: Containment or a deterministic stop, not continuation.
  • 在部署前为每个站点确定此映射。
    Decide this mapping per station before deployment.

约束 2:安全会带来实际的物理后果Constraint 2: Safety has physical consequences

聊天机器人产生幻觉会令人尴尬。焊接参数产生幻觉则会造成结构缺陷,这些缺陷可能在碰撞测试或现场故障中暴露出来,并导致安全召回。反复出现的有两种失效模式:A hallucinated chatbot causes embarrassment. A hallucinated welding parameter causes structural defects that surface in crash testing or field failure and can lead to a safety recall. Two failure modes recur:

  • OT/IT 边界状态不同步:智能体读取制造执行系统(MES)时,系统显示 12 号工位正在生产零件 #A,但人工 PLC 覆盖操作已将其切换为零件 #B,因此智能体为错误的零件调整参数。
    OT/IT boundary state desync: An agent reads the manufacturing execution system (MES) as Station 12 running Part #A, but a manual PLC override already switched it to Part #B, so it tunes parameters for the wrong part.
  • 幻觉式安全边界:维护代理从头推理上锁挂牌程序,并宣称相邻的 6 号工位运行时仍可进入 7 号工位,从而破坏联锁区域。
    Hallucinated safety boundary: A maintenance agent reasons about lockout/tagout from scratch and declares Station 7 accessible while adjacent Station 6 runs, breaking the interlock zone.

架构层面的影响:Architecture implication:

边界是:保持确定性核心不变,包括 PLC、监控与数据采集(SCADA)系统和 MES,并在其外围构建一个建议层。The boundary: keep the deterministic core unchanged, including PLCs, supervisory control and data acquisition (SCADA) systems, and the MES, and wrap an advisory layer around it.

  • 智能体负责观察、分析和提出建议,但不执行操作。
    Agents observe, analyze, and recommend. They do not actuate.
  • 安全约束以确定性护栏的形式存在于外部服务中,智能体会向该服务查询,而不是自行推理这些约束。它们绝不会嵌入提示词中,以免被通过论辩绕过。
    Safety constraints live as deterministic guardrails in an external service that agents query rather than reason about. They’re never embedded in prompts, where they can be argued away.

验证与批准:建议通过模式验证和物理仿真,并在执行前立即与 OT 的权威数据源核对,绝不依据缓存超过一个周期的 OT 状态。随后根据建议的适用范围,按相应级别进行批准:Validation and approval: A recommendation passes schema validation and physics simulation, checked against the OT source of truth immediately before actuation, never against OT state cached beyond one cycle. It’s then approved at a level matched to its scope:

  • 第 0 级:代理自主解决。
    Level 0: Agent resolves autonomously.
  • 第 1 级:操作员单击确认。
    Level 1: Operator confirms with one click.
  • 第 2 级:工程师根据所提供的分析做出决定。
    Level 2: Engineer decides from the presented analysis.
  • 第 3 级:管理层评估停线建议。
    Level 3: Management evaluates a line-stop recommendation.

只有在此之后,经过验证的命令接口才会将获准的命令传递给确定性控制系统。大语言模型(LLM)提出建议;物理引擎和人类操作员作出决定。Only then does a validated command interface pass permitted commands to deterministic control. The large language model (LLM) proposes. The physics engine and the human operator dispose.

约束 3:数据位于边缘端Constraint 3: Data lives at the edge

一台冲压机每天产生超过 50 GB 的传感器数据,而这些数据的价值会在几毫秒内迅速消退。将数据传到云端的带宽成本甚至高于计算成本;等云端给出答复时,冲压机早已进入下一步。A single stamping press generates 50+ GB/day of sensor data whose value decays in milliseconds. Shipping it to the cloud costs more in bandwidth than compute, and by the time the cloud answers, the press has moved on.

架构层面的启示:混合边缘云是切实可行的默认方案,而约束 2 的边界在边缘侧同样成立。Architecture implication: hybrid edge-cloud is the practical default, and the Constraint 2 boundary holds at the edge too.

  • 边缘端(AWS IoT Greengrass):在源头进行亚节拍异常检测、阈值监控并发出停止或继续信号:边缘代理提出建议,PLC 执行操作。
    Edge (AWS IoT Greengrass): sub-takt anomaly detection, threshold monitoring, and stop-or-continue signals at the source: the edge agent recommends, the PLC acts.
  • 云端:边缘端无法完成的工作包括跨班次分析、跨工厂趋势关联,以及基于设备群数据重新训练模型。边缘端会提炼信息,只传输重要内容。
    Cloud: What the edge can’t do: cross-shift analytics, trend correlation across plants, and model retraining on fleet data. The edge distills and transmits only what matters.

约束 4:与班次对齐的智能体生命周期Constraint 4: Shift-aligned agent lifecycle

无界上下文会让智能体逐渐偏离,因为过时的观察结果会挤占对当前现实的认知。彻底重置又会丢失交接班之间的连续性。制造业早已通过结构化的交接班流程为人类解决了这个问题,智能体也需要同样严谨的机制。Unbounded context makes an agent drift as stale observations crowd out current reality. A full reset loses continuity between shifts. Manufacturing already solves this for humans with structured shift handoffs, and agents need the same discipline.

架构启示:将智能体记忆限制在一个班次周期内。Architecture implication: Bound agent memory to the shift cycle.

  • 初始化:切换上下文,包括班组名单、生产目标和上一班次的交接信息。
    Initialize: Shift context, including the crew roster, production targets, and the prior shift handoff.
  • 累积:仅限于班次窗口内的工作记忆。
    Accumulate: Working memory within the shift window only.
  • 交接:生成班次结束摘要,汇总未解决问题、标记的异常和建议,为下一班团队提供工作起点;既保留人工交接的惯例,又避免上下文无限膨胀。
    Hand off: Emit a shift-end summary of open issues, flagged anomalies, and recommendations that seed the next crew, mirroring the human ritual without unbounded context growth.

基于 AWS 构建Building on AWS

以下托管服务对应本文前面提出的问题。每一行列出的是具体机制,而不只是服务名称。The following managed services map to the concerns raised earlier in this post. Each row names the mechanism, not just the service.

Need Service Mechanism
Runtime AgentCore runtime, a capability of Amazon Bedrock AgentCore Where agents run, their control flow is determined or model determined. Bring Strands, LangGraph, or CrewAI.
Shift-bounded memory AgentCore memory, a capability of Amazon Bedrock AgentCore Managed short-term and long-term context, so the shift-scoped memory from Constraint 4 is configuration rather than custom state plumbing.
Typed handoffs AgentCore Gateway, a capability of Amazon Bedrock AgentCore Converts APIs and AWS Lambda functions into Model Context Protocol (MCP) tools with validated schemas, so handoffs carry typed fields rather than prose.
Agent permissions AgentCore Identity, a capability of Amazon Bedrock AgentCore A unique, verifiable identity for each agent with fine-grained access control. It’s the enforcement point for which agent can reach which system, and on whose behalf.
Tracing between agents AgentCore Observability, a capability of Amazon Bedrock AgentCore Spans and traces across runtime, memory, gateway, and tools, through Amazon CloudWatch Transaction Search and AWS Distro for Open Telemetry (ADOT). Handoffs are the least observable part of a multi-agent system and where untyped contracts fail silently.
Human approval surface AWS Quick Where the escalation tiers land. AWS Quick Automate runs approval workflows with one-click approval in Slack, and its action connectors can invoke Amazon Bedrock AgentCore agents.
Tiered model selection Amazon Bedrock One API across model families, so cost tiering is configuration: a small model for a router’s classification and a stronger one for an orchestrator synthesis.

结论Conclusion

多智能体系统改变了汽车制造商大规模协同智能的方式,但前提是建立在正确的基础之上。Multi-agent systems change how automotive manufacturers orchestrate intelligence at scale, but only when built on the right foundations.

这里的模式与反模式源自真实部署案例:架构不佳会导致令牌成本失控、节拍时间违规,最严重时还会带来人身安全风险。在工厂规模下,经济账不容有失,因为随着代理、机器人和班次的增加,令牌用量也会不断增长。分层选择模型、压缩上下文以及边缘云分布式部署,是以极低成本实现相同价值的主要手段。The patterns and anti-patterns here come from real deployments where poor architecture shows up as runaway token costs, takt-time violations, and, at worst, physical safety risks. The economics at plant scale are unforgiving, because token volume grows with every agent, robot, and shift. Tiered model selection, context compression, and edge-cloud distribution are the main levers for delivering the same value at a fraction of that cost.

这里的建议是从 Tier 1 模式入手,验证其价值,然后再逐步扩展。对于大多数制造业应用场景,例如交接班摘要、质量关卡决策和预测性维护,确定性工作流已足以胜任。只有在真正开放式的问题中,动态发现子任务所带来的收益足以抵消额外的成本、延迟和调试复杂性时,才采用自主编排。The recommendation here is to start with Tier 1 patterns, prove value, and then expand. Most manufacturing use cases, such as shift handoff summarization, quality-gate decisions, and predictive maintenance, are well served by deterministic workflows. Reserve autonomous orchestration for genuinely open-ended problems where dynamic subtask discovery justifies the added cost, latency, and debugging complexity.


关于作者About the authors

Kamlesh Mariwala

卡姆莱什·马里瓦拉Kamlesh Mariwala

Kamlesh 是 AWS 的高级生成式 AI 机器学习解决方案架构师,专注于汽车和制造业。他帮助客户设计可扩展、安全且经济高效的架构,利用 AWS 智能体 AI 和机器学习解决复杂的业务问题,加快实现价值的速度。Kamlesh is a Senior GenAI ML Solutions Architect at AWS, focused on the automotive and manufacturing industries. He helps customers design scalable, secure, and cost-effective architectures that use AWS agentic AI, and machine learning to solve complex business problems and speed up time to value.

Malini Sethi

马利尼·塞西Malini Sethi

Malini 是亚马逊云科技(AWS)的解决方案架构师,专注于汽车和制造业领域。她与大型汽车及工业客户合作,设计并实施云原生解决方案,借助 AI 和 AWS 生成式 AI 加速客户的数字化转型。此前,她曾担任 AWS 专业服务(ProServe)顾问,与客户紧密合作,将复杂的技术挑战转化为可扩展、可投入生产的系统。她曾在麻省理工学院(MIT)学习机器学习。Malini is a Solutions Architect at Amazon Web Services (AWS), specializing in the Automotive and Manufacturing sector. She works with large automotive and industrial customers to design and implement cloud-native solutions that accelerate their digital transformation of AI adoption, AWS Generative AI. Before her current role, she served as an AWS ProServe Consultant, working closely with customers to turn complex technical challenges into scalable, production-ready systems. She studied Machine Learning at MIT.

Deepesh Koppunuru

迪佩什·科普努鲁Deepesh Koppunuru

Deepesh 是 AWS 的高级生成式 AI 机器学习解决方案架构师,他与大型企业客户合作,借助 AWS 生成式 AI 服务释放创新潜力。Deepesh 热衷于展示 AI 的变革力量,帮助组织重新构想业务流程,并取得可衡量的成果,创造切实影响。Deepesh is a Senior GenAI ML Solutions Architect at AWS, where he partners with large enterprise customers to unlock innovation through AWS Generative AI services. With a passion for demonstrating the transformative power of AI, Deepesh helps organizations reimagine their business processes and achieve measurable outcomes that drive real impact.

Sandy Hsieh

桑迪·谢Sandy Hsieh

Sandy 是 AWS 全球专业服务组织中的高级数据与 AI 专家,支持汽车和制造业客户采用生成式 AI、智能体 AI 和物理 AI 解决方案。Sandy 拥有超过 10 年的全球汽车行业经验,涉及供应链、车辆规划和车载信息娱乐等领域。她拥有卡内基梅隆大学机械工程硕士学位。Sandy is a Senior Data & AI Specialist within the AWS Worldwide Specialist organization supporting Automotive and Manufacturing customers in adopting generative AI, agentic AI, and Physical AI solutions. Sandy brings over 10 years of global automotive industry experience in areas of supply chain, vehicle planning, and infotainment. She holds a master’s degree in Mechanical Engineering from Carnegie Mellon University.

值得记下

  1. 情况很明显:团队增加复杂性的速度,超过了加深理解的速度。
  2. 10 个步骤的可靠性各为 95 percent,端到端可靠性只有 59.9 percent;20 个步骤则只有 35.8 percent。
  3. 指导原则是选择满足需求的最简单架构。
  4. 判断标准是:一个智能体能否通过切换工具来处理各个阶段?如果可以,那就不是多智能体问题。