talira

Headroom

Compresses tool outputs, logs, files and RAG chunks before they reach the LLM

open coreApache-2.0self-hostablefreeMCP

Headroom compresses what an AI agent reads (tool outputs, logs, RAG chunks, files and conversation history) before it reaches the model, so the same answers cost fewer input tokens; its README measures 21–57% fewer on four agent scenarios and 90%+ on repeated JSON arrays and log lines. It routes each kind of content to a compressor for JSON, source code or prose, keeps originals locally so the model can retrieve them, and runs on your machine. It works as a Python or TypeScript library, a local proxy, a one-command wrapper for coding agents such as Claude Code and Codex, or an MCP server, and adds cross-agent memory. Its makers sell Headroom Enterprise for teams.

Problems it solves

  • my coding agent burns through tokens reading huge tool outputs and logs
  • cut my LLM bill when my app sends big JSON API responses to the model
  • shrink RAG chunks and file contents before they hit the context window without changing my agent

Features

  • compress() library for Python and TypeScript
  • local proxy with zero code changes
  • headroom wrap for Claude Code, Codex, Cursor, Aider, OpenCode, Cline and more
  • MCP server with compress, retrieve and stats tools
  • reversible compression: originals cached locally and retrieved on demand
  • cross-agent memory shared by Claude, Codex, Gemini and Grok
  • headroom learn writes corrections from failed sessions to CLAUDE.md or AGENTS.md
  • output token reduction

Limitations

  • An anonymous telemetry beacon is on by default (compression ratios, counters, provider and model IDs, OS); it can be turned off with HEADROOM_TELEMETRY=off or DO_NOT_TRACK=1.1
  • Saves little on short conversational prompts and prose.1
  • The headroom CLI and proxy ship only in the PyPI package; the npm package is the TypeScript SDK alone.1

Ways to run it

Headroom (open source)

You run it, Apache-2.0

free1

Only in this edition

  • library, proxy, agent wrap, MCP server, cross-agent memory and headroom learn

You arrange

  • the LLM provider and agents it sits in front of

Self-hosting docs

Headroom Enterprise

You run it, under a commercial licence

contact sales1

Only in this edition

  • more cost savings, token security, on-premise deployment and deep attribution, per the README

You arrange

  • a conversation with Headroom Labs

Self-hosting docs

Capabilities

Has a command line toolplan not known
Has an MCP serverplan not known
Has official SDKsplan not known

Alternatives

The same job

These do what Headroom does.

  1. RTK (Rust Token Killer) Cuts the command output AI coding agents read
  2. Caveman Skill and local proxy that make coding agents answer shorter and read smaller tool output
  3. code-review-graph Local code knowledge graph that gives AI coding tools precise review context over MCP
  4. Context Mode Local plugin that keeps coding agents' tool output out of their context window, with sandboxed runs and SQLite search

Compare Headroom with the top 3