Headroom

Active
GitHub Python Apache-2.0

Description

Context compression layer that compresses tool outputs, logs, files, and RAG chunks before they reach the LLM, saving 60-95% of tokens while preserving answer quality. Available as library, proxy, or MCP server.

Key Features

  • Compress everything before LLM receives it, reducing 60-95% of tokens
  • Three usage modes: library, proxy, and one-command agent wrapping
  • Built-in MCP server with cross-agent shared memory
  • ContentRouter auto-detects content type and selects optimal compressor
  • CCR reversible compression: originals never deleted, retrieved on demand
  • Compatible with Claude, Codex, Cursor, Aider, and Copilot agents
  • headroom learn mines failed sessions and writes corrections back to CLAUDE.md / AGENTS.md

Use Cases

💡 Reduce API costs for AI agent workloads
💡 Compress code search, SRE debugging, and issue triage outputs
💡 Cross-agent context sharing and memory reuse
💡 Efficient transmission of long conversation history and RAG results
💡 Enterprise LLM application token optimization

Strengths & Limitations

Strengths

  • Actively maintained, recent updates
  • High community interest (68.6k stars)
  • Permissive open-source license (Apache-2.0)
  • Responsive to issues, low backlog

Quick Start

# Install and wrap your agent
pip install "headroom-ai[all]"
headroom wrap claude           # one-command wrap for Claude/Codex/Cursor
headroom proxy --port 8787     # or run as a proxy
headroom perf                  # inspect token savings

Related Projects

Codebase Memory MCP

41.9k · C
Active A+

High-performance code intelligence MCP server that indexes codebases into a persistent knowledge graph, supporting 66 languages with sub-millisecond queries and 99% fewer tokens.

mcpknowledge-graphcode-analysis +2
  • · Extreme indexing speed: Linux kernel (28M LOC) indexed in 3 minutes via RAM-first pipeline
  • · 159 languages supported through vendored tree-sitter grammars in a single binary
  • · Hybrid LSP semantic type resolution for Python, TypeScript, PHP, C#, Go, C, and C++

ByteRover CLI

5.0k · TypeScript
Normal B

ByteRover CLI provides persistent structured memory for autonomous coding agents. It features context tree management, git-like version control, and cloud sync, compatible with Cursor, Claude Code, Windsurf, and 22+ coding agents via MCP integration.

agent-memorycontext-managementcoding-agent +3
  • · Persistent structured memory with context tree and knowledge storage for coding agents
  • · Git-like version control for context trees (branch, commit, merge, push/pull)
  • · Supports 20 LLM providers including Anthropic, OpenAI, Google, Groq, DeepSeek

MaxKB

22.7k · Python
Active A+

MaxKB is an open-source knowledge base Q&A and agent building platform powered by LLMs, with vector retrieval, workflow orchestration, and multi-model support out of the box.

knowledge-baseragchatbot +3
  • · RAG Pipeline — Document upload and online crawling with automatic splitting and vectorization to reduce hallucinations
  • · Agentic Workflow — Powerful workflow engine, function library and MCP tool-use for complex business scenarios
  • · Zero-code Integration — Seamlessly integrate into third-party business systems for smart Q&A capabilities

21st Magic MCP

5.8k · TypeScript
Active A+

21st Magic MCP is a frontend-focused MCP server providing v0-like AI component generation capabilities inside Cursor, WindSurf, Cline, and other IDEs.

mcpfrontendui-generation +2
  • · AI-powered UI component generation from natural language descriptions via MCP protocol
  • · Multi-IDE support for Cursor, Windsurf, VS Code, and VS Code + Cline integrations
  • · Access to a vast library of pre-built, customizable components inspired by 21st.dev designs