CTRLK

Shared components

Orchestration

|

View as Markdown

An orchestrator coordinates multiple sub-agents to manage complex multi-step workflows.

After you configure an agent as an orchestrator, it becomes a coordination layer that plans tasks, delegates work to sub-agents, and integrates their outputs. The orchestrator does not execute tools directly. Instead, it focuses on strategy, task routing, and combining results.

Architecture

The orchestrator works as a supervisory layer that coordinates multiple agents. It does not call tools directly. Instead, it manages the workflow by doing the following:

  1. Interpreting the end user's goal
  2. Identifying which agents are required
  3. Delegating tasks to those agents
  4. Collecting and integrating their results

Example workflow

End user request: Create a Q2 sales performance report with charts and an executive summary.

Steps:

  • Break down the request: Identify subtasks such as data extraction, analysis, visualization, summarization
  • Delegate: Assign each subtask to the most suitable agent
    • Data Agent → Extracts data
    • Analytics Agent → Performs analysis and generates charts
    • Summary Agent → Produces the executive summary
  • Integrate: Validate outputs, merge them, and compile the final report

Benefits

  • Modular architecture: Agents are specialized and can be maintained independently
  • Scalable execution: Tasks can run in parallel
  • Robustness: Failures are isolated with retry/fallback mechanisms
  • Clear division of responsibilities: Orchestrator manages planning, agents manage execution
  • Extensibility: New agents or tools can be added easily

Example orchestrator prompt

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

For information about when to use orchestration, refer to Plan your implementation.