token-optimization

10 repositories

rtk-ai/rtk

A Rust CLI that slashes token costs for AI coding agents — RTK is a single-binary, zero-dependency Rust proxy that compresses, routes, and filters everything an AI coding agent reads or sends, cutting bash-output tokens by up to 90%. It's agent-agnostic, useful for anyone running Claude Code or similar LLM-driven dev tools who wants lower API costs.

Rust🇪🇺 EuropeAttention 47
★88,829
headroomlabs-ai/headroom

Shrinking AI agent context without losing the important lines — Headroom compresses tool outputs, logs, and RAG chunks before they hit the LLM, cutting tokens by 20% for coding agents and up to 95% for JSON while preserving exact answers, including critical lines like error messages. It ships as a Python/TS library, proxy, or MCP server, with its own kompress-v2 model on Hugging Face.

PythonAttention 43
★81,512
microsoft/TokenEconomizer

Cutting coding-agent token bills without touching the model — TokenEconomizer is a black-box wrapper that reduces token costs for coding agents like Claude Code, Codex, and GitHub Copilot by learning from past runs rather than modifying the underlying model. On SWE-Bench, it reports 18.4-30.9% lower mean cost across five agent-model pairs, with cheaper results in every tested repo/combination and improved Pass@1 in most cases. Useful for teams running agentic coding at scale who want cost control without sacrificing accuracy.

Python🇺🇸 North America
★8,290
INK-Q/agy-fast

A local MCP plugin that cuts Antigravity's LLM turns and token cost — agy-fast is a zero-dependency MCP plugin for Google Antigravity (CLI, Desktop, IDE) that batches searches, symbol outlines, multi-file edits, and build checks into local calls. Benchmarks claim roughly 34% fewer LLM turns, 31% less billable token quota, and 40% less upload traffic, without touching Antigravity's native UI, diffs, or checkpoints. Useful for developers running Antigravity agents who want lower latency and cost.

TypeScript
★4,029
alexgreensh/token-optimizer

Find the ghost tokens. Fix them. Survive compaction. Avoid context quality decay.

Python
★3,157
localixai/plugins

Cost-cutting for Claude Code, backed by your own session replays — tokendoctor replays your last 30 days of Claude Code sessions at different compaction windows (200K-600K) to show what each setting would have actually cost you, using your own transcripts rather than generic benchmarks. It then lets you apply only the changes your data supports, and undo them, aiming for up to 38% token savings.

TypeScriptAttention 38
★186
DFKHelper/token-goat

Auto AI improver. Cost and token burn reducer, turn saver, and focus keeper for Claude Code, Copilot, Codex, Hermes, and more: surgical read hints, PDF/Office/CSV/md file interception, 255+ filter & interception rules, compact manifest injection, image shrinking, cache and compact skills, cache MCPs, prompt injection protection, and much more.

TypeScript🇺🇸 North AmericaAttention 43
★151
nagisanzenin/nonhuman

Agent-first coding mode for any coding agent: -18% billed tokens on Claude Opus 5.5 and -23% on Gemini 4 Neon XHigh (16/16 SWE-Bench Pro, zero security loss, pre-registered).

Python
★145
archid21/rightsize

Make every Claude token count. rightsize picks the right model and effort for each prompt, while keeping cache and context costs low. It learns how you work and gets better over time.

TypeScriptAttention 57
★58
pvjbuilds/delegate-router

Claude Code and Codex CLI skill: an LLM router that delegates bulk, already-decided coding tasks to another model you already pay for (GPT via Codex, Gemini via agy, a Claude Opus subagent), on another subscription first. Benchmark-checked routes, cost per task measured on a bench, cross-model review. The host verifies every diff.

Python
★43