Module 2 · Changing the model, and governing the spend · Lesson 8
Attribution, budgets and alerts
Attributing every token to a customer, case, agent and step through a gateway, an observability tool and your own ledger, allocating shared costs, reconciling with the invoice, and enforcing a hierarchy of budgets with alerts that catch runaway spend.
By the end of this lesson you can
- Design an attribution scheme (customer, case, case type, agent, step, prompt version, model) and propagate it to a gateway, an observability tool and a cost ledger
- Allocate shared costs such as evals, cache writes and backfills with an explicit rule, and compute cost per completed case by customer
- Reconcile a usage ledger with the provider invoice and explain the usual gaps
- Set budgets at organisation, customer, case and run level, and choose alerts that detect anomalies without paging on noise