How it works
Two stages, both on your Mac.
Every request your agent makes passes through the same short pipeline before it leaves your machine: one stage that protects the provider’s cache, and one that picks the right compressor for whatever it is looking at.
Your prompt
Tool output, logs, files, history.
On your Mac
CacheAligner → ContentRouter
Anthropic · OpenAI
Under your own credentials.
Stage 1
CacheAligner keeps the provider’s cache working.
Providers discount tokens they have already seen, and Anthropic reads a cached prefix at about a tenth of the normal price. That discount only applies while the start of your request stays byte-identical from turn to turn, and anything that shifts it silently throws the discount away.
CacheAligner exists to keep that prefix stable. It is also the reason the second stage is deliberately restrained about what it is allowed to touch.
Stage 2
ContentRouter sends each kind of content somewhere different.
A JSON array and a stack trace and a source file are not the same problem, and one general-purpose compressor handles all three badly. The router detects what it is looking at and hands it to the compressor built for it.
| Content | Compressor | What it does |
|---|---|---|
| JSON arrays | SmartCrusher | Statistical analysis: keeps errors, anomalies and boundaries. No hardcoded rules. |
| Source code | CodeCompressor | AST-aware, via tree-sitter. Preserves function signatures, collapses bodies. |
| Plain text | Kompress | ModernBERT token classification. Removes redundant tokens while preserving meaning. |
| Build and test logs | LogCompressor | Keeps failures, errors and warnings. Drops the passing noise. |
| Search results | SearchCompressor | Ranks by relevance to your query and keeps the top matches. |
| Git diffs | DiffCompressor | Preserves the change hunks, drops unchanged context. |
| HTML | HTMLExtractor | Strips markup and extracts the readable content. |
What it will not touch
Only the newest content is ever compressed.
Compression is confined to the live zone, the latest user message and the tool results that came back with it. Your system prompt, your tool definitions and every earlier turn are left exactly as they are.
That is the cache hot zone, and rewriting it would cost you more in lost cache discount than the compression could ever save. It also means no message is ever dropped from history. Your agent sees the whole conversation; it just reads a shorter version of the newest part.
What all of this actually saves →
Try it on today’s session.
Enjoy fewer tokens from your first request.
7 days free, no card.