orchestrator
Classes#
OrchestratorAgent<I, O>#
Orchestrator Agent Class
This Agent is responsible for:
- Generating an execution plan based on the objective
- Breaking down the plan into steps and tasks
- Coordinating the execution of steps and tasks
- Synthesizing the final result
Workflow:
- Receives input objective
- Uses planner to create execution plan
- Executes tasks and steps according to the plan
- Synthesizes final result through completer
Extends#
- `Agent`<
I,O>
Type Parameters#
Type Parameter | Default type |
|---|---|
| |
|
Indexable#
[key: symbol]: () => string | () => Promise<void>
Constructors#
Constructor#
new OrchestratorAgent<
I,O>(options):OrchestratorAgent<I,O>
Creates an OrchestratorAgent instance
Parameters#
Parameter | Type | Description |
|---|---|---|
|
| Configuration options for the Orchestrator Agent |
Returns#
OrchestratorAgent<I, O>
Overrides#
Properties#
tag#
tag:
string="OrchestratorAgent"
Overrides#
inputKey#
inputKey:
string
maxIterations?#
optionalmaxIterations:number
Maximum number of iterations Prevents infinite execution loops
tasksConcurrency?#
optionaltasksConcurrency:number
Number of concurrent tasks Controls how many tasks can be executed simultaneously
Methods#
from()#
staticfrom<I,O>(options):OrchestratorAgent<I,O>
Factory method to create an OrchestratorAgent instance
Type Parameters#
Type Parameter |
|---|
|
|
Parameters#
Parameter | Type | Description |
|---|---|---|
|
| Configuration options for the Orchestrator Agent |
Returns#
OrchestratorAgent<I, O>
A new OrchestratorAgent instance
process()#
process(
input,options):Promise<O>
Process input and execute the orchestrator workflow
Workflow:
- Extract the objective
- Loop until plan completion or maximum iterations: a. Generate/update execution plan b. If plan is complete, synthesize result c. Otherwise, execute steps in the plan
Parameters#
Parameter | Type | Description |
|---|---|---|
|
| Input message containing the objective |
| Agent invocation options |
Returns#
Promise<O>
Processing result
Overrides#
Interfaces#
OrchestratorAgentOptions<I, O>#
Configuration options for the Orchestrator Agent
Extends#
- `AgentOptions`<
I,O>
Type Parameters#
Type Parameter | Default type |
|---|---|
| |
|
Properties#
Property | Type | Description |
|---|---|---|
|
| Maximum number of iterations to prevent infinite loops Default: 30 |
|
| Number of concurrent tasks Default: 5 |
|
| - |