Openclaw Context Capsule

Data & APIs

Compresses agent session history by over 99% before sending to LLM, retaining last 10 messages verbatim and summarizing the rest into a 60-token capsule.

Install

openclaw skills install context-capsule

Context Capsule

Compress agent session history 99.3% before it hits the LLM. Works with Claude, GPT, Ollama, Mistral, LM Studio — any model.

What it does

Keeps last 10 messages verbatim. Compresses the rest into a 60-token capsule. Agent still answers 30/30 memory questions correctly.

Savings

WithoutWith
Tokens per call7,58353
Cost (Claude Sonnet)$0.023$0.00016
Monthly (50 calls/day)~$34~$0.24

Install

npm i @parad0x_labs/context-capsule

Benchmark

npm run bench:public

CI fails if savings drop below 95% or recovery below 90%.

Source

github.com/Parad0x-Labs/dna-x402/tree/main/packages/context-capsule