Hi, how to have agent complete task multiple time? With different outputs (to file)

Hi, does anyone know how to have a task executed in a loop.

Use case is
Agent 1 will provide a high level lesson plan
Agent 2 will provide the low level lesson detail

I want to output agents 2’s low level lesson detail for each lesson in the high level lesson plan.

For example

High Level Plan
Lesson 1 Blah
Lesson 2 Bleh

Low Level Lesson 1 = Blah Blah blah
Low Level Lesson 2 = Bleh Bleh bleh

Thanks in advance!!

Hey, O think that the YouTube video will help you do exactly that: CrewAI Flows Crash Course, from CodeWithBrandon. The last chapter of the video is about writing book with chapters. So think that it is exactly the same case scenario as yours, but with small difference, diff jlin topic.

2 Likes