HA

headroomlabs-ai/headroom

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

7.8万 stars 6078 forks 质量 83 趋势 100Apache-2.0

在工具输出、日志、文件和RAG块到达LLM之前压缩它们。编码代理的令牌减少20%,JSON减少60-95%的令牌,结果相同。库、代理、MCP服务器。

概览

██╗ ██╗ ███████╗ █████╗ ██████╗ ██████╗ ██████╗ ██████╗ ███╗ ██╗ ██║ ██║ ██║███╔ 含子╝███╔含含子含子,含蓄之子,╝██╗██╔含子含蓄之子,╗██ �██╔══██╗█████ █████ ████║ ███████║█████╗ ███████║███ ██║██████╔╝███ ██║ ██║████ ██║████████ ██╔╔ιι██║ ██╔ιικ████ ██╔ ██╔ι ██╔ ═██║███████╔含子之╕███║ ██║███║ ██║███║ ██║███╔╝██║ ██║ ██║ ██║███████╗██║██████╔╝██║ ██║╚██████╔╝╚██████ ╔╝██║ ╚═╝ ██║ ╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝╚═════╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝ AI代理的上下文压缩层 JSON数据令牌减少60–95%,编码代理令牌减少15-20% ·库 ·代理 ·MCP ·内容感知压缩器 ·本地优先 ·可逆 文档 ·安装 ·证明 ·代理人 ·Discord ·llms.txt AI 代理 / 大型语言模型:请阅读 /llms.txt,或获取实时索引/完整文档集合。 Headroom 会压缩你的 AI 代理读取的所有内容——工具输出、日志、RAG 块、文件和对话历史——然后才会到达 LLM。答案相同,token 的比例。 实时:10,144→1,260个令牌——同样的致命标记。

概述(AI 翻译)

快速入门 · 团队头部空间 · 安装· 证明· 代理人 · 文档 · Discord · llms.txt

人工智能代理/大型语言模型:点击这里阅读/llms.txt,或者获取 实时索引· 完整的文档大块。

Headroom压缩了你的AI代理读取的所有数据——工具输出、日志、RAG 块、文件和对话历史——在它到达LLM之前。同感 答案,token的分数。压缩在你的机器上运行;没有提示或 文件内容会被发送到任何地方进行压缩。

10,144→1,260个代币。同样的致命物品。

它的作用

  • Library — compress(messages) 在 Python 或 TypeScript 中,在任何应用中内联使用。
  • 代理 — headroom proxy --port 8787,零代码更改,任意语言。
  • 代理包裹 — headroom wrap claude|codex|grok|copilot|cursor|aider|opencode|cline|continue|goose|openhands|openclaw|vibe|omp|zcode在一个命令中;撤销时使用headroom unwrap 。
  • MCP 服务器 — headroom_compress、headroom_retrieve、headroom_stats] 适用于任何 MCP 客户端。
  • 跨代理内存 — 跨 Claude、Codex、Gemini 和 Grok 共享存储,自动去重。
  • headroom learn — 挖掘失败会话并写入修正至 'CLAUDE.local.

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 README 节选,完整内容请查看原文。

Headroom compresses everything your AI agent reads — tool outputs, logs, RAG chunks, files, and conversation history — before it reaches the LLM. Same answers, fraction of the tokens. Compression runs on your machine; no prompt or file content is sent anywhere to be compressed.

在 GitHub 查看完整 README

安装

This server does not publish a one-line install command.

Open the repository installation guide 新手?先看 mcpskill.org 教程 →