The orchestrator is the intelligence layer that manages agent interactions. It:
- Interprets user intent
- Selects the appropriate agent(s)
- Coordinates multi-agent workflows
- Resolves conflicts between outputs
- Delivers unified responses
Orchestration Patterns
Choose a pattern based on your use case complexity.- Single Agent: One agent handles all requests. Best for focused, well-defined domains.
- Supervisor: Central orchestrator coordinates multiple specialized agents. Best for complex, parallelizable tasks.
- Adaptive Network: Agents dynamically hand off to each other. Best for sequential, multi-domain workflows.
Pattern Comparison
| Aspect | Single Agent | Supervisor | Adaptive Network | |
|---|---|---|---|---|
| Complexity | Low | Medium | Medium-High | |
| Agents | 1 | Multiple | Multiple | |
| Coordination | None | Centralized | Decentralized | |
| Execution | Sequential | Parallel | Sequential | |
| Latency | Lowest | Medium | Variable | Low |
| Best for | Simple tasks | Complex decomposition | Dynamic hand-offs |
How Orchestration Works
┌──────────────────────────────────────────────────────────────┐
│ User Request │
└──────────────────────────────────────────────────────────────┘
│ │
│ ▼
┌──────────────────────────────────────────────────────────────┐
│ Intent Analysis │
│ • Parse user input │
│ • Identify required capabilities │
│ • Determine complexity │
└──────────────────────────────────────────────────────────────┘
│ │
│ ▼
┌──────────────────────────────────────────────────────────────┐
│ Agent Selection │
│ • Match capabilities to agent descriptions │
│ • Consider agent availability and scope │
│ • Select single agent or multiple agents │
└──────────────────────────────────────────────────────────────┘
│ │
│ ┌───────────────┼───────────────┐
│ ▼ ▼ ▼
│ ┌──────────┐ ┌──────────┐ ┌──────────┐
│ │ Agent A │ │ Agent B │ │ Agent C │
│ └────┬─────┘ └────┬─────┘ └────┬─────┘
│ │ │ │
│ └───────────────┼───────────────┘
│ ▼
┌──────────────────────────────────────────────────────────────┐
│ Response Aggregation │
│ • Collect agent outputs │
│ • Resolve conflicts │
│ • Synthesize unified response │
└──────────────────────────────────────────────────────────────┘
│ │
│ ▼
┌──────────────────────────────────────────────────────────────┐
│ User Response │
└──────────────────────────────────────────────────────────────┘
Choosing the Right Pattern
Use Single Agent when:
- Your app has one primary capability
- Tasks don’t require coordination between specialists
- You want minimal orchestration overhead
- Response latency is critical
Use Supervisor when:
- Tasks can be broken into independent subtasks
- You need parallel execution for speed
- Multiple specialists should contribute to responses
- You want centralized control and conflict resolution
Use Adaptive Network when:
- Tasks flow naturally between domains
- You need dynamic routing based on context
- Agents should autonomously decide when to hand off
- Sequential expertise is required
Orchestrator Responsibilities
Task Decomposition
Breaking complex requests into manageable subtasks:Agent Delegation
Routing tasks to appropriate specialists:Conflict Resolution
Handling inconsistencies between agent outputs:Context Management
Maintaining conversation state across agents:Orchestrator Configuration
Navigate to App > Orchestrator. For each orchestration pattern, configure the following.Default AI Model
AI model to be used for operations across the app. Select any of the configured models. The default settings of the model are shown. Click the Settings icon to update the default settings.Voice-to-Voice Interactions
Enable this field to allow users to interact with the app via real-time voice conversations. Once enabled, also provide the AI model that processes speech and generates voice responses. The platform supports various models. See the list of supported models and how to add an external model to the platform.Behavioral Instructions
Use this section to set the guidelines for the agent’s behavior. These instructions will be added to the orchestrator and the system prompt of each agent. Click Modify Instructions, then enter the prompt.Response Processor
The Response Processor is an application-level feature that lets you run a custom script on every agent response before it is delivered to the end user. It executes as the final stage in response generation, after the agent generates its output and before the output leaves the platform. Because it is configured at the app level on the Orchestrator page, the script applies consistently across all agents in the app, regardless of which agent handled the request.Using the Response Processor to Generate Artifacts
Developers can write artifact payloads directly inside the Response Processor code. When the processor runs, it constructs the desired payload, writes it into the artifacts key, and the platform appends it for delivery. This is particularly useful when:- The artifact needs to be assembled from multiple tool outputs or session variables rather than a single tool response.
- The payload structure depends on business logic better handled centrally at the application level.
- No tool is needed — the processor can produce artifacts independently based on input context alone.
Using the Response Processor to Transform Existing Artifacts
When tools have already populated the artifacts array, the Response Processor can be used to enrich or transform it before delivery:- Reorder elements to control which artifact renders first.
- Filter artifacts based on channel, user segment, or business logic.
- Transform or enrich payload data before delivery to the client.
- Merge multiple tool outputs into a single consolidated artifact.
- Add metadata, wrapper keys, or channel-specific formatting.
When a Response Processor is active, streaming is not supported. Artifacts and the text response are delivered as a complete payload after the processor finishes. If the processor fails, the original untransformed response is returned, and the error is logged.
Adding a Response Processor
Click Add Script to open the script editor. The following are available as input to the script:- Input — The original user input that triggered this agent run.
- Output — The agent’s response generated by the agent.
- Artifacts — Array of tool outputs and structured data returned during the run by different tools.
Single Agent Configuration
In a Single Agent setup, all user requests are routed directly to the agent. Since no supervisor agent is involved, the agent’s prompt serves as the primary instruction set for the underlying model. When processing a request, the platform constructs a single consolidated prompt by combining the following components in order, and sends it to the model:- Agent Prompt — The core instructions that define the agent’s role and behavior.
- Behavioral Instructions — Guidelines that control tone, constraints, and response style.
- Tools Assigned to the Agent — Tool definitions available for the agent to invoke.
- Events Enabled in the Application — Event-related context.
Supervisor Configuration
In addition to the configurations discussed above, configure the following for the Supervisor pattern:- Orchestrator Prompt — A set of instructions for the supervisor of the app. This includes instructions and requirements that guide the orchestrator’s decision-making process.
- Orchestration Prompt for Voice-to-Voice Interactions — This prompt serves as instructions for the supervisor in case of voice interactions.
Adaptive Network Configuration
In addition to the configurations discussed above, configure the following for the Adaptive Network pattern:- Initial Agent — Select the agent that serves as the first point of contact for each task. This agent receives the user’s request, processes the initial requirements, and begins task execution.