Usage & Cost

Token usage, estimated cost, and the cost investigation workflow.

BudgetAI tracks token usage and estimated cost for every turn and session, and rolls them into cost-per-success metrics and receipts.

Quick reports

budgetai cost                  # recent spend summary
budgetai cost --session <id>   # one session in detail
budgetai cost --by provider    # group by provider
budgetai cost --by channel     # group by channel

Investigating a spike

  1. Run budgetai cost --by session to find the expensive sessions.
  2. Open a receipt with budgetai cost receipt <id> to see where spend went.
  3. Look for escalations — a turn that climbed to a higher tier and why.
  4. Tighten the contract or channel budget if needed.

Cost figures are estimates based on model pricing. Receipts show the tier, escalations, and tool calls that produced each number.