ワンクリックで
headroom
Token compression for LLM applications — compress tool outputs, logs, and RAG chunks by 60-95% before they reach the LLM.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Token compression for LLM applications — compress tool outputs, logs, and RAG chunks by 60-95% before they reach the LLM.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
In-process vector database for AI applications — embed vector search, hybrid retrieval, and full-text search directly into your application without managing a separate server.
LLM-powered knowledge extraction CLI — transform unstructured text into structured knowledge (graphs, hypergraphs, spatio-temporal graphs) with a single command.
Give your AI agent one-click internet access — Twitter, Reddit, YouTube, GitHub, Bilibili, and more. Zero API fees.
Generate token-efficient CLIs for AI agents by reading API docs and studying community patterns. Prints Go binaries + Claude Code skills + MCP servers.
Terminal AI coding agent with video input, subagents, MCP support, and ACP editor integration
AI-powered code review CLI — deterministic pipelines + LLM agent, battle-tested at Alibaba scale
| name | headroom |
| description | Token compression for LLM applications — compress tool outputs, logs, and RAG chunks by 60-95% before they reach the LLM. |
| version | 1.0.0 |
| author | Hermes Agent |
| license | Apache-2.0 |
| platforms | ["linux","macos","windows"] |
| metadata | {"hermes":{"tags":["llm","tokens","compression","cost-optimization","mcp","rag"],"related_skills":["crawl4ai","codebase-memory-mcp"]}} |
Compress tool outputs, logs, files, and RAG chunks before they reach the LLM. 60-95% fewer tokens, same answers.
pip install headroom
Add to your Hermes Agent config or any MCP-compatible agent:
headroom mcp-server --port 8080
MCP config:
{
"mcpServers": {
"headroom": {
"command": "headroom",
"args": ["mcp-server", "--port", "8080"]
}
}
}
from headroom import compress
# Compress text to 30% of original size
long_output = "..." # Your tool output, log, or RAG chunk
compressed = compress(long_output, target_ratio=0.3)
# Use compressed output with your LLM
response = llm.chat(compressed)
# Proxy OpenAI API calls through Headroom
headroom proxy --upstream https://api.openai.com/v1/chat/completions
# Your app sends requests to http://localhost:8080 instead
# Headroom compresses inputs and decompresses outputs transparently
| Ratio | Use Case | Token Savings |
|---|---|---|
| 0.1 | Maximum compression (logs, verbose output) | ~90% |
| 0.3 | Balanced (tool outputs, RAG chunks) | ~70% |
| 0.5 | Conservative (code, structured data) | ~50% |
| 0.7 | Minimal (already concise text) | ~30% |
HEADROOM_DEFAULT_RATIO=0.3 # Default compression ratio
HEADROOM_CACHE_SIZE=1000 # LRU cache size
HEADROOM_LOG_LEVEL=info # Logging verbosity
# Test installation
headroom --version
# Test compression
echo "This is a test output that should be compressed significantly by the Headroom library for LLM consumption" | headroom compress --ratio 0.3
# Test MCP server
headroom mcp-server --port 8080 &
curl http://localhost:8080/health