Agent Cost Ledger Normalizer
Scenario
Use when model usage, tool usage, task ownership, and provider prices live in separate logs and a team needs one reproducible ledger.
Input and output
Input contains redacted usage rows with run id, agent id, input units, output units, tool units, and unit prices. Output has per-run costs, aggregate totals, and a stable ledger_hash.
Execution and recovery
Run the README command. Missing numeric fields, negative units, or missing prices return a visible error. This script does not infer provider prices or fetch billing data.
Privacy boundary and acceptance
Use identifiers and numeric summaries only; omit prompts, private payloads, keys, cookies, and customer content. The sample produces a non-empty hash and repeatable totals.