Files
nexus/wiki/concepts/Context-Passing.md
2026-04-21 04:02:47 +08:00

1.4 KiB
Raw Blame History

title, type, tags, last_updated
title type tags last_updated
Context Passing concept
multi-agent
workflow
communication
2026-04-21

Definition

上下文传递Context Passing是一种多智能体通信模式在智能体之间传递完整的上下文信息而非摘要或压缩版本。

Core Principle

"Copy-paste agent outputs between steps — don't summarize, use the full output"

Problem It Solves

  • 摘要会丢失关键细节
  • 压缩可能遗漏重要上下文
  • 智能体不具备共享记忆

Best Practices

  1. 完整复制:将上一智能体的输出完整粘贴到下一智能体的输入
  2. 不要摘要:即使很长也要完整传递
  3. 不要解释:让接收智能体自己解析和处理完整信息
  4. 包含所有内容:原始输出、元数据、证据、决策理由等

Example

在 Multi-Agent Workflow: Startup MVP 中:

Sprint Prioritizer 输出 → [完整粘贴] → Backend Architect 输入
UX Researcher 输出 → [完整粘贴] → Backend Architect 输入
Backend Architect 输出 → [完整粘贴] → Frontend Developer 输入

Trade-offs

  • 优点:最大化信息保留,便于接收智能体做出完整判断
  • 缺点:消耗更多上下文窗口,可能需要更长的处理时间