Context7
Up-to-date docs for AI agents
作者提供的说明(英文原文)
Long-term memory and context fitting for agents, with no LLM in the loop. Local SQLite.
这三项永远不会合并成一个分数:意见、测量和人气是不同的东西。
我们还没有为它写通俗的介绍。下面是我们从注册中心读取到的事实。
选择你使用的 AI 应用,然后复制设置。
LLMSLIM_MEMORY_DB, LLMSLIM_USER_ID, LLMSLIM_AGENT_ID你需要
你用的是哪个应用?
在上方选择你的应用。我们会记住它,下次按钮会显示“安装到 …”。
打开 Claude Desktop → Settings → Developer → Edit Config,把下面的内容粘贴到 claude_desktop_config.json
{
"mcpServers": {
"llmslim": {
"command": "uvx",
"args": [
"llmslim",
"mcp"
],
"env": {
"LLMSLIM_MEMORY_DB": "your-value",
"LLMSLIM_USER_ID": "your-value",
"LLMSLIM_AGENT_ID": "your-value"
}
}
}
}在终端中运行这条命令
claude mcp add llmslim --env LLMSLIM_MEMORY_DB=your-value --env LLMSLIM_USER_ID=your-value --env LLMSLIM_AGENT_ID=your-value -- uvx llmslim mcp运行前请先填写空着的值。
粘贴到项目中的 .cursor/mcp.json,或 ~/.cursor/mcp.json
{
"mcpServers": {
"llmslim": {
"command": "uvx",
"args": [
"llmslim",
"mcp"
],
"env": {
"LLMSLIM_MEMORY_DB": "your-value",
"LLMSLIM_USER_ID": "your-value",
"LLMSLIM_AGENT_ID": "your-value"
}
}
}
}浏览器会先询问是否打开应用,然后应用会显示设置并请你确认。密钥的值会留空,由你自己填写。
粘贴到项目中的 .vscode/mcp.json
{
"servers": {
"llmslim": {
"type": "stdio",
"command": "uvx",
"args": [
"llmslim",
"mcp"
],
"env": {
"LLMSLIM_MEMORY_DB": "your-value",
"LLMSLIM_USER_ID": "your-value",
"LLMSLIM_AGENT_ID": "your-value"
}
}
}
}浏览器会先询问是否打开应用,然后应用会显示设置并请你确认。密钥的值会留空,由你自己填写。
这个服务器在你的电脑上运行,而 ChatGPT 只能连接互联网上的服务器。请选择其他应用。
你的选择通过 Cookie 保存在这台设备上,无需账户。
LLMSLIM_MEMORY_DB envLLMSLIM_USER_ID envLLMSLIM_AGENT_ID env这些设置是根据作者在注册中心的条目生成的。如果 README 的写法不同,请以 README 为准。
它在你的电脑上运行;安装后,工具列表会显示在你的 AI 应用中。
我们检查的是任何人都能看到的信息;我们没有阅读代码。不适用的检查项不计入总数。 · 检查于 2026年11月7日
注册名称已通过 GitHub 账户 Thanatos9404 验证,该账户拥有此仓库
我们还没有从 GitHub 读取这个仓库
我们还没有从 GitHub 读取这个仓库
它在你的电脑上运行,没有互联网端点
在你的电脑上运行,改用本地设置
它在你的电脑上运行;我们只能读取互联网端点的工具列表
与注册中心里这个分类中所有活跃的服务器比较。只有当发布者拥有该仓库时,星标数才计入。
它在 1 项适用的基础检查中通过了 1 项。我们没有阅读代码。在添加密钥或令牌之前,请先看看这个服务器要求哪些权限,并使用只具备所需权限的密钥。
注册中心没有列出必需的密钥,不过有些服务器会在首次使用时要求你登录。
它在你的电脑上运行。你的 AI 应用会在需要时启动它,数据不会经过作者的服务器(除非它自己调用在线服务)。
GitHub 仓库最后更新于–,最新版本(0.12.0)于5天前进入注册中心。
支持 MCP 的应用,例如 Claude Desktop、Claude Code、Cursor 和 VS Code。你的电脑上还需要有 Python (uv)。
同一分类中有:Context7, Codebase Memory, Exa
同一分类中其他作者的服务器,按星标数排序。
如何看卡片:★ GitHub 星标i三大支柱:评价 · 检查 · 使用情况i更新 = 最新版本发布到注册中心的时间i
Up-to-date docs for AI agents
Codebase knowledge graph for AI agents — 162 languages, sub-ms queries, 99% fewer tokens.
Connect AI agents to Exa for web search, content fetching, and multi-step research.
按原文从作者的仓库复制。PopNx MCP 没有审查或背书其内容。HTML、图片和脚本已被移除。链接会离开本站。
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.
Examples • Documentation • Live Studio Playground • Sarvam Integration • Benchmarks • Changelog
A real Python session with llmslim 0.11.1 from PyPI, typed by a script and recorded with asciinema ( script , recording ).
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:
| Tool | Run |
|---|---|
| Claude Code | claude mcp add llmslim -- uvx --from "llmslim[mcp]" llmslim mcp |
| Claude Code plugin | /plugin marketplace add Thanatos9404/llmslim, then /plugin install llmslim@llmslim |
| Codex | codex mcp add llmslim -- uvx --from "llmslim[mcp]" llmslim mcp |
| GitHub Copilot CLI | copilot mcp add llmslim -- uvx --from "llmslim[mcp]" llmslim mcp |
| Gemini CLI | gemini extensions install https://github.com/Thanatos9404/llmslim |
| Hermes Agent | hermes plugins install llmslim --enable, then hermes config set context.engine llmslim: a context engine that compacts long conversations locally (plugin) |
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):
from llmslim.memory import Memory
mem = Memory("memory.db") # a SQLite file; or "postgresql://..." (llmslim[postgres]), "mongodb://..." (llmslim[mongodb]) mem.add([{"role": "user", "content": "I'm allergic to peanuts."}], user_id="asha") context = mem.search("Am I allergic to anything?", user_id="asha", budget=1500) print(context.text) # put it in your prompt as data, not instructions
TypeScript (npm install llmslim, Node 18 or newer), against llmslim serve (pip install "llmslim[server]"):
import { LLMSlim } from "llmslim";
const slim = new LLMSlim(); // http://127.0.0.1:8080 unless LLMSLIM_BASE_URL is set await slim.memories.add({ userId: "asha", messages: "I'm allergic to peanuts." }); const context = await slim.memories.search({ userId: "asha", query: "Am I allergic to anything?", budget: 1500 });
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.
remember, recall, list_memories, forget and fit_context.recall returns the stored messages that answer a question, under their dates and whole where they fit, within the budget you set. fit_context shrinks a long log or document to a budget.Beyond memory, LLMSlim Core also compresses and plans prompts, chat history, retrieved documents and tool schemas into token budgets: see the sections below.
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.
1. Install LLMSlim Core from PyPI (Python 3.10+). Running it needs no API key, model, or network call:
pip install llmslim
2. Run this snippet:
from llmslim import compress
ticket = """ Hi team, I hope you are all doing well and had a good weekend. I am writing about invoice INV-2291, which charged us $480 instead of $240. We upgraded to the Pro plan on 3 September, but the old Basic plan was billed as well. Our finance lead was asking about this during the weekly sync, which ran long as usual. Please refund the duplicate $240 charge to the card ending 4417. Thanks so much, and let me know if you need anything else from me. """
result = compress(ticket, target_ratio=0.6) # target: keep about 60% of the tokens print(result.compressed_text) print(f"{result.original_tokens} -> {result.compressed_tokens} tokens ({result.reduction_percent:.1f}% fewer)")
3. What you should see (llmslim 0.11.1, base install):
Hi team, I hope you are all doing well and had a good weekend. I am writing about invoice INV-2291, which charged us $480 instead of $240. We upgraded to the Pro plan on 3 September, but the old Basic plan was billed as well. Please refund the duplicate $240 charge to the card ending 4417.
112 -> 72 tokens (35.7% fewer)
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
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.*
| LLMSlim Core | LLMSlim Orbit | LLMSlim Vault | |
|---|---|---|---|
| What it is | The open-source library, MCP server and HTTP server | The hosted edition, run by us | The self-hosted edition, run in your own VPC (formerly LLMSlim Platform) |
| Version | 0.12.0 | Opens with LLMSlim 1.0 | 0.9.1 beta |
| License | MIT, this repository | Proprietary, paid plans | Proprietary, private beta |
| Get it | pip install llmslim | Join the founding list at llmslim.app/pricing | By invitation; not published to PyPI |
| What it does | Compresses, plans, and traces model-visible context inside your Python process | A hosted memory API, remote MCP with OAuth for Claude.ai, ChatGPT, Cursor and Claude Code, team memory, a context console with traces and replay, and a truth timeline | Builds on Core: a verifiable timeline of agent state, explainable and replayable context decisions, and outcome-driven context policies that start in shadow mode |
Core is and stays fully open source. Orbit and Vault are separate products that depend on Core; none of their code lives in this repo
只显示了开头部分;其余内容请在仓库中阅读