Edgee Compressor V2 optimizes developer agent token costs with three-layer compression
Edgee has released Compressor V2, an AI gateway layer that uses three orthogonal strategies to reduce agent context bloat without breaking prompt caches. This update addresses the compounding costs of long-running SWE-bench style developer sessions.
Impact: Medium
Why it matters
As AI agents perform complex, multi-turn coding tasks, context windows quickly fill up, leading to soaring API costs. Optimizing context usage without losing prefix caching is key to sustainable AI agent economics.
TL;DR
- 01Edgee Compressor V2 uses brevity, tool surface reduction, and tool result trimming to reduce token costs.
- 02The approach avoids modifying the static prefix, ensuring compatibility with Anthropic's prefix caching.
- 03Evaluations on SWE-bench Lite show statistically significant token savings with low within-task variation.
Key facts
- Baseline V1 cost savings
- ~10%
- Evaluation benchmark
- SWE-bench Lite
- Typical task turns
- 30-100 API turns
- Typical tokens per task
- 1M to 10M tokens
Three Orthogonal Compression Layers
Edgee Compressor V2 splits token optimization into three independent layers designed to combat distinct sources of agentic context bloat:
- Brevity: Compresses the model's output tokens. This directly targets the most expensive token tier (outputs) without touching the prefix.
- Tool Surface Reduction (TSR): Optimizes the input prefix by streamlining Model Context Protocol (MCP) tool catalogs and schemas, which are often highly repetitive.
- Tool Result Trimming: Inspired by the RTK project, this layer strips out verbose, redundant terminal and tool outputs accumulated over 30 to 100 conversational turns.
Preserving Prefix Caching
A key architectural requirement for coding agents is compatibility with Anthropic's prefix cache. Because Anthropic's cache is content-keyed, any changed byte invalidates the cache downstream. Edgee avoids this by focusing brevity and tool result trimming strictly on model outputs and tail-end conversation history. The static prefix (system prompt and active tools) remains untouched, letting developers preserve the 90% discount on cached input tokens.
Verified on SWE-bench Lite
To prove these gains, Edgee ran autonomous agents on SWE-bench Lite tasks over multiple randomized replicates to prevent cold-cache bias. They applied a paired sign test on task means to isolate variance from task difficulty (which ranges from 100k to 12M tokens). Across their trials, the within-task coefficient of variation remained safely below the 20% trustworthiness threshold, confirming reliable, statistically significant token savings.