Take fine-grained control over task execution.
- The task may require multiple attempts or refinements
- You want to implement custom logic between iterations
- You need to dynamically adjust the workflow based on other results
task.is_incomplete()
, you ensure that the agent continues working until the task is either marked as complete or fails. The run_once()
method allows for step-by-step execution, giving you control over each iteration of the agentic loop.