Check out the detailed blog with code: https://krishcnaik.substack.com/p/guardrails-with-langchain-a-complete?r=6ah1nv&utm_campaign=post&utm_medium=web&triedRedirect=true
In this crash course, we will cover everything you need to know about implementing guardrails in LangChain agents -- from simple keyword filters to production-grade layered middleware stacks. By the end, you will have built a fully guarded healthcare chatbot with PII detection, content filtering, human-in-the-loop approval, and output safety validation.
Here is what we will cover:
What are Guardrails and why do they matter?
Two approaches: Deterministic vs Model-based
Built-in: PII Detection Middleware
Built-in: Human-in-the-Loop Middleware
Custom: Before-Agent Guardrail (input filtering)
Custom: After-Agent Guardrail (output safety)
Layered / Combined Guardrails
Real-World Use Case: Healthcare Chatbot
Visit krishnaik.in for Live courses
Choose to Build with AI
Matched to AI Agents
AI Maker Residence 3
The third AI workshop taught by our legendary teacher, Nick Sarafa. This is a full-day hands-on training workshop for purposeful co-creation with AI using Claude Code.
Imagine having access to hundreds of billions of dollars of computing power and knowing exactly how to make it work for you through the power of super intelligence.
◆ Fri 09 Oct 2026◆ KOKO Cafe, London◆ With Nick Sarafa