Skip to main content

Parameters

ParameterTypeDefaultDescription
agentslist[Any]RequiredList of Direct agent instances to use as team members
taskslist[Task] | NoneNoneList of tasks to execute (optional)
modelOptional[Any]NoneThe model provider instance for any internal agents (leader, router)
response_formatAnystrThe response format for the end task (optional)
ask_other_team_membersboolFalseA flag to automatically add other agents as tools
modeLiteral["sequential", "coordinate", "route"]"sequential"The operational mode for the team (‘sequential’, ‘coordinate’, or ‘route’)
memoryOptional[Memory]NoneMemory manager for the team coordination

Functions

complete

Execute multi-agent operations with the predefined agents and tasks (alias for do). Parameters:
  • tasks (list[Task] | Task | None): Optional list of tasks or single task to execute. If not provided, uses tasks from initialization
Returns:
  • The response from the multi-agent operation
Execute the multi-agent operation and print the result (alias for print_do). Parameters:
  • tasks (list[Task] | Task | None): Optional list of tasks or single task to execute. If not provided, uses tasks from initialization
Returns:
  • The response from the multi-agent operation

do

Execute multi-agent operations with the predefined agents and tasks. Parameters:
  • tasks (list[Task] | Task | None): Optional list of tasks or single task to execute. If not provided, uses tasks from initialization
Returns:
  • The response from the multi-agent operation

multi_agent

Execute multi-agent operations with agent configurations and tasks. Parameters:
  • agent_configurations (List[Agent]): List of agent configurations
  • tasks (Any): Tasks to execute
Returns:
  • The response from the multi-agent operation

multi_agent_async

Asynchronous version of the multi_agent method. Parameters:
  • agent_configurations (List[Agent]): List of agent configurations
  • tasks (Any): Tasks to execute
Returns:
  • The response from the multi-agent operation
Execute the multi-agent operation and print the result. Parameters:
  • tasks (list[Task] | Task | None): Optional list of tasks or single task to execute. If not provided, uses tasks from initialization
Returns:
  • The response from the multi-agent operation

add_tool

Add agents as a tool to each Task object.