Skip to main content

Documentation

Start in one line. Go as deep as you need.

Short guides for compressing context, keeping provenance, and fitting chat, retrieval and tool output into a real token budget.

quickstart.pypython
from llmslim import compress

result = compress(chat_history, target_ratio=0.25,
                  query="Where should the card be shipped?")

print(result.compressed_text)   # what the model needs
print(result.tokens_saved)      # what you no longer pay for
01Start hereYour first compressionInstall, compress a long context, and focus it on the question your agent is answering.Read 02UnderstandProvenance and trustKeep instructions protected and retrieved or tool text in its place, whatever it says.Read 03BuildRetrieval and chatShare one budget across documents, and compress conversations with role-aware defaults.Read

Getting Started

Core Concepts

API Reference

Guides & Strategies

Framework integrations