Token Compression

Same meaning. Roughly half the tokens.

The compression engine rewrites prompts and tool output into a denser stream models understand natively — lossless-first by default, aggressive on request.

INPUT847 tokens
COMPRESS
OUTPUT398 tokens
SAVED · −449 tokens · 53.0% $0.0066 · meaning preserved
The compression lab

How the gateway folds a prompt.

A set of transforms run in a single pass, inline, before the request is billed. Meaning is preserved — not every byte.

STALE-READ SUPERSESSION older read dropped
BEFORE3,888 tokens
turn 1 · tool
read src/api.py
2,041 tok · stale
turn 2 · user
now fix the bug on line 42
turn 3 · tool
read src/api.py
1,847 tok · newest
user · current
the test still fails
SUPERSEDE
AFTER1,847 tokens · −53%
turn 1 · tool
read src/api.py
superseded · 0 tok
turn 2 · user
now fix the bug on line 42
turn 3 · tool
read src/api.py
1,847 tok · kept verbatim
user · current
the test still fails
SAVED THIS REQUEST · −2,041 tokens · 52.5% $0.0066 · meaning preserved
  • 01
    Stale-read supersession

    Older copies of a re-read file are dropped; the newest read stays verbatim.

    −18%
  • 02
    Context compaction

    Stale turns and dead tool output folded out losslessly.

    −22%
  • 03
    Cross-turn dedup

    Repeated instructions and echoed tool results collapsed across turns.

    −9%
  • 04
    Structural rewrite

    Whitespace, JSON and markup normalised to a dense form.

    −4%

Illustrative per-transform split on a blended coding workload — your mix may vary.

Each fold, explained

Each fold, explained.

Every transform runs inline in the gateway — no round trips, no external calls.

01 · SUPERSESSION −18%

Stale-read supersession

When an agent re-reads a file after editing it, the older copy is dropped and only the newest read is kept verbatim — the model sees the current state, not the history of reads.

read 1 · src/api.py2,041 tok
read 2 · src/api.py (edited)→ kept · 1,847 tok
stale read 1→ superseded · 0 tok
02 · COMPACTION −22%

Context compaction

Stale conversation turns and dead tool output are folded out losslessly — the model keeps the gist, drops the bytes.

turn 1-8 · history3,210 tok
→ compacted summary1,180 tok · −63%
03 · DEDUP −9%

Cross-turn dedup

Repeated instructions and echoed tool results are collapsed across turns — the same content isn't re-sent at full size every time.

turn 1 · "read file x.py"42 tok
turn 3 · repeated→ deduped · 0 tok
04 · REWRITE −4%

Structural rewrite

Whitespace, JSON indentation and markup are normalised to a dense form the tokenizer handles in fewer tokens.

pretty JSON · 8-space184 tok
→ minified142 tok · −23%
Lossless-first

Meaning is preserved,
not every byte.

The gateway favours lossless transforms — folding out stale reads, dead tool output and repeated spans — so the model keeps the gist without the redundant bytes. Nothing the agent needs is dropped irrecoverably.

  • Lossless-first. Stale and repeated content is folded; the newest working set stays verbatim.
  • Per-request receipt. Tokens saved, percentage and dollar impact — visible in the dashboard.
  • Inline in the gateway. No round trips, no external calls.
TOKENS SAVED per request
req 12345678
avg reduction 53%

Input tokens cut roughly in half on a blended enterprise workload.

The receipt

Every request comes with a receipt.

Tokens saved, percentage and dollar impact — visible per request in the dashboard, exportable to your SIEM.

BEFORE raw
input tokens4,096
tool output1,847
system prompt2,041
total billed$0.0142
AFTER · COHESOR compressed
input tokens1,925 · −53%
tool output612 · −67%
system prompt205 · −90%
total billed$0.0066
SAVED this request
−53%

2,171 tokens kept in your budget.

dollar impact−$0.0076
transforms applied4 / 4
LOSSLESS-FIRST ✓
inline
added overhead

Compression runs inline in the gateway — no round trips, no external calls.

53%
avg reduction

Input tokens cut roughly in half on a blended enterprise workload.

lossless
first

Stale and repeated content folded; the newest working set stays verbatim.

Get started

Send fewer tokens. Keep the answers.

Compression starts on request one — no config, no model change, no migration.