tokenomics
Unified LLM-spend ingestion engine + FinOps — one canonical ledger across OpenClaw, Zoder, Hermes, and Goose.
tokenomics is a host-neutral core (ledger → pricing → report → FinOps) plus thin
per-host ingestion adapters. Each host's native usage is mapped into one canonical
ledger row, so spend from different agent runtimes lands in a single report.
Distributed on PyPI as
ncz-tokenomics; the import package, thetokenomicscommand, and the Hermes plugin are all namedtokenomics.
Canonical ledger row
{ ts_utc, provider, model, tokens_in, tokens_out, cost_usd,
caller?, task?, tier?, cache_hit_ratio? } # last four = optional FinOps tags
Cost precedence is host-neutral: host-reported cost → pricing-catalog estimate → $0 (never invented).
Hosts
| host | surface | cost |
|---|---|---|
| Goose (block) | SQLite session store (~/.local/share/goose/sessions/sessions.db) |
host-authoritative (accumulated_cost) |
| Hermes (NousResearch) | SQLite session store (~/.hermes/state.db) |
host-authoritative (actual_cost_usd) → estimate → catalog |
| OpenClaw | model.usage event bus (shipped plugin) |
host cost |
| Zoder / zeroclaw | in-process cost-tracker + offline pricing | host cost else catalog |
Goose and Hermes are pulled read-only from their existing stores — no host modification.
Install
pip install ncz-tokenomics
CLI
tokenomics ingest --host goose --ledger ledger.jsonl
tokenomics ingest --host hermes --ledger ledger.jsonl --pricing pricing.json
tokenomics report --ledger ledger.jsonl --days 30
tokenomics finops --ledger ledger.jsonl --days 30
Hermes plugin
Installing the package exposes a Hermes plugin via the hermes_agent.plugins
entry point. Enable it in ~/.hermes/config.yaml:
plugins:
enabled:
- tokenomics
Then, from Hermes's own session store:
hermes tokenomics # sync ~/.hermes/state.db -> ledger, print spend report
hermes tokenomics --finops # FinOps view (allocation / realized-rate / advisor / forecast)
hermes tokenomics --ingest-only
Read-only over Hermes's own state.db; no Hermes core changes.
License
Apache-2.0 © Jason Perlow
Metadata
Release files for ncz-tokenomics 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| ncz_tokenomics-0.1.0.tar.gz | 25.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| ncz_tokenomics-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 54.4 kB
Release files / ncz_tokenomics-0.1.0.tar.gz
| Download URL | ncz_tokenomics-0.1.0.tar.gz |
|---|---|
| Size | 25.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ad6cc43163bea87d9cad4d9afa176413eb520421796c93487b9a86e6106bdfed
|
|
BLAKE2b-256 checksum How to use checksums |
ab53fdc39b3e46f2a95183aaca45577c363ae42f52ad25b2fb49dc7ffdc6baa3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 29, 2026.
Transparency logRelease files / ncz_tokenomics-0.1.0-py3-none-any.whl
| Download URL | ncz_tokenomics-0.1.0-py3-none-any.whl |
|---|---|
| Size | 29.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a5a12d2db5bdad989be1c262266057915b79274be7dbdb7d5905f26f8bf9a421
|
|
BLAKE2b-256 checksum How to use checksums |
909bb4889504a44eaaba8a0d113798f83ad1c10de4158d7fdf32dd997bbfd765
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 29, 2026.
Transparency log