Examples / Human-in-the-Loop (HITL)
Human-in-the-Loop (HITL)
Patterns for integrating human decision-making into AI workflows. These examples show how to request human input, approval, and feedback during procedure execution.
Examples in This Chapter
Basic Hitl
Introduction to HITL primitives with direct procedure calls. This example demonstrates the traditional approach where the procedure code explicitly calls HITL primitives with hardcoded messages:
Human.approve()- Yes/no decisionsHuman.input()- Text input with optional dropdown optionsHuman.review()- Content review and feedback
Has Specs
Agent Driven Approval
An AI agent that dynamically decides when to request human approval and constructs context-aware approval messages. This demonstrates agent-driven HITL where the agent has tools that wrap HITL primitives and uses them intelligently based on context.
Has Specs · Requires API Keys
Want to contribute?
The examples repository is open source. Add your own examples or improve existing ones.