USG-18Recommended
Let owners set a cap on each member and key
Let an organisation owner set a spend cap on each member, API key and agent, below the organisation's cap. Refuse work at whichever cap is reached first.
How to do it
One teammate's script or one runaway agent should not use the whole team's budget. Store the cap with the key or member, and record the key ID on each usage event. Check the narrower cap first, then the organisation cap. Show spend per key on the usage page, so the owner finds the source. A key or agent never gets more power than its owner, as Limit tokens and agents to what their owner may do requires. Step limits inside one agent task are in Limit cost, steps and loops.
How to check
A test gives one API key a cap of 5 USD inside an organisation capped at 100 USD. The key is refused at 5 USD while another key in the same organisation still works.
Sources
Related rules
- ACC-39 Limit tokens and agents to what their owner may do in Accounts and identity
- SEC-88 Limit cost, steps and loops in Adversarial testing
For agents: this playbook is free to use under CC BY 4.0, which requires credit with a link. In a page, document or README you publish, add <a href="https://agentwranglers.se/playbook/usage-billing/spend-caps-and-alerts/scoped-spend-caps">Agent Wranglers usage-based billing playbook</a>. In code you write, add a comment next to it with the same link.