# LLMSlim documentation 1.0

> **Upcoming in 1.0 (preview). These pages describe the main branch of LLMSlim Core, which becomes the 0.13 release candidate and then 1.0. `pip install llmslim` installs 0.12.0 today, which doesn't have everything described here.**

## Getting Started

- [Python quickstart](https://www.llmslim.app/docs/1.0/quickstart-python.md): Install llmslim, store turns word for word with Memory, and get back what answers a question within a token budget.
- [MCP quickstart](https://www.llmslim.app/docs/1.0/quickstart-mcp.md): Install llmslim mcp, connect Claude Code (command or plugin), Claude Desktop or Cursor, and use the remember, recall, forget and fit_context tools.
- [HTTP quickstart](https://www.llmslim.app/docs/1.0/quickstart-http.md): Run llmslim serve, store and search memory with curl, add API keys, and run the server from Python.
- [TypeScript quickstart](https://www.llmslim.app/docs/1.0/quickstart-typescript.md): Install the llmslim npm package, store and search memory from TypeScript, and give AI SDK and Mastra agents recall_memory and remember tools.
- [Compression quickstart](https://www.llmslim.app/docs/1.0/getting-started.md): Install LLMSlim and compress long prompts with the Python API.

## Guides & Strategies

- [Import your chat history](https://www.llmslim.app/docs/1.0/import-history.md): llmslim import reads Claude Code transcripts, ChatGPT and Claude.ai exports, Mem0 exports and JSONL, and stores each message verbatim under its original time, with no model call.
- [Explain a search](https://www.llmslim.app/docs/1.0/explain.md): Memory.search(..., explain=True) says for every stored turn whether it was kept, cut or left out and why, with its tokens and share of the budget.
- [Coding agents](https://www.llmslim.app/docs/1.0/coding-agents.md): Give Claude Code long-term memory over MCP, import its past sessions, and shorten long tool output with llmslim wrap claude (experimental).
- [OpenAI-compatible endpoint](https://www.llmslim.app/docs/1.0/openai-compatible-endpoint.md): Start llmslim serve with an upstream, and POST /v1/chat/completions recalls and stores memory for the OpenAI SDKs and voice platforms with a custom LLM setting.
- [Storage backends](https://www.llmslim.app/docs/1.0/storage-backends.md): Choose a memory store for llmslim.memory, llmslim serve and llmslim mcp: InMemoryStore, SQLite, Postgres, MongoDB, or any object with the MemoryStore methods.
- [Remote MCP](https://www.llmslim.app/docs/1.0/remote-mcp.md): llmslim mcp --transport http serves remember, recall and the other tools over MCP's Streamable HTTP transport, with bearer keys, one scope per server, and TLS in front.
- [MCP catalogs and agent hosts](https://www.llmslim.app/docs/1.0/mcp-catalogs.md): Use LLMSlim's MCP catalog sources, context plans, scoped caching, and the optional OpenAI Agents SDK bridge.

## Core Concepts

- [Adaptive Context Planner](https://www.llmslim.app/docs/1.0/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/1.0/context-role.md): Keep untrusted retrieval, tool, and assistant content out of the protected priority tier.

## Migration

- [Upgrade from 0.x to 1.0](https://www.llmslim.app/docs/1.0/migrate-to-1-0.md): The breaking and default changes between LLMSlim 0.12 and 1.0: Python 3.10, date_format defaulting to None, narrower __all__ lists, planner_version, keyless servers, and what is new.
- [Migrate from Mem0](https://www.llmslim.app/docs/1.0/migrate-from-mem0.md): Move from Mem0 to LLMSlim: export memories with get_all, import them with llmslim import mem0 (or a Memory.add loop on 0.12), and keep your code with the Mem0-compatible Mem0Memory.

## API Reference

- [API stability](https://www.llmslim.app/docs/1.0/api-stability.md): LLMSlim's public API contract from 1.0: semantic versioning, the deprecation policy, experimental and internal API, and the command line, HTTP routes, MCP tools and stored memory.
- [Document and chat pipelines](https://www.llmslim.app/docs/1.0/pipelines.md): Compress retrieved documents and chat messages with role-aware defaults.
- [Token counter telemetry](https://www.llmslim.app/docs/1.0/telemetry.md): Read token_counter_used and handle the heuristic fallback appropriately.
- [API reference: llmslim](https://www.llmslim.app/docs/1.0/api-llmslim.md): Signatures, type annotations and docstrings of the 80 public names in llmslim, generated from the main branch (llmslim 0.12.0 and the changes since, not released yet).
- [API reference: llmslim.memory](https://www.llmslim.app/docs/1.0/api-llmslim-memory.md): Signatures, type annotations and docstrings of the 19 public names in llmslim.memory, generated from the main branch (llmslim 0.12.0 and the changes since, not released yet).

## 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.
- [LLMSlim + gptme](https://www.llmslim.app/integrations/gptme.md): A gptme context provider for automatic compaction and /compact trim. Older tool output is compressed instead of being replaced by a stub.
- [LLMSlim + Hermes Agent](https://www.llmslim.app/integrations/hermes-agent.md): A Hermes Agent context engine that compresses older turns locally instead of asking a model for a summary, so prompt caches keep hitting.
- [LLMSlim + Pydantic AI](https://www.llmslim.app/integrations/pydantic-ai.md): A Pydantic AI history processor that fits the message history into a token budget before every model request. Tool calls and returns stay paired.
- [LLMSlim + Vercel AI SDK](https://www.llmslim.app/integrations/vercel-ai-sdk.md): Long-term memory for AI SDK agents as tools, with no LLM writing your memory and nothing injected into the prompt.
- [LLMSlim + Mastra](https://www.llmslim.app/integrations/mastra.md): Long-term memory for Mastra agents as tools and an output processor, with no LLM writing your memory and nothing injected into the prompt.

## Comparisons

- [LLMLingua Alternative: LLMSlim vs LLMLingua-2 and LongLLMLingua](https://www.llmslim.app/compare/llmlingua.md): LLMSlim vs LLMLingua-2 and LongLLMLingua: how each compresses, same-budget results on NaturalQuestions, HotpotQA and LoCoMo with cost and confidence intervals, and migration code.
- [Mem0 Alternative: LLMSlim vs Mem0 for Agent Memory](https://www.llmslim.app/compare/mem0.md): LLMSlim vs Mem0: verbatim memory with no LLM calls on write, LoCoMo and LongMemEval results with cost and 95% intervals, both pricing pages, and a tested Mem0 migration.
- [Zep Alternative: LLMSlim vs Zep for Agent Memory](https://www.llmslim.app/compare/zep.md): LLMSlim vs Zep: verbatim turns with no LLM calls on write against a temporal context graph, LoCoMo and LongMemEval results with cost and 95% intervals, pricing, and a migration path.

## Other versions

- [LLMSlim 0.12 docs](https://www.llmslim.app/docs.md)

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