MCP 및 도구 호출

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별점
⑂ 4.9K포크 수
626미해결 이슈
Python언어
Apache-2.0라이선스
Q@project.QualityScore편집 점수

프로젝트 스크린샷

Headroom: Context Compression Layer for AI Agents 스크린샷 Headroom: Context Compression Layer for AI Agents 스크린샷

개요

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.

주요 기능

  • 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

요구 사항, 설치 및 빠른 시작

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

사용 정보

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

모델 호환성 및 사용 사례

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.

라이선스 및 위험 참고 사항

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.

릴리스 및 유지 관리

Not stated in the repository metadata.

MemPalace

mempalace/mempalace

★ 58KPython

QwenPaw

agentscope-ai/qwenpaw

★ 33.9KPython

Composio

composiohq/composio

★ 29.5KTypeScript