from praisonaiagents import Agent, Task, AgentTeam# Create agentsresearcher = Agent( name="Researcher", role="Research Analyst", instructions="Conduct thorough research on topics")writer = Agent( name="Writer", role="Content Writer", instructions="Write engaging content based on research")# Create tasksresearch_task = Task( description="Research AI trends", agent=researcher)write_task = Task( description="Write article about AI trends", agent=writer)# Create team with hierarchical process (enables error recovery)team = AgentTeam( agents=[researcher, writer], tasks=[research_task, write_task], process="hierarchical", manager_llm="gpt-4o")
2
Start Workflow
# Error recovery happens automaticallyresult = team.start()# If manager has parse errors or selects invalid IDs,# the system retries transparentlyprint(result)
These constants are not user-configurable today; they are SDK defaults designed for optimal reliability. Future versions may expose configuration options.