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.
SubscribeRelated
AgentMiddlewareinterrupt_onCommandcheckpointerInterruptOnConfigHuman-in-the-loop overview