# Human in the Loop (HITL)

Allow your agent and users to collaborate on complex tasks.

This video shows an example of our [AI Travel App](https://docs.copilotkit.ai/coagents/tutorials/ai-travel-app) using HITL to get user feedback.

## [What is Human-in-the-Loop (HITL)?](https://docs.copilotkit.ai/coagents/human-in-the-loop\#what-is-human-in-the-loop-hitl)

Human-in-the-loop (HITL) allows agents to request human input or approval during execution, making AI systems more reliable and trustworthy. This pattern is essential when building AI applications that need to handle complex decisions or actions that require human judgment.

![Agentic Copilot Human in the Loop](https://docs.copilotkit.aihttps://cdn.copilotkit.ai/docs/copilotkit/images/coagents/coagents-hitl-infographic.png)

Learn more about HITL in [LangGraph's concept guide](https://langchain-ai.github.io/langgraph/concepts/human_in_the_loop/).

## [When should I use this?](https://docs.copilotkit.ai/coagents/human-in-the-loop\#when-should-i-use-this)

HITL combines the efficiency of AI with human judgment, creating a system that's both powerful and reliable. The key advantages include:

- **Quality Control**: Human oversight at critical decision points
- **Edge Cases**: Graceful handling of low-confidence situations
- **Expert Input**: Leverage human expertise when needed
- **Reliability**: More robust system for real-world use

## [How can I use this?](https://docs.copilotkit.ai/coagents/human-in-the-loop\#how-can-i-use-this)

CopilotKit provides two main approaches for HITL LangGraph workflows - interrupt and node-based.

Unsure which approach to use? We recommend starting with the [Interrupt](https://docs.copilotkit.ai/coagents/human-in-the-loop/interrupt-flow) flow.

[Interrupt\\
\\
Utilize LangGraph's interrupt function to pause the agent and wait for user input.](https://docs.copilotkit.ai/coagents/human-in-the-loop/interrupt-flow)

[Node-based\\
\\
Utilize nodes and tools to create LLM-driven Human-in-the-Loop workflows.](https://docs.copilotkit.ai/coagents/human-in-the-loop/node-flow)

[Previous\\
\\
Tool-based Generative UI](https://docs.copilotkit.ai/coagents/generative-ui/tool-based) [Next\\
\\
Interrupt](https://docs.copilotkit.ai/coagents/human-in-the-loop/interrupt-flow)

### On this page

[What is Human-in-the-Loop (HITL)?](https://docs.copilotkit.ai/coagents/human-in-the-loop#what-is-human-in-the-loop-hitl) [When should I use this?](https://docs.copilotkit.ai/coagents/human-in-the-loop#when-should-i-use-this) [How can I use this?](https://docs.copilotkit.ai/coagents/human-in-the-loop#how-can-i-use-this)

[Edit on GitHub](https://github.com/CopilotKit/CopilotKit/blob/main/docs/content/docs/coagents/human-in-the-loop/index.mdx)

![](https://static.scarf.sh/a.png?x-pxid=ffc9f65d-0186-4575-b065-61d62ea9d7d3)

## CopilotKit Quickstart Guide
CrewAI CrewAI support is here! Checkout the [Crew](https://docs.copilotkit.ai/crewai-crews) and [Flow](https://docs.copilotkit.ai/crewai-flows) documentation.

Search docs

`⌘`  `K`

On this pageInstall CopilotKit