Skip to main content

Cut LLM context token costs: MusCoRe colour-frequency serialisation for structured state. Verified reduction vs JSON, on-chain sealed protocol (cert df9822d8).

Project description

muscore-compress

Cut your AI agent's context bill. Verified, sealed, reproducible.

Every agent framework passes structured state through model context as JSON — and pays for every token of it, every call, every loop. muscore-compress re-serialises that state into the MusCoRe™ symbol protocol: same meaning, a fraction of the tokens.

pip install muscore-compress
from muscore_compress import encode, decode, benchmark

state = {"step": 14, "goal": "civic-lookup", "history": [...]}
stream = encode(state)          # dense MusCoRe symbols
restored = decode(stream)       # lossless — always
benchmark(state)                # run the numbers on YOUR payload

The numbers

Metric Raw JSON Gzipped JSON MusCoRe
Bytes run benchmark run benchmark run benchmark
LLM tokens (tiktoken cl100k) run benchmark n/a (binary) run benchmark

Historical verified figures for the sealed protocol: ~92% byte reduction vs raw JSON, 45–61% vs gzipped JSON. Token benchmark: reproduce it yourself — python -m muscore_compress.benchmark prints the full table on a sample agent-state payload, or call benchmark(your_payload) on your own data.

A note on gzip: gzip wins raw byte counts on large payloads — but gzip output is binary and cannot ride inside a text context window. MusCoRe streams are text-native: they go straight into the prompt. The comparison that costs you money is tokens in context, and that is the number this package attacks.

Why the seal matters

The MusCoRe protocol was sealed on-chain November 2025 — Skale mainnet, block 35752169, cert df9822d8. The alphabet cannot drift. What your agents encode today decodes identically in ten years, and no dependency update can silently change the wire format underneath you. No other serialisation format offers a cryptographically frozen vocabulary.

Demonstrated in public: a blind AI-to-AI exchange (Claude → human courier → Grok) with self-verifying parity, on the open X timeline, July 2026.

Licence

Free for evaluation and benchmarking. Production use: $49 per projectgussstos.gumroad.com/l/jhntiw. Includes the full protocol spec and the sealed alphabet reference.

Support the wider build: patreon.com/c/NoitallionDispatch

Verify everything

Run the tests: pytest tests/ — the round-trip suite gates every release. Run the benchmark on your own payloads before paying a cent.

Check me, not trust me. Ahoeaaa.

Gussstron Foundation · Cape Town, South Africa

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

muscore_compress-0.1.2.tar.gz (8.2 kB view details)

Uploaded Source

Built Distribution

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

muscore_compress-0.1.2-py3-none-any.whl (7.9 kB view details)

Uploaded Python 3

File details

Details for the file muscore_compress-0.1.2.tar.gz.

File metadata

  • Download URL: muscore_compress-0.1.2.tar.gz
  • Upload date:
  • Size: 8.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.12

File hashes

Hashes for muscore_compress-0.1.2.tar.gz
Algorithm Hash digest
SHA256 7ef92022de841010125b60f24ae682a5e85e99b73ba39cea578e73f6ff09bf26
MD5 128af6da5d0f9e5e67b4c6813d335153
BLAKE2b-256 7593ceb3c2251aec53c43928273e58d630a72266f43eb73628724ed797ff935b

See more details on using hashes here.

File details

Details for the file muscore_compress-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for muscore_compress-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 a966d8edc57db5331187cf1e920c2578d89a25fa6ed5b10fa789c7b1710f1928
MD5 c8ed13fb383371e737d5590e839d908a
BLAKE2b-256 bbc6617b875f8b0ee89dd33ca37322a7ccf0ed0497cd80d590e1f1243839629e

See more details on using hashes here.

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