Add Human Approval to an Agent
Your agent can send emails or spend money. Here is how to make it stop and ask before doing anything you cannot undo.
- 1
Identify the irreversible steps
List the actions your agent can take that you cannot easily undo: sending a message, charging a card, deleting records, publishing content. Those are the only steps that need a human gate. Routine read-only steps like searching or summarizing should run freely, or the approvals become noise people stop reading.
- 2
Use a framework with pause and resume
Approval needs the run to stop, persist its state, and resume after the human answers. LangGraph does this cleanly with an interrupt at an approval node backed by its checkpointer. CrewAI, AutoGen, Google ADK, Semantic Kernel, and Mastra support human-in-the-loop too. Lighter libraries make you build the pause yourself.
- 3
Show the human enough to decide
When the agent pauses, surface the exact action and its inputs: the full email, the amount and recipient, the records to be deleted. A vague 'approve this step?' leads to rubber-stamping. Give the person the option to edit the action, not just approve or reject, so the agent stays useful instead of getting stuck.