caveman: Local proxy that reduces input tokens by 33.2%
JuliusBrussee/caveman
About the project
A tool that lowers LLM costs and latency by reducing the amount of data agents read. While previous approaches only shortened agent responses, Caveman 2 compresses the actual input context being sent, including tool schemas, files, logs, and history. On a fixed Claude Code benchmark, it reduced provider-reported input tokens by 33.2% while passing all 18 correctness verifications.
It operates as a local proxy, requiring no code changes or separate backend servers. Before forwarding requests to the selected provider, it detects content types and applies appropriate compressors for JSON, logs, code, diffs, and more. Original bytes are stored on disk and can be exactly restored when needed, ensuring safety. Transformations are executed only when the measured result is smaller, and the original is passed through unchanged if the transformation fails.

The `caveman learn` command analyzes locally stored agent histories in read-only mode. It ranks token consumption points, showing modification suggestions and estimated savings for each item. The analyzer does not directly modify files; it is designed so that agents apply modifications as diffs after approval. It also displays estimated costs over 30 days and context depth per session.
It is compatible with over 30 agents, including Claude Code, Codex, Gemini CLI, and Aider. The skill provided under the MIT license focuses on making agent responses concise. In contrast, the proxy engine under the BSL-1.1 license specializes in reducing input tokens, allowing the two products to be used together or separately. It can be integrated into existing workflows without complex configuration.
JuliusBrussee/caveman
🪨 why use many token when few token do trick. Viral skill + proxy for coding agents that cuts 65% of tokens by talking like a caveman.
Go
This introduction was generated automatically by AI. Check the original for the author's claims and context. Copyright belongs to the original author.
Our guide explains how the AI works. Report errors, attribution issues, or removal requests via Contact.