The context compression layer for AI agents
Compress everything your AI agent reads — tool outputs, logs, RAG chunks, files, and conversation history — before it reaches the LLM. Same answers, fraction of the tokens.
Headroom runs locally on your machine; no prompt or file content is sent anywhere to be compressed.
compress(messages) in Python or TypeScript, inline in any app.
headroom proxy --port 8787, zero code changes, any language.
Wrap Claude, Codex, Grok, Copilot, Cursor, Aider and more in one command.
Headroom tools for any MCP client with headroom_compress, headroom_retrieve, headroom_stats.
One shared store across Claude, Codex, Gemini and Grok, with automatic deduplication.
Originals are cached locally and retrieved on demand when the model needs them.
Real-world compression scenarios measured with provider tokenizers
| Scenario | Before | After | Saved |
|---|---|---|---|
| Code search (100 results) | 17,199 | 13,597 | 21% |
| SRE incident debugging | 55,957 | 24,340 | 57% |
| Codebase exploration | 58,801 | 33,895 | 42% |
| GitHub issue triage | 46,067 | 32,429 | 30% |
Install Headroom and start saving tokens immediately
uv tool install --python 3.13 "headroom-ai[all]"pip install "headroom-ai[all]"npm install headroom-aiheadroom deployheadroom wrap claudeheadroom proxy --port 8787headroom doctorheadroom perfheadroom dashboard