Community코딩 & 개발github.com

langchain-ai/langchain-middleware

인간-루프 승인, 커스텀 미들웨어 또는 구조화된 출력이 필요할 때 사용합니다. 위험한 도구 호출에 대한 인간 승인을 위한 HumanInTheLoopMiddleware, 훅을 사용한 커스텀 미들웨어 생성, Command 재개 패턴, Pydantic/Zod를 사용한 구조화된 출력을 다룹니다.

langchain-middleware란 무엇인가요?

이 스킬은 AI 에이전트 개발 시 인간 승인(Human-in-the-loop), 커스텀 미들웨어, 구조화된 출력이 필요한 상황에 사용됩니다. 특히 위험한 도구 호출을 수행하기 전에 인간의 승인을 요청하는 HumanInTheLoopMiddleware를 손쉽게 구현할 수 있도록 도와줍니다. 또한 자체 훅(hook) 시스템을 이용해 요청 전후에 사용자 정의 로직을 삽입하는 커스텀 미들웨어를 만들 수 있으며, Command 패턴을 사용해 승인 요청을 일시 중단하고 재개하는 흐름을 제어할 수 있습니다. 마지막으로 Pydantic(Python) 또는 Zod(TypeScript) 스키마를 활용해 구조화된 출력을 생성할 수 있어, AI 에이전트의 결과물을 더 안정적이고 예측 가능하게 만듭니다. 이 스킬은 LangChain, LangGraph, Cursor, Claude Code 등 다양한 AI 에이전트 플랫폼에서 활용 가능하며, 사람의 개입이 필요한 민감한 작업이나 복잡한 출력 검증이 필요한 시나리오에 특히 유용합니다.

지원 대상~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/langchain-ai/langchain-skills/tree/main/skills/langchain-middleware

Installed? Explore more 코딩 & 개발 skills: steipete/bluebubbles, steipete/eightctl, steipete/blucli · View all 6 →

즐겨 사용하는 AI에게 물어보기

이 에이전트 스킬이 미리 로드된 새 채팅을 엽니다.

문서

langchain-middleware은(는) 무엇을 하나요?

이 스킬은 인간-루프 승인, 커스텀 미들웨어 또는 구조화된 출력이 필요할 때 호출하세요. 위험한 도구 호출에 대한 인간 승인을 위한 HumanInTheLoopMiddleware, 훅을 사용한 커스텀 미들웨어 생성, Command 재개 패턴, Pydantic/Zod를 사용한 구조화된 출력을 다룹니다.

Individual skills in this repo

This repo contains 11 individual skills — each has its own dedicated page.

langchain-ai/deep-agents-core

INVOKE THIS SKILL when building ANY Deep Agents application. Covers create_deep_agent(), harness architecture, SKILL.md format, and configuration options.

langchain-ai/deep-agents-memory

INVOKE THIS SKILL when your Deep Agent needs memory, persistence, or filesystem access. Covers StateBackend (ephemeral), StoreBackend (persistent), FilesystemMiddleware, and CompositeBackend for routing.

langchain-ai/deep-agents-orchestration

INVOKE THIS SKILL when using subagents, task planning, or human approval in Deep Agents. Covers SubAgentMiddleware, TodoList for planning, and HITL interrupts.

langchain-ai/framework-selection

INVOKE THIS SKILL at the START of any LangChain/LangGraph/Deep Agents project, before writing any agent code. Determines which framework layer is right for the task: LangChain, LangGraph, Deep Agents, or a combination. Must be consulted before other agent skills.

langchain-ai/langchain-dependencies

INVOKE THIS SKILL when setting up a new project or when asked about package versions, installation, or dependency management for LangChain, LangGraph, LangSmith, or Deep Agents. Covers required packages, minimum versions, environment requirements, versioning best practices, and common community tool packages for both Python and TypeScript.

langchain-ai/langchain-fundamentals

Create LangChain agents with create_agent, define tools, and use middleware for human-in-the-loop and error handling.

langchain-ai/langchain-rag

INVOKE THIS SKILL when building ANY retrieval-augmented generation (RAG) system. Covers document loaders, RecursiveCharacterTextSplitter, embeddings (OpenAI), and vector stores (Chroma, FAISS, Pinecone).

langchain-ai/langgraph-fundamentals

INVOKE THIS SKILL when writing ANY LangGraph code. Covers StateGraph, state schemas, nodes, edges, Command, Send, invoke, streaming, and error handling.

langchain-ai/langgraph-human-in-the-loop

INVOKE THIS SKILL when implementing human-in-the-loop patterns, pausing for approval, or handling errors in LangGraph. Covers interrupt(), Command(resume=...), approval/validation workflows, and the 4-tier error handling strategy.

langchain-ai/langgraph-persistence

INVOKE THIS SKILL when your LangGraph needs to persist state, remember conversations, travel through history, or configure subgraph checkpointer scoping. Covers checkpointers, thread_id, time travel, Store, and subgraph persistence modes.

langchain-ai/swarm

Dispatches many independent items in parallel: create a table, fan out to subagents, aggregate results. One row = one unit of work.

관련 스킬