Least privilege means giving the agent only the tools, permissions and budget it needs. Searching is safe to automate, and paying is not.
When should a person approve
It depends on the stakes and on whether the action can be undone:
| Stakes | Easy to undo | Hard to undo |
|---|---|---|
| Low | Let the agent act: search, compare | Act and keep a log: send a price alert |
| High | Act, but allow undo: hold an item in the cart | Ask a person: pay, share personal data |
Approval fatigue
If everything needs a click, people stop reading. Ask a person only for high-stakes actions that are hard to undo.
Rules
- give each agent a separate allow-list of tools
- show the real total, with delivery and GST, on the approval screen
- use a payment token with a limit and not the full card
- keep a log of every step
Code
A permission table that decides what to do with each tool:
POLICY = {
"search_products": "auto", # low stakes, easy to undo
"check_compat": "auto",
"add_to_cart": "auto_logged", # reversible, but keep a log
"checkout": "ask_person", # high stakes, hard to undo
}
def gate(tool_name, cart=None, ask_user=None):
"""Return True if the tool call may run."""
mode = POLICY.get(tool_name)
if mode is None:
return False # not on the allow-list
if mode == "ask_person":
return ask_user(cart) # show the real total and the seller
return TrueNotes:
- a tool that is missing from
POLICYis refused, which is the least-privilege default - the approval screen must show the real total, so a misleading summary from the LLM cannot hide it
All the safeguards together make the guarded loop, see Guarded Agent Loop.