PyRank
  • Insights
  • PyPI
  • GitHub
  • Search
  • Compare
  • Advisories
  • Ecosystem
  • About

Context Compression Python Packages

Python packages with the GitHub topic context-compression. Sorted by relevance, with stars and monthly downloads.
dshakes
distil-llm

Compression with a quality contract — cache-aware, causally-pruned LLM context compression for agentic runtimes, certified non-inferior across 7 domains. Works with any SDK.

16K 1 0
juyterman1000
entroly-core

Cut your Claude / OpenAI / Gemini bill 70–95% on AI coding. Local proxy that compresses context, keeps provider caches hot, and verifies LLM output ($0 hallucination guard). Drop-in for Cursor, Claude Code, Codex, Aider + 34 more and custom providers — 30s, no code changes

15K 419 66
juyterman1000
entroly

Cut your Claude / OpenAI / Gemini bill 70–95% on AI coding. Local proxy that compresses context, keeps provider caches hot, and verifies LLM output ($0 hallucination guard). Drop-in for Cursor, Claude Code, Codex, Aider + 34 more and custom providers — 30s, no code changes

10K 419 66
finktech-dev
llm-zip

Self-hosted HTTP sidecar for LLM context compression. Reduce token costs 3–5× before calling any AI API — powered by LLMLingua-2 and MarkItDown. No proxy, no API keys, no GPU required.

7K 0 0
robbiebusinessacc
justllm

Production LLM calls. Just the three lines. Cross-provider fallback, native caching, and reversible context compression on by default.

5K 1 1
open-compress
claw-compactor

14-stage Fusion Pipeline for LLM token compression — reversible compression, AST-aware code analysis, intelligent content routing. Zero LLM inference cost. MIT licensed.

992 2K 209
naranor
agent-coderag

CodeRAG: Lightweight semantic code search and distillation utility for AI coding agents. It solves the API knowledge gap via real-time local signature extraction and intent analysis. Optimized for token efficiency, it compresses codebase context into compact semantic summaries stored in a local DuckDB vector similarity index.

956 1 0
SUDARSHANCHAUDHARI
foldback-ai

Lossless context compression for LLM agents — fold it down, fold it back. Compresses tool outputs/logs before the model, prompt-cache-preserving, 39–82% fewer tokens. pip install foldback-ai

942 1 0
castnettech
mnemosyne-engine

State aware knowledge compression, ingestion, and hybrid retrieval engine. Zero dependencies. Sub-100ms queries.

704 58 9
MakeaMouse
fish-bridge-mcp

An economical and fuel(token) efficient AI tool, graph session memory for looong chat session

673 2 0
aimaghsoodi
foveance

Cut your LLM token bill 60%+ without changing your code or your answers. Drop-in proxy + one-line Python API that auto-compresses agent context for Claude Code, Codex, OpenAI, Anthropic & Ollama. pip install foveance

585 8 1
Yuchen20
contextcrumb

Save Token Usage on Unstructured Document 😎. Let agent read docs, memories, prompts with in ultra-compressed mode through a tiny local model.

484 1 0
uninhibited-scholar
llm-context-compressor

Shrink LLM context windows by removing noise, redundancy, and long-tail detail — without losing signal.

469 1 0
mo-tunn
tokenpack-rag

Query-aware semantic chunk selection under LLM context-window budgets.

440 10 0
arjunkshah
supercompress

SuperCompress — learned context compression for LLMs.

403 2 0
castnettech
mnemosyne-ollama

State aware knowledge compression, ingestion, and hybrid retrieval engine. Zero dependencies. Sub-100ms queries.

386 58 9
KRLabsOrg
squeez

Squeeze verbose LLM agent tool output down to only the relevant lines

352 20 0
nac7
tooltrim

Drop-in compression for LLM agent tool outputs: cut ~99% of tool-result tokens while keeping (often improving) answer accuracy. Provider-agnostic, with a faithfulness benchmark and an OpenAI-compatible proxy.

328 1 0
castnettech
mnemosyne-mcp

State aware knowledge compression, ingestion, and hybrid retrieval engine. Zero dependencies. Sub-100ms queries.

272 58 9
h2cker
llama-index-postprocessor-vecr

LlamaIndex postprocessor for vecr-compress: deterministic retention-guaranteed node compression.

220 0 0
h2cker
vecr-compress

Auditable, deterministic context compression for LLMs — structured data survives by regex whitelist, every decision logged.

204 0 0
h2cker
langchain-vecr-compress

Deterministic, auditable LLM context compression — regex whitelist guarantees structured facts (IDs, URLs, dates, code) survive. Two layers: retention + heuristic knapsack.

187 0 0
compactbench
compactbench

Open benchmark for LLM context compaction methods — measures what survives when you replace conversation history with a compacted artifact. Multi-cycle drift, hidden ranked set.

183 2 0
    • Data from PyPI, GitHub, ClickHouse, and BigQuery