Hi guys, I want to build three agents. In this system, two of the agents require human input for approval. Basically, my plan is that three humans need to approve the output coming from Agent 2.
If Human 1 approves, the request moves to Human 2. If Human 2 rejects it, they should have the option to either request modifications or cancel it. If modifications are requested, the output should be updated accordingly. If canceled, the process should stop, and another agent can start.
If all three humans approve, the final output should be displayed.
How can I implement this human input system?
I think you might find some inspiration in the video CrewAI Flows: AI Feedback Loop by Brandon Hancock.
In it, you’ll learn about the Flows paradigm in CrewAI with feedback loops. The video also covers using routers to direct the flow.
Okay, but if I use this, how can I create a backend for it using Django REST, and how do I handle the feedback loops then?
Alright, so now you’ve already grasped the core concepts behind CrewAI Flows. Each node (or step) is basically a straightforward Python method, and you’re free to do whatever your knowledge and creativity allow.
The feedback loop is simply an information exchange process. One node generates an output, you present that to the user, and when you get their feedback, you feed that back in as context to the next node that will process it again — now enriched with the user’s input. It’s up to you to build out this entire logic using the technologies you’re already comfortable with, or maybe the ones you want to learn. Good luck with your implementation!
Okay, thank you. If I have any doubts, I’ll let you know.