headroomlabs-ai/headroom
Compress tool outputs, logs, files, and RAG chunks before they reach the LLM. 20% fewer tokens for coding agents, 60-95% fewer tokens for JSON, same answers. Library, proxy, MCP server. observed · 2026-08-28
Health v2 · maintenance only
78/100
- Activity 99
- Release rhythm 87
- Longevity 17
How is this computed?
round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10) — computed 2026-09-03. Adoption (stars, forks) is never an input.
- gap_med: 0
- age_days: 238
- days_rel: 11
- days_push: 7
- n_releases_24m: 168
Adoption not part of the score
67706 stars · 5227 forks observed · 2026-08-28
What it is AI-extracted, prompt v1, taxonomy v1, 2026-08-29, confidence not recorded
Headroom is a context compression layer for LLM applications that compresses tool outputs, logs, files, RAG chunks, and images before they reach the model, claiming 60-95% token savings on JSON and 15-20% on coding agent traffic. It ships as a Python/TypeScript library, a local proxy server, and an MCP server, with content-aware compressors including statistical JSON pruning, AST-aware code compression, and ML-routed image compression.
Use cases
- reduce LLM token costs for AI coding agents like Claude Code or Cursor
- compress large JSON tool outputs before sending to GPT-4o or Claude
- shrink RAG retrieval chunks to fit more context in the window
- compress images sent to vision models to cut token spend
- run a local proxy that transparently compresses OpenAI/Anthropic API traffic
- add token compression middleware to LangChain or Vercel AI SDK apps
- compress log files and command outputs fed to agents
When to choose
- you spend heavily on LLM tokens from verbose tool outputs, JSON arrays, or RAG chunks
- you want drop-in compression via SDK wrappers, a proxy, or MCP without changing prompts
- you need reversible compression so original content can be recovered
- you use coding agents and want fewer tokens without degrading answer quality
When to avoid
- your prompts are already small and token cost is not a concern
- you cannot tolerate any risk of compression altering model answers
- you need Windows or Intel macOS first-class support without building Rust extensions
- you require a fully managed cloud service rather than a local-first tool
Facets
library · maturity active
compression rag prompt-engineering mcp proxy middleware sdk developer-tools large-language-models developer-tools artificial-intelligence python cli cross-platform token-optimization context-window context-compression llm-cost-reduction coding-agents claude-code cursor langchain openai anthropic reversible-compression ast-compression tree-sitter smartcrusher image-token-compression ai-agents retrieval-augmented-generation nodejs docker macos linux
10 sources
- readme: https://github.com/headroomlabs-ai/headroom · fetched 2026-08-28 · df737a2e5b2c
- homepage: https://docs.headroomlabs.ai/docs · fetched 2026-08-28 · 47754cae8ea0
- site_page: https://docs.headroomlabs.ai/docs/quickstart · fetched 2026-08-28 · 71fcadea3338
- site_page: https://docs.headroomlabs.ai/docs/installation · fetched 2026-08-28 · cd7e522dc1e2
- site_page: https://docs.headroomlabs.ai/docs/docker-install · fetched 2026-08-28 · fbb56dc3e013
- site_page: https://docs.headroomlabs.ai/docs/persistent-installs · fetched 2026-08-28 · fdd550424baf
- site_page: https://docs.headroomlabs.ai/docs/how-compression-works · fetched 2026-08-28 · 4762d663f059
- site_page: https://docs.headroomlabs.ai/docs/smart-crusher · fetched 2026-08-28 · c5c5ffee05b3
- site_page: https://docs.headroomlabs.ai/docs/code-compression · fetched 2026-08-28 · f421bd867a1b
- site_page: https://docs.headroomlabs.ai/docs/image-compression · fetched 2026-08-28 · 70d9a56547e3
Member repositories
| Repository | Role | Health v2 |
|---|---|---|
| headroomlabs-ai/headroom | main | 78 |
For agents
markdown · JSON · MCP: product_card(name="headroomlabs-ai/headroom")
Data as of 2026-08-30T08:39:29.467469+00:00 · Report a problem