Skip to main content
Many agent scenarios require human oversight before executing high-risk operations. This guide shows how to implement human-in-the-loop patterns with Noēsis.

When to use human approval

Add human approval when:
  • Actions are irreversible (deletes, deployments, financial transactions)
  • Risk scores exceed thresholds
  • Policies flag operations as requiring review
  • Regulations demand audit trails with human sign-off

Basic approval pattern

The recommended pattern is pause -> checkpoint -> approve -> resume (same run):
Prefer resume_run(...) over rerunning from scratch after approval. It preserves a continuous, append-only run history.
For protocol-first side-effect tools, prefer the prepared invocation bridge instead of inventing a second approval store. It persists the reviewed draft under tool_invocations/prepared/, pauses the episode, and lets ns.resume_run(...) execute the same run_id + draft_id after approval. See Integrate adapters.

Policy-driven approval

Create a policy that flags operations for approval:

Slack integration

Send approval requests to Slack:

Async approval workflow

For production systems, use an async workflow:

Recording approval in events

The approval decision should be captured in the event timeline:

UI for approvals

Build a simple approval UI with Gradio:

Best practices

Set reasonable timeouts. Pending approvals shouldn’t block indefinitely—expire them after a reasonable period.
Authenticate approvers. In production, verify the identity of approvers through SSO or similar.
Create audit trails. Record all approval decisions with timestamps, approvers, and reasons in the event timeline.

Next steps

Trace-Based Evals

Full example harness with veto visibility and scoring.

Governance guide

Configure governance for approval requirements.