Understanding how agents handle and manage tasks
task = Task( description="Research AI trends", expected_output="Summary report", agent=research_agent )
Basic Task
Decision Task
decision_task = Task( type="decision", conditions={ "success": ["next_task"], "failure": ["error_task"] } )
Loop Task
loop_task = Task( type="loop", items=data_list, operation="process_item" )
task_a = Task(name="research") task_b = Task( name="analyze", context=[task_a] # Uses task_a's output )