All 123 Dependencies
Every package headroom depends on, ranked by repo health score.
Headroom is a context compression layer that sits between your AI agent and the LLM provider. Every piece of content your agent ingests — tool outputs, log files, RAG chunks, codebase searches, and conversation history — is automatically compressed before being sent, slashing token costs by 60–95% without degrading the quality of the model's responses.
The library ships three integration modes that can be mixed and matched: an inline Python or TypeScript `compress()` function you add to any existing LLM call; a transparent HTTP proxy that intercepts requests from any language with zero code changes; and a command-line agent wrapper (`headroom wrap claude|codex|cursor|aider`) that bootstraps the proxy and launches the agent in one step. An MCP server exposes compression, retrieval, and statistics as tools any MCP-native client can call.
Beyond simple compression, Headroom includes a cross-agent memory store that deduplicates context across Claude, Codex, and Gemini sessions; a `headroom learn` command that mines failed agent sessions and writes corrections back to `CLAUDE.md` or `AGENTS.md`; and a Reversible Compression (CCR) system that caches originals locally so the LLM can call `headroom_retrieve` whenever it needs the unabridged version.
Output token reduction is also supported: the proxy can inject a terseness instruction that reduces model verbosity and uses effort routing to dial down thinking depth on routine steps like file reads and passing tests — cutting what the model writes back in addition to what you send.