
Headroom
Context compression for AI agents
About Headroom
Headroom is a context compression layer that sits between an AI coding agent and the model it calls. Agents burn tokens on material nobody reads: a ten thousand line log dump, a JSON tool response with forty redundant fields, the full text of a file when three functions mattered. Headroom compresses that content before it reaches the LLM and caches the originals locally, so the agent can pull the untouched version back on demand when it turns out to need it. The project publishes a worked example on its own repository: a 10,144 token log reduced to 1,260 tokens with the FATAL line preserved byte for byte.
You adopt Headroom at whichever layer suits the codebase. As a library, you call compress(messages) in Python or TypeScript and hand the result to your existing model client. As a proxy, you run headroom proxy --port 8787 and point your SDK base URL at it, which needs no code change and works from any language. As an agent wrapper, headroom wrap claude (or codex, grok, copilot, cursor, aider, opencode, cline, continue, goose, openhands and others) configures that tool in a single command, and headroom unwrap reverses it.
- •Local-only compression - Everything is compressed on your own machine.
- •Four adoption surfaces - A Python and TypeScript library, a drop-in HTTP proxy, a one-command wrapper for roughly fifteen named coding agents, and an MCP server.
- •Type-aware routing - JSON, source code and prose go through different compressors, because the structure that can safely be dropped from a JSON payload is not the structure that can be dropped from a stack trace.
- •Reversible retrieval - Originals are cached locally and exposed back to the agent as a retrieval tool, so compression degrades context rather than destroying it and the agent can recover detail it discovers it needs.
- •Cross-agent memory - One shared store across Claude, Codex, Gemini and Grok with automatic deduplication, so context gathered in one agent is not re-fetched by the next.
Developers and teams running coding agents at enough volume that token cost is a line item rather than a rounding error, and anyone whose agent sessions die on context-window limits in the middle of long tasks. The proxy and wrapper modes make it worth trying even if you did not write the agent, since neither requires touching its source.
Pricing
No pricing page found
- Open source$0/mo
- EnterpriseContact sales























































