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.

16Projects
286.8KStars in total
+506Stars in a day

Hot right now

Most stars gained in a day · Dec 2

The all-time top

16 projects · by stars

  1. #1 · rtk-ai/rtk

    rtk

    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.

    88.6K
  2. #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.

    81.3K
  3. #3 · volcengine/OpenViking

    OpenViking

    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.

    43.1K
  1. 4

    code-review-graph

    33Ktirth8205/code-review-graph · Python

    A 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.

  2. 5

    billion-context

    8.9Kranxianglei/billion-context · TypeScript

    billion-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.

  3. 6

    TokenEconomizer

    8.3Kmicrosoft/TokenEconomizer · Python

    TokenEconomizer 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.

  4. 7

    answer-me-with-html

    6.5KQingYunA/answer-me-with-html · JavaScript

    Answer 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.

  5. 8

    opencode-dynamic-context-pruning

    4.5KTarquinen/opencode-dynamic-context-pruning · TypeScript

    Dynamic 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.

  6. 9

    lean-ctx

    4Kyvgude/lean-ctx · Rust

    LeanCTX 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.

  7. 10

    SoL-Pi

    3.7KNVlabs/SoL-Pi · TypeScript

    SoL-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.

  8. 11

    maki

    1.4Ktontinton/maki · Rust

    Maki 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.

  9. 12

    Step-Code

    1Kstepfun-ai/Step-Code · TypeScript

    Step 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.

  10. 13

    axiomcodegraph

    754AxiomCodeAI/axiomcodegraph · TypeScript

    AxiomCode 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.

  11. 14

    dsh-see-now

    701SAOS-3624/dsh-see-now · JavaScript

    It'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.

  12. 15

    jev-router

    670gargpratyush/jev-router · JavaScript

    jev-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.

  13. 16

    Astra-Ares

    316miuuyy/Astra-Ares · JavaScript

    Astra-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.

Often tagged together