Module 3: Bounded Agents in Production
Human-in-the-Loop Approval Workflows
Designing confirmation checkpoints for destructive, irreversible, or financially significant agent actions.
The safest way to deploy high-leverage agents is by granting read-only autonomy, but requiring explicit user confirmation before executing write or delete operations.
Tiered Tool Permissions
Categorize every tool in your system into permission tiers:
| Tier | Autonomy Level | Examples | Confirmation UI |
|---|---|---|---|
| Tier 1 (Read-Only) | Fully Autonomous | search_docs, inspect_code, query_logs |
None (instant) |
| Tier 2 (Staged) | Autonomous Staging | create_draft_pr, format_report, prepare_invoice |
Inline preview |
| Tier 3 (Destructive) | Explicit Human Approval | merge_pr, send_email_blast, charge_card |
Modal confirmation |
State Pausing and Resumption
When an agent requests a Tier 3 action, serialize the entire execution state into a database (PostgreSQL/Redis) with status WAITING_FOR_USER:
if (tool.isDestructive) {
await db.sessions.update({
where: { id: sessionId },
data: {
status: "AWAITING_APPROVAL",
pendingAction: {
tool: tool.name,
args: tool.args
}
}
});
// Return interactive UI prompt to end-user
return renderApprovalCard(tool.name, tool.args);
}
Once the user clicks Approve in the dashboard, the backend dequeues the execution, fires the tool, appends the result, and resumes the agent loop seamlessly.
Continue to Module 4: Evaluation Pipelines & Benchmarks.
Was this page helpful?