Skip to content

Framework for orchestrating role-playing, autonomous AI agents. By fostering collaborative intelligence, CrewAI empowers agents to work together seamlessly, tackling complex tasks.

ordering tasks properly

João Moura7310f4d85b3b
diff --git a/src/crewai/project/crew_base.py b/src/crewai/project/crew_base.py
index 62390e991..1e807a2ab 100644
--- a/src/crewai/project/crew_base.py
+++ b/src/crewai/project/crew_base.py
@@ -45,7 +45,7 @@ def CrewBase(cls: T) -> T:
]
tasks = [
getattr(self, name)()
- for name, func in self._get_all_functions().items()
+ for name, func in reversed(self._get_all_functions().items())
if hasattr(func, "is_task")
]
return Crew(agents=agents, tasks=tasks)