What has been built
- A small, synthetic DuckDB demonstration.
- Versioned metric definitions and original-result replay.
- Source reconciliation and receipt-backed reporting evidence.
- A retained comparison with an independent BigQuery baseline.
tokenledger / By Chandler Klose
A reference implementation for AI businesses that meter tokens and seats. Report a business metric, explain a change, and reproduce the original result.
Built from the SOX-controlled subscriber-metrics work I ran at SiriusXM for 19 years.
The demonstration, explained
The local demonstration uses synthetic data on DuckDB. This page describes that workflow; it is not a live connection to the database.
Calculate recognized revenue per million tokens. Retain the inputs and definition needed to reproduce the result.
Revenue changes while the token denominator stays fixed. A bridge explains the movement between the two results.
Recover the earlier answer using its original evidence and definition, even though the system now knows more.
The model
A fourteen-column activity envelope carries event identity, timing, and JSON feature data. Typed query-time projections give those features meaning. New reporting questions can reuse the same stream while retaining explicit definitions and evidence.
Scope
The retained BigQuery comparison measured 51.47% fewer billed bytes; 14.96 times median slot time. Native execution was slower in the first measured pair. These results do not establish a general speed or cost advantage. Comparative agent accuracy and token efficiency remain unmeasured.
Reproducibility alone does not prove source completeness, approval of an accounting policy, or SOX operating effectiveness.
For people and their agents
The public reference offers three paths: run the small example, understand how the result is derived, and assess it through an open-book reproduction exercise.
v0.2.0-rc.6 is published. Run the small demo, understand the model, or try the agent challenge.
The release includes the terminal recording, executable tasks, and retained measurement evidence.
The interesting work begins with your source contracts, customer identities, reporting policy, and the people who own the number.