AgentIndex icon
AgentIndex
ToolsCategoriesTrendingNewCompareGuides
Submit Tool
ToolsCategoriesTrendingNewCompareGuides
Home/
Memory & Context/
headroom
headroom logo

headroom

Active·★ 74.8k·Apache-2.0·Updated 2026-10-08
★ Most Popular★ Essential

Headroom compresses what an AI agent reads, including tool outputs, logs, RAG chunks, files and conversation history, before it reaches the model. A content router picks a specialised compressor for each type (JSON, source code via the AST, or prose via a small local model), and the originals are cached locally so the model can retrieve the full text when it needs it. Compression runs on your machine; content is not sent anywhere to be compressed.

It is useful wherever context size drives cost or quality: coding agents reading long logs and test output, agents calling APIs that return large JSON, and RAG pipelines. The project's own figures are about 20% fewer tokens for coding agents and 60–95% for JSON-heavy content. You can use it as a Python or TypeScript library, as a local proxy with no code changes, as an MCP server, or by wrapping an agent such as Claude Code, Codex, Cursor or Aider with a single command. It also offers cross-agent memory and a `learn` command that turns failed sessions into instructions in files such as CLAUDE.md or AGENTS.md.

Getting started: install the CLI with `uv tool install --python 3.13 "headroom-ai[all]"` or pip, then run `headroom wrap claude` (or another agent) or `headroom proxy --port 8787`. `headroom doctor` checks the setup and `headroom dashboard` shows live savings.

#Context Compression#Token Optimization#AI Agents#LLM Integration#Local-first#Reversible#Proxy#Developer Tooling
$ Install
$ pip install "headroom-ai[all]"
↗ Visit site★ GitHub
01

Features

01In-app library for compression (Python/TypeScript)
02Zero-code-change proxy mode
03One-command agent wrapping for various AI agents
04Cross-agent shared memory and auto-deduplication
05Reversible compression (CCR) with original content retrieval
02

Why choose it

+Several integration modes (library, proxy, MCP server, one-command agent wrapping) cover most setups without code changes.
+Content-aware compression for JSON, code and prose, with reversible retrieval of the originals.
+Runs locally, so content is not sent to a third party for compression.
+Apache-2.0 licensed, with diagnostics and a live savings dashboard.
03

Trade-offs

!Savings depend heavily on content: around 20% for typical coding-agent traffic is far less than the headline numbers for JSON.
!Wrapping agents or routing traffic through a proxy adds a component that can affect latency and needs to be kept running.
!Lossy compression can occasionally drop details the model needed; it then has to call the retrieval tool, so verify answer quality on your own tasks.
04

Compatibility

Python
Runtime
Verified via docs
TypeScript
SDK
Verified via docs
Docker
Container
Verified via docs
macOS
OS
Verified via docs
Linux
OS
Verified via docs
Windows
OS
Verified via docs
05

Quick start

1
$ pip install "headroom-ai[all]"
06

Use cases

↳Reduce LLM token usage and API costs for AI agents.
↳Enable shared context and memory across multiple AI agents.
↳Optimize coding agents by compressing tool outputs, logs, and RAG chunks.
↳Maintain full data fidelity with reversible context compression.
07

How it compares

≈vs context-mode: both reduce what coding agents load into context; context-mode sandboxes tool output, while Headroom compresses many content types and also works as a general proxy for any LLM app.
≈vs codebase-memory-mcp: codebase-memory-mcp reduces tokens by answering code questions from a graph; Headroom compresses whatever content reaches the model.
≈vs Letta: Letta is a full stateful-agent harness with memory; Headroom is a layer you add to existing agents.
08

Alternatives

letta logo
letta★ 25.1k
Letta is the platform for building stateful agents: open AI with advanced memory that can learn and self-improve over time.
vs →
mcp-memory-service logo
mcp-memory-service★ 2.0k
Stop re-explaining your project to AI every session. Automatic context memory for Claude, VS Code, Cursor, and 13+ AI tools.
MindsHub (formerly MindsDB) logo
MindsHub (formerly MindsDB)★ 39.8k
MindsHub (formerly MindsDB) is an agent workspace for knowledge work and software development, with connected data sources, a model router across frontier and open models, open-source agent harnesses, and publishable artifacts.
GitHub MCP Server logo
GitHub MCP Server★ 33.5k
GitHub's official MCP Server. Allows AI agents to interact directly with your GitHub repositories (read files, search code, issues).
Brave Search MCP logo
Brave Search MCP★ 1.5k
Allow your AI Agent to search the real-time internet using Brave Search API. Essential for getting up-to-date information.
CopilotKit logo
CopilotKit★ 37.8k
React UI + elegant infrastructure for AI Copilots, AI chatbots, and in-app AI agents. The Agentic Frontend.
python-sdk logo
python-sdk★ 24.5k
The official Python SDK for Model Context Protocol servers and clients
nanobot logo
nanobot★ 48.9k
Ultra-lightweight, open-source, self-hosted personal AI agent framework in Python with WebUI, tools, memory, MCP, multi-agent workflows, automation, and chat apps
See all alternatives →

Comments

Log in to leave a comment

No comments yet. Be the first!

On this page
01Features02Why choose it03Trade-offs04Compatibility05Quick start06Use cases07How it compares08Alternatives
Stats
GitHub Stars★ 74.8k
Last commit1d ago
StatusActive
LicenseApache-2.0
CategoryMemory & Context
Trend (30d)
+2.9k↑ 5.0%
Links
Documentation↗Discussion↗Issues↗Releases↗

Deploy on DigitalOcean — Get $200 Free Credit

Ad
© 2026 AgentIndex.app|Built by a 10-year iOS Developer.
AboutContactAdvertisePrivacy PolicyTerms of UseQYSGitHubBuy me a coffee ☕

Browse by Category

Code AssistantWorkflow AutomationRAG / Knowledge BaseMulti-AgentBrowser AutomationLLM InfraDev ToolingObservability

Not affiliated with Anthropic, OpenAI or Microsoft.