Skip to main content
Your support agent can now reach a payments API, a file-server, and Google Search — and it didn’t require any special wrapper code. That capability is powerful, but it also requires safeguards. Reading data is usually harmless; executing irreversible actions (refunds, cancellations, database deletes) has real-world consequences. Those actions should never run solely because a model decided to do so. There are two complementary ways to introduce human approval into a flow:
  • Workflow-level gates: pause the entire workflow at a decision point and wait for human approval (for example, a refund workflow that stops until a manager authorizes payment).
  • Tool-level confirmation: pause only a single tool call right before it executes, and require explicit approval.
Tool-level confirmation is useful when risk is localized to a specific tool call rather than to an entire workflow. It lets models and agents proceed normally except for the single high-risk operation that must be approved.

How tool-level confirmation works

Wrap a function in a FunctionTool and set require_confirmation=True. When the model attempts the tool call, the ADK suspends execution and prompts for confirmation; the underlying function does not run until a human approves.
If the model decides to cancel order A1001 the attempted call looks like:
With confirmation enabled, execution pauses and the approver sees a prompt such as “Do you want to cancel order A1001?” If approved, the tool runs; if denied, it does not.
A diagram titled "Workflow Gate vs Tool Confirmation" showing process icons and arrows such as Billing → Approval → Refund. A manager avatar is shown above the approval gate, and a second row depicts a Model/Support-agent flow leading to a cancel_order action.

Structured confirmations (more than Yes/No)

Tool confirmation can be structured: instead of a simple approve/deny, the approver can modify or fill in a structured payload — for example, approving a refund but entering a reduced amount.
An illustrated slide titled "Structured Confirmation" showing a manager's avatar on the left and a "Refund approval" dialog on the right. The dialog displays a refund amount of $45 and buttons to Approve or Deny.

ToolContext API: request confirmation and read the result

Each tool receives a compact ToolContext object describing the session and current user. The context exposes a method to request confirmation and a property that returns the confirmation payload once provided. The request can include a hint and a payload (for instance, { "amount": 45, "customer": "Jane Doe" }). The approver may change the payload values before approving.
Because confirmation can be provided via the ADK UI or an external application, the approver does not have to be using the same interface where the agent started.
A flow diagram titled "Approval From Another App." It shows an ADK UI refund approval dialog, a support agent, and an external mobile app screen with a $30 refund request and Approve/Deny buttons.

Limiting tool exposure: a second line of defense

Confirmation protects high-risk operations, but preventing unnecessary access reduces risk even further. Do not expose every tool to every agent. Giving a support agent access to deployment or administration tools increases the attack surface and makes it harder to apply policy. Example: restrict a support agent to only the tools required for support (customer lookup, order status, refunds) and add identifying headers to requests.
A dark-themed diagram titled "Too Many Tools" showing a central "Support agent" box connected by arrows to a "Database" above and four surrounding tools labeled Refund, Administration, Customer lookup, and Deployment. The arrows indicate data flow between the support agent and each tool.
You can make the filter dynamic: choose which tools to expose based on the task or the current context. Combined with tool-level confirmation for high-risk calls, this yields a practical security model:
  • A support task receives only support-related tools.
  • A data analysis task receives only data-processing tools.
  • High-risk operations are wrapped with confirmation so a human must approve them.
That way, you never trust the model with a destructive call by default — a human stands in front of it. If something goes wrong, the scope of damage stays limited.

Best practices

  • Apply the principle of least privilege: limit tools per role or per task.
  • Wrap destructive operations (payments, deletions, cancellations) with confirmation.
  • Use structured confirmations when the approver must change values (e.g., reduce a refund).
  • Add team and authorization headers to requests so downstream systems can enforce policy and auditing.
  • Prefer task-based dynamic filters to a single static tool list.
Protect destructive operations with confirmation and restrict tool exposure to the minimum set required for each role or task.

Example tool set for a support agent

Give an agent exactly the tools they need — and no more:
Further reading and references

Watch Video