Skip to content
echogeco
Tools and the agent loop · Trust boundaries

Which tools does the refund agent get?

Choose the tool surface for a refund agent that reads untrusted messages, with each tool tiered, bounded and sized against the review queue it creates.

designmediumExercise · 4 min · 20 of 77
On this page

A refund agent reads whatever the customer typed and then calls tools with money behind them. The tool list is the security design; the prompt is not.

The situation

An online retailer wants a chat agent to handle refunds. It receives 1,500 refund requests a day; today support staff spend about four minutes on each, 100 hours of work a day. The order service exposes 16 endpoints to internal callers: get_order, list_orders_for_customer, get_refund_policy, issue_refund(order_id, amount, destination, reason), cancel_order, update_shipping_address, update_customer_email, send_email(to, subject, body), reply_in_chat(text), add_order_note, get_shipment, create_return_label, apply_store_credit, delete_order, run_report(sql) and escalate(ticket_id). Orders average 80 units of currency; 13% of refund requests are under 10, 85% under 60 and 97% under 150. Last quarter 0.4% of refund requests were judged fraudulent after the fact. The agent's input is the customer's message, which anyone can write. Product wants the agent to resolve "most" requests without a person, and security wants the worst case of an injected message written down before launch.

The question

Lay out the agent's tool surface: which endpoints it gets, in which tier (read-only, gated write, human-approved), with what bound on each argument; then state the worst case of a successful injection and the size of the human queue your thresholds create.

A strong answer · Rubric · Where answers go wrong

Write your answer first, then open