The problem: agents need judgment on the risky steps
Most agent workflows are safe to automate end to end — until one step isn't. Issuing a refund, sending an external email, changing a production config, or approving spend often needs a human to look first. A good human-in-the-loop design covers:
- Approval gates before irreversible or high-impact actions.
- Manual review of an agent's proposed action, with the context that produced it.
- Workflow suspension at the gate, and clean continuation after a decision.
- Auditability — who approved what, when, and why.
- Approval timeouts so a run doesn't wait forever.
- Escalation to a backup approver when the first doesn't respond.
Concept
Why a paused run shouldn't hold a worker
The naive implementation blocks: the workflow calls something like await approval() and the worker sits there. That's fine for seconds and disastrous for days. It ties up a worker per pending approval, and if that worker restarts — a deploy, a crash, autoscaling — the paused run vanishes.
Suspension as durable state
The durable model treats the gate as a persisted checkpoint plus a pending decision. The run records "waiting for approval at step N," releases the worker, and does nothing until a decision (or a timeout) wakes it. No process is pinned while a human takes their time.
Continuation and audit
When the decision arrives, the run resumes from the gate checkpoint. The decision — approve or reject, by whom, when, with any note — becomes part of the run's immutable history, which is exactly what an audit later needs.
How Vectorbea helps
Approval gates, without the idle worker
- Pause mid-run for a decision with the full context that led to it, so the approver isn't guessing.
- Suspend and resume durably. A gated run holds durable state, not a live process, and continues automatically on approval.
- Complete audit trail. Every approval request and decision is recorded in the run's immutable event history.
- Survives restarts. A pending approval isn't lost to a deploy or worker restart — it resumes where it paused.
The point
FAQ
Human-in-the-loop AI — FAQ
- What is a human-in-the-loop AI workflow?
- A workflow where an agent pauses at a defined point for a person to review, approve, edit or reject before it proceeds — typically before a risky or irreversible action like sending a payment, emailing a customer, or writing to a system of record.
- Why shouldn't a workflow keep a worker alive while it waits for approval?
- Approvals can take minutes to days. Blocking a worker or process the whole time wastes resources and is fragile — a restart loses the paused run. The durable approach persists the run's position, releases the worker, and resumes when the decision arrives.
- How do approval timeouts and escalation work?
- Because a suspended run is durable state with a wake condition, it can also carry a deadline. If no decision arrives in time, the run can time out or escalate (notify a backup approver) instead of hanging forever — all recorded in the run's history.