Token compression · V2

Fewer tokens.
Same context.

Compression V2 upgrades Edgee's Compress pillar for coding agents. Three techniques across two layers: sharper tool result trimming, new task-aware tool surface reduction, and Layer 2 output brevity — semantically lossless on code tasks.

Drop-in CLI · works with your existing API keys and plans · no code changes

compression.toml
live preview

tokens the model sees

9,210

of 18,420 uncompressed

50%

reduction

kept · sent to model9,210 removed

Toggle a technique to see the bill move.

Install
  • −50%

    tokens on a typical session

    all three techniques on

  • <12ms

    P50 gateway overhead

    compression time at the edge

  • 100%

    semantically lossless

    on code-oriented tasks

  • 0

    code changes

    drop-in CLI wrapper

Illustrative figures on a mixed suite of coding-agent workflows. Your mileage may vary.

Two layers. Three techniques.

Token compression splits in two. Layer 1 (Input) handles what enters the context window — tool results, tool definitions, codebase context — roughly 99% of token volume in a coding session. Layer 2 (Output)trims the model's response: small in volume, high in ROI. V2 sharpens both and adds a new Layer 1 technique that compresses the tool surface itself.

What's new in Compression V2

Each technique is a named config flag you toggle independently. Percentages below are each technique's share of one illustrative session — measured in tokens, never summed across techniques.

Tool result trimming

Improved in V2

tool_result_trimming · Layer 1 (Input)

10%1,842 tokens

Filters CLI and tool results before they reach the model — boilerplate, pagination markers, ANSI escape sequences, repeated headers, and verbose framing. Inspired by RTK. V2 trims harder while keeping the output semantically intact for code tasks: a 980-token directory listing becomes a dense 340-token one the model reads just as well.

Tool surface reduction

New in V2

tool_surface_reduction · Layer 1 (Input)

10%1,842 tokens

Agents send the model the union of every MCP server, skill, and tool definition on every request — even when 95% are irrelevant to the task. V2 runs a small, fast classifier that scores each tool against the classified task, then strips or down-scopes the rest before the request hits the model. Your IDE still exposes everything; the model only sees a curated, task-relevant subset. No more toggling MCP servers on and off by hand like a mixing desk.

Output brevity

New in V2

output_brevity · Layer 2 (Output)

30%5,526 tokens

Reduces the verbosity of model responses without losing technical content — same answer, fewer tokens. Pick the level (light, medium, hard) to trade aggressiveness against tone. Small in token volume, high in ROI: output is the ~1% of traffic you pay the most for.

Compression is designed to be semantically lossless for code-oriented tasks. We validated this on a suite of coding benchmarks where the compressed prompt produced outputs statistically indistinguishable from the original. Extremely short prompts compress less, tool-use schemas are passed through untouched, and when in doubt Edgee skips compression.

See it on a live session

Watch the three V2 techniques applied to a real Claude Code session — what gets trimmed, which tools get cut, and how the token bill moves.

A walkthrough of the three V2 techniques applied to a live Claude Code session: tool result trimming, tool surface reduction, and output brevity.

Drop-in install

Install the CLI once. Launch any supported coding agent through it. Compression V2 runs per session — your CLAUDE.md and MCP servers stay put.

# Install the Edgee CLI
curl -fsSL https://edgee.ai/install.sh | bash

# Launch Claude Code through the compression proxy
edgee launch claude

Full CLI guide in the Edgee documentation.

Measure every saved token

Compression without observability is flying blind. Every session reports its compression ratio, tokens saved, and estimated cost avoided — at developer and team level.

Technical FAQ

Stop sending verbose prompts. Ship Compression V2.

50% fewer tokens on a typical session (18,420 9,210), semantically lossless on code tasks.

Works with your existing API keys and plans. No lock-in.

Edgee Turbo Models - Use Claude Code with Kimi K2.7, MiniMax M2.7, and more | Product Hunt