Skip to main content
Some tool operations may be sensitive and require human approval before execution. Deep agents support human-in-the-loop workflows through LangGraph’s interrupt capabilities. You can configure which tools require approval using the interrupt_on parameter.

Basic configuration

The interrupt_on parameter accepts a dictionary mapping tool names to interrupt configurations. Each tool can be configured with:
  • True: Enable interrupts with default behavior (approve, edit, reject allowed)
  • False: Disable interrupts for this tool
  • {"allowed_decisions": [...]}: Custom configuration with specific allowed decisions

Decision types

The allowed_decisions list controls what actions a human can take when reviewing a tool call:
  • "approve": Execute the tool with the original arguments as proposed by the agent
  • "edit": Modify the tool arguments before execution
  • "reject": Skip executing this tool call entirely
You can customize which decisions are available for each tool:

Handle interrupts

When an interrupt is triggered, the agent pauses execution and returns control. Check for interrupts in the result and handle them accordingly.

Multiple tool calls

When the agent calls multiple tools that require approval, all interrupts are batched together in a single interrupt. You must provide decisions for each one in order.

Edit tool arguments

When "edit" is in the allowed decisions, you can modify the tool arguments before execution:

Subagent interrupts

When using subagents, you can use interrupts on tool calls and within tool calls.

Interrupts on tool calls

Each subagent can have its own interrupt_on configuration that overrides the main agent’s settings:
When a subagent triggers an interrupt, the handling is the same – check for __interrupt__ and resume with Command.

Interrupts within tool calls

Subagent tools can call interrupt() directly to pause execution and await approval:
When run, this produces the following output:

Best practices

Always use a checkpointer

Human-in-the-loop requires a checkpointer to persist agent state between the interrupt and resume:

Use the same thread ID

When resuming, you must use the same config with the same thread_id:

Match decision order to actions

The decisions list must match the order of action_requests:

Tailor configurations by risk

Configure different tools based on their risk level: