Human in the loop for flows, not crews

Hi!

I am building a flow that inspects unstructured data, comes up with a plan to clean it, and then generate the code to clean it.

I want to have human in the loop to validate after the planning step, and have some sort of a router to it. So that if human says pass, it moves on to code generation; else, it takes the human input to rethink and come up with a new plan.

Looking at the documentation, Human-in-the-Loop (HITL) Workflows - CrewAI, I found that HITL can be easily implemented with crews by configuring human_input=True in a task. I am wondering if there is a similar solution for flows? From my understanding, there is no “tasks” in flows, so does it mean it is not supported?

Thank you so much for your help!

Yes! Flows also have tasks (i.e., tasks.yaml file).

Basically, Flows are just a different way of running CrewAI, but the fundamentals are identical.

Read more about non-Flows vs. Flows:

See a Flow example project: