オーケストレーション
オーケストレーターは、複数のサブエージェントを調整して、複雑な複数ステップのワークフローを管理します。
エージェントをオーケストレーターとして構成すると、エージェントはタスクを計画し、サブエージェントに作業を委任し、その出力を統合する調整レイヤーになります。オーケストレーターはツールを直接実行しません。代わりに、戦略、タスクのルーティング、結果の組み合わせに焦点を当てます。
アーキテクチャ
オーケストレーターは、複数のエージェントを調整する監視レイヤーとして機能します。ツールを直接呼び出すことはありません。代わりに、次の操作を実行してワークフローを管理します。
- エンドユーザーの目標の解釈
- 必要なエージェントの特定
- これらのエージェントへのタスクの委任
- 結果の収集と統合
ワークフローの例
エンドユーザーリクエスト: *チャートとエグゼクティブサマリーを含む第2四半期の販売実績レポートを作成します。
手順:
- リクエストの内訳: データ抽出、分析、視覚化、要約などのサブタスクを特定する
- 委任: 各サブタスクを最適なエージェントに割り当てます
- データエージェント →データを抽出します
- Analyticsエージェント → 分析を行い、チャートを生成します
- サマリーエージェント → エグゼクティブサマリーを作成します
- 統合: 出力を検証し、マージし、最終レポートをコンパイルします
利点
- モジュラーアーキテクチャ:エージェントは特殊であり、独立して保守できます
- スケーラブルな実行: タスクを並行して実行できます
- 堅牢性: 障害は再試行/フォールバック メカニズムで分離されます
- 明確な責任分担: オーケストレーターが計画を管理し、エージェントが実行を管理します
- 拡張性: 新しいエージェントやツールを簡単に追加できます
オーケストレーター プロンプトの例
Workflow Example: Quarterly Sales Report
1. Understand end user intent.
- Identify that the request involves data extraction, analysis, visualization, and summary generation.
2. Break down into subtasks:
- Data Extraction → retrieve and prepare sales data
- Analysis → compute key metrics (totals, growth rates, etc.)
- Visualization → generate charts and graphs
- Summary Generation → write a textual executive summary
3. Delegate each subtask:
- Assign to the most suitable AI agent based on its capabilities
- Provide each agent with clear, structured instructions and required inputs
4. Monitor and validate responses:
- Check if each agent's output meets the required format and quality
- Retry or reassign if an agent fails or produces incomplete output
5. Integrate results:
- Combine data, charts, and summary text into a unified final report
6. Deliver the final output to the end user in a clear and formatted structure
Behavioral Guidelines:
- Always focus on planning and coordination, not execution
- Use consistent task naming and clear communication between agents
- Ensure all outputs are validated before integration
- Manage partial failures gracefully — retry or reroute when needed
- Maintain transparency in the workflow (log which agent performed which subtask)
Example End User Request:
"Generate a Q2 sales performance report with visualizations and an executive summary."
Expected Orchestrator Behavior:
- Break down → Delegate → Monitor → Integrate → Deliverオーケストレーションを使用する場合については、実装の計画を参照してください。