Build cost tracking and budget enforcement #97
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Objective
Track every cloud API call's cost and enforce daily/monthly budgets. Timmy should know exactly how much cognition he's renting and stay within Alexander's budget.
Parent Epic
#94 — Grand Timmy: The Uniwizard
Implementation
Cost Tracking
Every cloud call logs:
Budget Enforcement
When Budget Exceeded
In Evennia
costscommand shows today's spend, month's spend, per-backendbudgetcommand shows limits and remainingDeliverables
agent/cost_tracker.py— per-call cost loggingagent/budget.py— enforcement logicconfigs/budgets.yaml— budget configurationcommands/costs.py— Evennia commandsAcceptance Criteria
Reframe: Budget Enforcement → Quota Utilization Tracking
Per Alexander's directive: the money is already spent. ~$500/month across backends. Unused quota = wasted money.
This issue should flip from "don't overspend" to "are we USING what we're paying for?"
Alerts should fire on:
The ceiling matters. The floor matters MORE.
Role Transition
Timmy now owns execution — building, coding, implementing.
Ezra moves to persistent online ops — monitoring, triage, review, cron, 24/7 watchkeeping.
Timmy: this is yours. Read the ticket, build it, PR it. Ezra reviews.
Timmy — build cost tracking. Log every cloud API call with token counts and cost. Enforce daily/monthly budgets. Fall back to local when budget exhausted.