Articles for people who
ship the stack
Rewrites on React, Node.js, TypeScript and AI. A translated body is shown when it exists. If it does not, you see the English text and a note that says so.
Tagged: Middleware
Single-Agent Handoffs in LangChain: Building an IT Help Desk Workflow
One LangChain agent that changes its prompt and tools per step: a staged IT help desk with real identity checks, middleware handoffs and an out-of-scope exit.
7 min readThree LangChain Middleware Guards That Keep Agents From Leaking Secrets
Stop an agent from sending API keys to the model or deleting files unasked: PIIMiddleware, HumanInTheLoopMiddleware, call limits and why middleware order decides safety.
10 min readLangChain Reliability: Streaming, Batching, Retries, Fallbacks, Middleware
How to make a LangChain helpdesk agent survive slow and failing calls: classify errors, stream honest progress, batch safely, retry, fall back and test offline.
12 min readLangChain @dynamic_prompt for task-aware system instructions
One LangChain HR agent swaps Leave, Benefits and Admin system prompts with @dynamic_prompt middleware from runtime context, while authorization stays in code.
4 min readStop Tools Conditionally: Artifacts Beat return_direct in LangGraph
Stop or continue per tool call in LangGraph using tool artifacts, in a hand-built ReAct loop and in create_agent middleware, where return_direct can't decide.
11 min readGate Agent Tools Per User with LangChain Wrap Middleware
One calculator agent, three access tiers: LangChain wrap-style middleware swaps the tool list per runtime user_type instead of cloning three separate agents.
4 min readHardening a Python LangChain Agent with Seven Built-In Middlewares
Learn how LangChain 1.0 middleware adds summarization, call limits, retries, model fallback, PII redaction and human approval to a Gemini agent without touching its core logic.
11 min readSeven Beginner Node.js and Express Coding Tasks, Solved and Explained
Work through seven typical junior Node.js interview tasks, from Express routes and middleware to error handling, string reversal and duplicates, and learn to explain each one.
7 min readAuthentication vs Authorization: Where Each One Belongs in Your Code
Authentication proves who you are, authorization decides what you can do. Where each belongs in middleware, 401 vs 403, and the bugs from mixing them up.
6 min read
About these articles
Request a 24h estimate
Need the same stack in a production operator layer? Send the brief — estimate within 24 hours.