LLM Wiki Kit
📚 llm-wiki-kit
别再每次对话都向 AI 代理重新解释你的研究了。
llm-wiki-kit 为你的 AI 代理提供了一种持久化、结构化的记忆,并随时间不断积累。放入 PDF、URL、YouTube 视频——你的代理会构建一个维基,连接各个知识点,并在不同会话间记住一切。
基于 Karpathy 的 LLM Wiki 模式。适用于 Claude、Codex、Cursor、Windsurf 以及任何兼容 MCP 的代理。
https://github.com/user-attachments/assets/8814a581-1832-4e94-a5df-9e9b6b041507
问题所在
每次开始新对话时:
You: "Remember that paper on speculative decoding I shared last week?"
Agent: "I don't have access to previous conversations..."
You: *sighs, re-uploads PDF, re-explains context*你总是不得不重新教你的代理它本应已经知道的事情。
Related MCP server: LLM Wiki MCP
解决方案
使用 llm-wiki-kit,你的代理可以维护自己的知识库:
You: "What did we learn about speculative decoding?"
Agent: *searches wiki* "Based on the 3 papers you've shared, the Eagle
architecture shows the best efficiency tradeoffs because..."维基是持久的。 交叉引用不断增加。随着你添加的源文件越多,你的代理会变得越聪明。
⚡ 快速入门 (2 分钟)
1. 安装
pip install "llm-wiki-kit[all] @ git+https://github.com/iamsashank09/llm-wiki-kit.git"2. 初始化维基
mkdir my-research && cd my-research
llm-wiki-kit init --agent claude3. 连接你的代理
添加到 Claude Desktop 配置 (claude_desktop_config.json):
{
"mcpServers": {
"llm-wiki-kit": {
"command": "llm-wiki-kit",
"args": ["serve", "--root", "/path/to/my-research"]
}
}
}OpenAI Codex
codex mcp add llm-wiki-kit -- llm-wiki-kit serve --root /path/to/my-researchCursor
添加到 .cursor/mcp.json:
{
"mcpServers": {
"llm-wiki-kit": {
"command": "llm-wiki-kit",
"args": ["serve", "--root", "/path/to/my-research"]
}
}
}Windsurf
添加到 ~/.codeium/windsurf/mcp_config.json:
{
"mcpServers": {
"llm-wiki-kit": {
"command": "llm-wiki-kit",
"args": ["serve", "--root", "/path/to/my-research"]
}
}
}4. 使用它
You: "Ingest this paper: raw/attention-is-all-you-need.pdf"
Agent: *creates wiki pages, cross-references concepts, updates index*
You: "Now ingest https://youtube.com/watch?v=kCc8FmEb1nY"
Agent: *extracts transcript, links to existing transformer concepts*
You: "How does the attention mechanism in the paper relate to Karpathy's explanation?"
Agent: *searches wiki, synthesizes answer from both sources*你的代理现在拥有了跨会话的持久记忆。
🔥 核心优势
特性 | 为什么重要 |
多格式摄取 | PDF、URL、YouTube、Markdown — 直接放入即可 |
自动交叉引用 | 代理会在相关概念之间构建 |
跨会话持久化 | 开始新对话时无需丢失上下文 |
全文搜索 | 代理可即时查找相关页面 (SQLite FTS5) |
健康检查 |
|
图谱可视化 |
|
零锁定 | 它只是文件夹中的 Markdown 文件 — 可在 Obsidian、VS Code 等任何地方查看 |
兼容任何 MCP 代理 | Claude、Codex、Cursor、Windsurf 等 |
📥 支持的源文件
你的代理可以摄取任何内容:
放入此内容... | 得到此结果... |
| 提取的文本、页码标记、元数据 |
| 清理后的文章内容,自动保存到 |
| 带有时间戳的完整转录文本 |
| 直接 Markdown 摄取 |
安装所需依赖:
pip install "llm-wiki-kit[pdf]" # PDF support
pip install "llm-wiki-kit[web]" # URL extraction
pip install "llm-wiki-kit[youtube]" # YouTube transcripts
pip install "llm-wiki-kit[all]" # Everything🧠 工作原理
┌─────────────────────────────────────────────────────────┐
│ YOU │
│ "Ingest this paper. How does it relate to X?" │
└───────────────────────┬─────────────────────────────────┘
│
┌───────────────────────▼─────────────────────────────────┐
│ WIKI (agent-maintained) │
│ │
│ ┌──────────────┐ ┌──────────────┐ ┌──────────────┐ │
│ │ concepts/ │ │ sources/ │ │ synthesis/ │ │
│ │ attention.md │◄─┤ paper-1.md │──► cache.md │ │
│ │ [[linked]] │ │ [[linked]] │ │ [[linked]] │ │
│ └──────────────┘ └──────────────┘ └──────────────┘ │
│ │
│ + index.md (table of contents) │
│ + log.md (what happened when) │
└───────────────────────┬─────────────────────────────────┘
│
┌───────────────────────▼─────────────────────────────────┐
│ RAW SOURCES (immutable) │
│ paper.pdf, article.html, transcript.md │
└─────────────────────────────────────────────────────────┘代理读取原始源文件,编写维基页面,并维护连接。你无需直接接触维基——所有工作都由代理完成。
📊 知识图谱
wiki_graph 生成维基结构的交互式 HTML 可视化图:
节点按类型(源文件、概念、综合)进行颜色编码。点击并拖动以探索连接。
🛠 可用工具
你的代理将获得以下 MCP 工具:
工具 | 功能 |
| 处理任何源文件(文件、URL、YouTube) |
| 创建或更新维基页面 |
| 读取特定页面 |
| 对所有页面进行全文搜索 |
| 查找断链、孤立页面、空页面 |
| 概览:页面计数、源文件、近期活动 |
| 追加到操作日志 |
| 生成交互式 HTML 图谱可视化 |
💡 使用场景
研究:在数周内将论文输入你的维基。提出跨越所有阅读内容的综合性问题。
技术入职:摄取代码库文档。你的代理可以根据积累的上下文回答架构问题。
竞争情报:添加市场报告、财报电话会议、新闻。代理会维护一个随着你添加内容而更新的动态全景图。
学习:观看 YouTube 教程,阅读博客文章。代理会为你学习的所有内容构建个性化维基。
读书笔记:阅读时摄取章节。代理会跟踪人物、主题、情节线索和联系。
🔍 专业提示
使用 Obsidian 可视化你的维基图谱 — 它本质上就是一个 Markdown 文件文件夹
Git init 你的维基目录 — 免费获得版本历史记录
让代理积极地进行链接 — 价值在于连接的复合效应
定期运行 lint — 捕获知识库中的矛盾和空白
从小处着手 — 即使只有 5-10 个源文件,也能产生非常有用的维基
📦 开发
git clone https://github.com/iamsashank09/llm-wiki-kit
cd llm-wiki-kit
uv venv && source .venv/bin/activate
uv pip install -e ".[all]"🙏 致谢
基于 Andrej Karpathy 的 LLM Wiki 构想。
📄 许可证
MIT — 随你所用。
This server cannot be deployed
Maintenance
Related MCP Connectors
Personal wiki and memory layer for AI assistants. Persistent, structured memory across sessions.
Self-hostable team wiki; agents read & write it via MCP; Atlas turns your repo into a cited wiki.
Governed, auditable knowledge your team curates for its AI assistants, self-hostable
Self-hostable shared brain for you and your AI agents — docs, flows, meetings, decisions, rationale
Related MCP Servers
- AlicenseNot gradedqualityCmaintenancePersistent markdown wiki for your AI agent, built on Karpathy's LLM wiki gist.44 PyPI2MIT
- AlicenseNot gradedqualityDmaintenanceMCP server for persistent, compounding markdown wikis maintained by LLMs. Enables incremental knowledge base building with interlinked pages, search, and raw source management.19 npm1MIT
- AlicenseBqualityBmaintenanceMindBase implements Karpathy's "LLM wiki" pattern as an MCP server. Instead of retrieving chunks at query time (RAG), the LLM maintains a persistent wiki between your conversations: it reads every source you feed it, cross-references pages with [[wikilinks]], flags contradictions between sources, and keeps a context.md that reflects your current synthesized thinking.508 npm136MIT
- AlicenseAqualityCmaintenanceEnables an LLM to autonomously maintain a Markdown-based wiki with YAML frontmatter, using hybrid BM25 and local CPU vector search for fully offline retrieval without external APIs or databases.189 npmMIT