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": {
"always_keep_additions": true,
"always_keep_deletions": true,
"enable_ccr": true,
"max_context_lines": 2,
"max_files": 20,
"max_hunks_per_file": 10,
"min_lines_for_ccr": 50
},
"input": "diff --git a/new.py b/new.py\nnew file mode 100644\n--- /dev/null\n+++ b/new.py\n@@ -0,0 +1,4 @@\n+def hello():\n+ return 'world'\n+\n+x = hello()\n# variant 0",
"input_sha256": "2cd095b132f5da3f90c8f101e192724f40e4d23fa8ad720c287a72d7944ea589",
"output": {
"additions": 0,
"cache_key": null,
"compressed": "diff --git a/new.py b/new.py\nnew file mode 100644\n--- /dev/null\n+++ b/new.py\n@@ -0,0 +1,4 @@\n+def hello():\n+ return 'world'\n+\n+x = hello()\n# variant 0",
"compressed_line_count": 10,
"deletions": 0,
"files_affected": 0,
"hunks_kept": 0,
"hunks_removed": 0,
"original_line_count": 10
},
"recorded_at": "2026-04-23T23:51:37.353113+00:00",
"transform": "diff_compressor"
}