Repository navigation
v0.1.0
Initial release of Kompact — multi-layer context optimization proxy for LLM agents.
Features
- 8 transforms: TOON, JSON Crusher, Code Compressor, Log Compressor, Content Compressor (TF-IDF extractive), Schema Optimizer (TF-IDF tool selection), Observation Masker, Cache Aligner
- Transparent HTTP proxy: works with any Anthropic/OpenAI-compatible agent — just change
base_url - Adaptive pipeline: scales compression parameters based on context size
- Artifact index: tracks compressed content for re-fetching
- Live dashboard: real-time metrics at
/dashboard - Benchmark suite: context-bench integration with NIAH, answer recall, effective ratio, cost-of-pass metrics
Benchmarks
47.7% compression with 100% needle preservation on search-heavy scenarios. See README for full comparison against Headroom and LLMLingua-2.
Install
pip install kompact