Orchestrator overview
The Multi-Agent Orchestrator is the central component of the framework, responsible for managing agents, routing requests, and handling conversations. This page provides an overview of how to initialize the Orchestrator and details all available configuration options.
Initializing the Orchestrator
To create a new Orchestrator instance, you can use the MultiAgentOrchestrator
class:
The options
parameter is optional and allows you to customize various aspects of the Orchestrator’s behavior.
Configuration options
The Orchestrator accepts an OrchestratorConfig
object during initialization. All options are optional and will use default values if not specified. Here’s a complete list of available options:
storage
: Specifies the storage mechanism for chat history. Default isInMemoryChatStorage
.config
: An instance ofOrchestratorConfig
containing various configuration flags and values:LOG_AGENT_CHAT
: Boolean flag to log agent chat interactions.LOG_CLASSIFIER_CHAT
: Boolean flag to log classifier chat interactions.LOG_CLASSIFIER_RAW_OUTPUT
: Boolean flag to log raw classifier output.LOG_CLASSIFIER_OUTPUT
: Boolean flag to log processed classifier output.LOG_EXECUTION_TIMES
: Boolean flag to log execution times of various operations.MAX_RETRIES
: Number of maximum retry attempts for the classifier.MAX_MESSAGE_PAIRS_PER_AGENT
: Maximum number of message pairs to retain per agent.USE_DEFAULT_AGENT_IF_NONE_IDENTIFIED
: Boolean flag to use the default agent when no specific agent is identified.CLASSIFICATION_ERROR_MESSAGE
: Custom error message for classification errors.NO_SELECTED_AGENT_MESSAGE
: Custom message when no agent is selected.GENERAL_ROUTING_ERROR_MSG_MESSAGE
: Custom message for general routing errors.
logger
: Custom logger instance. If not provided, a default logger will be used.classifier
: Custom classifier instance. If not provided, aBedrockClassifier
will be used.
Example with all options
Here’s an example that demonstrates how to initialize the Orchestrator with all available options:
Remember, all these options are optional. If you don’t specify an option, the Orchestrator will use its default value.
Default values
The default configuration is defined as DEFAULT_CONFIG
in the Python implementation:
In the Python implementation, DEFAULT_CONFIG
is an instance of OrchestratorConfig
with default values.
Available Functions
The MultiAgentOrchestrator provides several functions to manage agents, process requests, and analyze agent configurations. Here’s an overview of the key functions in the Python implementation:
Note: The analyzeAgentOverlap
method is not present in the provided Python implementation.
These functions allow you to configure the orchestrator, manage agents, and process user requests. For more detailed information on each function, please refer to the API Reference section.
Additional notes
-
The
storage
option allows you to specify a custom storage mechanism. By default, it uses in-memory storage (InMemoryChatStorage
), but you can implement your own storage solution or use built-in options like DynamoDB storage. For more information, see the Storage section. -
The
logger
option lets you provide a custom logger. If not specified, a default logger will be used. To learn how to implement a custom logger, check out the logging section. -
The
classifier
option allows you to use a custom classifier for intent classification. If not provided, aBedrockClassifier
will be used by default. For details on implementing a custom classifier, see the Custom Classifiers documentation. -
The default agent is a
BedrockLLMAgent
configured as a generalist, capable of handling a wide range of topics. Learn more about the default agent and how to customize it in the Default Agent Configuration section.
By customizing these options, you can tailor the Orchestrator’s behavior to suit your specific use case and requirements.