Skip to main content

agenthub.delegator_agent.agent

DelegatorAgent Objects

class DelegatorAgent(Agent)

VERSION

The Delegator Agent is responsible for delegating tasks to other agents based on the current task.

__init__

def __init__(llm: LLM)

Initialize the Delegator Agent with an LLM

Arguments:

  • llm (LLM): The llm to be used by this agent

step

def step(state: State) -> Action

Checks to see if current step is completed, returns AgentFinishAction if True. Otherwise, delegates the task to the next agent in the pipeline.

Arguments:

  • state (State): The current state given the previous actions and observations

Returns:

  • AgentFinishAction: If the last state was 'completed', 'verified', or 'abandoned'
  • AgentDelegateAction: The next agent to delegate the task to