Concept guide · Agents, tools, and MCP
How do you add human approval to an agent?
A slower explanation for when the short interview answer is not enough. Start with the intuition, then connect it to the technical idea and the way an interviewer expects you to reason about it.
ML area
Generative AI → Human approval
Interview format
Core · Scenario
Question
GENAI-079
Start with the idea
In simple terms
Pause before an agent performs an irreversible, expensive, external, or sensitive action. Show the person what will happen, why, with which arguments, and which evidence supports it.
Make it concrete
Before sending a refund or publishing a report, display the proposed action, amount, recipient, supporting records, and any uncertainty so a reviewer can approve or edit it.
Build the answer
How to approach it
- 1Classify actions by risk and place approval before the side effect.
- 2Persist the proposed action, evidence, and reviewer decision.
- 3Make resume idempotent and auditable.
Go one level deeper
The technical explanation
Human-in-the-loop is a workflow state, not just a confirmation button. Persist the run and proposed action, make resume safe, record who approved what, and prevent the agent from bypassing the pause through another tool. Approval should be scoped to the exact action and arguments, with expiration or revalidation when the underlying data can change.
Say this in the interview
Pause before irreversible, external, financial, or sensitive actions. Show the proposed action, arguments, evidence, and expected consequence; let a person approve, reject, or edit it; persist state; and resume safely. The approval step should be auditable and idempotent.
Keep preparing