TokenEconomizer
An open-source context optimization plugin for coding agents, released jointly by Microsoft Research and UC Berkeley. It learns context selection strategies from historical sessions and compresses context intelligently to reduce token costs without altering the agent's logic. The plugin targets the accumulation of conversation history that inflates prompt size, applying learned filtering to retain relevant information while discarding redundant content, thereby lowering inference expense in long-running agent workflows.
Timeline (last 90 days)
Microsoft Research and UC Berkeley jointly released the open-source plugin TokenEconomizer.
On SWE-Bench, TokenEconomizer can reduce the token cost of coding agents by 18.4% to 30.9%.
TokenEconomizer takes the form of a plugin; it does not require developers to rewrite agent logic or change how models are called, but instead intelligently compresses and filters context at the session level.
TokenEconomizer learns from past sessions to identify which context fragments are valuable for the current task, so that all historical information need not be placed into the prompt for a new task.
The benefits of TokenEconomizer depend heavily on task type and session characteristics, and different tasks vary greatly in their dependence on context.
The 'learning from past sessions' approach adopted by TokenEconomizer is a data-driven dynamic context selection method whose effectiveness depends heavily on the scale and distribution of historical data; if a new task differs greatly from past sessions, the benefits may degrade noticeably.
For API users billed by token, a 20% to 30% reduction in token cost translates directly into a lower bill amount.
TokenEconomizer is released as open source, lowering the adoption barrier, and teams can review its context-processing logic themselves and assess compatibility with their own agent frameworks.
All Facts (8)
TokenEconomizer is released as open source, lowering the adoption barrier, and teams can review its context-processing logic themselves and assess compatibility with their own agent frameworks.
50%UnverifiedOn SWE-Bench, TokenEconomizer can reduce the token cost of coding agents by 18.4% to 30.9%.
50%UnverifiedTokenEconomizer takes the form of a plugin; it does not require developers to rewrite agent logic or change how models are called, but instead intelligently compresses and filters context at the session level.
50%UnverifiedTokenEconomizer learns from past sessions to identify which context fragments are valuable for the current task, so that all historical information need not be placed into the prompt for a new task.
50%UnverifiedThe benefits of TokenEconomizer depend heavily on task type and session characteristics, and different tasks vary greatly in their dependence on context.
50%UnverifiedThe 'learning from past sessions' approach adopted by TokenEconomizer is a data-driven dynamic context selection method whose effectiveness depends heavily on the scale and distribution of historical data; if a new task differs greatly from past sessions, the benefits may degrade noticeably.
50%UnverifiedFor API users billed by token, a 20% to 30% reduction in token cost translates directly into a lower bill amount.
50%UnverifiedMicrosoft Research and UC Berkeley jointly released the open-source plugin TokenEconomizer.
50%