headroom
by headroomlabs-ai
Headroom shrinks the text that AI coding agents and apps send to a language model, such as logs, JSON, files and search results, before it is sent. It is meant to cut token use and cost while keeping the answers the same.
- Stars
- 78k +54 a day
- Licence
- Apache-2.0
- Runs on
- Your computer
- Setup
- Moderate
- Language
- Python
- Age
- 292 days
What you can do with it
- Wrap a coding agent such as Claude Code, Codex or Cursor with one command so its tool output is compressed
- Run a local proxy on a port so any app calling an LLM API gets compressed prompts without code changes
- Call compress() in Python or TypeScript to shrink messages before sending them to a model, and check the savings on a dashboard
Make money with it
A freelancer could offer to cut LLM running costs for clients by setting up compression in front of their AI agents and apps, charging a fee or a share of the savings.
An idea, not financial advice. Check the licence before charging for anything built on it.
Ways a business could use it
- Lower the monthly bill for AI coding agents and LLM API calls by sending fewer tokens
- Fit more logs, documents or search results into a model's context window in support or data-processing workflows
Can you use it commercially?
Free to use, change and sell, including in paid products. Keep the copyright notice.
Not legal advice. Read the project's licence file before building a product on it.
Getting it running
Install with pip or uv (Python), or npm for the TypeScript library, then run headroom wrap, headroom proxy or call compress() in your code.
Follow the official instructions in the project README.
Things to check
- Savings vary a lot; prose and already-dense output compress very little
- Still needs your own paid LLM provider keys to be useful
- Wrapping an agent also installs and registers a third-party tool (Serena) unless you opt out
- Headline figures come from the project's own benchmarks
Checked 27 Oct 2026. Summary drafted by AI from the project's README.