Skip to main content
Humancheck provides built-in adapters for integrating with LangChain and LangGraph agents. This allows your agents to automatically request human review for tool calls that require approval.

Overview

The LangChain integration works by:
  1. Intercepting tool calls from your agent
  2. Converting them to Humancheck reviews
  3. Waiting for human decisions (or checking back later)
  4. Resuming agent execution with the decision

Installation

Install Humancheck with LangChain dependencies:
Or with Poetry:

Basic Integration

Simple Example

LangGraph Integration

Using with LangGraph HITL

Humancheck integrates with LangGraph’s Human-in-the-Loop (HITL) feature:

Complete Example

Here’s a complete example of integrating Humancheck with a LangChain agent:

Tool Approval Configuration

Configure Approval Rules

Conditional Approval

Handling Multiple Tool Calls

Non-blocking Pattern

For async workflows where you don’t want to block:

Best Practices

  1. Define clear approval rules: Specify which tools require approval and which decisions are allowed
  2. Provide context: Include agent reasoning and confidence scores in reviews
  3. Use appropriate urgency: Set urgency based on the impact of the tool call
  4. Handle timeouts: Implement timeout handling for blocking requests
  5. Test with dashboard: Use the Streamlit dashboard to test your integration

Next Steps