headroom vs leviathan
Context compression layer for agents: squeezes tool outputs, logs, files and RAG chunks 20-95% before the LLM — reversible, local-first; library, proxy, one-command agent wrap, or MCP. — versus — Single Rust binary that turns JSONL, CSV, SQLite or any DB export into a ranked full-text index, giving agents short cited answer cards (~450 tokens) at any dataset size.
Both cut tokens spent on bulky data. Headroom compresses what is passed in; Leviathan retrieves only the few matching records.
| headroom | leviathan | |
|---|---|---|
| Stars | 79k | 879 |
| Forks | 6.2k | 53 |
| Language | Python | Rust |
| License | Apache-2.0 | Apache-2.0 |
| Last activity | yesterday | 4 days ago |
| Topics | coding, gateway | memory, data |
| Curated connections | 10 | 3 |
headroom — the curator's take
The dedicated answer to context bloat: content-aware compressors route JSON, logs and code differently (60-95% on JSON, 15-20% on real coding sessions), originals stay cached so the model can retrieve what compression dropped — the reversibility is what makes aggressive ratios safe. Adoption cost is near zero: `headroom wrap claude` and you're running, or use it as proxy/library/MCP. Prompt-cache-aware alignment avoids torching your cache hit rate. NOT free lunch: a lossy-in-context layer between agent and model is another thing to debug when the model 'misses' something — budget for retrieval round-trips — and the 20% coding figure is the honest number, not the 95% headline.
leviathan — the curator's take
Use it when an agent has to answer questions over large record dumps, like tickets, logs or CRM exports, and grep is flooding the context. The benchmark claims 245x fewer tokens than the best grep strategy. Skip it if you need semantic or vector recall: it is lexical full-text search. It is not a memory system that learns from conversations; you re-index when the data changes.