
Non-destructive compression gateway for AI coding agents. Cuts token bills 25% on turn 1 to past 85%
Non-destructive compression gateway for AI coding agents. Cuts token bills 25% on turn 1 to past 85%
A non-destructive compression gateway for coding agents — cut your input-token bill without changing your agent.
Paritok sits between your agent and the LLM as a drop-in proxy. On every request it strips the tool-schema bloat, compresses tool results and file reads, and summarizes stale history — then forwards upstream, billed on the compressed tokens. Nothing is ever permanently discarded: the agent pulls back any exact original on demand. Works with Claude Code, Cursor, Codex, OpenHands, and any agent that honors BASE_URL — you don't change a line of your agent.
Powered by the first open-source 4B compression model trained specifically for coding agents (45K real agent trajectories). Cut input token bills from ~25% on turn one to past 85% in long, context-saturated sessions, and fit ~3× more turns in the same context window.
What it does · The three levers · Compounding savings · Cost · Pricing · Quick Start · The engine (model) · Team
/stats dashboard (live token savings + per-request original→compressed before/after, in place of the raw JSON) and the new Paritok VS Code extension.read_original API rename (from expand_context).gateway_search_tools recall.Paritok runs as a middle layer between your agent and the LLM API — your agent points at Paritok instead of Anthropic/OpenAI, and everything else stays the same.
Your Agent (Claude Code / Cursor / Codex)
→ builds request (tool schemas + history + tool results / file reads)
★ Paritok gateway rewrites the request here ★
→ forwarded to Anthropic / OpenAI (billed on the compressed tokens)
← response flows back unchanged; compressed refs expand on demandThe token bill for a coding agent is dominated by input you re-send every turn: dozens of tool schemas, an ever-growing message history, and big file-read / tool-output blocks. Paritok attacks all three — and because it's a non-destructive gateway, anything it compresses or filters is still recoverable on demand. It's lossy on the wire, fully recoverable when it counts.
Paritok saves tokens through three independent mechanisms. They stack, and they hit different parts of the bill:
Coding agents expose dozens of tools — often 70+ once you add MCP servers — in full JSON schema on every request. Most are irrelevant to the task at hand. Paritok filters them semantically (tool_discovery.strategy: embedding), keeping only the handful relevant to the user's intent in full schema and stubbing the rest.
tools[] block stays byte-stable turn-to-turn and never invalidates the LLM's KV cache.gateway_search_tools and gets the full schema back.Each tool_result, file read, and (once the window fills) stale history turn is compressed by the 4B model down to ~26% of its original size, tagged [REF:id]. This is where the trained model earns its keep: it knows a function signature from a debug line, so it protects identifiers, paths, and error strings while dropping the noise.
read_original / expand_context to pull back the exact untouched bytes, locally and instantly.Turns beyond the recent window are summarized once the context fills up, so a long session stays inside the model's context window instead of overflowing (or forcing an aggressive client-side compaction that drops detail).
This is the part a single-turn benchmark hides. In a real multi-turn session the two levers grow at different rates, and together they compound.
We ran the same read-only "find the bug" task for 5 consecutive turns in one Claude Code session (Sonnet, GPU model). Important: in this A/B the tool filter was left on for both sides, so the delta below isolates content compression alone — it does not include the tool-schema saving.
Content compression only (tool filter on both sides):
| Turns | Paritok (files compressed) | Baseline (files raw) | Content-only saving |
|---|---|---|---|
| 1 | 72,041 | 75,507 | 4.6% |
| 5 | 293,389 (cumulative) | 377,099 (cumulative) | 22.2% |
But that's only one of the three levers. The real "do I use Paritok or not?" comparison must add the tool filter back — and without Paritok the agent sends the entire ~29K tool-schema block every turn, not the filtered ~8K. Folding that ~21K/turn back onto the no-Paritok side:
Full stack (filter + compression vs. no Paritok at all):
| Turns | Paritok (filter + compression) | No Paritok (full tools + raw files) | End-to-end saving |
|---|---|---|---|
| 1 | 72,041 | ~96,500 | ~25% |
| 5 | 293,389 (cumulative) | ~482,000 (cumulative) | ~39% |
So the 4.6% / 22.2% above is the floor (content only). Against a real no-Paritok baseline it's ~25% on turn 1, past ~39% by turn 5 — because the tool filter saves a fixed ~21K every turn on top of the compounding content compression.
Why it grows: every file you read stays in history and is re-sent (cache-read) every subsequent turn — so content compression keeps paying off turn after turn, while the tool filter adds a fixed cut on top.
3,350 × N² — each turn's compressed reads keep paying off on every later turn.21,000 × N — a fixed block saved every turn.Plugging these formulas into a range of N (baseline ~96,500 tokens/turn), capped at a ~200K context budget (typical Sonnet-tier configuration; larger-context models like Opus 1M push the flatten point out proportionally):
| Turn (N) | Content saved | Tool filter saved | Cumulative saved | Cumulative baseline | % saved |
|---|---|---|---|---|---|
| 1 | 3,350 | 21,000 | 24,350 | 96,500 | 25% |
| 5 | 83,750 | 105,000 | 188,750 | 482,500 | 39% |
| 10 | 308,150 | 210,000 | 518,150 | 965,000 | 54% |
| 12 | 404,150 | 252,000 | 656,150 | 1,158,000 | 57% |
| 15 | 548,150 | 315,000 | 863,150 | 1,447,500 | 60% |
| 20 | 788,150 | 420,000 | 1,208,150 | 1,930,000 | 63% |
Capped at a ~200K context budget. The quadratic only holds while history is still growing. Once the accumulated context fills the configured budget (around turn ~8–12 here on Sonnet-tier ~200K), client-side compaction holds it flat, per-turn content saving stops growing (freezes at ~48K/turn), and % saved plateaus toward the ~72% default ceiling instead of diverging. Turns 1–5 match the measured tables above; later rows are in-window projections.
Ceilings shift with deployment shape:
| Deployment scenario | Baseline / turn | Ceiling % saved |
|---|---|---|
| Default (~40 tools, moderate reads) | 96,500 | ~72% |
| MCP-heavy (70+ tools) | 127,500 | ~78% |
| Context-saturated (no-Paritok forced to compact) | ~200,000 | ~85%+ |
The projection above uses the default ceiling. MCP-heavy setups earn a bigger per-turn tool-filter cut; context-saturated sessions get an even larger effective saving because they're now compared against a compacted, information-lossy baseline.
Honest cap: the quadratic doesn't run forever — whatever session context budget you configure bounds it. In practice a ~200K budget (typical for Sonnet-tier deployments) makes the curve flatten around turn ~12–20 as the window fills; larger-context models like Opus 1M push the flatten point out proportionally. But that ceiling is itself a feature: because each turn's prefix is smaller, the agent fits more turns before hitting the budget — Paritok effectively buys back context length.
Same budget, more room to think. Because each turn's prefix is smaller, the agent fits far more turns in the same window before compaction kicks in.
| Context budget | Turns without Paritok | Turns with Paritok |
|---|---|---|
| 128K (typical Claude Code default) | ~10 | ~30 |
| 200K (Claude Sonnet standard) | ~15 | ~44 |
| 1M (Claude Opus, GPT-5 beta) | ~75 | ~220 |
That's roughly 3× the runway on any budget, giving the agent more turns to think and finish the task before hitting the wall.
One line: use more, save more. Compression frees up the window and lets the agent go deeper and longer in the same session. Strongest on long, multi-turn, read-heavy work (auditing, Q&A over a big codebase, long debugging sessions).
The 74% figure is Paritok's content compression rate — file reads, tool output, and hist
No open issues yet, or sync has not completed.