
Picture published by the creator on GitHub.
Headroom: Shrink what your AI agent reads so it uses fewer tokens
Added · Updated
Made by Headroom Labs
View profile on GitHub (opens in a new tab)Compress logs, tool output and files before they reach the AI model, so each request uses fewer tokens.
For developers running coding agents or LLM apps.
What it does
Headroom sits between your app or agent and the AI model. A router detects what kind of content is coming in, such as JSON, source code or plain prose, and picks a matching compressor to shorten it. The creators say compression runs on your machine and no prompt or file content is sent elsewhere to be compressed. Originals are kept locally, so the model can ask for the full text back with headroom retrieve.
How to use it
Input → action → output: run headroom wrap claude (or codex, cursor, aider and others) and your agent session routes through a local proxy that trims tool outputs, logs and history before they are sent. Developers can instead call compress(messages) inside a Python or TypeScript app, run headroom proxy on port 8787, or use it as an MCP server (a way to plug tools into an AI assistant). headroom unwrap undoes the wrap.
Common use cases
- Wrap a Claude Code session and let long build logs be shortened before the model reads them, with the originals kept on disk.
- Pass a chat history full of JSON search results through compress() in a Python app and send a shorter message list to the model.
- Run headroom savings on your own traffic to see how many tokens it would remove for your workload.
Can I use this?
Requirements Install with uv tool install or pip install headroom-ai[all] to get the headroom command; the npm headroom-ai package is the TypeScript library only, with no command. headroom wrap also installs Serena, a code navigation tool, unless you pass code memory none. Apache-2.0 licensed, so it is open source.
Caveat The creators report savings from 21% to 57% in their own four test scenarios; your number will differ, and they suggest measuring your own traffic.
Worth knowing Savings depend on the content: the creators say repetitive JSON and logs shrink a lot, while prose and already dense output compress very little.
Why it's here
Not trending this week
Last seen on the GitHub trending list on 22 October 2026. It stays on BuildTube so you can still find it.
- 79,130 people have starred it on GitHub.
Numbers checked on 8 November 2026; not refreshed since.
Behind it
View setup guideBuildTube has not run or verified this project. Everything above is written from what the creator published.
Made this?
Quick questions
- What is Headroom?
- Headroom sits between your app or agent and the AI model.
- What can I use Headroom for?
- Wrap a Claude Code session and let long build logs be shortened before the model reads them, with the originals kept on disk; Pass a chat history full of JSON search results through compress() in a Python app and send a shorter message list to the model; Run headroom savings on your own traffic to see how many tokens it would remove for your workload
- Can I run Headroom on my computer?
- It runs on your own computer or server after a local setup.
- What do I need to use Headroom?
- Python 3.10 or newer for the headroom command (pip or uv), or the npm package for the TypeScript library. You still use your own AI provider and its key.
- What license does Headroom use?
- Apache-2.0 licensed, so it is open source.
More from this week
- Stroq Check AI coding agent sessions for leaked keys
Stroq scans your recent Claude Code and Codex sessions for keys that left your machine.
- RAGFlow Ask questions about your documents and get cited answers
Upload documents and ask questions with traceable citations.
- Garden Skills Give your coding agent video and web design skills
Install ready-made skills so Claude Code, Cursor or Codex can make short videos, web pages and articles.
Explore by topic
Post this
Download share imageFor makers
Made this? Show it’s on BuildTube — add the badge to your README or embed the card on your site.
README badge (Markdown)
[](https://buildtube.app/p/gh-headroomlabs-ai-headroom/)Embed card (HTML)
<iframe src="https://buildtube.app/embed/gh-headroomlabs-ai-headroom/" width="560" height="240" style="border:0;max-width:100%" loading="lazy" title="Headroom on BuildTube"></iframe>