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

Prompt Compression Python Packages

Python packages with the GitHub topic prompt-compression. Sorted by monthly downloads, with stars and forks.
fkiene
llmtrim

Local proxy that compresses your LLM API requests so you pay less, with no change to the answers. Trims wasted tokens from prompts, history, tool output, and code before they're sent: -31% input / -74% output, measured live. Any provider, no extra model calls. Also an MCP server and embeddable library (Rust, Python, Ruby, Kotlin, Swift, JS/TS).

5K 243 23
omar-y-abdi
furl-ctx

Context compression for AI agents — cut token usage costs with retrievable CCR compression. Rust core + Python API, Claude Code & Codex plugin, MCP server. PyPI: furl-ctx

2K 5 0
KathanModh259
latent-gate

MCP server that shrinks logs, JSON, docs and web pages before your AI reads them. Offline, deterministic, ~3ms, no API key. 66% fewer tokens on a mixed dev corpus, 90%+ on logs.

2K 25 2
NadirRouter
barber-llm

Query-aware context trimming for LLM requests. Your context could use a trim.

1K 5 0
lucasmartins-ai
local-context-compiler

Cut LLM context and Claude Code sessions 40–80% without rewriting a byte. Offline, verbatim, with an audit receipt for every block dropped. CLI, MCP server and Claude Code/Open AI Plugin. MIT.

1K 12 0
bnimit
memor-cli

One local memory shared by every AI coding agent — Claude Code, Cursor, Codex, Copilot, Kimi, Goose. No API key, no cloud, no plugin to install. Plus opt-in token compression.

603 2 0
howwang0507
adaptive-prompt-compressor

Adaptive Prompt Compression system powered by Contextual Bandit (LinUCB) to optimize LLM API costs and response quality. 🧠🤖

528 0 0
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.

506 1 0
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.

458 2K 184
aimaghsoodi
foveance

A lossless token-optimization codec for LLM agents — cut input tokens up to 82%, nothing dropped, every fact kept. Drop-in proxy + one-line Python API for Claude Code, Codex, Cursor, OpenAI, Anthropic & Ollama. pip install foveance

412 20 1
riceharvest
ctxprune

Context compression for AI agents: LLMLingua-2 successor that keeps IDs, paths and numbers intact. 68.8% vs 53.4% QA at 50% kept.

291 0 0
anilatambharii
agentmesh-proxy

The governance plane for AI agents — policy, budget, and audit across every framework. Istio for AI agents.

273 1 1
ashishjsharda
llm-token-surgeon

Cut your LLM API costs 30–70% automatically. Zero accuracy loss. Works with OpenAI, Anthropic, and Gemini.

261 1 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.

209 0 0
jia-gao
leanctx

Drop-in prompt compression for production LLM apps. Cut your token bill 40-60% without changing your code. Python SDK, LLMLingua-2, MIT.

174 326 7
contextcrunch-ai
contextcrunch

Compress LLM Prompts and save 80%+ on GPT-4 in Python

143 3 1
laconiq-ai
tekmyra

Context compression for LLM pipelines that proves nothing protected was lost before it emits, and refuses when it cannot. Refusals count against the published numbers. Paper, benchmarks and receipts ship with the code. Open core by LaconIQ. Apache-2.0.

137 4 0
nguyenminhduc9988
tokenseive

Multi-layer token optimization for LLM applications — compress prompts, map codebases, reduce output. Zero required dependencies.

136 4 0
laconiq-ai
tekmyra-core

Context compression for LLM pipelines that proves nothing protected was lost before it emits, and refuses when it cannot. Refusals count against the published numbers. Paper, benchmarks and receipts ship with the code. Open core by LaconIQ. Apache-2.0.

135 4 0
napmany
cutia

CUTIA: compress prompts while preserving quality

103 7 0
arjunkshah
supercompress

Neural context compression for long-running AI agents. Query-aware context compiler.

98 7 1
akshayballal95
grugify

Shrink anything you feed an LLM. Keep the words that change the answer.

89 1 0
DelvyG
promptminify

Minify LLM prompts to save tokens — domain-aware, tiktoken-validated, zero regressions

83 1 0
h2cker
vecr-compress

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

73 0 0
    • Original data from PyPI, GitHub, and OSV; downloads served through ClickHouse
    • Sources & methodology