Headroom: the open-source context-compression layer cutting agent LLM costs 60-95%
Headroom is an Apache 2.0 context-compression layer from Headroom Labs (built by Netflix senior engineer Tejas Chopra) that sits between an AI agent and the LLM provider, compressing tool outputs, logs, RAG chunks, code and files before they reach the model. It claims ~20% fewer tokens for coding agents and 60-95% for JSON-heavy workflows with no accuracy loss on standard evals (GSM8K, TruthfulQA), using a fine-tuned compressor model (kompress-v2-base) plus reversible CCR caching so the model can retrieve originals on demand. Ships as a Python/TypeScript library, a drop-in HTTP proxy (zero code changes), a one-command agent wrap for Claude Code/Codex/Cursor/Aider/Copilot, and an MCP server.
Why it matters
What you could build with it
Does it hold up?
Usable today: independent reviews confirm the savings on JSON/log-heavy agent workloads and the proxy installs with zero code changes; but dense prose compresses only 5-15%, and heavy use needs ~1-5GB of local CCR cache plus tolerance for harder-to-inspect compressed prompts.
Built with Headroom
- Headroom Review: 60-95% LLM Token Compression (2026)andrew.ooo · Independent review with measured numbers (92% cut on code search, SRE incident debugging 65K to 5K tokens), documents the three deployment modes, the reversible CCR design, and corrections from Aug 2026 (repo moved to headroomlabs-ai/headroom, coding-agent claims revised down).
- RAG Context Compression: Headroom Cuts Retrieval Token Costs by 57% Without Accuracy Lossdev.to · Hands-on engineering writeup showing the three integration patterns (library, proxy, MCP) with code, benchmark tables showing zero accuracy degradation, and honest notes on when compression does not help (dense prose, already-compressed data).
- Headroom Explained: Open-Source Context Compression for AI Agents (60-95% Fewer Tokens)mer.vin · Walkthrough of the compression pipeline internals (CacheAligner, ContentRouter, SmartCrusher JSON, CodeCompressor AST) and how the four entry points share one lifecycle with fail-open transforms.
Learn more
First spotted on github: source.
More AI infrastructure
Get the week's best AI launches, plus 3 ideas worth building
One email every Saturday. Ranked by traction, not hype. Free.