Approval-gated agent: nothing risky without a human

Trust is designed. This agent checks what goes in, what comes out, and stops for approval before anything that cannot be undone.

The brief

A finance team wants an agent to process small refund requests. They will only allow it if a person approves every refund and every decision is logged.

What you will build

  • Guardrails on the incoming request and the outgoing reply
  • A refund tool that pauses for human approval
  • Approve, reject or edit before the action runs
  • An audit log of every decision

Requirements

RequirementDone when
InputRequests that are abusive or off-topic are stopped early
ApprovalNo refund runs without an explicit approval
EditA reviewer can change the amount before approving
AuditEvery request, decision and approver is logged
Kill switchOne setting stops all actions immediately

What to learn it from

Milestones

  1. List every action the agent can take and mark the irreversible ones
  2. Add input and output guardrails
  3. Add approval to the refund tool
  4. Support approve, reject and edit
  5. Write the audit log
  6. Add the kill switch and test it
How it is judged
Show the log for one refund that was rejected and one that was edited, and prove the kill switch stops a run in progress.

Stretch goals

  • Different approvers for different amounts
  • A daily summary of approvals
  • Replay a past decision from the log

Before you call it done

Worth remembering
  • Irreversible means approved
  • Every decision is in the log
  • The kill switch was tested, not assumed
Back toAll frameworks

Every expert started right here.