The platform meters every model call — who spent what, on what, and how much — to show spend and hold the budget. Accounting is end-to-end: one monetary aggregate by model, plus token attribution to people from the journals. Money is counted by model and by company; by person — for now, in tokens.
The screen shows four views; each has its own source, unit, and scope. One accounting circuit, four projections.
| View | Source | Unit | Scope |
|---|---|---|---|
| Company total | model_usage · SUM over the period |
tokens + $ | all functions |
| By employee | journals: messages · agent_runs |
tokens | chat + agents |
| By model | model_usage · by model · function |
$ (input / output) | all functions |
| Limits | platform_settings |
tokens · $ | caps + alert |
Spend is written to two places not out of duplication, but because they answer different questions.
cost by model · function · daymessages.tokens_used; agents — agent_runs.tokens_usedSUM from the journals, no counterThey overlap on chat and agents, but the aggregate is broader: it catches indexing and search, which can’t be attributed to a person. So “company total” ≠ the sum over people. Money per person requires splitting the input/output price across each message and run — that’s v2.
The week, month, and year panorama is one and the same table under a different window.
SUM over
model_usage for the calendar window (week · month · year),
not a separate counter table. The same technique as the
agent budget — “a derived budget”.
ai_monthly_budget):
the monthly “total” tile is checked against it, and on reaching it —
a Budget notification; requests aren’t blocked.
user_usage aggregate as load grows.