Files
nexus/wiki/concepts/Hierarchy-Agent-Pattern.md

36 lines
1.2 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
title: "Hierarchy Agent Pattern"
type: concept
tags: []
sources:
- multi-agent-system-reliability
last_updated: 2026-04-28
---
# Hierarchy Agent Pattern
## 定义
多智能体系统的等级制度模式——由一个主管模型Supervisor/Planner制定计划、分解任务、分配工作给专业工作代理Worker再由验证代理Validator检验结果的质量。
## 核心机制
- **Planner**:智能模型(如 Opus将用户目标分解为原子化小步骤
- **Worker**:专门化智能体(通常用更小更快的模型),专注于单一任务
- **Validator**:检查点——工作不合格则退回;可用确定性代码(单元测试/JSON schema或LLM本身
## 为什么有效
依赖图强制协作——Worker必须等Planner分配任务才能开始且无法作弊会被Validator发现
## 适用场景
需要将上下文分开的复杂工作流(如不让"撰稿人"看到"研究员"的原始日志)。
## 优点
- 任务分解清晰,可独立验证每个步骤
- 支持上下文隔离
## 缺点
- 顺序执行Planner→Worker→Validator速度慢、成本高
- Validator建议使用与Planner/Worker不同的模型以提高客观性
## 来源
- [[multi-agent-system-reliability]]