← ClaudeAtlas

02-core-use-headroom-for-context-compressionlisted

CORE -- never delete. Trigger whenever launching or reasoning about a CLI-agent session's token cost, or when a session is burning tokens / approaching a context limit / paying for verbose tool outputs, logs, RAG chunks, files, or conversation history sent to the model. Headroom is the local context-compression proxy that sits between the agent and the LLM API and shrinks the payload 60-95% (reversible), a DIFFERENT layer than RTK (shell stdout), jcodemunch (code retrieval), jdocmunch (docs), and Serena (symbols). Launch agents through `headroom wrap` so compression is on by default; use `headroom doctor` to confirm routing, `headroom dashboard` for live savings, and `headroom unwrap` to escape for a delicate debug where a dropped detail would hurt. Also trigger when adding Headroom to a new box or agent, or when a wrapped session behaves oddly (missing detail, higher tokens).
markkennethbadilla/public-agent-provisioning · ★ 0 · AI & Automation · score 72
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