Skip to content

focused-dot-io/02-human-in-the-loop

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Human-in-the-Loop Complaint Handler

A customer complaint handler built with LangGraph that uses the interrupt() and Command(resume=...) pattern to insert human approval gates into an automated workflow. The agent drafts a response, pauses for human review, and then sends or rejects based on the reviewer's decision. Includes LangSmith tracing and LLM-as-judge evaluations.

Prerequisites

Setup

python -m venv venv
source venv/bin/activate
pip install -r requirements.txt
cp .env.example .env
# Edit .env with your API keys

Environment Variables

Variable Required Description
ANTHROPIC_API_KEY Yes Anthropic API key for Claude
LANGSMITH_API_KEY Yes LangSmith API key for tracing and evals
LANGSMITH_TRACING Yes Set to true to enable tracing

Running

python complaint_handler.py

To run evaluations:

python evals.py

Article

Your AI Just Emailed a Customer Without Permission

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages