Learn how to implement Human-In-The-Loop workflows in CrewAI for enhanced decision-making
Human-In-The-Loop (HITL) is a powerful approach that combines artificial intelligence with human expertise to enhance decision-making and improve task outcomes. This guide shows you how to implement HITL within CrewAI.
Configure Your Task
Set up your task with human input enabled:
Provide Webhook URL
When kicking off your crew, include a webhook URL for human input:
Receive Webhook Notification
Once the crew completes the task requiring human input, you’ll receive a webhook notification containing:
Review Task Output
The system will pause in the Pending Human Input
state. Review the task output carefully.
Submit Human Feedback
Call the resume endpoint of your crew with the following information:
Feedback Impact on Task Execution: It’s crucial to exercise care when providing feedback, as the entire feedback content will be incorporated as additional context for further task executions.
This means:
Handle Negative Feedback
If you provide negative feedback:
Execution Continuation
When you submit positive feedback, the execution will proceed to the next steps.
HITL workflows are particularly valuable for: