From 338c3b70af0ea408b73b340135865ca5ac748d91 Mon Sep 17 00:00:00 2001 From: Jasen Han Date: Sun, 28 Jun 2026 19:27:02 +0800 Subject: [PATCH 1/2] docs: add kb_add to all 7 i18n README files --- docs/readme/README.de.md | 6 ++++-- docs/readme/README.es.md | 6 ++++-- docs/readme/README.fr.md | 6 ++++-- docs/readme/README.ko.md | 6 ++++-- docs/readme/README.ru.md | 6 ++++-- docs/readme/README.zh-CN.md | 6 ++++-- docs/readme/README.zh-TW.md | 6 ++++-- 7 files changed, 28 insertions(+), 14 deletions(-) diff --git a/docs/readme/README.de.md b/docs/readme/README.de.md index 32a0418..073334e 100644 --- a/docs/readme/README.de.md +++ b/docs/readme/README.de.md @@ -51,12 +51,14 @@ wikiloop-kb/ ## Wie Agenten WikiLoop nutzen -Agenten interagieren mit WikiLoop über zwei MCP-Tools: +Agenten interagieren mit WikiLoop über drei MCP-Tools: **`kb_search(query, limit?)`** — Suche mit einem Schlüsselwort oder einer Phrase. Gibt bis zu 5 Source-Notes und 3 Concept/Comparison/Decision-Seiten pro Aufruf zurück. Jedes Ergebnis enthält ein `related`-Feld mit verknüpften Dokumenten zur Navigation. Verwenden Sie mehrere Suchen mit verschiedenen Schlüsselwörtern, um ein Thema aus mehreren Blickwinkeln abzudecken. **`kb_page(ids, full?)`** — Vollständigen Inhalt einer oder mehrerer Seiten per ID abrufen (aus `kb_search`-Ergebnissen). Übergeben Sie bis zu 5 IDs um mehrere Dokumente gleichzeitig zu scannen, oder `full=true` mit einer einzelnen ID für vollständigen ungekürzten Text. +**`kb_add(filename, content, source_url?)`** — Ein Textdokument zur Wissensdatenbank hinzufügen. Schreibt den Inhalt nach `raw/` und löst inkrementelle Indizierung aus. Die Destillation läuft asynchron im Hintergrund. Verwenden Sie das Präfix `converted/` für von Agenten extrahierte PDF/Word/Excel/EPUB-Inhalte. + Empfohlener Agenten-Workflow: ```text @@ -232,7 +234,7 @@ Alle Befehle akzeptieren ein globales `--kb `-Flag (Standard: `$WIKILOOP_K WikiLoop stellt KB-Tools über das MCP-Protokoll bereit. -**Verfügbare Tools:** `kb_search`, `kb_page` +**Verfügbare Tools:** `kb_search`, `kb_page`, `kb_add` Admin-Operationen (`status`, `reindex`, `lint`) sind über die Web-UI oder CLI verfügbar (`wikiloop status`, `wikiloop index`, `wikiloop lint`). diff --git a/docs/readme/README.es.md b/docs/readme/README.es.md index 41da11f..59d33f0 100644 --- a/docs/readme/README.es.md +++ b/docs/readme/README.es.md @@ -51,12 +51,14 @@ wikiloop-kb/ ## Cómo usan los agentes WikiLoop -Los agentes interactúan con WikiLoop a través de dos herramientas MCP: +Los agentes interactúan con WikiLoop a través de tres herramientas MCP: **`kb_search(query, limit?)`** — Buscar con una palabra clave o frase. Devuelve hasta 5 source-notes y 3 páginas concept/comparison/decision por llamada. Cada resultado incluye un campo `related` con documentos relacionados para navegación. Use múltiples búsquedas con diferentes palabras clave para cubrir un tema desde múltiples ángulos. **`kb_page(ids, full?)`** — Recupera el contenido completo de una o más páginas por ID (de los resultados de `kb_search`). Pase hasta 5 IDs para escanear varios documentos a la vez, o `full=true` con un solo ID para obtener el texto completo sin truncar. +**`kb_add(filename, content, source_url?)`** — Añade un documento de texto a la base de conocimiento. Escribe el contenido en `raw/` y desencadena la indexación incremental. La destilación se ejecuta de forma asíncrona en segundo plano. Use el prefijo `converted/` para contenido extraído por agentes de PDF/Word/Excel/EPUB. + Flujo de trabajo recomendado del agente: ```text @@ -232,7 +234,7 @@ Todos los comandos aceptan un flag global `--kb ` (por defecto `$WIKILOOP_ WikiLoop expone herramientas KB a través del protocolo MCP. -**Herramientas disponibles:** `kb_search`, `kb_page` +**Herramientas disponibles:** `kb_search`, `kb_page`, `kb_add` Las operaciones de administración (`status`, `reindex`, `lint`) están disponibles vía la interfaz Web o CLI (`wikiloop status`, `wikiloop index`, `wikiloop lint`). diff --git a/docs/readme/README.fr.md b/docs/readme/README.fr.md index de610ee..8257577 100644 --- a/docs/readme/README.fr.md +++ b/docs/readme/README.fr.md @@ -51,12 +51,14 @@ wikiloop-kb/ ## Comment les agents utilisent WikiLoop -Les agents interagissent avec WikiLoop via deux outils MCP : +Les agents interagissent avec WikiLoop via trois outils MCP : **`kb_search(query, limit?)`** — Recherche avec un mot-clé ou une phrase. Retourne jusqu'à 5 source-notes et 3 pages concept/comparison/decision par appel. Chaque résultat inclut un champ `related` listant les documents liés pour la navigation. Utilisez plusieurs recherches avec différents mots-clés pour couvrir un sujet sous plusieurs angles. **`kb_page(ids, full?)`** — Récupère le contenu complet d'une ou plusieurs pages par ID (depuis les résultats `kb_search`). Passez jusqu'à 5 IDs pour parcourir plusieurs documents à la fois, ou `full=true` avec un seul ID pour obtenir le texte complet non tronqué. +**`kb_add(filename, content, source_url?)`** — Ajoute un document texte à la base de connaissances. Écrit le contenu dans `raw/` et déclenche l'indexation incrémentale. La distillation s'exécute de manière asynchrone en arrière-plan. Utilisez le préfixe `converted/` pour le contenu extrait par des agents depuis des fichiers PDF/Word/Excel/EPUB. + Workflow agent recommandé : ```text @@ -232,7 +234,7 @@ Toutes les commandes acceptent un flag global `--kb ` (par défaut `$WIKIL WikiLoop expose les outils KB via le protocole MCP. -**Outils disponibles :** `kb_search`, `kb_page` +**Outils disponibles :** `kb_search`, `kb_page`, `kb_add` Les opérations d'administration (`status`, `reindex`, `lint`) sont disponibles via l'interface Web ou CLI (`wikiloop status`, `wikiloop index`, `wikiloop lint`). diff --git a/docs/readme/README.ko.md b/docs/readme/README.ko.md index 59028e2..9d1da0d 100644 --- a/docs/readme/README.ko.md +++ b/docs/readme/README.ko.md @@ -51,12 +51,14 @@ wikiloop-kb/ ## 에이전트가 WikiLoop를 사용하는 방법 -에이전트는 두 가지 MCP 도구를 통해 WikiLoop와 상호작용합니다: +에이전트는 세 가지 MCP 도구를 통해 WikiLoop와 상호작용합니다: **`kb_search(query, limit?)`** — 키워드나 문구로 검색합니다. 호출당 최대 5개의 source-note와 3개의 concept/comparison/decision 페이지를 반환합니다. 각 결과에는 탐색을 위한 관련 문서 목록이 담긴 `related` 필드가 포함됩니다. 여러 다른 키워드로 여러 번 검색하여 주제를 다양한 각도에서 다룹니다. **`kb_page(ids, full?)`** — ID(kb_search 결과에서)로 하나 이상의 페이지 전체 내용을 가져옵니다. 최대 5개의 ID를 전달하여 여러 문서를 한 번에 스캔하거나, 단일 ID와 `full=true`를 사용하여 완전한 전체 텍스트를 가져옵니다. +**`kb_add(filename, content, source_url?)`** — 지식 베이스에 텍스트 문서를 추가합니다. 콘텐츠를 `raw/`에 쓰고 증분 인덱싱을 트리거합니다. 증류는 백그라운드에서 비동기적으로 실행됩니다. 에이전트가 PDF/Word/Excel/EPUB에서 추출한 콘텐츠에는 `converted/` 접두사를 사용하세요. + 권장 에이전트 워크플로우: ```text @@ -232,7 +234,7 @@ wikiloop lint # wiki 페이지 상태 점검 WikiLoop는 MCP 프로토콜을 통해 KB 도구를 노출합니다. -**사용 가능한 도구:** `kb_search`, `kb_page` +**사용 가능한 도구:** `kb_search`, `kb_page`, `kb_add` 관리 작업 (`status`, `reindex`, `lint`)은 Web UI 또는 CLI를 통해 사용 가능합니다 (`wikiloop status`, `wikiloop index`, `wikiloop lint`). diff --git a/docs/readme/README.ru.md b/docs/readme/README.ru.md index bae5a7a..a191688 100644 --- a/docs/readme/README.ru.md +++ b/docs/readme/README.ru.md @@ -51,12 +51,14 @@ wikiloop-kb/ ## Как агенты используют WikiLoop -Агенты взаимодействуют с WikiLoop через два MCP-инструмента: +Агенты взаимодействуют с WikiLoop через три MCP-инструмента: **`kb_search(query, limit?)`** — Поиск по ключевому слову или фразе. Возвращает до 5 source-notes и 3 страниц concept/comparison/decision за вызов. Каждый результат содержит поле `related` со списком связанных документов для навигации. Используйте несколько поисков с разными ключевыми словами для охвата темы с разных сторон. **`kb_page(ids, full?)`** — Получение полного содержимого одной или нескольких страниц по ID (из результатов `kb_search`). Передавайте до 5 ID для просмотра нескольких документов сразу, или `full=true` с одним ID для получения полного неусечённого текста. +**`kb_add(filename, content, source_url?)`** — Добавляет текстовый документ в базу знаний. Записывает содержимое в `raw/` и запускает инкрементальную индексацию. Дистилляция выполняется асинхронно в фоновом режиме. Используйте префикс `converted/` для контента, извлечённого агентами из PDF/Word/Excel/EPUB. + Рекомендуемый рабочий процесс агента: ```text @@ -232,7 +234,7 @@ wikiloop lint # проверка wiki-страниц WikiLoop предоставляет инструменты базы знаний через протокол MCP. -**Доступные инструменты:** `kb_search`, `kb_page` +**Доступные инструменты:** `kb_search`, `kb_page`, `kb_add` Административные операции (`status`, `reindex`, `lint`) доступны через Web UI или CLI (`wikiloop status`, `wikiloop index`, `wikiloop lint`). diff --git a/docs/readme/README.zh-CN.md b/docs/readme/README.zh-CN.md index 85dae55..7846547 100644 --- a/docs/readme/README.zh-CN.md +++ b/docs/readme/README.zh-CN.md @@ -51,12 +51,14 @@ wikiloop-kb/ ## Agent 如何使用 WikiLoop -Agent 通过两个 MCP 工具与 WikiLoop 交互: +Agent 通过三个 MCP 工具与 WikiLoop 交互: **`kb_search(query, limit?)`** — 用关键词或自然语言搜索。每次返回最多 5 篇 source-note 和 3 篇 concept/comparison/decision 页面。每条结果包含 `related` 字段,列出关联文档供继续导航。用不同关键词多次搜索,从多个角度覆盖话题。 **`kb_page(ids, full?)`** — 按 ID(来自 `kb_search` 结果)获取一篇或多篇页面的完整内容。一次最多传 5 个 ID,或对单篇使用 `full=true` 获取不截断的全文。 +**`kb_add(filename, content, source_url?)`** — 向知识库添加文本文档。将内容写入 `raw/` 并触发增量索引。提炼在后台异步运行。Agent 提取的 PDF/Word/Excel/EPUB 内容使用 `converted/` 前缀。 + 推荐的 Agent 工作流: ```text @@ -232,7 +234,7 @@ wikiloop lint # 健康检查 wiki 页面 WikiLoop 通过 MCP 协议对外暴露 KB 工具。 -**可用 tools:** `kb_search`、`kb_page` +**可用 tools:** `kb_search`、`kb_page`、`kb_add` 管理操作(状态、重建索引、健康检查)通过 Web UI 或 CLI 执行:`wikiloop status`、`wikiloop index`、`wikiloop lint`。 diff --git a/docs/readme/README.zh-TW.md b/docs/readme/README.zh-TW.md index 89409d2..b83c638 100644 --- a/docs/readme/README.zh-TW.md +++ b/docs/readme/README.zh-TW.md @@ -51,12 +51,14 @@ wikiloop-kb/ ## Agent 如何使用 WikiLoop -Agent 透過兩個 MCP 工具與 WikiLoop 互動: +Agent 透過三個 MCP 工具與 WikiLoop 互動: **`kb_search(query, limit?)`** — 用關鍵詞或自然語言搜尋。每次返回最多 5 篇 source-note 和 3 篇 concept/comparison/decision 頁面。每條結果包含 `related` 欄位,列出關聯文件供繼續導覽。用不同關鍵詞多次搜尋,從多個角度涵蓋話題。 **`kb_page(ids, full?)`** — 按 ID(來自 `kb_search` 結果)獲取一篇或多篇頁面的完整內容。一次最多傳 5 個 ID,或對單篇使用 `full=true` 獲取不截斷的全文。 +**`kb_add(filename, content, source_url?)`** — 向知識庫新增文字文件。將內容寫入 `raw/` 並觸發增量索引。提煉在後台非同步執行。Agent 提取的 PDF/Word/Excel/EPUB 內容使用 `converted/` 前綴。 + 推薦的 Agent 工作流程: ```text @@ -232,7 +234,7 @@ wikiloop lint # 健康檢查 wiki 頁面 WikiLoop 透過 MCP 協議對外暴露 KB 工具。 -**可用 tools:** `kb_search`、`kb_page` +**可用 tools:** `kb_search`、`kb_page`、`kb_add` 管理操作(狀態、重建索引、健康檢查)透過 Web UI 或 CLI 執行:`wikiloop status`、`wikiloop index`、`wikiloop lint`。 From 5afcab86357168b6c379acf593dc72bb2ddc1c9f Mon Sep 17 00:00:00 2001 From: Jasen Han Date: Sun, 28 Jun 2026 19:29:59 +0800 Subject: [PATCH 2/2] docs: add kb_add to site index, what-is, and llm-wiki-technologies pages --- docs/site/ecosystem/llm-wiki-technologies.md | 1 + docs/site/getting-started/what-is-wikiloop.md | 2 +- docs/site/index.md | 2 +- docs/site/zh-CN/ecosystem/llm-wiki-technologies.md | 1 + docs/site/zh-CN/getting-started/what-is-wikiloop.md | 2 +- docs/site/zh-CN/index.md | 2 +- 6 files changed, 6 insertions(+), 4 deletions(-) diff --git a/docs/site/ecosystem/llm-wiki-technologies.md b/docs/site/ecosystem/llm-wiki-technologies.md index 31eb40c..f3487ac 100644 --- a/docs/site/ecosystem/llm-wiki-technologies.md +++ b/docs/site/ecosystem/llm-wiki-technologies.md @@ -68,6 +68,7 @@ Raw docs → LLM distills → wiki pages → [query time] → FTS / graph → re | [MCP protocol](https://modelcontextprotocol.io) | Model Context Protocol — Anthropic open standard for exposing tools/resources to AI agents. Supports stdio + HTTP transports. | | `kb_search` | FTS keyword search, returns ranked results with `related` links for graph navigation. | | `kb_page` | Fetch full page content by ID. Supports batch (up to 5 IDs) or `full=true` for untruncated text. | +| `kb_add` | Add a text document to the KB. Writes to `raw/`, triggers incremental indexing, and runs distillation in the background. | | MCP Resources | Read-only resources (URI form): wiki pages, graph schema, raw documents. | | Iterative search pattern | Agent issues multiple queries from different angles, follows `related` links, synthesizes own answer. | | Sage Wiki MCP tools | 17 tools: 6 read, 9 write, 2 composite — agents can directly write and compile knowledge. | diff --git a/docs/site/getting-started/what-is-wikiloop.md b/docs/site/getting-started/what-is-wikiloop.md index 79b4297..3339736 100644 --- a/docs/site/getting-started/what-is-wikiloop.md +++ b/docs/site/getting-started/what-is-wikiloop.md @@ -1,6 +1,6 @@ # What is WikiLoop -WikiLoop is a local-first knowledge search engine for agents. It distills raw documents into a structured, reviewable Markdown wiki, then exposes two MCP tools — `kb_search` and `kb_page` — that let agents search and deep-read at their own pace. +WikiLoop is a local-first knowledge search engine for agents. It distills raw documents into a structured, reviewable Markdown wiki, then exposes three MCP tools — `kb_search`, `kb_page`, and `kb_add` — that let agents search, read, and write knowledge at their own pace. ## Design Philosophy diff --git a/docs/site/index.md b/docs/site/index.md index 325da65..49e7cc8 100644 --- a/docs/site/index.md +++ b/docs/site/index.md @@ -18,7 +18,7 @@ hero: features: - title: Agent-Native Search - details: Two MCP tools — kb_search and kb_page — let agents search iteratively and read documents in full, just like a human uses a search engine. + details: Three MCP tools — kb_search, kb_page, and kb_add — let agents search, read, and write knowledge, just like a human uses and builds a knowledge base. - title: Auditable Knowledge details: All knowledge is explicit Markdown — git diff, lint, and review every change. No black-box vectors. - title: No Embedding Required diff --git a/docs/site/zh-CN/ecosystem/llm-wiki-technologies.md b/docs/site/zh-CN/ecosystem/llm-wiki-technologies.md index 59fb71c..63edeb4 100644 --- a/docs/site/zh-CN/ecosystem/llm-wiki-technologies.md +++ b/docs/site/zh-CN/ecosystem/llm-wiki-technologies.md @@ -68,6 +68,7 @@ LLM Wiki(知识编译范式)背后的核心技术——知识在写入时预 | [MCP 协议](https://modelcontextprotocol.io) | Model Context Protocol——Anthropic 开放标准,向 AI Agent 暴露工具/资源。支持 stdio + HTTP 双传输。 | | `kb_search` | FTS 关键词搜索,返回带 `related` 链接的排序结果,用于图谱导航。 | | `kb_page` | 通过 ID 获取完整页面内容,支持批量(最多 5 个 ID)或 `full=true` 获取不截断文本。 | +| `kb_add` | 向知识库添加文本文档,写入 `raw/`,触发增量索引,后台异步运行提炼。 | | MCP Resources | 只读资源(URI 形式):Wiki 页面、图谱 Schema、原始文档。 | | 迭代搜索模式 | Agent 从不同角度发出多次查询,跟随 `related` 链接,自行综合答案。 | | Sage Wiki MCP 工具 | 17 个工具:6 读、9 写、2 复合——Agent 可直接写入和编译知识。 | diff --git a/docs/site/zh-CN/getting-started/what-is-wikiloop.md b/docs/site/zh-CN/getting-started/what-is-wikiloop.md index ba87263..2e42014 100644 --- a/docs/site/zh-CN/getting-started/what-is-wikiloop.md +++ b/docs/site/zh-CN/getting-started/what-is-wikiloop.md @@ -1,6 +1,6 @@ # 什么是 WikiLoop -WikiLoop 是一个面向 Agent 的本地优先知识搜索引擎。它将原始文档提炼为结构化、可审计的 Markdown 知识库,然后通过两个 MCP 工具 — `kb_search` 和 `kb_page` — 让 Agent 按自己的节奏搜索和深度阅读。 +WikiLoop 是一个面向 Agent 的本地优先知识搜索引擎。它将原始文档提炼为结构化、可审计的 Markdown 知识库,然后通过三个 MCP 工具 — `kb_search`、`kb_page` 和 `kb_add` — 让 Agent 按自己的节奏搜索、阅读和写入知识。 ## 设计理念 diff --git a/docs/site/zh-CN/index.md b/docs/site/zh-CN/index.md index 9785c76..e829be1 100644 --- a/docs/site/zh-CN/index.md +++ b/docs/site/zh-CN/index.md @@ -18,7 +18,7 @@ hero: features: - title: Agent 原生搜索 - details: 两个 MCP 工具 — kb_search 和 kb_page — 让 Agent 像人使用搜索引擎一样迭代搜索、完整阅读文档。 + details: 三个 MCP 工具 — kb_search、kb_page 和 kb_add — 让 Agent 像人使用知识库一样迭代搜索、完整阅读、主动写入知识。 - title: 可审计的知识 details: 所有知识都是显式 Markdown — 可以 git diff、lint 和 review 每一次变更,没有黑盒向量。 - title: 无需 Embedding