Agent 产品设计模式库
四族总览
| 族 | 模式构成 | 一句话心法 | 代表实现 |
|---|---|---|---|
| 族Ⅰ 工具调用反馈 | 流式工具回显 / 骨架屏占位 / 进度树 | 让「正在干活」可见、可料、可打断 | Deep Research 实时进度[4] |
| 族Ⅱ 错误处理对话 | 重试征询 / 降级声明 / 归因道歉 | 先自己兜,兜不住就交还,且说清错在哪 | τ-bench 不可靠性[12] |
| 族Ⅲ 人机权责移交 | 影子执行 / 实时接管 / 中断细化 / 双控确认 | 权责是一条连续光谱,不是全有全无 | Operator·computer use·τ²[5][6][13] |
| 族Ⅳ 多Agent协作 | 总分看板 / 产物引用 / 对话流 | 子任务可见、产物落盘、总控收口 | Anthropic 研究系统[2]·AutoGen[14] |
让「正在干活」可见、可料、可打断
做法 每触发一次工具调用就向用户回显「动作+对象+中间结果」,流式追加而非完成后一次性吐出;每行带可展开的原始返回。
适用 检索/浏览器/多工具链式调用;时长 10 秒~3 分钟的任务。
做法 内容未生成前先渲染最终版式(表框/卡片/图轴),用微光占位块标记待填区域;数据到达按结构逐格填充。
适用 结构可预测的产出:表格、榜单、研报页、仪表盘刷新。
做法 任务规划成一棵步骤树,节点三态:✓完成 / ⚙进行中(带子步骤与计数)/ ○待办;支持点击展开中间产物、随时暂停。
适用 长任务(>3 分钟)、可分解为明确子步骤的研究/批处理/构建类任务。
先自己兜,兜不住就交还,且说清错在哪
做法 瞬时故障先静默重试(≤2 次并回显「已重试 n 次」);仍失败则给出 2–3 条带代价标注的选项交用户裁决,默认项标安全动作。
适用 外部 API 抖动、超时、限流等瞬时类故障。
做法 数据源/能力缺失时不用次级数据冒充完整结果:明确标记「降级」,列出受影响范围,给出恢复后重算入口。
适用 多源聚合、跨系统取数、依赖第三方接口的报表与扫描。
做法 三段式:①说人话讲清直接原因(不是抛错误码);②声明已尝试与未尝试的边界;③把下一步选择权交还用户。不甩锅用户、不假装无事。
适用 任务级失败、不可自动恢复的错误、涉及用户资产/社交后果的操作。
权责是一条连续光谱,不是全有全无
做法 Agent 的动作先走「干跑/模拟」通道并留影子履历,用户核过实绩后再授权真实执行;等价于把 HAX G19「用户是最终仲裁」做成产品机制。
适用 高风险不可逆动作:交易下单、批量删除、对外发送、生产变更。
做法 Agent 执行期间保持「可观察+可打断」:实时高亮当前操作对象,一键移交回人类;接管后 Agent 退居副驾。
适用 浏览器/桌面 GUI 自动化、填写表单、代订代购。
做法 长任务任何时刻可插入自然语言修正:系统暂停、diff 式呈现计划变更、确认后续跑;保进度不从头再来。
适用 研究类、构建类、任何「跑起来才发现方向不对」的长任务。
做法 承认用户也是「有工具的操作者」:把需用户动手的步骤显式编入任务流(带说明与确认回执),而非甩一条指令完事;双方动作时间线对齐可回溯。
适用 技术支持、设备配置、医健/金融等必须用户本人操作的场景。
子任务可见、产物落盘、总控收口
做法 总控与子 Agent 各占一行/一卡:头像+职责+状态+产物链接;总控行显示汇总进度与资源消耗;每行可展开进子 Agent 的工作流水。
适用 任何「1 总控 + N 并行子任务」结构:深度研究、批量体检、多源采集。
做法 子 Agent 大产物写入外部工件区,对话流中只传轻量引用;引用可点开预览,产物永久可查,不随会话滚动丢失。
适用 产物为文件形态(表格/图片/代码/长文)的一切多 Agent 协作。
做法 Agent 间协作呈现为一条可折叠的群聊流:每条消息带发言者徽标,默认折叠只给结论,展开可审计全过程;用户可随时插话成为群成员之一。
适用 创作/评审/辩论类任务,过程质量依赖多角色制衡的场景。
按触发信号对号入座
| 设计情境(触发信号) | 首选模式 | 组合用法 | 禁忌 |
|---|---|---|---|
| 任务 > 20 秒,用户开始疑惑「死了没」 | 1.1 流式回显 | +1.3 进度树;>3 分钟再加可打断 | 静默转圈 |
| 产出结构可预测(表/榜单/卡片) | 1.2 骨架屏 | +1.1 回显每格填充进度 | 版式跳变 |
| 长任务需中途改需求 | 3.3 中断细化 | +1.3 进度树锚点,diff 后续跑 | 全量重跑 |
| 瞬时故障(超时/限流/抖动) | 2.1 重试征询 | 静默重试 ≤2 次→征询,选项带代价 | 无限静默重试 |
| 数据源缺失但仍要交付 | 2.2 降级声明 | +2.1:降级项单独列出可重算 | 悄悄换源 |
| 任务级失败,不可自愈 | 2.3 归因道歉 | 三段式:原因→边界→交还选择权 | 空洞道歉 |
| 高危不可逆动作(交易/删除/发送) | 3.1 影子执行 | +3.4 双控确认;履历可审计 | 直接真实执行 |
| Agent 操控 GUI 替用户干活 | 3.2 实时接管 | +急停热键;接管后 Agent 退副驾 | 抢焦点 |
| 1 总控 + N 子任务并行 | 4.1 总分看板 | +4.2 产物引用;折叠子流水 | 串行假象 |
| 创作/评审需多角色制衡 | 4.3 对话流 | 默认折叠到结论,展开可审计 | 过程刷屏 |
两条普适判据
全部一手来源,逐条经原文核验
| # | 来源(一手) | 类型 / 核验日期 | 关键引文(逐字) |
|---|---|---|---|
| [1] | Building effective agents — Anthropic Engineering anthropic.com/engineering/building-effective-agents |
工程博客 · 2026-09-11 核验 | "the most successful implementations weren't using complex frameworks or specialized libraries. Instead, they were building with simple, composable patterns." |
| [2] | How we built our multi-agent research system — Anthropic anthropic.com/engineering/built-multi-agent-research-system |
工程博客 · 2026-09-11 核验 | "lead agent plans the research process…uses tools to create parallel agents that search for information simultaneously"; "implement artifact systems…then pass lightweight references back to the coordinator" |
| [3] | A practical guide to building agents — OpenAI cdn.openai.com/business-guides-and-resources/a-practical-guide-to-building-agents.pdf |
官方 PDF(34p) · 2026-09-11 核验 | "In case of failure, it can halt execution and transfer control back to the user."; "always operating within clearly defined guardrails" |
| [4] | Introducing deep research — OpenAI openai.com/index/introducing-deep-research/ |
产品公告(2025-02-02 发布,2026-02-10 更新) · 2026-09-11 核验 | "track progress in real-time and interrupt to refine with follow-up prompts or new sources" |
| [5] | Introducing Operator — OpenAI openai.com/index/introducing-operator/ |
产品公告(2025-01-23 发布,2025-07-17 并入 agent mode) · 2026-09-11 核验 | "Using its own browser, it can look at a webpage and interact with it by typing, clicking, and scrolling." |
| [6] | Introducing computer use… — Anthropic anthropic.com/news/3-5-models-and-computer-use |
产品公告(2024-10-22 发布) · 2026-09-11 核验 | "direct Claude to use computers the way people do—by looking at a screen, moving a cursor, clicking buttons, and typing text." |
| [7] | HAX Toolkit / Guidelines for Human-AI Interaction — Microsoft microsoft.com/en-us/haxtoolkit/ |
设计指南库 · 2026-09-11 核验 | 18 条 guideline 含 G4「明了现状:时间/结果/原因+下次会怎样」、G19「user is the final arbiter of what the AI does」 |
| [8] | SWE-agent: Agent-Computer Interfaces Enable Automated Software Engineering arxiv.org/abs/2405.15793 |
论文(cs.SE,2024-05-06 提交) · 2026-09-11 核验 | "we investigate how interface design affects the performance of language model agents…custom agent-computer interface (ACI) significantly enhances an agent's ability" |
| [9] | GitHub Copilot Workspace: the Copilot-native developer environment github.blog/news-insights/product-news/github-copilot-workspace/ |
产品博客(2024-04 发布 technical preview) · 2026-09-11 核验 | "developers can now brainstorm, plan, build, test, and run code in natural language…giving developers full control over every step of the process." |
| [10] | People + AI Guidebook · Mental Models — Google PAIR pair.withgoogle.com/chapter/mental-models |
设计指南 · 2026-09-11 核验 | "Mismatched mental models can lead to unmet expectations, frustration, misuse, and product abandonment."; "Onboard in stages…explain what it can do, what it can't do, how it may change." |
| [11] | Designing AI Agents: 4 Lessons from China's Qwen Agent — NN/g(Feifei Liu & Maria Rosala) nngroup.com/articles/designing-ai-agents/ |
UX 研究(2026-05-08) · 2026-09-11 核验 | "4 design lessons: support discoverability, reuse familiar patterns, handle personal data carefully, and protect user autonomy." |
| [12] | τ-bench: A Benchmark for Tool-Agent-User Interaction in Real-World Domains arxiv.org/abs/2406.12045 |
论文(cs.AI,2024-06-17 提交) · 2026-09-11 核验 | "even state-of-the-art function calling agents (like gpt-4o) succeed on <50% of the tasks, and are quite inconsistent (pass^8 <25% in retail)." |
| [13] | τ²-Bench: Evaluating Conversational Agents in a Dual-Control Environment arxiv.org/abs/2506.07982 |
论文(cs.AI,2025-06-09 提交) · 2026-09-11 核验 | "users need to actively participate in modifying the state of the (shared) world…both agent and user make use of tools to act in a shared, dynamic environment." |
| [14] | AutoGen: Enabling Next-Gen LLM Applications via Multi-Agent Conversation arxiv.org/abs/2308.08155 |
论文(cs.AI,2023-08-16 提交) · 2026-09-11 核验 | "allows developers to build LLM applications via multiple agents that can converse with each other to accomplish tasks." |
| [15] | Introducing Codex — OpenAI openai.com/index/introducing-codex/ |
产品公告(2025-05-16 发布) · 2026-09-11 核验 | "each task runs in its own cloud sandbox environment, preloaded with your repository." |
| [16] | Agent Memory: How to Build Agents That Learn and Remember — Letta letta.com/blog/agent-memory |
工程博客(2025-07-07,datePublished 核验) · 2026-09-11 核验 | "designing an agent's memory is essentially context engineering: determining which tokens enter the context window and how they're organized." |
| [17] | A Concrete Definition of an AI Agent — NN/g(Caleb Sponheim) nngroup.com/articles/definition-ai-agent/ |
UX 研究(2026-04-03) · 2026-09-11 核验 | "An AI agent is a system that pursues a goal by iteratively taking actions, evaluating progress, and deciding its own next steps." |