
TokenEconomizer
Learns from past agent sessions to cut coding-agent token costs
- Pricing
- Open source
- Platforms
- CLI
- GitHub stars
- 7.2K
- Last commit
- today
- Language
- Python
- License
- Apache-2.0
About TokenEconomizer
TokenEconomizer is an open-source AI tool for developer tools. It is available on CLI.
This wraps an existing coding agent rather than replacing it. It watches sessions in a repository and applies what it learns to later ones, through three mechanisms.
Micro-skills record repeated repo facts, such as the right test command, once three sessions confirm them. Tool pruning leaves unused tool definitions out of future requests through the agent's own settings, and one command restores them. A loop guard asks a judge model whether a turn is stuck and, if confident, sends one redirect note.
The authors report 18.4 to 30.9 percent lower mean cost on SWE-Bench tasks across five agent and model pairs. That figure comes from the project's own measurement. It is a Microsoft and UC Berkeley research project, Apache-2.0 licensed.
What it does
- Micro-skills
- Stores repo facts confirmed across three sessions.
- Tool pruning
- Drops tools that go unused over several sessions.
- Loop guard
- Judge model can redirect a stuck turn once.
- Black-box control
- Works without changing the agent itself.
- Reversible
- One command restores pruned tools.
Good for
- Lower token spend on a frequently used repo
- Stop agents repeating the same failed command
- Reduce tool-definition overhead
Pricing
Open source
Apache-2.0
TokenEconomizer FAQ
Does it modify the agent?
No, it works without changing the agent itself.
How much does it save?
The authors report 18.4 to 30.9 percent lower mean cost on SWE-Bench tasks.
Will it stop a stuck turn?
It redirects at most once, then tells you how to stop it.
Is TokenEconomizer free?
Yes. TokenEconomizer is open source, so you can use and self-host it for free.
What are the best alternatives to TokenEconomizer?
The closest alternatives to TokenEconomizer are ECC, firecrawl, ponytail, graphify and orca.
Alternatives to TokenEconomizer

Skills, hooks, memory and security layer for coding agent harnesses
- Freemium
- Open-source agent
- 305K GitHub stars
- AI models and LLM tooling

Web search, scraping and page interaction API for AI agents and developers
- Freemium
- Agent framework
- 202K GitHub stars
- Web search and scraping

Ruleset that makes AI coding agents write less code that still works
- Open source
- Open-source agent
- 192K GitHub stars
- AI models and LLM tooling

Code knowledge graph that gives coding assistants shared, source-linked context
- Freemium
- Open-source agent
- 149K GitHub stars
- Knowledge and memory

Desktop environment for running several coding agents in parallel worktrees
- Open source
- Open-source agent
- 127K GitHub stars
- Coding

Memory for coding agents that saves decisions and fixes, with optional hosted sync
- Freemium
- Open-source agent
- 118K GitHub stars
- Knowledge and memory