headroomlabs-ai/headroom Hits 62.5K Stars Compressing Tool Output Before It Reaches the Model — and Keeps It Reversible
Headroom sits between an agent and its LLM and compresses tool outputs, logs, files and RAG chunks in flight, claiming 20% fewer tokens for coding agents and 60–95% fewer for JSON at unchanged answer quality. It runs six content-type-specific compressors — SmartCrusher for JSON, an AST-based CodeCompressor covering Python, JS, Go, Rust, Java and C++, and a HuggingFace model for prose — all feeding a Compress-Cache-Retrieve store, which is the design point that matters: compression is reversible, so the model can request the original span whenever the summary isn't enough. It ships four deployment shapes (Python/TS library, a zero-code-change proxy on port 8787, an agent wrap command, and an MCP server) under Apache 2.0.
Source
↳ Follow the thread