Headroom is an open-source context compression layer for applications and agents that use large language models (LLMs), made by Headroom Labs and published on PyPI as headroom-ai; its command-line program is called headroom. The context is all the text an LLM receives with a request, and fewer tokens (pieces of words) in it mean lower cost and faster answers.
Headroom compresses tool outputs, logs, database results, files, RAG results (documents found by a search and added to the prompt) and conversation history, and the compression runs on the user's machine. A content router detects each content type and picks a compressor: SmartCrusher for JSON, an AST-aware compressor for source code and the Kompress-v2-base model for prose. Originals stay in a local cache, so the model can call headroom_retrieve for the full text. Headroom runs as a Python or TypeScript library, as a local proxy that needs no code changes, as a wrapper that starts coding agents such as Claude Code, Codex or Cursor (headroom wrap) and as an MCP server.
It is free under the Apache 2.0 license. Headroom Enterprise is a paid team version on 12-month plans.