Warning
Alpha. Astrocyte is in early development and is not yet released for general use. Breaking changes will happen between versions, including changes to its settings, stored data and interfaces. Pin an exact version if you depend on it.
astrocyte meters the AI usage on one machine. It reads the session stores of
local coding harnesses and broca's run index store directly, accepts usage pushed by peer
modules, and records each request as an immutable usage event. It prices
events in signed nanodollars against the fusiform price catalog, applies
declared subscriptions, and serves spend reports, statement reconciliation and
a subscription multiplier. It runs as a supervised module of the subconscious
daemon (subc) and never sits on a request's hot path. budget.verdict always
returns allow: cap enforcement is not built.
| Crate | Role |
|---|---|
astrocyte-core |
Event identity, ingest, pricing, subscriptions, statements, reconciliation, reports and the SQLite schema. No subc dependency. |
astrocyte-module |
The ck-astrocyte binary: served operations, configuration, the refresher loop, peer clients and producer mappings; the spend_drive and corpus_drive tools. |
astrocyte-readers |
Parsers for coding-harness session stores and provider-name normalization. |
See the architecture overview and the code map.
Once astrocyte is published in the CortexKit release index, use the CortexKit CLI:
ck setup astrocyte # installs and registers the module with subc
ck module status astrocyte --json # checks the running module
ck upgrade # upgrades managed CortexKit componentsNo settings file or OS permissions are required. Change usage sources in
Spending Tracker in CortexKit Settings. Fusiform
is the only peer needed for pricing. Insula, the vault, Colliculus and the
attribution publishers are optional. To import subscription plan tiers, give
astrocyte's vault identity (reserved:astrocyte) a list grant on the
llm-provider category. It does not need permission to read secrets.
For a source build, use a current stable Rust toolchain:
cargo build --locked --release -p astrocyte-module --bin ck-astrocyteFor a development install, set modules.astrocyte.program in subc's config
to the absolute path to target/release/ck-astrocyte (ck-astrocyte.exe on
Windows). Subc supplies the connection file and starts the module.
Use a current stable Rust toolchain. Every dependency resolves from crates.io
through the committed Cargo.lock, so building and testing need only the
toolchain; no sibling checkout is needed:
cargo build --locked -p astrocyte-module
cargo test --workspace --lockedThe build produces target/debug/ck-astrocyte, target/debug/spend_drive and
target/debug/corpus_drive. ck-astrocyte is supervised by subc, not a
standalone daemon; ck-astrocyte --version and ck-astrocyte --check-config <path> run without it. The module surface lists the
operations it serves.
The full gate that CI runs is in CONTRIBUTING.md. The
Windows clippy pass needs the x86_64-pc-windows-gnu target
(rustup target add x86_64-pc-windows-gnu).
A v* tag push stages a draft release. To rehearse without creating a tag or
writing to GitHub Releases, run gh workflow run release.yml --repo cortexkit/astrocyte --ref master.
The run skips the push CI gate, warns if the manifest has no valid minimum
supported core version (requires_core), and builds all five targets. It signs
and notarizes the macOS binary when the credentials are available. Download the
ZIPs and SHA-256 sidecars from the workflow run's artifacts, including
ck-astrocyte-linux-arm64 and ck-astrocyte-windows-arm64.
- Data model: ledger tables, event identity, the priced-charge chain and money.
- Harness readers: where each harness store is found and what one event is.
- Module surface: the served operations and the peer calls.
- Money ingest: caller corrections and statement attribution.
- Configuration: daemon-managed Spending Tracker settings.
- Operations: subscriptions, repricing, basis corrections and multiplier recomputes.
- CONTRIBUTING.md: contribution workflow and verification.
- SECURITY.md: private reporting and the local threat model.
- THIRD-PARTY-NOTICES.md: adapted code.
astrocyte is licensed under the MIT License. Code adapted from other projects keeps its own license; see THIRD-PARTY-NOTICES.md.