AI编排 - 层级(组织结构图)
Architecture
组织结构图架构,具有多级结构。顶级监督者管理团队负责人,每个负责人管理自己的专业工作者池。团队中的团队。最适合具有10多个专业智能体、跨越多个领域的企业级自动化。
完整 FlowZap 代码
User { # User
n1: circle label="Start"
n2: rectangle label="Submit enterprise request"
n1.handle(right) -> n2.handle(left)
n2.handle(bottom) -> Supervisor.n3.handle(top) [label="Goal"]
}
Supervisor { # Top-Level Supervisor
n3: rectangle label="Decompose goal"
n4: rectangle label="Delegate to team leads"
n5: rectangle label="Aggregate final output"
n6: circle label="Done"
n3.handle(right) -> n4.handle(left)
n4.handle(bottom) -> LeadA.n7.handle(top) [label="Sub-goal A"]
n4.handle(bottom) -> LeadB.n10.handle(top) [label="Sub-goal B"]
n5.handle(right) -> n6.handle(left)
n5.handle(top) -> User.n2.handle(bottom) [label="Final report"]
}
LeadA { # Team Lead A
n7: rectangle label="Plan subtasks for A"
n8: rectangle label="Dispatch to workers"
n9: rectangle label="Consolidate A results"
n7.handle(right) -> n8.handle(left)
n8.handle(bottom) -> Workers.n13.handle(top) [label="Task A1"]
n8.handle(bottom) -> Workers.n14.handle(top) [label="Task A2"]
n9.handle(top) -> Supervisor.n5.handle(bottom) [label="Result A"]
}
LeadB { # Team Lead B
n10: rectangle label="Plan subtasks for B"
n11: rectangle label="Dispatch to workers"
n12: rectangle label="Consolidate B results"
n10.handle(right) -> n11.handle(left)
n11.handle(bottom) -> Workers.n15.handle(top) [label="Task B1"]
n11.handle(bottom) -> Workers.n16.handle(top) [label="Task B2"]
n12.handle(top) -> Supervisor.n5.handle(bottom) [label="Result B"]
}
Workers { # Worker Agents
n13: rectangle label="Worker A1 executes"
n14: rectangle label="Worker A2 executes"
n15: rectangle label="Worker B1 executes"
n16: rectangle label="Worker B2 executes"
n13.handle(top) -> LeadA.n9.handle(bottom) [label="A1 done"]
n14.handle(top) -> LeadA.n9.handle(bottom) [label="A2 done"]
n15.handle(top) -> LeadB.n12.handle(bottom) [label="B1 done"]
n16.handle(top) -> LeadB.n12.handle(bottom) [label="B2 done"]
}
相关模板
AI编排 - 编排器-工作者
Architecture
指挥式架构,其中一个编排器智能体接收复杂任务,将其分解为子任务,分派给专业工作者智能体(研究、代码、审查),收集结果并综合最终答案。最适合具有动态分解的复杂多步骤任务。
AI编排 - 并行扇出(Map-Reduce)
Architecture
Map-Reduce风格架构,其中协调器将任务扇出到多个并行工作者智能体(风格检查、安全审计、性能分析),收集所有结果并做出聚合决策。最适合PR审查、代码审查和多维度分析。
AI编排 - 竞争式生成器-评判者
Architecture
锦标赛模式架构,其中多个生成器智能体并行产生独立输出,然后评估器智能体评分并选择最佳。具有细化循环的质量阈值检查。当正确性或创造力比延迟更重要时最佳。
AI原生编排器-工作者架构
Architecture
编排器-工作者架构,其中编排器智能体将目标分解为子任务,分派给专业工作者,然后综合最终响应。这是最常见的"智能体编排"架构——强大,但随着工作者数量增长,编排器可能成为瓶颈。