Cost Attribution

Cost is a field on every task. Not a line on an invoice.

Every model call is tagged with WO · phase · role · model · action and rolled up in PostgreSQL at write time. Sub-penny precision per call. Fail-closed at the boundary when a contract's budget is exhausted.

Reproducible
Source of truth

Cost-attribution layer in AgentOS. Each call writes a row to the cost ledger with the full attribution tuple; aggregation is at write-time, not month-end batch.

Mechanism

Cost = tokens × rate, computed per call. Budget is a required field on every execution contract. When consumed budget reaches the contract limit, the task halts at the boundary, it does not silently borrow from the next task or phase.

Evidence
cost ledger · per-call attribution
COST IS A FIELD ON EVERY TASK · NOT A LINE ON AN INVOICE

  Per work order        ✓ rolled up at write time
  Per phase             ✓ planning · arch · dev · QA · governance
  Per role              ✓ architect · dev · witness · reviewer · gatekeeper
  Per model             ✓ frontier-share is a KPI, not a year-end finding
  Per action            ✓ sub-penny precision

  Budget:               required field on every contract
  When exhausted:       fail-closed at the boundary
  Reconciliation:       none, spend rolls up on write
Reproduction
reproduce · SQL against the cost ledger
Source artifact
cost ledger table in PostgreSQL (one row per model call)
Command
SELECT wo_id, phase, role, model_id, SUM(cost) FROM cost_ledger GROUP BY 1,2,3,4;
Expected output
aggregated spend broken down per WO · phase · role · model; sum across all rows for a WO equals the WO's reported cost
Verification
cross-check: budget on the execution contract vs budget consumed in the ledger should match within the rate-sheet precision; an over-budget task should show a fail-closed event in the audit log
Caveats
Cost figures are per-deployment and surface inside each customer's own AgentOS console, not on this site. What's public is the mechanism: per-task attribution at sub-penny precision, real-time roll-up to WO · phase · role · model, fail-closed at the contract boundary.

Run the commands yourself.

Every entry in the evidence library is backed by an artifact with reproducible commands. If you want to put your own work through AgentOS, get started below.