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