Compress tool outputs, logs, files, and RAG chunks before they reach the LLM. 20% fewer tokens for coding agents, 60-95% fewer tokens for JSON, same answers. Library, proxy, MCP server.
Python agentaianthropicclaude-codecompressioncontext-engineeringcontext-windowcursorfastapilangchainllmmcpopenaiprompt-engineeringproxypythonragtoken-optimizationtokenstypescript
{
"config": {
"dedup_identical_items": true,
"enabled": true,
"factor_out_constants": false,
"first_fraction": 0.3,
"include_summaries": false,
"last_fraction": 0.15,
"max_items_after_crush": 15,
"min_items_to_analyze": 5,
"min_tokens_to_crush": 200,
"preserve_change_points": true,
"similarity_threshold": 0.8,
"toin_confidence_threshold": 0.5,
"uniqueness_threshold": 0.1,
"use_feedback_hints": true,
"variance_threshold": 2.0
},
"input": {
"bias": 1.0,
"content": "this is not json at all",
"query": ""
},
"input_sha256": "4322abf677f3994fbc00cbaf53ff6fb3935075029f2e122feadc3b7525bd81af",
"label": "non_json_passthrough",
"output": {
"compressed": "this is not json at all",
"original": "this is not json at all",
"strategy": "passthrough",
"was_modified": false
},
"recorded_at": "2026-04-27T06:59:39.894849+00:00",
"transform": "smart_crusher"
}