MCP et appels d’outils

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.

★ 65KÉtoiles
⑂ 4,9KForks
626Problèmes ouverts
PythonLangue
Apache-2.0Licence
Q@project.QualityScoreScore éditorial

Captures d'écran du projet

Capture d’écran de Headroom: Context Compression Layer for AI Agents Capture d’écran de Headroom: Context Compression Layer for AI Agents

Vue d’ensemble

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.

Fonctionnalités clés

  • 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

Prérequis, installation et démarrage rapide

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`.

Utilisation

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`.

Compatibilité des modèles et cas d’usage

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.

Licence et notes sur les risques

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.

Publication et maintenance

Not stated in the repository metadata.

MemPalace

mempalace/mempalace

★ 58KPython

QwenPaw

agentscope-ai/qwenpaw

★ 33,9KPython

Composio

composiohq/composio

★ 29,5KTypeScript