compose
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseMANDATORY PREPARATION
强制准备工作
Invoke {{command_prefix}}agent-workflow — it contains workflow principles, anti-patterns, and the Context Gathering Protocol. Follow the protocol before proceeding — if no workflow context exists yet, you MUST run {{command_prefix}}teach-maestro first.
Consult the agent-architecture reference in the agent-workflow skill for topology patterns and when multi-agent is justified.
Design a multi-agent system. But first — are you sure you need one?
调用 {{command_prefix}}agent-workflow —— 它包含工作流原则、反模式,以及上下文收集协议。继续操作前请遵循该协议——如果还不存在工作流上下文,你必须首先运行 {{command_prefix}}teach-maestro。
请查阅agent-workflow技能中的agent-architecture参考,了解拓扑模式以及适合使用多Agent的场景。
设计一个多Agent系统。但首先——你确定真的需要多Agent系统吗?
Step 1: Pre-Composition Check
步骤1:组合前检查
Answer these before proceeding:
- Has a single agent been tried and failed? (If no, try single agent first)
- What specific limitation requires multiple agents? (If you can't name it, you don't need multi-agent)
- Is the cost/latency increase justified? (Multi-agent = 2-10x cost and latency)
If you can't articulate a specific limitation, use {{command_prefix}}amplify on the single agent instead.
继续操作前请先回答以下问题:
- 是否已经尝试过单个Agent但失败了?(如果没有,请先尝试使用单个Agent)
- 需要使用多个Agent的具体限制是什么?(如果你说不出来,说明你不需要多Agent)
- 成本/延迟的提升是否合理?(多Agent = 2-10倍的成本和延迟)
如果你无法明确说明具体的限制,请改为对单个Agent使用 {{command_prefix}}amplify。
Step 2: Design the Topology
步骤2:设计拓扑结构
Choose the right architecture pattern (consult the agent-architecture reference in the agent-workflow skill):
For each agent in the system, define:
markdown
undefined选择合适的架构模式(请查阅agent-workflow技能中的agent-architecture参考):
为系统中的每个Agent定义如下信息:
markdown
undefinedAgent: [Name]
Agent: [Name]
Role: [One sentence]
Responsibilities: [What it does]
Boundaries: [What it does NOT do]
Tools: [List of tools this agent has access to]
Input: [What it receives]
Output: [What it produces]
undefinedRole: [One sentence]
Responsibilities: [What it does]
Boundaries: [What it does NOT do]
Tools: [List of tools this agent has access to]
Input: [What it receives]
Output: [What it produces]
undefinedStep 3: Design Handoffs
步骤3:设计交接流程
For each agent-to-agent connection:
markdown
undefined为每一个Agent间的连接定义如下信息:
markdown
undefinedHandoff: [Agent A] → [Agent B]
Handoff: [Agent A] → [Agent B]
Trigger: [When does A hand off to B?]
Payload: [What data is passed?]
Expected response: [What does A expect back?]
Timeout: [How long to wait?]
Failure handling: [What if B fails?]
undefinedTrigger: [When does A hand off to B?]
Payload: [What data is passed?]
Expected response: [What does A expect back?]
Timeout: [How long to wait?]
Failure handling: [What if B fails?]
undefinedStep 4: Design the Supervisor
步骤4:设计监管器
Every multi-agent system needs a supervisor:
- Monitors agent health and performance
- Routes tasks to appropriate agents
- Handles failures and escalation
- Enforces global constraints (budget, time, quality)
每个多Agent系统都需要一个监管器:
- 监控Agent的运行状态和性能
- 将任务路由给合适的Agent
- 处理故障和升级流程
- 执行全局约束(预算、时间、质量)
Composition Checklist
组合检查清单
- Each agent has a clear, non-overlapping role
- Handoff protocols are defined for every connection
- A supervisor pattern is in place
- Cost/latency budget accounts for all agents
- Failure modes are handled at every handoff point
- The system can be understood by reading the topology diagram
- 每个Agent都有清晰、不重叠的角色
- 所有连接都定义了交接协议
- 已配置监管器模式
- 成本/延迟预算覆盖所有Agent的消耗
- 每个交接节点都处理了故障模式
- 通过阅读拓扑图就可以理解整个系统
Recommended Next Step
推荐后续步骤
After composition, run to add error handling at every handoff, then to test the multi-agent system end-to-end.
{{command_prefix}}fortify{{command_prefix}}evaluateNEVER:
- Build multi-agent for a problem a single agent can handle
- Create agents with overlapping responsibilities
- Skip the supervisor (autonomous swarms are unpredictable)
- Pass full context between all agents (pass only what's needed)
- Compose without defining handoff protocols
完成组合后,运行 为每个交接环节添加错误处理,然后运行 对多Agent系统进行端到端测试。
{{command_prefix}}fortify{{command_prefix}}evaluate绝对禁止:
- 为单个Agent就能解决的问题构建多Agent系统
- 创建职责重叠的Agent
- 省略监管器(自主集群的运行结果不可预测)
- 在所有Agent之间传递完整上下文(仅传递需要的内容)
- 未定义交接协议就进行系统组合