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.1.tar.gz (7.7 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.1-py3-none-any.whl (7.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: muscore_compress-0.1.1.tar.gz
  • Upload date:
  • Size: 7.7 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.1.tar.gz
Algorithm Hash digest
SHA256 0284846b995ca86adee2ac604a3b6fdf52b65052e2e7d1167a79ca9a1206aacf
MD5 844e6043898d8525e055087c616d4fbc
BLAKE2b-256 751d1e952aa0f6666fcbdb41a63969298cdc2744e33fcc2a0175c76ce445d672

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for muscore_compress-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 736ef4678eb5fe654b544a0fe2c545d8dd06f52f5edfa06164123cc579c6632b
MD5 7a5125232bdc259fa60c9d7bca327b7e
BLAKE2b-256 cc261e60b2012ccf648d9264fa26d581712a11b604ca3761c9cb3256ebbfb8a1

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