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 project — gumroad.com/YOUR-LINK. 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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file muscore_compress-0.1.0.tar.gz.
File metadata
- Download URL: muscore_compress-0.1.0.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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
07ec5df2144ed93ab4f94ac494b9abe38aa39188980ffe8a6fa1180d16a7e48e
|
|
| MD5 |
538bc88d22e56e4ce314d2f165019146
|
|
| BLAKE2b-256 |
c152bd921ec98e6be48e6c09cf71a04fd82dad6398c6f3d3cbf2f07209396fe0
|
File details
Details for the file muscore_compress-0.1.0-py3-none-any.whl.
File metadata
- Download URL: muscore_compress-0.1.0-py3-none-any.whl
- Upload date:
- Size: 7.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d9bb2edf9de2c61f600bbe45a5120816aadfdee6de8b34322a44720c209df4e7
|
|
| MD5 |
16167f5b6cf016399c157ceda344d290
|
|
| BLAKE2b-256 |
31489e5cc22a69330bdc2b06b1b89feaa8086eea33dfe930206b800ce1c54dee
|