langchain-middleware
Human-in-the-loop approval, custom middleware, and structured output patterns for LangChain agents. HumanInTheLoopMiddleware pauses execution before dangerous tool calls, allowing humans to approve, edit arguments, or reject with feedback Per-tool interrupt policies let you configure different approval rules based on risk level; requires a checkpointer and thread_id for state persistence Command resume pattern continues execution after human decisions, with support for editing tool arguments...
npx skills add https://github.com/langchain-ai/langchain-skills --skill langchain-middlewarelangchain-middleware (retired)
langchain-middleware was retired from langchain-skills. Use the langchain-build-agent skill instead.
-
If
langchain-build-agentis available, use it for this task. -
Otherwise, install it, then use it:
npx skills add langchain-ai/langchain-skills --skill langchain-build-agent --yes -
Tell the user that
langchain-middlewareis retired and that they can remove it withnpx skills remove langchain-middleware.