# LLMSlim documentation

> Developer documentation for LLMSlim Core, the open-source Python library.

## Getting Started

- [Getting Started](https://www.llmslim.app/docs/getting-started.md): Install LLMSlim and compress long prompts with the Python API.

## Core Concepts

- [Adaptive Context Planner](https://www.llmslim.app/docs/adaptive-context-planner.md): Build deterministic, explainable context plans across instructions, chat, retrieval, memory, and tool contracts.
- [Provenance and ContextRole](https://www.llmslim.app/docs/context-role.md): Keep untrusted retrieval, tool, and assistant content out of the protected priority tier.

## API Reference

- [Document and chat pipelines](https://www.llmslim.app/docs/pipelines.md): Compress retrieved documents and chat messages with role-aware defaults.
- [Token counter telemetry](https://www.llmslim.app/docs/telemetry.md): Read token_counter_used and handle the heuristic fallback appropriately.

## Guides & Strategies

- [MCP catalogs and agent hosts](https://www.llmslim.app/docs/mcp-catalogs.md): Use LLMSlim v0.6.0 MCP sources, context plans, scoped caching, and the optional OpenAI Agents SDK bridge.

## Framework integrations

- [LLMSlim + LangChain](https://www.llmslim.app/integrations/langchain.md): A BaseDocumentCompressor for ContextualCompressionRetriever. Use it where you would use LLMLinguaCompressor.
- [LLMSlim + LlamaIndex](https://www.llmslim.app/integrations/llamaindex.md): A BaseNodePostprocessor for query engines. Use it where you would use LongLLMLinguaPostprocessor.
- [LLMSlim + Haystack](https://www.llmslim.app/integrations/haystack.md): A Haystack 2.x and 3 component that compresses retrieved documents between the retriever and the prompt builder.

Canonical page: https://www.llmslim.app/docs
