GI

geronimo-iia/llm-wiki

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

51 stars 10 forks 质量 76 趋势 33Apache-2.0

基于 Git 支持的维基引擎搭配 MCP 服务器——构建知识可积累

概览

一个无头的代理维基引擎。24个MCP工具。一个Rust二进制文件。内部没有大型语言模型。 一个基于git支持的Markdown维基——可搜索、输入、图链接。可通过命令行访问,或通过任何兼容MCP的代理,或通过ACP的任何IDE访问。 大多数AI知识工具会检索并生成每个查询。每个答案都是一次性的——既不学,也不保留。问同一个问题两次,LLM会从零推理。 LLM-wiki 实现了另一种模式——由 Andrej Karpathy 引入的 (DKR): 在导入时处理源,而非查询时。LLM将每个源集成到维基中——更新概念页、创建源代码摘要、标记矛盾——并提交结果。知识随着每次添加而积累。 引擎纯粹是基础设施。它管理文件、git、全文搜索和图表结构。LLM始终是外部的——它通过MCP调用引擎工具,读取页面、写入页面并提交知识。

概述(AI 翻译)

一个无头的代理维基引擎。24个MCP工具。一个Rust二进制文件。内部没有大型语言模型。

积累积累的知识——而不是消散的答案。

一个基于git支持的Markdown维基——可搜索、输入、图表链接。访问地址 命令行,无论是从任何兼容MCP的代理,还是通过ACP从任何集成开发环境(IDE)操作。

RAG的问题

大多数AI知识工具会检索并生成每条查询。每个答案都是 一次性——学不到东西,也没被保留。同一个问题再问两次 以及从零开始推理LLM的逻辑。

LLM-wiki实现了另一种模式——动态知识库 (DKR),由安德烈·卡帕西介绍:

在导入时处理源,而非查询时。LLM 集成了两个 维基中的源代码——更新概念页,创建源代码摘要, 指出矛盾——并导致结果。知识与 每一个新增内容。

传统RAG LLM-wiki(DKR)
知识构建时 查询时 摄入时
交叉引用 临时或遗漏 预构建的打字图
知识积累 重置每次查询 复合词随时间变化

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 README 节选,完整内容请查看原文。

llm-wiki

A headless wiki engine for agents. 24 MCP tools. One Rust binary. No LLM inside.

Build knowledge that compounds — not answers that evaporate.

A git-backed Markdown wiki — searchable, typed, graph-linked. Accessible from the command line, from any MCP-compatible agent, or from any IDE via ACP.

The problem with RAG

Most AI knowledge tools retrieve and generate on every query. Each answer is disposable — nothing is learned, nothing is kept. Ask the same question twice and the LLM reasons from scratch.

llm-wiki implements a different pattern — the Dynamic Knowledge Repository (DKR), introduced by Andrej Karpathy:

Process sources at ingest time, not query time. The LLM integrates each source into the wiki — updating concept pages, creating source summaries, flagging contradictions — and commits the result. Knowledge compounds with every addition.

Traditional RAG llm-wiki (DKR)
When knowledge is built At query time At ingest time
Cross-references Ad hoc or missed Pre-built, typed graph
Knowledge accumulation Resets each query Compounds over time
Audit trail None Git history per page
Data ownership Provider systems Your files, your git repo

How it works

The engine is pure infrastructure. It manages files, git, full-text search, and graph structure. The LLM is always external — it calls the engine’s tools via MCP, reads pages, writes pages, and commits knowledge. Intelligence flows through skills, not the binary.

LLM agent
  │
  ├── wiki_list(format: "llms")             → all pages grouped by type
  ├── wiki_search("mixture of experts")     → ranked results + facets
  ├── wiki_content_read("concepts/moe")     → full page + backlinks
  ├── wiki_graph(root: "concepts/moe")      → typed graph in Mermaid/DOT
  ├── wiki_suggest("concepts/moe")          → pages worth linking
  ├── wiki_content_new("concepts/new-page") → scaffold + returns local path
  ├── [write directly to path]              → no MCP round-trip
  └── wiki_ingest(path: "concepts/")        → validate, index, commit

A wiki page is a plain Markdown file with typed frontmatter:

---
type: concept
title: Mixture of Experts
status: active
confidence: 0.9
tags: [routing, scaling, efficiency]
sources:
  - sources/switch-transformer-2021
  - sources/mixtral-2024
concepts:
  - concepts/sparse-routing
  - concepts/scaling-laws
---

Sparse routing of tokens to expert subnetworks...

The engine validates frontmatter against a JSON Schema, extracts typed graph edges from sources and concepts, and indexes everything in tantivy. The graph is live the moment a page is committed.

Install

在 GitHub 查看完整 README

安装

This server does not publish a one-line install command.

Open the repository installation guide 新手?先看 mcpskill.org 教程 →

配置

{ "mcpServers": { "llm-wiki": { "command": "llm-wiki", "args": ["serve"] } } }