# Human-in-the-Loop

> human-in-the-loop lets you add approval gates to agent actions with one flag. the agent pauses, shows what it wants to do, and waits for confirmation before executing.

**URL:** https://inference.sh/docs/runtime/human-in-the-loop
**Last updated:** 2026-10-11

---

human-in-the-loop lets you add approval gates to agent actions with one flag. the agent pauses, shows what it wants to do, and waits for confirmation before executing.

## the oversight problem

agents become useful when they can take action. they become dangerous when they take the wrong action.

an agent that can send emails can send the wrong email. an agent that can delete data can delete the wrong data. an agent that can make purchases can make expensive mistakes.

the question isn't whether to give agents autonomy. it's how to give them autonomy with appropriate guardrails.

## how it works

when an agent reaches an action that requires approval:

1. **execution pauses**: the agent's state is persisted
2. **request surfaces**: the user sees what the agent wants to do
3. **human decides**: approve, reject, or modify
4. **execution resumes**: the agent continues with the decision

this requires durable execution. the agent can't sit in memory waiting; it might wait hours or days.

## one flag to enable

```python
agent = Agent(
    name="my-agent",
    tools=[send_email, update_database, ...],
    human_in_the_loop=True  # that's it
)
```

when enabled, tool calls pause for approval before executing. you can also configure approval per-tool.

## what you see

when approval is needed, you see:

- the specific tool being called
- the parameters being passed
- the context of why the agent chose this action
- options to approve, reject, or modify

## async by design

approvals can take minutes, hours, or days. the runtime handles:

- persisting state while waiting
- routing approval requests
- handling timeouts
- resuming execution on decision

## configure in your agent

Mark individual tools with `require_approval()` (or `requireApproval` in TypeScript), or enable human-in-the-loop for all tool calls in agent configuration. Paused runs surface in chat with **Approve** / **Reject** controls.

From a terminal, use `belt chat pending`, `belt chat approve`, and `belt chat reject` — see [CLI setup](/docs/extend/cli-setup#chat-cli) and [Approval settings](/docs/api/agent/approval#terminal-workflow).

→ [Approval settings](/docs/api/agent/approval) — SDK examples for client, app, flow, and connector tools

## learn more

- [deep dive: human-in-the-loop](/blog/agent-runtime/human-in-the-loop)
- [blog: human-in-the-loop for agents](https://inference.sh/blog/agent-runtime/human-in-the-loop)
- [blog: tool approval gates](https://inference.sh/blog/tools/approval-gates)

