Elemental | Documentation
Agent Team

Agent Team

The AgentTeam is initialized with an empty agent_registry which is a dictionary keeping information about the agents in this team. The necessary argument is agent selector.

class AgentTeam(ABC):

    def __init__(self, selector: AgentSelector = None):

        self._agent_registry: Dict[str, Agent] = {}
        self._agent_types: Dict[str, str] = {}
        self._selector = selector

The AgentTeam has the following methods:

  • get_selector - Get the agent selector used by the team.
    def get_selector(self) -> AgentSelector
    
  • get_agents - Get the dictionary of all agents registered in this team.
    def get_agents(self) -> Dict[str, Agent]
    
  • register_agent - Register an agent with the team. This method is used to populate the dictionary of agents with their respective names and agent reference.
    def register_agent(
            self, 
            agent_name: str, 
            agent: Agent, 
            agent_type: str
        ) -> None
    
  • describe - Describe the agent unit by creating a dictionary of all agents registered in the unit and their descriptions (agent personas).
    def describe(self) -> Dict[str, str]
    
  • update_conversational_strategies - Update the conversational strategies of all agents in the team with the description of the complete team.
    def update_conversational_strategies(self) -> None
    
  • run - Run the AgentTeam with the specified task. This method is an equivalent to run method of the single Agent for a team.
    @abstractmethod
    def run(
            self, 
            task: str, 
            input_session: str
        ) -> str