Concepts / practice

Human-in-the-loop stable

Human-in-the-loop approvals · Practice

Type
practice
Published
Reviewed

What it is

An agent that asks permission for everything is a chatbot with extra steps. One that asks for nothing will eventually delete something. Human-in-the-loop is the discipline of deciding which actions pause for a person, and building the pause so it survives a restart.

How it works

The production pattern is asynchronous and durable:

  1. The agent reaches an action that needs approval.
  2. It serializes its state to a checkpoint.
  3. The request goes to a queue with a time-to-live, and a person is notified.
  4. On approval, execution resumes from the checkpoint. On timeout or rejection, it does not.

Frameworks expose this directly: LangGraph interrupts, the OpenAI Agents SDK, Microsoft’s Agent Framework. Protocols carry it too: ACP has permission requests, AG-UI streams state the user can edit mid-run, MCP has elicitation, and Managed Agents has a permissions layer.

Deciding what needs approval

Score the action on four dimensions:

  • Irreversibility: can it be undone?
  • Blast radius: how many people or records does it touch?
  • Compliance exposure: does it move money, PII or production config?
  • Confidence: how sure is the agent that this is right?

High on any of them means pause. Everything else runs.

Watch out for

  • Approval fatigue. If people approve without reading, you have no control, just latency.
  • The trend is toward policy-driven delegation: pre-approve classes of action rather than prompting each time.

Builds

  • A tool-call gate with Jev Put Jev in front of an agent's bash tool so every command is run, held for a human, or blocked. About 80 lines of TypeScript.
  • Screening job applications with Jev Sort applications into shortlist, review and low priority against a job's stated requirements. A person reads every pile. Includes a name-swap test.

Related

In the guide

  • 2. Delegate the right work How to size a task an agent can finish, write the spec so it does, ask for a plan before code, and know which work to keep for yourself.

Sources

  1. Human-in-the-loop (LangChain docs)
  2. Human-in-the-loop (OpenAI Agents SDK)
  3. Human-in-the-loop patterns for AI agents

Suggest a fix to this page →