Netflix engineer open-sources Headroom, cutting LLM token usage by up to 95%
VeryWellVersed · x · 2026-10-18
A Netflix engineer has open-sourced Headroom, a tool that sits between your agent and the LLM to compress context before it reaches the model — targeting AI's most expensive waste: tokens.
An agent may read a 10,000-token log file to find one error; the answer only needs 1,200 tokens, but you pay for all of them. Headroom compresses everything in advance:
- Specialized compressors: separate handling for JSON, code, logs, and RAG chunks
- Reversible: originals stay on your machine, nothing is lost
- Results: 60-95% fewer tokens for JSON, 20% for coding agents, same benchmark accuracy
- Zero code changes: ships as a library, proxy, or MCP server; setup takes a minute via pip
The repo has 75.7k stars and 5.9k forks, Apache-2.0 licensed, with support for LangChain, Claude Code, Cursor, and more.
Related event: Netflix Engineers Open-Source Headroom, Cutting Token Costs by Up to 95%(2 posts)→
More from coding & agent
- 'Cuck coding': the savage new nickname for just watching AI write your code — petesena · 2026-10-18
- Agent memory's blind spot: lessons learned in one task silently become rules for the next — blaizedsouza · 2026-10-18
- Huashu-motion open-sourced: coding-agent skill makes product launch videos in 30 min for $0.27 — AlchainHust · 2026-10-18
- XERJ open-sourced: index similar GitHub repos before coding, cuts AI tokens by ~62% vs grep — lxfater · 2026-10-18
- Multi-agent coding is 'the greatest slot machine casinos could never match' — theteknosaur · 2026-10-18
- AI makes it too easy to build every feature — a spec keeps shipping disciplined — audrow · 2026-10-18