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.

Best results on repetitive structured state (agent conversation histories, loop variables, session context). Compression scales with payload repetition.\n\n**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.3.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.3-py3-none-any.whl (8.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: muscore_compress-0.1.3.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.3.tar.gz
Algorithm Hash digest
SHA256 d551a95914fec1363cf1df3d34285f225dc57ee3263665f92919b1a13312fbf7
MD5 36c3e20eee01933b48379821d2b1a768
BLAKE2b-256 7e2870696bfa63a248110ed6c4fd0c63eb9bdea225287abec306c0460166a355

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for muscore_compress-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 42a9b40947f08ebee87b3a2def0393d53a42d289fda911d1c9fc32cb57fbee9d
MD5 90d540240abcfe6e14eb393ccd8dac6c
BLAKE2b-256 7478ee49e0f1b9af736c8a19298324863681b2c5db60bfd04dc113cae7da9536

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