@@ -28,6 +28,29 @@ class SupervisorAgentOptions(AgentOptions):
2828 description : str = field (init = False )
2929
3030class SupervisorAgent (Agent ):
31+ """
32+ SupervisorAgent class.
33+
34+ This class represents a supervisor agent that interacts with other agents in an environment. It inherits from the Agent class.
35+
36+ Attributes:
37+ supervisor_tools (list[Tool]): List of tools available to the supervisor agent.
38+ team (list[Agent]): List of agents in the environment.
39+ supervisor_type (str): Type of supervisor agent (BEDROCK or ANTHROPIC).
40+ user_id (str): User ID.
41+ session_id (str): Session ID.
42+ storage (ChatStorage): Chat storage for storing conversation history.
43+ trace (bool): Flag indicating whether to enable tracing.
44+
45+ Methods:
46+ __init__(self, options: SupervisorAgentOptions): Initializes a SupervisorAgent instance.
47+ send_message(self, agent: Agent, content: str, user_id: str, session_id: str, additionalParameters: dict) -> str: Sends a message to an agent.
48+ send_messages(self, messages: list[dict[str, str]]) -> str: Sends messages to multiple agents in parallel.
49+ get_current_date(self) -> str: Gets the current date.
50+ supervisor_tool_handler(self, response: Any, conversation: list[dict[str, Any]]) -> Any: Handles the response from a tool.
51+ _process_tool(self, tool_name: str, input_data: dict) -> Any: Processes a tool based on its name.
52+ process_request(self, input_text: str, user_id: str, session_id: str, chat_history: list[ConversationMessage], additional_params: Optional[dict[str, str]] = None) -> Union[ConversationMessage, AsyncIterable[Any]]: Processes a user request.
53+ """
3154
3255 supervisor_tools :list [Tool ] = [Tool (
3356 name = 'send_messages' ,
0 commit comments