Topics / #token-optimization
Token-optimization projects on GitHub
Reducing token usage and context size in LLM workflows.
As of , the most-starred Token-optimization projects on GitHub are rtk (88.6K stars), headroom (81.3K stars) and OpenViking (43.1K stars). GitHub.Locker tracks 16 Token-optimization repositories with 286.8K stars combined. The fastest-growing on December 2 was rtk, with +155 stars in a day.
Hot right now
Most stars gained in a day · Dec 2
+155rtk
rtk-ai/rtk · ★ 88.6Krtk is a CLI proxy that filters and compresses command outputs before they reach your LLM context, cutting 60-90% of the bash output your coding agent reads and lowering token costs.
headroom
headroomlabs-ai/headroom · ★ 81.3KHeadroom compresses everything an AI agent reads - tool outputs, logs, RAG chunks, files, and conversation history - before it reaches the LLM, cutting tokens while keeping the same answers. It ships as a library, a local proxy, and an MCP server.
+93billion-context
ranxianglei/billion-context · ★ 8.9Kbillion-context is a context-compression proxy that sits between any coding agent and its model API, rewriting Anthropic/OpenAI streams so a 100K context window is enough and a single session can run for months across billions of tokens.
+49OpenViking
volcengine/OpenViking · ★ 43.1KAn open-source context database for AI agents: memories, resources, and skills live in one virtual filesystem under the viking:// protocol, so the agent browses its own context with ls, tree, and find instead of querying a black-box vector store.
The all-time top
16 projects · by stars
- 88.6K
#1 · rtk-ai/rtkrtk
rtk is a CLI proxy that filters and compresses command outputs before they reach your LLM context, cutting 60-90% of the bash output your coding agent reads and lowering token costs.
- 81.3K
#2 · headroomlabs-ai/headroom
headroom
Headroom compresses everything an AI agent reads - tool outputs, logs, RAG chunks, files, and conversation history - before it reaches the LLM, cutting tokens while keeping the same answers. It ships as a library, a local proxy, and an MCP server.
- 43.1K
#3 · volcengine/OpenVikingOpenViking
An open-source context database for AI agents: memories, resources, and skills live in one virtual filesystem under the viking:// protocol, so the agent browses its own context with ls, tree, and find instead of querying a black-box vector store.
- 4

code-review-graph
33Ktirth8205/code-review-graph · PythonA local-first code intelligence tool: it builds a persistent graph of your codebase so AI coding assistants read only the files that matter on review and large-repo tasks, instead of re-reading everything.
- 5

billion-context
8.9Kranxianglei/billion-context · TypeScriptbillion-context is a context-compression proxy that sits between any coding agent and its model API, rewriting Anthropic/OpenAI streams so a 100K context window is enough and a single session can run for months across billions of tokens.
- 6

TokenEconomizer
8.3Kmicrosoft/TokenEconomizer · PythonTokenEconomizer is an experience-driven system that makes coding agents (like Claude Code or Codex) cheaper to run in repositories you use often, without modifying the agent itself. It learns from past sessions in a repository and uses that experience to cut waste in future sessions.
- 7
answer-me-with-html
6.5KQingYunA/answer-me-with-html · JavaScriptAnswer me with HTML is an agent skill that turns a coding agent's long text answers into a single-page HTML with diagrams, tables, or timelines instead of a wall of text. The model only writes a short Markdown draft and a bundled CLI renders the layout, CSS and SVG.
- 8

opencode-dynamic-context-pruning
4.5KTarquinen/opencode-dynamic-context-pruning · TypeScriptDynamic Context Pruning (DCP) is a plugin for OpenCode that automatically cuts token usage by intelligently managing conversation context — compressing stale history into summaries, deduplicating repeated tool calls, and purging failed tool-call inputs.
- 9

lean-ctx
4Kyvgude/lean-ctx · RustLeanCTX is a 'Context Gateway' that runs locally alongside your AI coding agent, deciding what context the model actually sees, compressing it, and tracking the cost and outcome of that work.
- 10

SoL-Pi
3.7KNVlabs/SoL-Pi · TypeScriptSoL-Pi is a standalone extension for the Pi coding agent that packages four efficiency mechanisms discovered through scaled auto-research loops. It cuts repeated model turns, context replay, oversized observations and long-log reading without dropping the work an agent needs.
- 11

maki
1.4Ktontinton/maki · RustMaki is a terminal AI coding agent written in Rust, built to spend as few context tokens as possible, and extendable with neovim-style Lua plugins.
- 12
Step-Code
1Kstepfun-ai/Step-Code · TypeScriptStep Code is a terminal-based AI coding agent from StepFun: it handles the full task loop in your project — reading code, making changes, running tests — using Step models after you sign in.
- 13

axiomcodegraph
754AxiomCodeAI/axiomcodegraph · TypeScriptAxiomCode Graph turns a codebase into a knowledge graph built with formal methods (compiler-style type resolution) rather than syntax guessing, so AI coding agents can look up exact callers, callees, call paths and affected tests instead of grepping through code.
- 14

dsh-see-now
701SAOS-3624/dsh-see-now · JavaScriptIt's a real-time vision plugin for DSH. It turns your screen (or a camera or a video file) into a stream of frames, keeps only the ones where something changed, and stitches them into one image for the model, so a still screen costs almost nothing.
- 15

jev-router
670gargpratyush/jev-router · JavaScriptjev-router automatically picks the cheapest capable AI model for each turn in Claude Code or OpenAI Codex, sending simple requests to a fast/cheap tier and hard requests to a stronger tier, while keeping each CLI's native interface, tools, and authentication untouched.
- 16
Astra-Ares
316miuuyy/Astra-Ares · JavaScriptAstra-Ares is an experimental tool that lets Jev, an AI evaluator, adapt GPT-6's reasoning effort while a Codex task runs, matching thinking depth to each next step to reduce token usage.
Related topics
Often tagged together