UC-003
UC-003: Budget Exhaustion
Scenario
An AI agent repeatedly calls tools until the daily budget limit is reached. Subsequent calls are denied with a budget exhaustion receipt.
Preconditions
- HELM proxy running with
--daily-limit 5(5 cents = ~5 tool calls) - Tenant ID set via
--tenant-id test-tenant
Steps
- Agent sends 5 tool calls (each consuming 1 cent)
- All 5 are approved and receipts generated
- Agent sends 6th tool call
- Budget enforcer detects exhaustion → DENY
- Deny receipt emitted with
PROXY_BUDGET_EXHAUSTEDreason
Assertions
- First 5 receipts have
reason_code: "TOOL_ALLOWED" - 6th receipt has
reason_code: "PROXY_BUDGET_EXHAUSTED" - No further tool executions occur after budget exhaustion
- Budget state recoverable from receipt chain replay
Expected Output (6th call)
{
"receipt_id": "rcpt_...",
"tool_name": "calculator",
"status": "PROXY_BUDGET_EXHAUSTED",
"reason_code": "PROXY_BUDGET_EXHAUSTED",
"lamport": 6
}
Script
See: rogue_agent.sh for a full budget exhaustion demo.