Documentation Index Fetch the complete documentation index at: https://docs.praison.ai/llms.txt
Use this file to discover all available pages before exploring further.
AgentTeam is the multi-agent coordinator that manages and delegates work to multiple Agent instances, supporting sequential, parallel, and hierarchical execution patterns.
Quick Start
Basic Team
Create a simple team with multiple agents: from praisonaiagents import Agent , AgentTeam , Task
# Create agents
researcher = Agent (
name = " Researcher " ,
role = " Research Specialist " ,
instructions = " Research and gather information on topics "
)
writer = Agent (
name = " Writer " ,
role = " Content Writer " ,
instructions = " Write clear, engaging content "
)
# Create tasks
task1 = Task ( description = " Research AI trends " , agent = researcher )
task2 = Task ( description = " Write article " , agent = writer )
# Create team
team = AgentTeam (
agents =[ researcher , writer ],
tasks =[ task1 , task2 ]
)
result = team . start ()
print ( result )
Parallel Execution
Execute tasks in parallel for faster processing: from praisonaiagents import Agent , AgentTeam , Task
agents = [
Agent ( name = " Analyst1 " , instructions = " Analyze market data " ),
Agent ( name = " Analyst2 " , instructions = " Analyze competitor data " ),
Agent ( name = " Analyst3 " , instructions = " Analyze customer data " ),
]
tasks = [
Task ( description = " Market analysis " , agent = agents [ 0 ]),
Task ( description = " Competitor analysis " , agent = agents [ 1 ]),
Task ( description = " Customer analysis " , agent = agents [ 2 ]),
]
team = AgentTeam (
agents = agents ,
tasks = tasks ,
process = " parallel " # Execute tasks in parallel
)
result = team . start ()
Hierarchical Process
Use a manager agent to coordinate work: from praisonaiagents import Agent , AgentTeam , Task
team = AgentTeam (
agents =[ researcher , writer , editor ],
tasks =[ research_task , write_task , edit_task ],
process = " hierarchical " , # Manager coordinates agents
manager_llm = " gpt-4o " # Manager model
)
result = team . start ()
With Memory & Planning
Enable shared memory and planning for the team: from praisonaiagents import Agent , AgentTeam
team = AgentTeam (
agents =[ agent1 , agent2 , agent3 ],
memory = True , # Shared memory across agents
planning = True , # Enable collaborative planning
output = " verbose " # Detailed output
)
result = team . start ( " Analyze and report on Q4 sales data " )
Process Types
Process Description Best For sequentialTasks execute one after another Dependent tasks, pipelines parallelTasks execute simultaneously Independent analysis hierarchicalManager coordinates agents Complex delegation
Configuration Options
Parameter Type Default Description agentsList[Agent] Required List of Agent instances tasksList[Task] Auto-generated Tasks to execute processstr "sequential"Execution pattern manager_llmstr "gpt-4o-mini"Manager model (hierarchical) memorybool/Config FalseShared memory system planningbool/Config FalseCollaborative planning contextbool/Config FalseContext management outputstr/Config None Output configuration executionstr/Config None Execution limits hooksConfig None Lifecycle callbacks
State Management
AgentTeam provides shared state across all agents:
team = AgentTeam ( agents =[ agent1 , agent2 ])
# Set shared state
team . set_state ( " analysis_complete " , True )
team . set_state ( " total_records " , 1500 )
# Get state from any agent
value = team . get_state ( " analysis_complete " )
# Increment counters
team . increment_state ( " processed_count " , 1 )
# Append to lists
team . append_to_state ( " findings " , " New insight discovered " )
Best Practices
For sequential tasks, AgentTeam automatically passes context from previous tasks: task1 = Task ( description = " Research topic " , agent = researcher )
task2 = Task ( description = " Write based on research " , agent = writer )
# task2 automatically receives task1's output as context
Create agents with distinct roles for better task delegation: researcher = Agent ( role = " Research Specialist " , tools =[ search_tool ])
analyst = Agent ( role = " Data Analyst " , tools =[ analysis_tool ])
writer = Agent ( role = " Content Writer " )
Enable memory for teams that need to share information: team = AgentTeam (
agents =[ ... ],
memory = True # All agents share memory
)
Key Methods
Method Description start()Execute the team workflow run()Alias for start() astart()Async execution set_state()Set shared state value get_state()Get shared state value add_task()Add task dynamically get_task_status()Check task status
Agent Learn about individual AI agents
AgentFlow Deterministic workflow pipelines
Tasks Task configuration and management
Process Execution process patterns