Human Approval
~3 min read
Concept & How It Works
- Key points are in the visual diagram above.
Why Does It Exist?
Autonomous agents at scale need an emergency brake. Human approval is the last line of defense when policies and guardrails aren't enough.
Real-World Analogy
Human approval is two-factor authentication for agent actions — something the agent wants to do plus something a human confirms.
Visual Workflows
What is Human Approval?
Example
Scenario
Agent prepares $2,000 refund → approval card in Slack with customer context → manager clicks Approve → `issue_refund` executes.
Solution
In Agent Security & Governance, apply Human Approval to this scenario: Agent prepares $2,000 refund → approval card in Slack with customer context → manager clicks Approve → `issue_refund` executes. Identify the inputs, run the technique, validate the output, and note one thing you would monitor in production.
Practice Task
Do this before moving to the next module — reading alone is not enough.
Open the Code Walkthrough below and run it locally. Change one parameter related to Human Approval (e.g. model, temperature, top_k, or tool name), observe the difference in output, and write 2–3 sentences explaining what changed.
Code Walkthrough
Highlighted lines show where Human Approval happens in the code.
1async def execute_with_approval(action): # key line for Human Approval2 if action.risk_score > 0.7:3 approval = await request_human_approval(action, channel="#finance-approvals") # key line for Human Approval4 if not approval.granted: # key line for Human Approval5 return "Action denied by approver." # return the result6 return await action.execute() # return the resultCommands to Remember
Commands to Remember
pip install guardrails-ai # input/output validationpip install presidio-analyzer # PII detection
Common Mistakes
- Treating Human Approval as a black box without evaluation
- Ignoring cost and latency in production
- Skipping error handling for human approval
Cheat Sheet
Quick recap — the most important points from this module.
Cheat Sheet
quick ref- •Human Approval
- •PendingAction
- •Risk Score
- •Approval Queue
