https://github.com/fkiene/llmtrim
Local proxy that compresses your LLM API requests so you pay less, with no change to the answers. Trims wasted tokens from prompts, history, tool output, and code before they're sent: -31% input / -74% output, measured live. Any provider, no extra model calls. Also an MCP server and embeddable library (Rust, Python, Ruby, Kotlin, Swift, JS/TS).
https://github.com/fkiene/llmtrim
agentic-coding ai anthropic claude-code cost-reduction developer-tools llm llmops mcp mitm-proxy openai prompt prompt-compression prompt-engineering proxy rust token-optimization
Last synced: 1 day ago
JSON representation
Local proxy that compresses your LLM API requests so you pay less, with no change to the answers. Trims wasted tokens from prompts, history, tool output, and code before they're sent: -31% input / -74% output, measured live. Any provider, no extra model calls. Also an MCP server and embeddable library (Rust, Python, Ruby, Kotlin, Swift, JS/TS).
- Host: GitHub
- URL: https://github.com/fkiene/llmtrim
- Owner: fkiene
- License: mpl-2.0
- Created: 2026-06-07T19:58:56.000Z (about 1 month ago)
- Default Branch: main
- Last Pushed: 2026-07-05T20:43:27.000Z (2 days ago)
- Last Synced: 2026-07-05T21:06:37.035Z (2 days ago)
- Topics: agentic-coding, ai, anthropic, claude-code, cost-reduction, developer-tools, llm, llmops, mcp, mitm-proxy, openai, prompt, prompt-compression, prompt-engineering, proxy, rust, token-optimization
- Language: Rust
- Homepage: https://www.npmjs.com/package/@llmtrim/cli
- Size: 2.83 MB
- Stars: 142
- Watchers: 2
- Forks: 7
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Security: SECURITY.md
Awesome Lists containing this project
- awesome-rust - fkiene/llmtrim - Local proxy that compresses LLM API requests to cut input and output tokens without changing the answers. Sits between AI tools and the provider via HTTPS_PROXY; works with Claude Code, Codex, and more. [](https://github.com/fkiene/llmtrim/actions/workflows/ci.yml) (Applications / Productivity)
- awesome-hermes-agent - beta - Local proxy in front of the model Hermes calls; compresses resent tool schemas, history, and MCP tool output before each request is sent. Quality-gated, so it never increases your bill. Also an MCP server, CLI, and library (Rust, Python, Ruby, Swift, Kotlin, JS/WASM). MPL-2.0. Same spirit as [rtk-hermes](https://github.com/ogallotti/rtk-hermes), but a transport-layer proxy rather than a native `pre_tool_call` plugin. (Tools & Utilities / Skill Registries & Discovery)
- awesome-hermes-agent - beta - gated, so it never increases your bill. -31% input / -74% output tokens. Also an MCP server, CLI, and library (Rust, Python, Ruby, Swift, Kotlin, JS/WASM). MPL-2.0. (Tools & Utilities / Skill Registries & Discovery)
- awesome-claude-code-and-skills - fkiene/llmtrim - square) (Productivity Tools / Memory & Context Management)
- fucking-awesome-rust - fkiene/llmtrim - Local proxy that compresses LLM API requests to cut input and output tokens without changing the answers. Sits between AI tools and the provider via HTTPS_PROXY; works with Claude Code, Codex, and more. [](https://github.com/fkiene/llmtrim/actions/workflows/ci.yml) (Applications / Productivity)
- awesome-llm-token-reduction - llmtrim - Provider-agnostic Rust proxy that compresses input, output, and cache with no extra model calls.  (Coding-Assistant Token Savers)
- awesome-opensource-ai - llmtrim - Self-hosted Rust proxy, MCP server, CLI, and library that compresses LLM prompts, tool outputs, and replies to cut token usage, quality-gated so it never raises your bill. AGPL-3.0 licensed.  (4. Agentic AI & Multi-Agent Systems)
- awesome-rust-with-stars - fkiene/llmtrim - 06-22 | (Applications / Productivity)
- awesome-ratatui - llmtrim - Local proxy that compresses LLM API requests to cut token cost, with a tabbed status dashboard for per-source cost and context use. (💻 Apps / ⌨️ Development Tools)