02-core-use-headroom-for-context-compressionlisted
Install: claude install-skill markkennethbadilla/public-agent-provisioning
# Headroom -- context-compression proxy (a core token tool)
Headroom (`headroomlabs-ai/headroom`, Apache-2.0) is a local-first proxy that compresses
**everything the agent reads before it reaches the LLM** -- tool outputs, logs, RAG chunks,
files, and conversation history -- typically 60-95% fewer tokens for the same answer.
Reversible/clamp-only by design; your data never leaves the machine. It also trims OUTPUT
tokens (drops restated code/ceremony the model writes back).
Docs: https://headroom-docs.vercel.app/docs | agent index: `/llms.txt` on that site.
## The lane it owns (don't confuse it with the other token tools)
Each token tool operates at a different boundary; they STACK, they don't compete:
| Tool | Boundary it compresses/serves |
|---|---|
| **RTK** | one shell command's **stdout/stderr** before it enters context |
| **jcodemunch** | **code retrieval** -- returns just the symbols/snippets, not whole files |
| **jdocmunch** | **docs retrieval** |
| **Serena** | **symbol** navigation + edits (LSP) |
| **Headroom** | the **whole model-API payload** -- prompt + history + tool results + files -- at the agent<->LLM boundary |
Headroom is the broadest layer: it catches everything the others don't, including your own
prompts and conversation history. It treats Serena as the code-memory backup and makes RTK
opt-in inside its wrap -- designed to coexist, not replace.
## How it's used
The `headroom` CLI ships **only via PyPI**; the npm `headroom-ai` is the TypeScript