Skip to content
Hero Background Light

Maximum context. Minimum tokens.

Compressius Maximus intelligently reduces the context sent by your AI agents, lowering token usage and API costs while preserving essential meaning, instructions, and information.

Terminal window
curl -fsSL https://cmx.llm.kiwi/install.sh | bash

Works with your stack

cmx speaks the OpenAI and Anthropic chat protocols — if your harness can hit a base URL, it works.

Claude CodeOpenCodeCodexGemini CLICursorClineAiderAny OpenAI-compatible client

Compress AI context. Preserve what matters.

Agents resend their entire history on every single turn. Old tool output, dead ends and logs ride along forever — and you pay for all of it.

Costs compound by default

A long session resends the same stale tokens hundreds of times. Cache fees quietly become 80%+ of your inference bill.

cmx compresses in the background

Stable message IDs let the model crystallize stale spans into dense summaries. The gateway rewrites requests on the fly.

Nothing about your setup changes

Same harness, same provider keys, same model. Your stored session history is never touched — only the proxied request is.

How it flows

A local gateway. One hop. Zero config on the provider side.

┌──────────┐ ① every turn ┌─────────────────┐ ② only what's needed ┌──────────┐
│ agent │ ───────────────▶ │ cmx gateway │ ───────────────────────▶ │ provider │
│ harness │ ◀─────────────── │ 127.0.0.1:17322 │ ◀─────────────────────── │ model │
└──────────┘ ③ same reply └─────────────────┘ ④ compressed req. └──────────┘
⑤ summaries stored locally in SQLite

The numbers from our own runs

Measured end-to-end on real sessions with the production gateway — not lab conditions.

46% context cut

Live end-to-end smoke test: a 1,164-token context rewritten down to 628 tokens on the compressed turn — and larger sessions save more.

Cache-aware

Compression only fires when projected savings repay the one-time cache-rewrite cost — usually within 2–3 turns.

Private by default

Conversations and summaries stay in SQLite on your machine. Optional cloud features use only documented aggregate counters; only your provider sees your prompts.

Have questions? We've got answers

The things people ask before pointing their agent at a gateway.

Setup & Compatibility

Getting cmx running with your stack.

How Compression Works

What gets compressed and when.

Data & Pricing

Where your data lives and what it costs.

Go deeper

Everything else you need to run cmx day to day.

How it works

Message IDs, the compress tool, summary nesting and cache economics — the full mechanics. Read the mechanics →

Configuration

Thresholds, summarizer models, protected tools, retention — every knob explained. Configure cmx →

Dashboard

Terminal UI plus optional hosted dashboard: savings, sessions, summaries and cache stats at a glance. See the dashboards →

Maximum context. Minimum tokens.

One command installs the gateway. Your harness, provider and model all stay the same.

Install cmxQuick start