Loading video player...
Durable Human-in-the-Loop Approval Workflows for AI Agents Using Agentspan with LangChain/LangGraph/CrewAI/OpenAI Agent SDK etc ------- For business enquiries: ai@futurminds.com 🔗 Resources & Links: - Agentspan : https://agentspan.ai/ - Resources used in this video: https://www.skool.com/ai-architects-8928 Thanks to Agentspan for sponsoring this video. ----------- AI agent human-in-the-loop that actually survives crashes, restarts, and 48-hour waits. This tutorial shows how Agentspan , a free open-source runtime built on Netflix Conductor, gives your AI agents durable approval workflows with one decorator: @tool(approval_required=True). Your approval state lives on the server, not in process memory. This is Video 2 in the Agentspan series. In Video 1 we covered crash recovery for tool calls. This video focuses entirely on human-in-the-loop. We build a trading compliance dashboard, demo the full approve/reject flow, kill the process mid-approval, and show the request surviving the crash. ⏱️ CHAPTERS: 0:00 - Why AI Agent Approval Requests Break on Crash 1:02 - What We Cover in This Video 1:31 - Agentspan Open Source AI Agent Runtime 1:55 - How LangGraph and CrewAI Handle Human in the Loop 3:02 - How Agentspan Solves Durable Human Approval 4:27 - Human in the Loop Architecture Deep Dive 5:35 - Built in Dashboard for Workflows and Token Counts 6:07 - Before Demo LangGraph Trading Bot Without Agentspan 7:50 - After Demo Agentspan Code Walkthrough 10:41 - Live Demo Approve Reject and Crash Recovery 13:38 - Advanced Patterns Edited Params Human Tool Guardrails 14:40 - Resources and Next Steps 🔑 Key Takeaways: • One decorator @tool(approval_required=True) turns any tool into a durable human approval gate • Approval state lives on the Agentspan server, not in your Python process. Crashes don't matter • Approve or reject from any machine via REST API. Dashboard, Slack bot, mobile app, or CLI script • Beyond binary yes/no. Send edited parameters back, let agents ask humans questions, escalate guardrail failures to human review • Full audit trail. Who approved or rejected, when, and why ❓ FAQ: Q: How does AI agent human-in-the-loop work with Agentspan ? A: When your agent calls a tool marked with approval_required=True, the Agentspan server creates a durable HUMAN task in its database and pauses the workflow. The approval request persists independently of your Python process. A human responds via any REST client and the server resumes the agent exactly where it left off. Q: What happens to pending approval requests if the Python process crashes? A: Nothing is lost. The approval request lives on the Agentspan server, not in process memory. When your worker restarts, it reconnects to the server and picks up pending work. The human can still approve or reject, and the workflow continues from the exact point of interruption. Q: How is Agentspan human-in-the-loop different from LangGraph interrupt? A: LangGraph's interrupt() pauses the graph and saves state to an in-memory checkpointer (MemorySaver by default). The approval must come from the same process, and a crash destroys the state. Agentspan moves the approval state to a separate server with database persistence. Approvals can come from any machine, and the state survives indefinitely. Q: Can the human do more than just approve or reject? A: Yes. Agentspan supports three advanced patterns. (1) edited parameters where the human modifies the tool arguments before approving, (2) the human tool where the agent proactively asks the human a question mid-execution, and (3) guardrail escalation where failed validation pauses for human review instead of auto-retrying. 📢 Subscribe to FuturMinds for weekly AI agent tutorials and automation guides helping non-dev builders and developers build production-ready AI systems. Whether you need human-in-the-loop for AI agent trade approvals, durable approval workflows that survive crashes, or a way to add human review gates to LangGraph or CrewAI pipelines, this tutorial covers the complete architecture and live demo using Agentspan with one decorator.