tooltrim vs billion-context
LLM context compression projects compared
tooltrim compresses outputs from agent tools before they enter the model context, while billion-context compresses coding-agent conversation history over time. Their main difference is scope: tooltrim targets individual tool results, and billion-context targets long-running coding sessions.

tooltrim: Compress LLM Agent Tool Outputs
tooltrim trims large tool results before they enter an LLM agent’s context, using content-aware, query-aware extraction and optional retrieval of the original output. It suits teams looking to reduce context use without changing their provider or agent framework.

billion-context: Compress Context for Long Coding-Agent Sessions
billion-context is a TypeScript proxy plugin built on acp-kernel that incrementally compresses coding-agent conversations, aiming to fit month-long sessions into smaller context windows. It supports clients including Claude Code, Codex, OpenCode, pi, and Gemini CLI.
| tooltrim | billion-context | |
|---|---|---|
| Language | Python | TypeScript |
| License | MIT | — |
| Stars | 3 | 2.3k |
| Forks | 0 | 198 |
| Last analyzed | Oct 9, 2026 | Oct 22, 2026 |
Key differences
- tooltrim is a Python library and proxy for extracting relevant content from tool outputs; billion-context is a TypeScript proxy plugin that summarizes conversation ranges incrementally.
- tooltrim supports content-aware handling for HTML, JSON, tabular data, logs, and text; billion-context focuses on layered summaries and on-demand restoration of conversation history.
- tooltrim offers a decorator, API, compatible proxy, and optional framework integrations; billion-context offers native plugins, launchers, and a proxy route for coding-agent clients.
- tooltrim is MIT-licensed; billion-context has `NOASSERTION` license metadata, so its codebase terms should be verified before adoption or redistribution.
- tooltrim can use file, Redis, or S3 stores and has a core with no runtime dependencies; billion-context offers npm installation or Docker and requires Node.js 20 or later.
- Both projects are marked new and concentrate measured contributor activity in one person; tooltrim’s supplied health data shows no issues closed or pull requests merged in the last 90 days, while billion-context reports very frequent recent commits and releases.
Choose tooltrim if you…
- need to reduce context from large tool results such as pages, JSON, tables, or logs.
- want to keep the original tool output retrievable by reference after extractive compression.
- prefer a Python library, optional agent-framework integrations, or a compatible proxy for compressing tool results.
Choose billion-context if you…
- want to compress conversation history across extended coding-agent sessions.
- need support for coding-agent clients through plugins, launchers, or a shared proxy.
- want model-driven summaries with tools to search or restore compressed context and inspect proxy status.
Compare the numbers side by side, or add more projects
This comparison is generated with AI from the OSRepos analyses of both projects. Always check each project's repository and documentation before choosing.