Skip to main content

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, the tokenomics command, and the Hermes plugin are all named tokenomics.

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ncz_tokenomics-0.1.0.tar.gz (25.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ncz_tokenomics-0.1.0-py3-none-any.whl (29.3 kB view details)

Uploaded Python 3

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

Hashes for ncz_tokenomics-0.1.0.tar.gz
Algorithm Hash digest
SHA256 ad6cc43163bea87d9cad4d9afa176413eb520421796c93487b9a86e6106bdfed
MD5 3969e39f9003496abf702d51618e038d
BLAKE2b-256 ab53fdc39b3e46f2a95183aaca45577c363ae42f52ad25b2fb49dc7ffdc6baa3

See more details on using hashes here.

Provenance

The following attestation bundles were made for ncz_tokenomics-0.1.0.tar.gz:

Publisher: publish.yml on ncz-os/tokenomics

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for ncz_tokenomics-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a5a12d2db5bdad989be1c262266057915b79274be7dbdb7d5905f26f8bf9a421
MD5 07a7ae7d3dcb0178d72551b330e72345
BLAKE2b-256 909bb4889504a44eaaba8a0d113798f83ad1c10de4158d7fdf32dd997bbfd765

See more details on using hashes here.

Provenance

The following attestation bundles were made for ncz_tokenomics-0.1.0-py3-none-any.whl:

Publisher: publish.yml on ncz-os/tokenomics

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page