🦞 OpenClaw ecosystem — built on aeromomo/claw-compactor

The Claw Compactor

Crush your OpenClaw agent context by 98%. 5 compression layers, pay-per-run with $cCLAW. The first tokenized utility in the claw ecosystem.

Origin

aeromomo built the compactor. We built the meter.

claw-compactor is an open-source Python tool by aeromomo, built for the OpenClaw ecosystem. It compresses AI agent workspaces — memory files, session transcripts, sub-agent context — using 5 rule-based compression layers. No LLM needed. Python 3.9+. MIT licensed.

$cCLAW is the fuel for the hosted compression API. Every run burns tokens proportional to workspace size. The CLI stays free forever. The token powers the managed service: one API call, instant results, no local setup.

How It Works

5 Compression Layers

Data flows through each layer sequentially. Each technique targets a different type of redundancy. Together they achieve 50%+ savings on a typical workspace.

Input
100,000 tokens
Lossless
L1Rule Engine

Dedup lines, strip markdown filler, merge sections

4–8%
Lossless
L2Dictionary Encoding

Auto-learned codebook, $XX substitution

4–5%
Lossy
L3Observation Compression

Session JSONL → structured summaries

~97%
Lossless
L4RLE Patterns

Path shorthand ($WS), IP prefix, enum compaction

1–2%
Lossy
L5Compressed Context Protocol

Ultra/medium/light abbreviation levels

20–60%
Output

Real-world savings

Session transcripts~97%
New workspace50–70%
Weekly maintenance10–20%
Already optimized3–12%

Combined with caching

95%

effective cost reduction

50% compression + 90% prompt cache discount

Burn Model

Every run burns $cCLAW

Bigger workspace = more tokens burned. Volume discounts kick in automatically. No tiers, no staking gates. Just use it.

Compress

1K tokens

500 $cCLAW

Single file cleanup

Compress

10K tokens

4,000 $cCLAW

20% volume discount

Compress

100K tokens

30,000 $cCLAW

40% volume discount

Compress

1M tokens

200,000 $cCLAW

60% volume discount

The open-source CLI is always free. Burns apply only to the hosted API.

FAQ

Common questions