For AI agents: the complete documentation index is available at https://tingfeng347.github.io/windwiki/llms.txt, the full documentation bundle is available at https://tingfeng347.github.io/windwiki/llms-full.txt, and this page is available as Markdown at https://tingfeng347.github.io/windwiki/llm-applications/ai-engineering/agent-engineering/design-patterns/index.md.

设计模式总览

设计模式描述可复用的控制结构。它们建立在五个设计面之上:单 Agent 模式主要改变 L3 Loop,多 Agent 模式主要改变 L4 Graph;无论选用哪一种,都需要 L5 Harness 负责状态、权限、预算和停止。

先读主流 Agent 架构,了解 Claude Code、Codex、Pi、GenericAgent、Hermes 与 DeepSeek Harness 的产品运行时差异;再按实际问题进入单 Agent 或多 Agent 的专篇。这里比较的是具体产品与 Runtime,不是把 ReAct、Planner、Supervisor 等通用控制模式当成产品名单。

类型模式解决的问题
单 AgentReflection怎样用评审和反馈修订结果
单 AgentReAct怎样让推理决策与环境行动交错
单 AgentPlan-and-Execute怎样显式拆解、执行和重规划长任务
多 AgentSupervisor怎样由中心 Agent 动态调度 workers
多 AgentSwarm怎样通过 handoff 转移会话控制权
多 AgentDebate怎样生成独立候选、交叉审查并裁决

模式可以组合,但每增加一个循环、Agent 或裁决器都会增加延迟、成本和失败面。应先用一次结构化调用或确定性代码完成能完成的部分,再根据评测暴露的问题引入模式。