Cost Gating
Block actions whose expected cost exceeds a threshold without explicit user (or operator) acknowledgement.
Intent & Description
🎯 Intent
Block actions whose expected cost exceeds a threshold without explicit user (or operator) acknowledgement.
📋 Context
A team runs an agent whose individual steps cost real money — large-context model calls billed by the token, paid third-party APIs, retrieval against an expensive vector store. A single user request can fan out into hundreds of such calls, and the bill arrives at the end of the month rather than at the moment of the action. Users have no way to see the cost building up while the agent works.
💡 Solution
Estimate cost before invoking the expensive action. If the estimate exceeds the threshold, surface it to the user (or operator) and require explicit approval. Track running totals against per-session and per-period budgets.
Real-world Use Case
- Some agent actions are expensive enough that surprise costs would erode user trust.
- Cost can be estimated before invoking the action with reasonable accuracy.
- A user or operator approval path exists for expensive actions.
Source
Advantages
- Predictable bill.
- Forces the system to know its own cost shape.
Disadvantages
- Estimation errors; actual cost can exceed estimate.
- Friction at the wrong moment can sour UX.