MCP & Tool-Aufrufe

Headroom: Context Compression Layer for AI Agents

headroomlabs-ai/headroom

Headroom is a local-first context compression layer that reduces token usage for AI agents by compressing tool outputs, logs, files, and RAG chunks before they reach the LLM. It offers library, proxy, and MCP server modes and claims to preserve answer accuracy while cutting tokens by 15-95% depending on workload.

★ 65KSterne
⑂ 4,9KForks
626Offene Issues
PythonSprache
Apache-2.0Lizenz
Q@project.QualityScoreRedaktionelle Bewertung

Projekt-Screenshots

Screenshot von Headroom: Context Compression Layer for AI Agents Screenshot von Headroom: Context Compression Layer for AI Agents

Übersicht

Headroom intercepts the data flowing from your application or AI agent to an LLM provider and compresses it locally. It uses a content-aware routing system to select the appropriate compressor for different data types, such as JSON, code, or natural prose. Beyond input compression, it includes an output token reduction feature that trims verbose model responses. It also provides reversible compression by caching originals locally, allowing the LLM to retrieve them on demand via an MCP tool.

Wichtige Funktionen

  • Library, proxy, and MCP server deployment modes
  • Content-aware compression for JSON, code, and text
  • Reversible compression with local caching (CCR)
  • Cross-agent shared memory with auto-deduplication
  • Output token reduction via verbosity steering and effort routing
  • Agent wrapping for tools like Claude Code, Cursor, and Aider
  • Local-first architecture that keeps data on your machine

Voraussetzungen, Installation und Schnellstart

You can install Headroom via uv, pip, npm, or Docker. For the full Python CLI, use `uv tool install --python 3.13 "headroom-ai[all]"` or `pip install "headroom-ai[all]"`. For the TypeScript SDK, use `npm install headroom-ai`. Docker is available via `docker pull ghcr.io/chopratejas/headroom:latest`.

Nutzung

After installation, you can start Headroom in several ways. Use `headroom deploy` for a turnkey local deployment, `headroom wrap claude` to wrap a specific coding agent, or `headroom proxy --port 8787` for a drop-in proxy. You can verify the setup with `headroom doctor` and view savings with `headroom dashboard`.

Modellkompatibilität und Anwendungsfälle

Headroom works with any OpenAI-compatible client via its proxy. It supports Anthropic and OpenAI-compatible endpoints for output token reduction features. It can wrap agents including Claude Code, Codex, Grok CLI, Cursor, Aider, Copilot CLI, VS Code Copilot, Cline, Continue, Goose, and OpenHands.

Lizenz- und Risikohinweise

The repository is licensed under the Apache-2.0 license.

Editorial verification 2026-08-09: repository URL, owner, description, license and repository statistics were reviewed. License metadata: Apache-2.0. README was fetched for the channel draft; re-check repository dependencies, releases and model terms before production use.

Veröffentlichung und Wartung

Not stated in the repository metadata.

MemPalace

mempalace/mempalace

★ 58KPython

QwenPaw

agentscope-ai/qwenpaw

★ 33,9KPython

Composio

composiohq/composio

★ 29,5KTypeScript