Skip to content
masterclass Buddy

LangChain · Class

HumanInTheLoopMiddleware

HumanInTheLoopMiddleware pauses an agent before selected tools run. A person can approve, edit, reject, or answer instead, and the agent then resumes.

Last updated

Since
v1.4

Syntax

HumanInTheLoopMiddleware(self, interrupt_on: dict[str, bool | InterruptOnConfig], *, description_prefix: str = 'Tool execution requires approval', edit_notice: str | None = _EDIT_NOTICE, interrupt_mode: InterruptMode = 'batched')

In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.

Subscribe
  • AgentMiddleware
  • interrupt_on
  • Command
  • checkpointer
  • InterruptOnConfig
  • Human-in-the-loop overview

Source: HumanInTheLoopMiddleware | langchain | LangChain Reference. Checked 2026-11-03.