Files
crewAI/lib
Devin AI 3a2e5a3abb feat: add adaptive re-planning for crew task execution (#4983)
Add optional replan_on_failure and max_replans flags to the Crew class
that enable the system to re-evaluate and update the execution plan
when task results deviate from the original plan's assumptions.

New components:
- ReplanningEvaluator: lightweight LLM-based evaluator that checks
  whether a task result deviates significantly from the plan
- CrewPlanner._handle_crew_replanning(): generates revised plans for
  remaining tasks based on actual results so far
- Crew._maybe_replan(): hook called after each sync task completion
  in both _execute_tasks() and _aexecute_tasks()

Backwards compatible: replan_on_failure defaults to False, so existing
crews are completely unaffected.

Co-Authored-By: João <joao@crewai.com>
2026-03-20 12:03:57 +00:00
..