
LLMSlim memory
io.github.Thanatos9404由 GitHub 帳號 Thanatos9404 發布v0.12.0更新於 Nov 3, 2026
為代理程式提供長期記憶與上下文適配,無需LLM參與。本機SQLite。
AI 翻譯由 AI 模型根據下方的原文描述翻譯,可能有誤。
原文描述
Long-term memory and context fitting for agents, with no LLM in the loop. Local SQLite.
發布方自己的服務:Memory.fit
概覽
LLMSlim memory 的本機 MCP 服務;無需登入;STDIO。
暫無 AI 概覽:以下資訊來自註冊中心條目和服務本身。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 LLMSlim memory,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
LLMSlim
Long-term memory and context selection for AI agents and coding tools, with no LLM call.
LLMSlim stores what users and agents say word for word, then returns the parts that answer a question within a token budget you set. It runs as an MCP server, a Python library or a small HTTP server.
[PyPI Version] [PyPI Downloads] [MCP Registry: io.github.Thanatos9404/llmslim] [License] [llmslim MCP server: quality and maintenance score on Glama]
Examples • Documentation • Live Studio Playground • Sarvam Integration • Benchmarks • Changelog
[A Python session: Memory('asha.db') holds 62 stored messages; after adding 'I moved to Pune last week for a new job.', search('Am I allergic to anything?', budget=50) returns only the peanut allergy turns, and search('Where did I move to?', budget=50) returns only the Pune message.]A real Python session with llmslim 0.11.1 from PyPI, typed by a script and recorded with asciinema (script, recording).
Use it in 30 seconds
Each MCP setup below starts the same server, llmslim mcp, with uv (Python 3.10 or
newer). Memory goes to a local SQLite file, ~/.llmslim/memory.db.
One click: [Install in VS Code] [Add to Cursor] [Add to LM Studio] [Install in Goose] [Add to Kiro]
The first start downloads LLMSlim and its dependencies. If a client gives up waiting, run
uvx --from "llmslim[mcp]" llmslim mcp --help once to fill uv's cache, then restart the client.
Python (pip install llmslim, Python 3.10 or newer):
TypeScript (npm install llmslim, Node 18 or newer), against llmslim serve (pip install "llmslim[server]"):
Runnable examples, each with a test: Claude Code memory, LangChain agent, Pydantic AI agent, big logs and TypeScript.
If LLMSlim is useful, a star helps others find it. Feedback is welcome in issues.
What it does
- Five MCP tools:
remember,recall,list_memories,forgetandfit_context. - Stores messages word for word in SQLite, Postgres or MongoDB. Nothing is summarized or extracted on the way in.
- Recalls within a token budget.
recallreturns the stored messages that answer a question, under their dates and whole where they fit, within the budget you set.fit_contextshrinks a long log or document to a budget. - Fixes the scope at server start. The user and agent ids are set when the server starts, not by the model, so a model steered by injected text can't read or delete another user's memory.
- Makes no LLM call. By default, storing and recalling are plain code: no model, no embedding API, no API key.
- MIT licensed. The library and the MCP server need Python 3.10 or newer.
Beyond memory, LLMSlim Core also compresses and plans prompts, chat history, retrieved documents and tool schemas into token budgets: see the sections below.
Why no LLM call
Storing is a database write and recall is deterministic ranking code. So what comes back is what was said, not a
model's rewrite of it, and the same history and question always give the same context, which makes recall easy to
test. The memory server and llmslim serve make no network calls of their own. What does reach the network:
installing from PyPI (including uvx's first run of a version) and tiktoken downloading its tokenizer file once.
The trade-off: the default lexical mode matches words, not meanings, so a question phrased differently from the
stored message can miss it. relevance="semantic" adds an optional cross-encoder for that (llmslim[semantic],
which downloads the model the first time). See the limits.
Compress a prompt in 60 seconds
1. Install LLMSlim Core from PyPI (Python 3.10+). Running it needs no API key, model, or network call:
2. Run this snippet:
3. What you should see (llmslim 0.11.1, base install):
Two of the six sentences are dropped; the invoice number, amounts, plan change,
and refund request are kept. The default extractive mode only selects sentences
from your input, so the same input always gives the same output. The base install
estimates tokens at about 4 characters per token and prints a one-line warning
saying so. With pip install "llmslim[fast-tokens]", tokens are counted with
tiktoken instead: on this input the same four sentences are kept, and the count
reads 107 -> 72 tokens (32.7% fewer).
Next: Docs • Pricing • Vault beta • Issues
LLMSlim Core, Orbit and Vault
The context layer for production AI agents. This repository is LLMSlim Core (v0.12.0, MIT): local-first context planning and compression that fits prompts, conversation history, RAG, memory, and tool schemas into real token budgets while preserving instructions and execution boundaries.
[Python Versions] [Tests Passing] [Coverage] [Live Studio] [Sarvam Startup Program]
Core is and stays fully open source. Orbit and Vault are separate products that depend on Core; none of their code lives in this repository. Plans and prices are at llmslim.app/pricing; read about Vault and request beta access at llmslim.app/vault.
What's new in Core: the agent context runtime (v0.7.0) and the cache-aware context runtime (v0.7.1). Both are in the PyPI package from 0.7.1 onward; 0.7.0 was tagged but not published to PyPI.
Adaptive Context Planner (v0.6.0)
LLMSlim is no longer only a fixed-ratio prompt compressor. The Adaptive
Context Planner chooses safe representations for each context item, then uses
a deterministic constrained allocator to fit the highest-value context into a
finite model budget. The original compress() API remains fully supported.
The v0.6.0 release adds explainable per-item decisions, explicit infeasibility reporting, post-plan validation, token and cost telemetry, policy presets, and optional Sarvam AI, Zoho, and MongoDB integrations while keeping the base installation local-first and provider-neutral.
Planning works offline with the base install. Optional integrations are isolated behind extras:
See the architecture, algorithm, security model, CLI, and measured offline benchmark.
Startup programs
[LLMSlim is part of 21 startup programs: Sarvam, Zoho, MongoDB, Claude, OpenAI, Auth0, Zendesk, Mixpanel, Sentry, Descope, Pulumi, Honeycomb, Exa, Neo4j, Cartesia, Nebius, Notion, Snyk, Gitar, Composio and Future AGI]LLMSlim is part of 21 startup programs. They provide credits, tools, and guidance; none of them is an investor, and membership does not imply endorsement.
Logos are trademarks of their owners and identify each program.
Sarvam Startup Program and Sarvam integration
✦ Accepted into the Sarvam Startup Program
LLMSlim has been accepted into the Sarvam Startup Program. This is program membership only: it is not a partnership, and it does not imply an endorsement by Sarvam AI.
Separately, LLMSlim Core ships an optional Sarvam integration (llmslim[sarvam])
built on the official sarvamai Python SDK. You plan and compress context locally,
then send only the planned context to a Sarvam model such as sarvam-105b.
- Local planning: retrieved documents are planned and compressed in your Python process before any request is sent.
- Local-first: sensitive retrieved context stays local; only the planned context is sent to the model.
- Your application stays in charge: LLMSlim is a pre-processor. Your application owns API keys, prompts, and inference, and nothing is sent to Sarvam unless your code calls the provider.
Quickstart: Adaptive Planning + Sarvam
👉 Read the Sarvam integration guide (also in docs/integrations/SARVAM.md)
🔮 What is LLMSlim?
LLMSlim Holographic Engine: Multi-stage token compression condensing sparse context streams into dense information cores with zero contract mutation.
Modern LLM systems suffer from the Context Window Dilemma:
- Financial Tax: Re-sending large prompts on every turn means you pay for the same input tokens again and again.
- Latency Bottleneck: Large prompts inflate Time-To-First-Token (TTFT) and queue times.
- Lost-In-The-Middle Syndrome: Models can miss or misuse information buried in the middle of long contexts.
- Security Risks: Untrusted RAG content can smuggle indirect prompt injections into system instructions.
LLMSlim fixes this at the source. It provides deterministic, contract-preserving compression that runs natively in your application layer before calling any model.
💎 Core Architectural Pillars
🖥️ Live Studio Playground (www.llmslim.app)
Paste a long chat, a stack of search results or a CI log, ask a question, and watch LLMSlim keep what answers it. The Studio shows the tokens and cost saved, whether the answer survived, and what plain truncation to the same size would have kept instead.
- Ready-made scenarios: a six-month support chat, help-centre search results, and a CI log with one failure, each with a question whose answer is known.
- Your own text: paste up to about 16,000 tokens and choose how much to keep.
- In place: kept lines are highlighted inside the original, next to the exact text the model would receive.
- No model call: the Studio runs Core on the server and calls no provider. Nothing you paste is stored.
See Studio deployment and the security policy.
🌐 Modern Developer Website & Documentation
Explore our redesigned dark/light documentation site covering end-to-end integration patterns:
📦 Installation
Requirements: Python 3.10 or higher. No provider SDK, PyTorch, sentence-transformers, or cloud service is required for the default installation.
⚡ Quick Start & Usage Patterns
1. Basic Extractive Compression (Default)
Extractive selection keeps whole sentences, not meaning: always check that the
sentences you need survived. On this text, the 0.7.1 base install keeps three of
the five sentences and drops the 1969 Moon landing sentence; with
llmslim[fast-tokens] (tiktoken counts) it keeps that sentence and drops another.
2. Multi-Document RAG Compression
Compress each retrieved chunk before you build the prompt. compress_documents
takes plain strings and returns one result per document, in order:
With a query, the documents share one budget and it goes where the query points. Relevance is lexical by default (BM25 with feedback: no model, deterministic, tens of milliseconds on a 3k-token context). For RAG and long chat memory, where the answer often shares few words with the question, add the optional reranker:
relevance also accepts any callable scorer(query, texts) -> scores, such as a hosted reranking API.
Retrieving with LangChain, LlamaIndex or Haystack? Use the
framework adapters instead of calling
compress_documents yourself.
[!NOTE]
compress_documentstreats documents as untrusted (ContextRole.RAG) by default, so imperative wording inside a retrieved document is never force-kept as a protected instruction. It does not remove injected text: an injected sentence can still survive compression. To mark retrieved content as untrusted in the final prompt, useplan_contextorContextRuntime, which wrap every document in atrusted="false"provenance tag and ignore any role a document claims for itself.
3. Multi-Turn Chat Conversation Compression
Compress long earlier turns while passing system instructions and user questions through unchanged:
4. Hybrid Prompt Optimization (Extractive + Rewrite)
Combine ultra-fast extractive pre-filtering with your own LLM provider for deep semantic paraphrasing:
Every rewrite is validated for structure, instruction retention, entity retention,
and similarity. If a hybrid rewrite fails validation, LLMSlim returns the extractive
result instead and reports why in rewrite_metadata.failure_reasons.
Coding agents: llmslim wrap claude
Claude Code resends the whole conversation on every turn. So long test logs, build output, search results and web pages get paid for again and again, and they add to the context that Claude Code eventually compacts.
llmslim wrap claude runs Claude Code through a local proxy:
- It shrinks such output the first time the model sees it. Lines that look like errors, failures or warnings come first, then the lines related to the command.
- It sends exactly the same bytes on every later request, so the prompt cache keeps hitting and Claude's thinking stays valid.
- Output of Claude Code's own
Read,EditandWritetools is never touched. A file printed through the shell (cat,head) counts as shell output.
What it does to the bill, measured on real Claude Code 2.1.296 with Claude Haiku 5.5, on eight small synthetic tasks. We counted list-price dollars from the API's usage, with cache reads priced separately, and published all 572 runs in benchmarks/claude_code_cost. The primary result has both arms in Claude Code's default permission mode; a second run has both in auto mode.
- Long logs: a simulated failing CI run (about 12 KB of log, the cause in the middle) cost 26-32% less, and a lint run with three errors among 240 warnings 17-21% less.
- Test runs: about 4% less in default mode, within noise for every task; 2-15% less in auto mode. Agents already
trim test output with
tail. - Over 8 tasks: +5.3% in default mode (95% interval +1.5% to +9.4%), mostly from one task where shortened JSON cost about twice as much; -5.1% in auto mode. JSON is left alone by default since 0.11.1.
- Real sessions: in an offline replay of the maintainer's own transcripts (32 sessions and the 412 subagent runs
they started, almost all Claude Opus 5.5, at list prices), tool output was a small part of the bill: with the same
turns, all shell, search and web output costing nothing would have cut it by 13.4%. Re-reading long context was the
big part. Claude Code's
/autocompactsetting decides when it compacts; what that does to cost is not measured here.
Without the byte-for-byte replay, an edited history invalidates Claude's thinking: in our API check on Claude Haiku 5.5 the request was rejected with HTTP 400, the default for accounts created on or after 31 August 2026. With the replay, cache reads grew on every request of a 7-request API test. See docs/PROXY.md for what is compressed, the limits and security.
As a Claude Code plugin. The plugin adds LLMSlim's memory server (below) and two commands:
/llmslim:wrap-claudewalks you through starting Claude Code through the proxy;/llmslim:savingsshows how many tool-output tokens the proxy kept out of your requests: an estimate counted before prompt-cache discounts, not dollars saved.
On Claude Code 2.1.275 or later, /plugin install llmslim --marketplace Thanatos9404/llmslim does both in one step.
The memory server runs with uvx, so it needs uv.
Memory for agents, with no LLM in the loop
llmslim.memory stores every turn verbatim and selects, at read time, the turns that answer a question within a
token budget. There is no extraction model on the way in and no model call on the way out.
On BEAM's 1M-token conversations (held-out, run once), Memory.search with its reranker scored on par with Mem0 at
2,500 and 10,000 tokens (+1.2 and +0.6 points, neither significant), 60x and 28.6x cheaper per 1,000 questions at
list prices, and 7.5 to 9.9 points ahead of Zep (on 30 conversations). Its weak spots are published alongside the results
(Round 6). Coming from Mem0?
from llmslim.memory.compat import Mem0Memory as Memory keeps Mem0's method names, and llmslim import mem0 export.json brings your memories along. llmslim import also reads Claude Code transcripts and ChatGPT and
Claude.ai exports (docs/IMPORT.md). See
docs/MEMORY.md for scopes, stores, evidence and limits, and the 1.0 roadmap.
In Claude, Cursor or any MCP client
llmslim mcp serves this memory over MCP, with a fit_context tool for long text. It needs pip install "llmslim[mcp]"
on Python 3.10+.
- Tools:
remember,recall,list_memories,forgetandfit_context. - Scope: the server fixes it with
--user-id, so the model can't read another user's memory. - Storage: a local SQLite file; the server makes no network calls of its own (the tokenizer downloads one file once and caches it).
- Several machines:
llmslim mcp --transport http(0.13.0 and newer) serves the same memory over HTTP behind bearer keys, so your laptop and desktop share it; see docs/MCP.md. - More: client configs and options are in docs/MCP.md.
One-click install in other clients. Each link runs uvx --from "llmslim[mcp]==0.12.0" llmslim mcp, so it needs
uv and Python 3.10 or newer.
[Install in VS Code] [Add to Cursor] [Add to LM Studio] [Install in Goose] [Add to Kiro]
In Gemini CLI, gemini extensions install https://github.com/Thanatos9404/llmslim adds the same server.
In VS Code, the LLMSlim Memory extension adds it to VS Code's MCP support (coming soon to the VS Code
Marketplace and Open VSX).
[llmslim MCP server: quality and maintenance score on Glama]
Over HTTP, from any language
llmslim serve puts the same memory and a context-fitting endpoint behind a small JSON API. It runs as one process with
one SQLite file and no model calls. Install it with pip install "llmslim[server]", or build the Dockerfile.
It needs a bearer API key to listen beyond localhost. The routes, limits and Docker setup are in docs/SERVER.md.
The TypeScript client, npm install llmslim (clients/typescript), wraps this API with no
dependencies. It also gives the Vercel AI SDK recall_memory and remember tools and a middleware that saves turns. None of them changes your
prompt, so prompt caches keep hitting and Claude's preserved thinking stays valid.
Use with LangChain / LlamaIndex / Haystack
Each adapter runs compress_documents on the retrieved documents, with the same
shared budget when there is a query. Kept documents keep their metadata, and
documents that compress to nothing are dropped. They run locally with no model.
Runnable examples with their output: LangChain, LlamaIndex, Haystack.
Use with gptme / Hermes Agent / Pydantic AI
These adapters fit an agent's message history into a token budget. They keep the system prompt, tool calls and the latest turns as they are, compress older tool output and turns locally (failures and tracebacks in tool output are kept), and keep every tool call paired with its result. There is no model call.
Setup and runnable examples with their output: gptme, Hermes Agent, Pydantic AI.
🛡️ Security Architecture: Provenance Isolation
Compression algorithms that naively score sentences based on imperative keywords ("Must", "Always", "Action Required") introduce a severe vulnerability: indirect prompt injection amplification. An attacker injecting malicious instructions into a retrieved RAG document can trick the compressor into preserving the attack payload while discarding legitimate context.
We found this issue in LLMSlim internally and fixed it in v0.3.1. No CVE or security advisory was published, and the issue has no official CVSS score.
LLMSlim solves this via an explicit Context Role Trust Boundary:
- Hardened Priority Locking: Content marked
ContextRole.RAG,ContextRole.TOOL, orContextRole.ASSISTANTcannot achieve Tier-4 priority, regardless of imperative syntax. - Nonce-Protected Rewrite Delimiters: When the input contains a fence-like token such as
---END TEXT---, the rewrite template's fences get a random per-call nonce, so the embedded token cannot close the text region. The input itself is never modified. - Untrusted by default, not filtered: these protections stop injected text from gaining priority. They do not delete it.
plan_contextandContextRuntimelabel ittrusted="false"in the final context so your model and application can treat it accordingly.
🧩 Contract-Safe Tool Schemas & MCP Ingestion
Large agent catalogs (dozens or hundreds of tool definitions) waste thousands of tokens before an agent even starts thinking. LLMSlim introduces Contract-Safe Tool Infrastructure (v0.4.0 & v0.5.0):
Async MCP Catalog Source (v0.5.0)
Requires pip install "llmslim[mcp]" (Python 3.10+) and an MCP server you run:
📊 Benchmarks & Radical Transparency
Many libraries make unsubstantiated claims about 90% prompt compression. At LLMSlim, we practice Radical Benchmark Transparency:
Round 6: agent memory on BEAM-1M, Core 0.12 against Mem0 and Zep
Measured 24-27 October 2026 on held-out data: BEAM's 1M tier, 35 conversations of about 946,000 tokens each and 700 questions across 10 types. None of it was opened while 0.12 was tuned. The protocol was fixed before the first paid call, its one change to the ship rule and the claim wording was made before any system had answered a question, and every system was read and judged once.
Every system is read by Claude Haiku 5.5 with BEAM's answer prompt, three times per question, and scored by BEAM's
rubric judge (also Haiku 5.5). The score is the mean rubric score out of 100. Mem0 (OSS 2.2.1, extraction on) and
Zep (Graphiti 0.30.2) stored every exchange through their own pipelines, with Haiku 5.5 as their LLM and
Qwen3-Embedding-0.6B as their embedder. LLMSlim ran with its reranker (relevance="semantic"). Cost is per 1,000
questions at list prices, with BEAM's 20 questions per conversation. It counts the answer call, Mem0's and Zep's
memory-building calls, and each system's compute.
* Zep ran on a seeded draw of 30 conversations to cap its cost. On those 30, LLMSlim 0.12 scored 45.9 and 48.3.
What it shows:
- On par with Mem0, at a fraction of the cost. LLMSlim is +1.2 points at 2,500 tokens (95% CI -0.7 to +3.2) and +0.6 at 10,000 (-1.6 to +2.7). Neither difference is significant, so we do not claim to beat Mem0. It is 60x and 28.6x cheaper per 1,000 questions at list prices (2,500 and 10,000 tokens), because Mem0 makes an LLM call for every exchange it stores and LLMSlim makes none.
- Ahead of Zep by 7.5 to 9.9 points, on Zep's 30 conversations: +7.5 at 2,500 tokens (+4.5 to +10.4) and +9.9 at 10,000 (+6.8 to +12.9).
- Ahead of 0.11.1. On the same questions 0.12 scored 44.6 and 47.3 where 0.11.1 scored 38.0 and 41.6, with no question type more than 1.3 points lower.
Where LLMSlim loses (against Mem0, per question type, 70 questions each):
- Summarization: -8.9 points at 2,500 tokens (-13.1 to -4.7) and -4.0 at 10,000 (-7.8 to -0.2).
- Multi-session reasoning at 10,000 tokens: -6.0 (-10.1 to -1.8).
- Information extraction: -4.6 and -4.9. Neither is significant.
- Search latency with the reranker. With the reranker running on a laptop CPU, a search over a 946,000-token
history took 3.6 s at the median at 2,500 tokens and 4.9 s at 10,000. The default lexical search, which
llmslim mcpuses, takes about 45 ms on a 100,000-token history, but it was not scored in this round. - The ship rule was relaxed. It was loosened before any LLMSlim result on this data was read. The original, stricter per-type bar, which also required the lower bounds for instruction following and summarization to stay within 5 points of Mem0, would have failed on summarization (both budgets) and instruction following (10,000 tokens). The report gives both verdicts.
"LLMSlim 0.12" is commit 16a2708, which became 0.12.0 after hardening and returns the same bytes on the English parity checks; the round-6 contexts were not rebuilt with 0.12.0. Setup, every table, paired differences, cost, latency and limitations: benchmarks/live/round6. The protocol, harness and per-question answers are not published with this round.
Round 3: Core 0.9.0 against memory systems and compressors, cost first
Measured 13-15 October 2026 on held-out test questions. Every system is read by Claude Haiku 5.5 with the same answer prompt and judges. Mem0 and Zep ran through their own benchmark harnesses, and LLMLingua-2 and LongLLMLingua (LLaMA-2-7B in float16) with their published settings. Every compressor's context was built in public Kaggle notebooks pinned to a commit. Each cell is accuracy and what 1,000 questions cost end to end at list prices: the answer call, Mem0's and Zep's memory-building calls, and each system's compute. Full tables, confidence intervals, weak spots and every answer: benchmarks/live/round3.
* Dense retrieval over turns (Qwen3-Embedding-0.6B) on LoCoMo and LongMemEval; a plain reranker on NaturalQuestions and HotpotQA. Mem0 is its top 50 memories, except top 200 on Mem0's own sample. LongLLMLingua ran on pre-registered samples; on the same questions LLMSlim with its reranker scores 93.3% on LoCoMo (+20.0, 95% CI +15.0 to +25.0) and 72.7% on NaturalQuestions, and the default LLMSlim 53.3% on HotpotQA. A cached full history costs $4.48 per 1,000 LoCoMo questions when the cache misses.
Where LLMSlim loses:
- NaturalQuestions without the reranker. The default lexical mode scores 60.6% against 73.9% for a plain reranker: paraphrased questions need semantic matching, so use the reranker for open-domain retrieval.
- Dense retrieval on LongMemEval. 80.6% to LLMSlim's 77.8% at 10,000 tokens and 76.1% to 74.4% at 2,500, at about twice the cost. Neither gap is significant on 180 questions, but both point the same way. A fix that narrowed it on development questions did not hold up on test, so it is not in 0.9.0.
- Multi-hop and temporal questions at 1,000 tokens. Mem0's top 20 memories beat the default LLMSlim on LoCoMo's multi-hop (88.7% vs 80.3%) and temporal (93.4% vs 85.7%) questions. With its reranker LLMSlim is ahead overall (90.5% vs 88.7%).
- A cached full history. When a conversation's questions come back to back, the cached history (95.1% for $0.83) beats every compressed context on LoCoMo.
Long documents and agents: round 2, Core 0.8.0
Same model and prompt for every configuration; truncation gets exactly LLMSlim's token count, and every suite was rerun once on a fresh sample after the code was frozen (benchmarks/live). 0.9.0 changes only how plain-text chat transcripts are selected.
The reranker is optional (relevance="semantic", a 22M-parameter cross-encoder from the semantic extra); without
it LLMSlim runs no model at all.
[!NOTE] The Schema-Tax Measurement: In our v0.4.0 benchmark across 375 synthetic tool schemas in 18 catalogs written for this repository (see the dataset card), lossless schema compression saved 0 tokens (0.00%) when the baseline was already compact canonical JSON. We publish this result transparently: we never claim imaginary savings where none exist.
v0.6 Adaptive Planner (Frozen Offline Suite)
The 28-case corpus covers chat, RAG, tools, mixed, external-source, and 12-language multilingual cases. The sole adaptive infeasibility is an intentionally impossible full-catalog case; it is reported explicitly. These task-grounded checks are not an LLM-judge or universal quality claim. Latency is specific to the checked-in run and hardware. See the release gate results, raw results, and frozen dataset. The live Sarvam harness was not run without both explicit opt-in and credentials.
🖥️ Command-Line Interface (CLI)
Compress files, streams, or prompts directly from your terminal:
📋 Changelog
Release notes for every version, including 0.12.0, are in CHANGELOG.md and on GitHub Releases.
🤝 Ecosystem Integrations
LLMSlim operates as an unopinionated context pre-processor. These integrations ship in Core; none of them sends a request for you. Every integration that spends a vendor credit is checked by a UsageGuard before the request leaves the process (per-minute rate, lifetime request cap and a unit cap in INR, USD or queries, configurable with LLMSLIM_<VENDOR>_* variables; see .env.example):
For other frameworks there is no dedicated adapter. LLMSlim works with any framework
that can pass plain message lists ({"role": ..., "content": ...} dicts) or document
strings; you write the few lines of glue that pass LLMSlim's output to your client.
📜 License & Citation
LLMSlim is open-source software licensed under the MIT License. See LICENSE for full details.
If you use LLMSlim in your research or production systems, please cite:
Agent Context Runtime (v0.7.0)
Version 0.7.0 added a per-turn context path for agent applications (0.7.0 was not published to PyPI; install 0.7.1 or later). The host supplies messages, retrieved documents, memories, tool results, and authorized tool schemas; LLMSlim returns a quality-checked model input and an explainable local trace. Model calls and tool execution stay with the host.
The runtime includes ContextEnvelope, ContextGraph, ContextPolicy,
progressive planning, quality gates, bounded in-memory sessions, and
execution-free adapters for generic, Sarvam, OpenAI-compatible, and text-only
OpenAI Agents applications. ContextTrace omits prompt bodies by default.
The existing compress() and plan_context() APIs continue to work.
See the architecture, security model, integrations, migration guide, benchmark, and engineering report.
Cache-Aware Context Runtime (v0.7.1)
Cache planning is an opt-in layer for repeated agent turns. LLMSlim identifies
stable provider-visible prefixes, keeps append-only conversation context when
safe, fingerprints cache-sensitive settings, and reports local cache estimates
separately from provider-reported usage. A tenant-scoped CacheManager stores
metadata and provider references, never prompt bodies or KV tensors.
Execution-free request builders cover OpenAI Responses, Anthropic Messages, Gemini cached resources, and self-hosted vLLM. An advanced in-process Transformers adapter validates KV continuation state. OpenAI provider-stateful continuation and Gemini cached-resource creation require explicit host opt-in. Sarvam prompt caching remains unverified and is disabled by default. The Context Inspector shows prefix segmentation and cache diagnostics without calling a provider. See caching guidance, multi-turn benchmark, and engineering report.
Open-source security tooling
Snyk provides developer security tooling for open-source projects. Learn more about its Secure Developer Program.
來源:README.md,提交 626646e
工具
0版本歷史
4- v0.12.0最新Nov 3, 2026
- v0.11.2Oct 25, 2026
- v0.11.1Oct 17, 2026
- v0.11.0Oct 17, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分
其他 Memory 整合

Memory.fit
fit.memory官方發布者
託管式 Memory.fit 伺服器,讓 AI 讀取你的訓練、睡眠、恢復與飲食資料,並寫回每週計畫、每日目標和飲食計畫。
pg.ddx.io: the PostgreSQL community's memory
io.ddx.pg官方發布者
pg.ddx.io: the PostgreSQL community's memory 的託管 MCP 服務,由 pg.ddx.io 發布;無需登入;Streamable HTTP;29 個工具。
var.gg Naming Memory
gg.var官方發布者
遠端 MCP 伺服器,可依領域概念推薦並檢索韓、日、中、越、英多語言的程式識別字名稱,並提供 ERD 結構查詢。

Counterparts
ai.counterparts
為 Claude Code 與 Claude Desktop 提供的本地優先長期記憶:助理自行寫下關於你與專案的筆記,並在之後的對話中回想起來。

LAHZE - Persian AI Memory Platform
由 GitHub 帳號 pedramgholizadeh 發布
以波斯語為先的地理記憶平臺:發現地點,起草併發布僅限波斯語的記憶。AI 翻譯