Unified LLM-spend ingestion engine + FinOps — one ledger across OpenClaw, Zoder, Hermes, Goose.
Project description
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ncz_tokenomics-0.1.0.tar.gz.
File metadata
- Download URL: ncz_tokenomics-0.1.0.tar.gz
- Upload date:
- Size: 25.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ad6cc43163bea87d9cad4d9afa176413eb520421796c93487b9a86e6106bdfed
|
|
| MD5 |
3969e39f9003496abf702d51618e038d
|
|
| BLAKE2b-256 |
ab53fdc39b3e46f2a95183aaca45577c363ae42f52ad25b2fb49dc7ffdc6baa3
|
Provenance
The following attestation bundles were made for ncz_tokenomics-0.1.0.tar.gz:
Publisher:
publish.yml on ncz-os/tokenomics
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ncz_tokenomics-0.1.0.tar.gz -
Subject digest:
ad6cc43163bea87d9cad4d9afa176413eb520421796c93487b9a86e6106bdfed - Sigstore transparency entry: 2002492944
- Sigstore integration time:
-
Permalink:
ncz-os/tokenomics@5dc14fc2764a54d36ed99bbece4d3fc577a836b7 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/ncz-os
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@5dc14fc2764a54d36ed99bbece4d3fc577a836b7 -
Trigger Event:
release
-
Statement type:
File details
Details for the file ncz_tokenomics-0.1.0-py3-none-any.whl.
File metadata
- Download URL: ncz_tokenomics-0.1.0-py3-none-any.whl
- Upload date:
- Size: 29.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a5a12d2db5bdad989be1c262266057915b79274be7dbdb7d5905f26f8bf9a421
|
|
| MD5 |
07a7ae7d3dcb0178d72551b330e72345
|
|
| BLAKE2b-256 |
909bb4889504a44eaaba8a0d113798f83ad1c10de4158d7fdf32dd997bbfd765
|
Provenance
The following attestation bundles were made for ncz_tokenomics-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on ncz-os/tokenomics
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ncz_tokenomics-0.1.0-py3-none-any.whl -
Subject digest:
a5a12d2db5bdad989be1c262266057915b79274be7dbdb7d5905f26f8bf9a421 - Sigstore transparency entry: 2002493002
- Sigstore integration time:
-
Permalink:
ncz-os/tokenomics@5dc14fc2764a54d36ed99bbece4d3fc577a836b7 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/ncz-os
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@5dc14fc2764a54d36ed99bbece4d3fc577a836b7 -
Trigger Event:
release
-
Statement type: