Generated banner for LLM Wiki
Generated logo for LLM Wiki

LLM Wiki

Brain app

First committed by nashsu

Published in nashsu/llm_wiki. Publisher page

21,569 GitHub stars

What it is

LLM Wiki is a cross-platform desktop application that turns your documents into an organized, interlinked knowledge base — automatically. Instead of traditional RAG (retrieve-and-answer from scratch every time), the LLM incrementally builds and maintains a persistent wiki from your sources。
— the description by nashsu

AutoGineer overview, from the brain’s own files

LLM Wiki is a desktop application designed to build and maintain a personal knowledge base by incrementally processing documents. Unlike traditional RAG systems that re-derive answers from scratch, this tool compiles knowledge into a structured, persistent wiki. It features a three-layer architecture (Raw Sources, Wiki, Schema) and uses a two-step chain-of-thought ingest process to analyze and generate interlinked Markdown pages. The application includes a knowledge graph with community detection, vector semantic search, and a Rust-based chat agent that supports tool use and skill management. It is designed to be compatible with Obsidian, allowing users to manage their knowledge base as a local vault.

How it works

Memory model: LLM wiki

AutoGineer overview, from the brain’s own files

The system ingests raw documents from a source folder, processes them through a two-step LLM pipeline (analysis followed by generation), and stores the output as interlinked Markdown files. It maintains a persistent index and log, and uses a knowledge graph to track relationships between pages. Users interact with the knowledge base through a chat interface that can perform semantic search, graph traversal, and web research. The application also supports folder watching to automatically ingest new files and provides an MCP server for external agent integration.

Folders
FolderRoleFiles
.githubagent-config4
assetsattachments9
scriptsscripts1
srcsource-code362
extensionfolder10
mcp-serverfolder11
plansfolder1
src-taurifolder61

Requirements

Runtimes: Node.js

Databases: LanceDB

Set it up

  1. Not scanned by AutoGineerThe author’s README also describes installing it from a clone of its repository. Read its install section: AutoGineer did not scan that path. https://github.com/nashsu/llm_wiki/blob/e08cfce65aad8b76b13546a081c1a8d4422b70c3/README.md#installation
  2. First committed by nashsu. Published in nashsu/llm_wiki. Licence: GNU General Public License v3.0 only.

Usage

AutoGineer overview, from the brain’s own files

  • Automating the creation of a personal wiki from research papers and web clips.
  • Visualizing connections between disparate knowledge topics using a graph-based interface.
  • Integrating local document knowledge into external AI agents via the bundled MCP server.
  • Maintaining a structured, searchable archive of project-related documentation.
“What are the key themes connecting my research on renewable energy and urban planning?”
The agent traverses the knowledge graph, identifies relevant pages, and synthesizes a summary highlighting the intersection of these topics based on existing wiki links.
“Find any isolated concepts in my current wiki that need more research.”
The agent analyzes the graph structure to identify nodes with low connectivity and suggests topics for further investigation.

Documentation by nashsu

LLM Wiki

<p align="center"> <img src="logo.jpg" width="128" height="128" style="border-radius: 22%;" alt="LLM Wiki Logo"> </p>

<p align="center"> <strong>A personal knowledge base that builds itself.</strong><br> LLM reads your documents, builds a structured wiki, and keeps it current. </p>

<p align="center"> <a href="#what-is-this">What is this?</a> • <a href="#what-we-changed--added">Features</a> • <a href="#tech-stack">Tech Stack</a> • <a href="#installation">Installation</a> • <a href="#credits">Credits</a> • <a href="#license">License</a> </p>

<p align="center"> English | <a href="README_CN.md">中文</a> | <a href="README_JA.md">日本語</a> | <a href="README_KO.md">한국어</a> </p>


<p align="center"> <img src="assets/overview.jpg" width="100%" alt="Overview"> </p>

Features

  • Two-Step Chain-of-Thought Ingest — LLM analyzes first, then generates wiki pages with source traceability and incremental cache

  • Multimodal Image Ingestion — extract embedded images from PDFs, generate factual captions with a vision LLM, surface them in image-aware search results with lightbox preview and jump-to-source

  • Multi-format Document Parsing — ingest PDF, Office documents, EPUB/MOBI, Org mode, images, media, web clips, and batches of URLs, with built-in, cloud, or local MinerU PDF processing

  • Flexible Model Configuration — configure models per project, route Chat and Ingest independently, and manage custom providers, headers, and streaming output

  • Source-grounded Retrieval — use Read Sources Only mode to answer exclusively from original imported material

  • Project Management & Migration — export and import complete project archives across devices, and rebuild the Wiki index from existing pages

  • 4-Signal Knowledge Graph — relevance model with direct links, source overlap, Adamic-Adar, and type affinity

  • Louvain Community Detection — automatic knowledge cluster discovery with cohesion scoring

  • Graph Insights — surprising connections and knowledge gaps with one-click Deep Research

  • Vector Semantic Search — optional embedding-based retrieval via LanceDB, supports any OpenAI-compatible endpoint

  • Persistent Ingest Queue — serial processing with crash recovery, cancel, retry, and progress visualization

  • Folder Import — recursive folder import preserving directory structure, folder context as LLM classification hint

  • Source Folder Auto-Watch — detects external changes in raw/sources/ and keeps ingest/delete cleanup in sync

  • Deep Research — LLM-optimized search topics, multi-query web search via Tavily, SerpApi, or SearXNG, auto-ingest results into wiki

  • Rust Backend Chat Agent — tool-using chat runtime with wiki/source/graph/web retrieval, workspace file generation, shell approval, cancellation, and streaming tool events

  • Agent Skills — scan and enable local SKILL.md folders, select skills with /skill, and let the Agent read skill instructions on demand

  • Generated Outputs Preview — Agent-created Markdown, HTML, images, and other workspace files appear as outputs with preview and quick folder access

  • Mermaid Diagram Rendering — render Mermaid code blocks directly in chat and preview, with compact syntax-error cards instead of raw parser output

  • Async Review System — LLM flags items for human judgment, predefined actions, pre-generated search queries

  • Chrome Web Clipper — one-click web page capture with auto-ingest into knowledge base

  • Local HTTP API + MCP Server + AI Agent Skill — built-in 127.0.0.1:19828 JSON API and bundled MCP server for hybrid search, file read, graph traversal, and source rescan; ready-made agent skill installs into Claude Code / Codex with one command (npx skills add …)

What is this?

LLM Wiki is a cross-platform desktop application that turns your documents into an organized, interlinked knowledge base — automatically. Instead of traditional RAG (retrieve-and-answer from scratch every time), the LLM incrementally builds and maintains a persistent wiki from your sources. Knowledge is compiled once and kept current, not re-derived on every query.

This project is based on Karpathy's LLM Wiki pattern — a methodology for building personal knowledge bases using LLMs. llm_wiki is created and maintained by nash_su, who implemented the core ideas as a full desktop application with significant enhancements.

<p align="center"> <img src="assets/llm_wiki_arch.jpg" width="100%" alt="LLM Wiki Architecture"> </p>

Credits

The foundational methodology comes from Andrej Karpathy's llm-wiki.md, which describes the pattern of using LLMs to incrementally build and maintain a personal wiki. The original document is an abstract design pattern; this project is a concrete implementation with substantial extensions.

What We Kept from the Original

The core architecture follows Karpathy's design faithfully:

  • Three-layer architecture: Raw Sources (immutable) → Wiki (LLM-generated) → Schema (rules & config)

  • Three core operations: Ingest, Query, Lint

  • index.md as the content catalog and LLM navigation entry point

  • log.md as the chronological operation record with parseable format

  • wikilink syntax for cross-references

  • YAML frontmatter on every wiki page

  • Obsidian compatibility — the wiki directory works as an Obsidian vault

  • Human curates, LLM maintains — the fundamental role division

<p align="center"> <img src="assets/5-obsidian_compatibility.jpg" width="100%" alt="Obsidian Compatibility"> </p>

What We Changed & Added

1. From CLI to Desktop Application

The original is an abstract pattern document designed to be copy-pasted to an LLM agent. We built it into a full cross-platform desktop application with:

  • Three-column layout: Knowledge Tree / File Tree (left) + Chat (center) + Preview (right)

  • Icon sidebar for switching between Wiki, Sources, Search, Graph, Lint, Review, Deep Research, Settings

  • Custom resizable panels — drag-to-resize left and right panels with min/max constraints

  • Activity panel — real-time processing status showing file-by-file ingest progress

  • All state persisted — conversations, settings, review items, project config survive restarts

  • Scenario templates — Research, Reading, Personal Growth, Business, General — each pre-configures purpose.md and schema.md

2. Purpose.md — The Wiki's Soul

The original has Schema (how the wiki works) but no formal place for why the wiki exists. We added purpose.md:

  • Defines goals, key questions, research scope, evolving thesis

  • LLM reads it during every ingest and query for context

  • LLM can suggest updates based on usage patterns

  • Different from schema — schema is structural rules, purpose is directional intent

3. Two-Step Chain-of-Thought Ingest

The original describes a single-step ingest where the LLM reads and writes simultaneously. We split it into two sequential LLM calls for significantly better quality:

Step 1 (Analysis): LLM reads source → structured analysis
  - Key entities, concepts, arguments
  - Connections to existing wiki content
  - Contradictions & tensions with existing knowledge
  - Recommendations for wiki structure

Step 2 (Generation): LLM takes analysis → generates wiki files
  - Source summary with frontmatter (type, title, sources[])
  - Entity pages, concept pages with cross-references
  - Updated index.md, log.md, overview.md
  - Review items for human judgment
  - Search queries for Deep Research

Additional ingest enhancements beyond the original:

  • SHA256 incremental cache — source file content is hashed before ingest; unchanged files are skipped automatically, saving LLM tokens and time

  • Persistent ingest queue — serial processing prevents concurrent LLM calls; queue persisted to disk, survives app restart; failed tasks auto-retry up to 3 times

  • Folder import — recursive folder import preserving directory structure; folder path passed to LLM as classification context (e.g., "papers > energy" helps categorize content)

  • Source folder auto-watch — files added, edited, or deleted in raw/sources/ outside the app are picked up automatically and reuse the same ingest/delete lifecycle as in-app actions

  • Queue visualization — Activity Panel shows progress bar, pending/processing/failed tasks with cancel and retry buttons

  • Auto-embedding — when vector search is enabled, new pages are automatically embedded after ingest

  • Source traceability — every generated wiki page includes a sources: [] field in YAML frontmatter, linking back to the raw source files that contributed to it

  • overview.md auto-update — global summary page regenerated on every ingest to reflect the latest state of the wiki

  • Guaranteed source summary — fallback ensures a source summary page is always created, even if the LLM omits it

  • Language-aware generation — LLM responds in the user's configured language (English or Chinese)

  • Progressive Sources view — large source folders render progressively while scrolling, keeping big source collections responsive

4. Knowledge Graph with Relevance Model

<p align="center"> <img src="assets/3-knowledge_graph.jpg" width="100%" alt="Knowledge Graph"> </p>

The original mentions [[wikilinks]] for cross-references but has no graph analysis. We built a full knowledge graph visualization and relevance engine:

4-Signal Relevance Model:

SignalWeightDescription
Direct link×3.0Pages linked via [[wikilinks]]
Source overlap×4.0Pages sharing the same raw source (via frontmatter sources[])
Adamic-Adar×1.5Pages sharing common neighbors (weighted by neighbor degree)
Type affinity×1.0Bonus for same page type (entity↔entity, concept↔concept)

Graph Visualization (sigma.js + graphology + ForceAtlas2):

  • Node colors by page type or community, sizes scaled by link count (√ scaling)

  • Edge thickness and color by relevance weight (green=strong, gray=weak)

  • Hover interaction: neighbors stay visible, non-neighbors dim, edges highlight with relevance score label

  • Zoom controls (ZoomIn, ZoomOut, Fit-to-screen)

  • Position caching prevents layout jumps when data updates

  • Legend switches between type counts and community info based on coloring mode

5. Louvain Community Detection

Not in the original. Automatic discovery of knowledge clusters using the Louvain algorithm (graphology-communities-louvain):

  • Auto-clustering — discovers which pages naturally group together based on link topology, independent of predefined page types

  • Type / Community toggle — switch between coloring nodes by page type (entity, concept, source...) or by discovered knowledge cluster

  • Cohesion scoring — each community scored by intra-edge density (actual edges / possible edges); low-cohesion clusters (< 0.15) flagged with warning

  • 12-color palette — distinct visual separation between clusters

  • Community legend — shows top node label, member count, and cohesion per cluster

<p align="center"> <img src="assets/kg_community.jpg" width="100%" alt="Louvain Community Detection"> </p>

6. Graph Insights — Surprising Connections & Knowledge Gaps

Not in the original. The system automatically analyzes graph structure to surface actionable insights:

Surprising Connections:

  • Detects unexpected relationships: cross-community edges, cross-type links, peripheral↔hub couplings

  • Composite surprise score ranks the most noteworthy connections

  • Dismissable — mark connections as reviewed so they don't reappear

Knowledge Gaps:

  • Isolated pages (degree ≤ 1) — pages with few or no connections to the rest of the wiki

  • Sparse communities (cohesion < 0.15, ≥ 3 pages) — knowledge areas with weak internal cross-references

  • Bridge nodes (connecting 3+ clusters) — critical junction pages that hold multiple knowledge areas together

Interactive:

  • Click any insight card to highlight corresponding nodes and edges in the graph; click again to deselect

  • Knowledge gaps and bridge nodes have a Deep Research button — triggers LLM-optimized research with domain-aware topics (reads overview.md + purpose.md for context)

  • Research topic shown in editable confirmation dialog before starting — user can refine topic and search queries

<p align="center"> <img src="assets/kg_insights.jpg" width="100%" alt="Graph Insights"> </p>

7. Optimized Query Retrieval Pipeline

The original describes a simple query where the LLM reads relevant pages. We built a multi-phase retrieval pipeline with optional vector search and budget control:

Phase 1: Tokenized Search
  - English: word splitting + stop word removal
  - Chinese: CJK bigram tokenization (每个 → [每个, 个…])
  - Title match bonus (+10 score)
  - Searches both wiki/ and raw/sources/

Phase 1.5: Vector Semantic Search (optional)
  - Embedding via any OpenAI-compatible /v1/embeddings endpoint
  - Stored in LanceDB (Rust backend) for fast ANN retrieval
  - Cosine similarity finds semantically related pages even without keyword overlap
  - Results merged into search: boosts existing matches + adds new discoveries

Phase 2: Graph Expansion
  - Top search results used as seed nodes
  - 4-signal relevance model finds related pages
  - 2-hop traversal with decay for deeper connections

Phase 3: Budget Control
  - Configurable context window: 4K → 1M tokens
  - Proportional allocation: 60% wiki pages, 20% chat history, 5% index, 15% system
  - Pages prioritized by combined search + graph relevance score

Phase 4: Context Assembly
  - Numbered pages with full content (not just summaries)
  - System prompt includes: purpose.md, language rules, citation format, index.md
  - LLM instructed to cite pages by number: [1], [2], etc.

Vector Search is fully optional — disabled by default, enabled in Settings with independent endpoint, API key, and model configuration. When disabled, the pipeline falls back to tokenized search + graph expansion. Benchmark: overall recall improved from 58.2% to 71.4% with vector search enabled.

8. Multi-Conversation Chat with Persistence

The original has a single query interface. We built full multi-conversation support:

  • Independent chat sessions — create, rename, delete conversations

  • Conversation sidebar — quick switching between topics

  • Per-conversation persistence — each conversation saved to .llm-wiki/chats/{id}.json

  • Configurable history depth — limit how many messages are sent as context (default: 10)

  • Cited references panel — collapsible section on each response showing which wiki pages were used, grouped by type with icons

  • Reference persistence — cited pages stored directly in message data, stable across restarts

  • Regenerate — re-generate the last response with one click (removes last assistant + user message pair, re-sends)

  • Save to Wiki — archive valuable answers to wiki/queries/, then auto-ingest to extract entities/concepts into the knowledge network

9. Rust Backend Chat Agent & Skills

Not in the original. Chat now runs through a Rust backend Agent runtime rather than a browser-only TypeScript loop:

  • Tool-using Agent — can choose wiki search, source search, graph search, web search, AnyTXT, workspace file tools, approved shell commands, and skill file reads

  • Skill management — scan project and user skill folders, enable or disable skills, and pick a skill per conversation with /skill completion

  • Generated workspace outputs — files produced by Agent tools are kept under agent-workspace/, shown as generated outputs, and can be previewed or opened from the chat

  • User interaction forms — skills can ask for structured user input such as single choice, multiple choice, or free text without hardcoding skill-specific UI

  • Safer execution model — project workspace commands can continue smoothly, while external shell commands still require explicit approval

10. Thinking / Reasoning Display

Not in the original. For LLMs that emit <think> blocks (DeepSeek, QwQ, etc.):

  • Streaming thinking — rolling 5-line display with opacity fade during generation

  • Collapsed by default — thinking blocks hidden after completion, click to expand

  • Visual separation — thinking content shown in distinct style, separate from the main response

11. Markdown Rendering: KaTeX Math & Mermaid Diagrams

Not in the original. Rich Markdown rendering across chat and preview:

  • KaTeX rendering — inline $...$ and block $$...$$ formulas rendered via remark-math + rehype-katex

  • Milkdown math plugin — preview editor renders math natively via @milkdown/plugin-math

  • Auto-detection — bare \begin{aligned} and other LaTeX environments automatically wrapped with $$ delimiters

  • Unicode fallback — 100+ symbol mappings (α, ∑, →, ≤, etc.) for simple inline notation outside math blocks

  • Mermaid code blocks — fenced mermaid diagrams render directly as flowcharts, sequence diagrams, and other Mermaid-supported visuals

  • Compact Mermaid errors — syntax failures are captured inside a small error card instead of spilling raw parser output into the chat

12. Review System (Async Human-in-the-Loop)

The original suggests staying involved during ingest. We added an asynchronous review queue:

  • LLM flags items needing human judgment during ingest

  • Predefined action types: Create Page, Deep Research, Skip — constrained to prevent LLM hallucination of arbitrary actions

  • Search queries generated at ingest time — LLM pre-generates optimized web search queries for each review item

  • User handles reviews at their convenience — doesn't block ingest

13. Deep Research

<p align="center"> <img src="assets/1-deepresearch.jpg" width="100%" alt="Deep Research"> </p>

Not in the original. When the LLM identifies knowledge gaps:

  • Web search via Tavily, SerpApi, or SearXNG finds relevant sources with full content extraction (no truncation)

  • Provider-specific configuration — Tavily and SerpApi use independent API keys; SerpApi supports selectable engines, while SearXNG uses a configured instance URL and search categories

  • Multiple search queries per topic — LLM-generated at ingest time, optimized for search engines

  • LLM-optimized research topics — when triggered from Graph Insights, LLM reads overview.md + purpose.md to generate domain-specific topics and queries (not generic keywords)

  • User confirmation dialog — editable topic and search queries shown for review before research starts

  • LLM synthesizes findings into a wiki research page with cross-references to existing wiki

  • Thinking display — <think> blocks shown as collapsible sections during synthesis, auto-scroll to latest content

  • Auto-ingest — research results automatically processed to extract entities/concepts into the wiki

  • Task queue with 3 concurrent tasks

  • Research Panel — dedicated sidebar panel with dynamic height, real-time streaming progress

14. Browser Extension (Web Clipper)

<p align="center"> <img src="assets/4-chrome_extension_webclipper.jpg" width="100%" alt="Chrome Extension Web Clipper"> </p>

The original mentions Obsidian Web Clipper. We built a dedicated Chrome Extension (Manifest V3):

  • Mozilla Readability.js for accurate article extraction (strips ads, nav, sidebars)

  • Turndown.js for HTML → Markdown conversion with table support

  • Project picker — choose which wiki to clip into (supports multi-project)

  • Local HTTP API (port 19827, tiny_http) — Extension ↔ App communication

  • Auto-ingest — clipped content automatically triggers the two-step ingest pipeline

  • Clip watcher — polls every 3 seconds for new clips, processes automatically

  • Offline preview — shows extracted content even when app is not running

15. Multi-format Document Support

The original focuses on text/markdown. We support structured extraction preserving document semantics:

FormatMethod
PDFBuilt-in pdf-extract (Rust) with file caching; optional MinerU Cloud, Local API, or Pipeline parsing for complex layouts
DOCXdocx-rs — headings, bold/italic, lists, tables → structured Markdown
PPTXZIP + XML — slide-by-slide extraction with heading/list structure
XLSX/XLS/ODScalamine — proper cell types, multi-sheet support, Markdown tables
EPUB/MOBIElectronic book metadata, chapters, and body text → ingest-ready content
ImagesNative preview (png, jpg, gif, webp, svg, etc.)
Video/AudioBuilt-in player
Web clipsReadability.js + Turndown.js → clean Markdown

MinerU is optional. Use MinerU Cloud, an official Local API endpoint, or Local Pipeline mode for complex PDFs. Local modes keep processing on your machine, and extracted images are stored in the project-managed wiki/media directory. If MinerU fails, LLM Wiki falls back to the built-in parser.

16. File Deletion with Cascade Cleanup

The original has no deletion mechanism. We added intelligent cascade deletion:

  • Deleting a source file removes its wiki summary page

  • 3-method matching finds related wiki pages: frontmatter sources[] field, source summary page name, frontmatter section references

  • Shared entity preservation — entity/concept pages linked to multiple sources only have the deleted source removed from their sources[] array, not deleted entirely

  • Index cleanup — removed pages are purged from index.md

  • Wikilink cleanup — dead [[wikilinks]] to deleted pages are removed from remaining wiki pages

17. Configurable Context Window

Not in the original. Users can configure how much context the LLM receives:

  • Slider from 4K to 1M tokens — adapts to different LLM capabilities

  • Proportional budget allocation — larger windows get proportionally more wiki content

  • 60/20/5/15 split — wiki pages / chat history / index / system prompt

18. Cross-Platform Compatibility

The original is platform-agnostic (abstract pattern). We handle concrete cross-platform concerns:

  • Path normalization — unified normalizePath() used across 22+ files, backslash → forward slash

  • Unicode-safe string handling — char-based slicing instead of byte-based (prevents crashes on CJK filenames)

  • macOS close-to-hide — close button hides window (app stays running in background), click dock icon to restore, Cmd+Q to quit

  • Windows/Linux close confirmation — confirmation dialog before quitting to prevent accidental data loss

  • Tauri v2 — native desktop on macOS, Windows, Linux

  • GitHub Actions CI/CD — automated builds for macOS (Apple Silicon), Windows (.msi), Linux (.deb / .AppImage)

19. Other Additions
  • i18n — English + Chinese interface (react-i18next)

  • Settings persistence — LLM provider, API key, model, context size, language saved via Tauri Store

  • Obsidian config — auto-generated .obsidian/ directory with recommended settings

  • Markdown rendering — GFM tables with borders, proper code blocks, wikilink processing in chat and preview

  • Multi-provider LLM support — OpenAI, Anthropic, Google, Ollama, Custom — each with provider-specific streaming and headers

  • Configurable LLM timeout — adjust request timeouts for slow local models and long-running operations

  • Configurable Firecrawl — optional API key and custom Base URL for hosted or self-hosted services

  • Collapsible file sidebar — collapse Knowledge/Files navigation while preserving its state

  • Project maintenance — ZIP export/import for migration and deterministic wiki/index.md rebuilding

  • dataVersion signaling — graph and UI automatically refresh when wiki content changes

Tech Stack

LayerTechnology
DesktopTauri v2 (Rust backend)
FrontendReact 19 + TypeScript + Vite
UIshadcn/ui + Tailwind CSS v4
EditorMilkdown (ProseMirror-based WYSIWYG)
Graphsigma.js + graphology + ForceAtlas2
SearchTokenized search + graph relevance + optional vector (LanceDB)
Vector DBLanceDB (Rust, embedded, optional)
Documentspdf-extract + MinerU Cloud/Local + docx-rs + calamine + EPUB/MOBI extraction
i18nreact-i18next
StateZustand
LLMStreaming fetch (OpenAI, Anthropic, Google, Ollama, Custom)
Web SearchTavily, SerpApi, SearXNG JSON API

Installation

Pre-built Binaries

Download from Releases:

  • macOS: .dmg (Apple Silicon)

  • Windows: .msi

  • Linux: .deb / .AppImage

Build from Source
# Prerequisites: Node.js 20+, Rust 1.88+, protoc
#   macOS:  brew install protobuf
#   Linux:  sudo apt install protobuf-compiler
#   Windows: choco install protoc
git clone https://github.com/nashsu/llm_wiki.git
cd llm_wiki
npm install
npm --prefix mcp-server ci && npm run mcp:build   # mcp-server/dist is bundled as a Tauri resource
npm run tauri dev      # Development
npm run tauri build    # Production build
Chrome Extension
  1. Open chrome://extensions

  2. Enable "Developer mode"

  3. Click "Load unpacked"

  4. Select the extension/ directory

  5. Clip the current page with Alt+Shift+L (Command+Shift+L on macOS). Customize it at chrome://extensions/shortcuts.

Quick Start

  1. Launch the app → Create a new project (choose a template)

  2. Go to Settings → Configure your LLM provider (API key + model)

  3. Optional: configure Web Search providers and source folder auto-watch in Settings

  4. Go to Sources → Import documents (PDF, DOCX, MD, etc.)

  5. Watch the Activity Panel — LLM automatically builds wiki pages

  6. Use Chat to query your knowledge base

  7. Browse the Knowledge Graph to see connections

  8. Check Review for items needing your attention

  9. Run Lint periodically to maintain wiki health

Local HTTP API + MCP Server + AI Agent Skill

LLM Wiki ships a built-in local HTTP API at http://127.0.0.1:19828 (token-protected, 127.0.0.1-only) so external tools — including AI agents like Claude Code, Codex, or any HTTP-capable script — can query your wiki:

  • GET /api/v1/health — server status (no auth)

  • GET /api/v1/projects — list projects

  • GET /api/v1/projects/{id}/files / files/content — read files and content

  • GET /api/v1/projects/{id}/reviews?status=unresolved — export Review tab items for wiki maintenance (status: unresolved, resolved, or all; optional type and limit)

  • PATCH /api/v1/projects/{id}/reviews/{reviewId} — update one Review item (JSON body { "resolved": true, "action": "label" }; resolved defaults to true, pass false to reopen)

  • POST /api/v1/projects/{id}/reviews/resolve — bulk-resolve Review items (JSON body { "ids": [...], "action": "label" }), returns { resolved, notFound, count }; the Review tab's Refresh button re-reads the result from disk

  • POST /api/v1/projects/{id}/search — hybrid retrieval (keyword + vector) returning mode, tokenHits, vectorHits, per-result vectorScore

  • POST /api/v1/projects/{id}/chat — backend Agent chat endpoint for wiki/source/web/AnyTXT retrieval. JSON requests remain non-streaming by default; send "stream": true or Accept: text/event-stream for SSE events (meta, incremental agent, then done, cancelled, or error). The terminal done frame contains the complete aggregate response, so clients should not render both message deltas and the final message as separate answers. mode: "deep" broadens evidence collection, while the full Deep Research workspace remains available in the desktop UI

  • GET /api/v1/projects/{id}/graph — wikilinks graph; supports q, nodeType, limit (max 1000), offset, and edgeScope=page|filtered, and returns totalCount / hasMore for large projects

  • POST /api/v1/projects/{id}/sources/rescan — trigger a backend rescan

  • POST /api/v1/projects/{id}/pages/embed — index one externally created or updated wiki/*.md page without rebuilding the whole vector database

Enable the API, generate a token, and choose whether local unauthenticated access is allowed in Settings → API + MCP.

For MCP-compatible clients, LLM Wiki also includes a local MCP server in mcp-server/. After building it with npm run mcp:build, Settings → API + MCP shows a copyable MCP client configuration with the correct local path for your machine. The MCP tools call the same API surface, so agent clients can list projects, read files, export unresolved Review items, run hybrid search, inspect the graph, trigger source rescans, and call the same Rust backend Agent chat endpoint without custom HTTP glue code.

Plug your AI agent in with one command

A ready-made agent skill for LLM Wiki lives in its own repo. Install it into Claude Code / Codex / any skills-compatible runtime:

npx skills add https://github.com/nashsu/llm_wiki_skill.git --skill llm-wiki

After install, the agent can answer prompts like "what does my LLM Wiki say about X", "search my 知识库 for Y", "show the neighborhood of node Z in my wiki graph", and "rescan my wiki sources" by talking to your locally-running app — read-only by default, citing wiki page paths so you can verify in-app.

  • Skill repo: https://github.com/nashsu/llm_wiki_skill

  • Trigger discipline: it intentionally does not trigger on generic "search my notes" / "check my Obsidian / Notion / Logseq" — only when you explicitly name LLM Wiki / my wiki / 知识库.

Project Structure

my-wiki/
├── purpose.md              # Goals, key questions, research scope
├── schema.md               # Wiki structure rules, page types
├── raw/
│   ├── sources/            # Uploaded documents (immutable)
│   └── assets/             # Local images
├── wiki/
│   ├── index.md            # Content catalog
│   ├── log.md              # Operation history
│   ├── overview.md         # Global summary (auto-updated)
│   ├── entities/           # People, organizations, products
│   ├── concepts/           # Theories, methods, techniques
│   ├── sources/            # Source summaries
│   ├── queries/            # Saved chat answers + research
│   ├── synthesis/          # Cross-source analysis
│   └── comparisons/        # Side-by-side comparisons
├── .obsidian/              # Obsidian vault config (auto-generated)
└── .llm-wiki/              # App config, chat history, review items

Star History

<a href="https://www.star-history.com/?repos=nashsu%2Fllm_wiki&type=date&legend=top-left"> <picture> <source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/chart?repos=nashsu/llm_wiki&type=date&theme=dark&legend=top-left" /> <source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/chart?repos=nashsu/llm_wiki&type=date&legend=top-left" /> <img alt="Star History Chart" src="https://api.star-history.com/chart?repos=nashsu/llm_wiki&type=date&legend=top-left" /> </picture> </a>

License

This project is licensed under the GNU General Public License v3.0 — see LICENSE for details.

README_KO.md

LLM Wiki

<p align="center"> <img src="logo.jpg" width="128" height="128" style="border-radius: 22%;" alt="LLM Wiki Logo"> </p>

<p align="center"> <strong>스스로 만들어지는 개인 지식 베이스.</strong><br> LLM이 문서를 읽고 구조화된 Wiki를 만들며 계속 최신 상태로 유지합니다. </p>

<p align="center"> <a href="#이게-무엇인가요">이게 무엇인가요?</a> • <a href="#변경하고-추가한-것들">기능</a> • <a href="#기술-스택">기술 스택</a> • <a href="#설치">설치</a> • <a href="#크레딧">크레딧</a> • <a href="#라이선스">라이선스</a> </p>

<p align="center"> <a href="README.md">English</a> | <a href="README_CN.md">中文</a> | <a href="README_JA.md">日本語</a> | 한국어 </p>


<p align="center"> <img src="assets/overview.jpg" width="100%" alt="개요"> </p>

기능

  • 2단계 Chain-of-Thought 인제스트 — LLM이 먼저 분석한 뒤, 출처 추적성과 증분 캐시를 갖춘 Wiki 페이지를 생성합니다

  • 멀티모달 이미지 인제스트 — PDF에 포함된 이미지를 추출하고, Vision LLM으로 사실 기반 캡션을 생성하며, 이미지 인식 검색 결과와 라이트박스 미리보기, 원본 위치로 이동 기능을 제공합니다

  • 다중 형식 문서 파싱 — PDF, Office 문서, EPUB/MOBI, Org mode, 이미지, 미디어, 웹 클립, URL 일괄 가져오기를 지원하며 내장, 클라우드 또는 로컬 MinerU PDF 처리를 선택할 수 있습니다

  • 유연한 모델 설정 — 프로젝트별 모델 설정, Chat/Ingest 개별 라우팅, 사용자 지정 Provider, 요청 헤더, 스트리밍 출력을 지원합니다

  • 원본 자료 기반 검색 — “원본 자료만” 모드에서 가져온 원본 자료만을 근거로 답변합니다

  • 프로젝트 관리 및 마이그레이션 — 전체 프로젝트 아카이브를 장치 간에 가져오고 내보내며 기존 Wiki 페이지에서 인덱스를 다시 만들 수 있습니다

  • 4-신호 지식 그래프 — 직접 링크, 출처 중복, Adamic-Adar, 타입 친화도를 사용하는 관련성 모델입니다

  • Louvain 커뮤니티 감지 — 지식 클러스터를 자동으로 발견하고 응집도를 점수화합니다

  • 그래프 인사이트 — 뜻밖의 연결과 지식 공백을 찾아내고, 한 번의 클릭으로 Deep Research를 실행합니다

  • 벡터 의미 검색 — LanceDB 기반의 선택적 임베딩 검색으로, OpenAI 호환 엔드포인트를 지원합니다

  • 영속 인제스트 큐 — 직렬 처리, 충돌 복구, 취소, 재시도, 진행 상황 시각화를 지원합니다

  • 폴더 가져오기 — 디렉터리 구조를 유지하며 재귀적으로 가져오고, 폴더 컨텍스트를 LLM 분류 힌트로 사용합니다

  • 소스 폴더 자동 감시 — raw/sources/의 외부 변경을 감지하고 인제스트/삭제 정리 흐름과 동기화합니다

  • Deep Research — LLM에 최적화된 검색 주제와 Tavily, SerpApi, SearXNG 기반 다중 쿼리 웹 검색을 사용하고, 결과를 자동으로 Wiki에 인제스트합니다

  • Rust 백엔드 Chat Agent — Wiki/Source/Graph/Web 검색, workspace 파일 생성, shell 승인, 취소, 스트리밍 tool event를 지원하는 도구 사용형 채팅 runtime입니다

  • Agent Skills — 로컬 SKILL.md 폴더를 스캔하고 활성화하며, 채팅에서 /skill로 선택하면 Agent가 필요할 때 Skill 지침을 읽습니다

  • 생성물 미리보기 — Agent가 만든 Markdown, HTML, 이미지 등 workspace 파일을 생성물로 표시하고, 미리보기와 출력 폴더 열기를 지원합니다

  • Mermaid 다이어그램 렌더링 — 채팅과 미리보기에서 Mermaid 코드 블록을 직접 렌더링하고, 문법 오류는 간결한 오류 카드로 표시합니다

  • 비동기 리뷰 시스템 — LLM이 사람의 판단이 필요한 항목을 표시하고, 사전 정의된 작업과 미리 생성된 검색 쿼리를 제공합니다

  • Chrome Web Clipper — 웹 페이지를 한 번의 클릭으로 캡처하고 지식 베이스에 자동 인제스트합니다

  • 로컬 HTTP API + MCP Server + AI Agent Skill — 내장 127.0.0.1:19828 JSON API와 번들 MCP Server를 통해 하이브리드 검색, 파일 읽기, 그래프 탐색, 소스 재스캔을 지원합니다. 바로 사용할 수 있는 agent skill은 한 줄 명령(npx skills add ...)으로 Claude Code / Codex에 설치할 수 있습니다

이게 무엇인가요?

LLM Wiki는 문서를 자동으로 정리되고 서로 연결된 지식 베이스로 바꾸는 크로스 플랫폼 데스크톱 애플리케이션입니다. 전통적인 RAG처럼 매번 처음부터 검색하고 답을 만드는 대신, LLM이 소스에서 영속적인 Wiki를 증분 방식으로 구축하고 유지합니다. 지식은 한 번 컴파일되고 계속 최신 상태로 유지되며, 쿼리마다 다시 추론되지 않습니다.

이 프로젝트는 Karpathy의 LLM Wiki 패턴을 기반으로 합니다. 이는 LLM으로 개인 지식 베이스를 구축하는 방법론입니다. llm_wiki는 nash_su가 만들고 유지 관리하며, 핵심 아이디어를 완전한 데스크톱 애플리케이션으로 구현하고 큰 폭으로 확장했습니다.

<p align="center"> <img src="assets/llm_wiki_arch.jpg" width="100%" alt="LLM Wiki 아키텍처"> </p>

크레딧

기초 방법론은 Andrej Karpathy의 llm-wiki.md에서 왔습니다. 이 문서는 LLM을 사용해 개인 Wiki를 증분 방식으로 구축하고 유지하는 패턴을 설명합니다. 원문은 추상적인 설계 패턴이며, 이 프로젝트는 상당한 확장을 더한 구체적인 구현입니다.

원본에서 유지한 것

핵심 아키텍처는 Karpathy의 설계를 충실히 따릅니다.

  • 3계층 아키텍처: Raw Sources(불변) → Wiki(LLM 생성) → Schema(규칙 및 설정)

  • 3가지 핵심 작업: Ingest, Query, Lint

  • index.md를 콘텐츠 카탈로그이자 LLM 탐색 진입점으로 사용

  • log.md를 파싱 가능한 형식의 시간순 작업 기록으로 사용

  • wikilink 문법으로 상호 참조

  • 모든 Wiki 페이지에 YAML frontmatter 사용

  • Obsidian 호환성 — Wiki 디렉터리를 Obsidian vault로 사용할 수 있습니다

  • 사람이 큐레이션하고 LLM이 유지 — 기본 역할 분담입니다

<p align="center"> <img src="assets/5-obsidian_compatibility.jpg" width="100%" alt="Obsidian 호환성"> </p>

변경하고 추가한 것들

1. CLI에서 데스크톱 애플리케이션으로

원본은 LLM 에이전트에 복사해 붙여 넣어 쓰는 추상적인 패턴 문서입니다. 우리는 이를 완전한 크로스 플랫폼 데스크톱 애플리케이션으로 만들었습니다.

  • 3열 레이아웃: Knowledge Tree / File Tree(왼쪽) + Chat(가운데) + Preview(오른쪽)

  • Wiki, Sources, Search, Graph, Lint, Review, Deep Research, Settings를 전환하는 아이콘 사이드바

  • 사용자 정의 리사이즈 패널 — 최소/최대 제약을 가진 좌우 패널 드래그 리사이즈

  • Activity 패널 — 파일별 인제스트 진행 상황을 보여주는 실시간 처리 상태

  • 모든 상태 영속화 — 대화, 설정, 리뷰 항목, 프로젝트 설정이 재시작 후에도 유지됩니다

  • 시나리오 템플릿 — Research, Reading, Personal Growth, Business, General 템플릿이 각각 purpose.md와 schema.md를 미리 설정합니다

2. purpose.md — Wiki의 영혼

원본에는 Schema(Wiki가 작동하는 방식)는 있지만 Wiki가 존재하는 이유를 담는 공식 위치가 없습니다. 우리는 purpose.md를 추가했습니다.

  • 목표, 핵심 질문, 연구 범위, 진화하는 논지를 정의합니다

  • LLM이 모든 인제스트와 쿼리에서 컨텍스트로 읽습니다

  • LLM이 사용 패턴을 바탕으로 업데이트를 제안할 수 있습니다

  • schema와 다릅니다. schema는 구조적 규칙이고, purpose는 방향성 있는 의도입니다

3. 2단계 Chain-of-Thought 인제스트

원본은 LLM이 읽기와 쓰기를 동시에 수행하는 단일 단계 인제스트를 설명합니다. 우리는 품질을 크게 높이기 위해 이를 두 번의 순차 LLM 호출로 나눴습니다.

1단계(분석): LLM이 소스를 읽음 → 구조화된 분석
  - 핵심 엔티티, 개념, 주장
  - 기존 Wiki 콘텐츠와의 연결
  - 기존 지식과의 모순 및 긴장
  - Wiki 구조 권장 사항

2단계(생성): LLM이 분석을 받아 Wiki 파일 생성
  - frontmatter(type, title, sources[])가 있는 소스 요약
  - 상호 참조가 포함된 엔티티 페이지와 개념 페이지
  - 갱신된 index.md, log.md, overview.md
  - 사람의 판단이 필요한 리뷰 항목
  - Deep Research용 검색 쿼리

원본을 넘어 추가한 인제스트 개선 사항:

  • SHA256 증분 캐시 — 인제스트 전에 소스 파일 콘텐츠를 해시하고, 변경되지 않은 파일은 자동으로 건너뛰어 LLM 토큰과 시간을 절약합니다

  • 영속 인제스트 큐 — 직렬 처리로 동시 LLM 호출을 방지합니다. 큐는 디스크에 저장되어 앱 재시작 후에도 유지되며, 실패한 작업은 최대 3회 자동 재시도됩니다

  • 폴더 가져오기 — 디렉터리 구조를 유지하며 재귀적으로 가져옵니다. 폴더 경로는 LLM 분류 컨텍스트로 전달됩니다(예: "papers > energy"는 콘텐츠 분류에 도움이 됩니다)

  • 소스 폴더 자동 감시 — 앱 밖에서 raw/sources/에 추가, 수정, 삭제된 파일을 자동으로 감지하고 앱 내부 작업과 동일한 인제스트/삭제 생명주기를 재사용합니다

  • 큐 시각화 — Activity Panel이 진행률 표시줄, 대기/처리/실패 작업, 취소 및 재시도 버튼을 표시합니다

  • 자동 임베딩 — 벡터 검색이 활성화되어 있으면 새 페이지가 인제스트 후 자동으로 임베딩됩니다

  • 출처 추적성 — 생성된 모든 Wiki 페이지는 YAML frontmatter에 sources: [] 필드를 포함하여 기여한 원본 소스 파일로 되돌아갈 수 있게 합니다

  • overview.md 자동 업데이트 — 전체 요약 페이지가 매 인제스트마다 재생성되어 최신 Wiki 상태를 반영합니다

  • 보장된 소스 요약 — LLM이 누락하더라도 소스 요약 페이지가 항상 생성되도록 fallback을 제공합니다

  • 언어 인식 생성 — LLM은 사용자가 설정한 언어(영어 또는 중국어)로 응답합니다

  • 점진적 Sources 뷰 — 큰 소스 폴더를 스크롤 중 점진적으로 렌더링하여 대규모 소스 컬렉션에서도 반응성을 유지합니다

4. 관련성 모델을 갖춘 지식 그래프

<p align="center"> <img src="assets/3-knowledge_graph.jpg" width="100%" alt="지식 그래프"> </p>

원본은 상호 참조를 위한 [[wikilinks]]를 언급하지만 그래프 분석은 없습니다. 우리는 완전한 지식 그래프 시각화 및 관련성 엔진을 만들었습니다.

4-신호 관련성 모델:

신호가중치설명
직접 링크x3.0[[wikilinks]]로 연결된 페이지
출처 중복x4.0frontmatter sources[]를 통해 같은 원본 소스를 공유하는 페이지
Adamic-Adarx1.5공통 이웃을 공유하는 페이지(이웃 차수로 가중)
타입 친화도x1.0같은 페이지 타입(entity↔entity, concept↔concept)에 보너스

그래프 시각화(sigma.js + graphology + ForceAtlas2):

  • 노드 색상은 페이지 타입 또는 커뮤니티 기준, 크기는 링크 수에 따라 조정(√ 스케일링)

  • 엣지 두께와 색상은 관련성 가중치 기준(초록=강함, 회색=약함)

  • Hover 상호작용: 이웃은 보이고 비이웃은 흐려지며, 엣지가 관련성 점수 라벨과 함께 강조됩니다

  • 줌 컨트롤(ZoomIn, ZoomOut, Fit-to-screen)

  • 위치 캐싱으로 데이터 업데이트 시 레이아웃 튐 방지

  • 색상 모드에 따라 타입 수와 커뮤니티 정보를 전환하는 범례

5. Louvain 커뮤니티 감지

원본에는 없는 기능입니다. Louvain 알고리즘(graphology-communities-louvain)을 사용해 지식 클러스터를 자동으로 발견합니다.

  • 자동 클러스터링 — 사전 정의된 페이지 타입과 무관하게 링크 토폴로지를 기반으로 자연스럽게 묶이는 페이지를 발견합니다

  • 타입 / 커뮤니티 토글 — 노드 색상을 페이지 타입(entity, concept, source 등) 또는 발견된 지식 클러스터 기준으로 전환합니다

  • 응집도 점수 — 각 커뮤니티를 내부 엣지 밀도(실제 엣지 / 가능한 엣지)로 평가합니다. 응집도가 낮은 클러스터(< 0.15)는 경고로 표시됩니다

  • 12색 팔레트 — 클러스터를 뚜렷하게 구분합니다

  • 커뮤니티 범례 — 상위 노드 라벨, 멤버 수, 클러스터별 응집도를 표시합니다

<p align="center"> <img src="assets/kg_community.jpg" width="100%" alt="Louvain 커뮤니티 감지"> </p>

6. 그래프 인사이트 — 뜻밖의 연결과 지식 공백

원본에는 없는 기능입니다. 시스템이 그래프 구조를 자동 분석하여 실행 가능한 인사이트를 보여줍니다.

뜻밖의 연결:

  • 교차 커뮤니티 엣지, 교차 타입 링크, 주변부↔허브 결합 같은 예상 밖의 관계를 감지합니다

  • 복합 surprise score로 가장 주목할 만한 연결을 순위화합니다

  • 닫을 수 있습니다. 연결을 reviewed로 표시하면 다시 나타나지 않습니다

지식 공백:

  • 고립 페이지(degree ≤ 1) — 나머지 Wiki와의 연결이 거의 없거나 없는 페이지

  • 희소 커뮤니티(응집도 < 0.15, 3개 이상 페이지) — 내부 상호 참조가 약한 지식 영역

  • 브리지 노드(3개 이상 클러스터 연결) — 여러 지식 영역을 묶는 핵심 연결 지점

상호작용:

  • 인사이트 카드를 클릭하면 해당 노드와 엣지가 강조됩니다. 다시 클릭하면 선택이 해제됩니다

  • 지식 공백과 브리지 노드에는 Deep Research 버튼이 있어 도메인 인식 주제로 LLM 최적화 리서치를 시작합니다(overview.md + purpose.md를 컨텍스트로 읽음)

  • 리서치 주제는 시작 전에 편집 가능한 확인 대화상자에 표시되어, 사용자가 주제와 검색 쿼리를 조정할 수 있습니다

<p align="center"> <img src="assets/kg_insights.jpg" width="100%" alt="그래프 인사이트"> </p>

7. 최적화된 쿼리 검색 파이프라인

원본은 LLM이 관련 페이지를 읽는 단순 쿼리를 설명합니다. 우리는 선택적 벡터 검색과 예산 제어를 포함한 다단계 검색 파이프라인을 만들었습니다.

1단계: 토큰화 검색
  - 영어: 단어 분리 + stop word 제거
  - 중국어: CJK bigram 토큰화(每个 → [每个, 个...])
  - 제목 일치 보너스(+10점)
  - wiki/와 raw/sources/ 모두 검색

1.5단계: 벡터 의미 검색(선택)
  - OpenAI 호환 /v1/embeddings 엔드포인트로 임베딩
  - 빠른 ANN 검색을 위해 LanceDB(Rust backend)에 저장
  - 키워드가 겹치지 않아도 의미적으로 관련된 페이지를 찾음
  - 결과를 검색에 병합: 기존 일치를 boost하고 새 발견을 추가

2단계: 그래프 확장
  - 상위 검색 결과를 seed node로 사용
  - 4-신호 관련성 모델로 관련 페이지 탐색
  - 깊이에 따라 감쇠되는 2-hop traversal

3단계: 예산 제어
  - 설정 가능한 context window: 4K → 1M tokens
  - 비례 할당: Wiki 페이지 60%, 채팅 기록 20%, index 5%, system 15%
  - 페이지는 검색 + 그래프 관련성 합산 점수로 우선순위화

4단계: 컨텍스트 조립
  - 전체 콘텐츠를 가진 번호 매긴 페이지(요약만 제공하지 않음)
  - system prompt 포함: purpose.md, language rules, citation format, index.md
  - LLM은 페이지 번호 [1], [2] 등으로 인용하도록 지시됨

벡터 검색은 완전히 선택 사항입니다. 기본값은 비활성화이며, Settings에서 별도의 엔드포인트, API key, 모델 설정으로 활성화합니다. 비활성화되어 있으면 파이프라인은 토큰화 검색 + 그래프 확장으로 fallback합니다. 벤치마크 기준 전체 recall은 벡터 검색 활성화 시 58.2%에서 71.4%로 향상되었습니다.

8. 영속성을 갖춘 다중 대화 채팅

원본에는 단일 쿼리 인터페이스만 있습니다. 우리는 완전한 다중 대화 지원을 만들었습니다.

  • 독립 채팅 세션 — 대화를 생성, 이름 변경, 삭제할 수 있습니다

  • 대화 사이드바 — 주제 간 빠른 전환

  • 대화별 영속성 — 각 대화는 .llm-wiki/chats/{id}.json에 저장됩니다

  • 설정 가능한 히스토리 깊이 — 컨텍스트로 보낼 메시지 수를 제한합니다(기본값: 10)

  • 인용 참조 패널 — 각 응답에 어떤 Wiki 페이지가 사용되었는지 타입별 아이콘과 함께 접을 수 있는 섹션으로 표시합니다

  • 참조 영속성 — 인용된 페이지는 메시지 데이터에 직접 저장되어 재시작 후에도 안정적입니다

  • Regenerate — 한 번의 클릭으로 마지막 응답을 다시 생성합니다(마지막 assistant + user 메시지 쌍 제거 후 재전송)

  • Save to Wiki — 가치 있는 답변을 wiki/queries/에 보관한 뒤, 자동 인제스트로 엔티티/개념을 지식 네트워크에 추출합니다

9. Rust 백엔드 Chat Agent와 Skills

원본에는 없는 기능입니다. 채팅은 브라우저 전용 TypeScript 루프가 아니라 Rust 백엔드 Agent runtime으로 실행됩니다.

  • 도구 사용형 Agent — Wiki 검색, Source 검색, Graph 검색, Web 검색, AnyTXT, workspace 파일 도구, 승인된 shell 명령, Skill 파일 읽기를 선택할 수 있습니다

  • Skill 관리 — 프로젝트 및 사용자 Skill 폴더를 스캔하고, Skill을 활성화/비활성화하며, 대화별로 /skill 자동완성으로 Skill을 선택합니다

  • 생성 workspace 출력물 — Agent 도구가 만든 파일은 agent-workspace/ 아래에 저장되며, 생성물로 표시되어 미리보기하거나 폴더를 열 수 있습니다

  • 사용자 입력 폼 — Skill은 단일 선택, 다중 선택, 자유 입력 같은 구조화된 사용자 입력을 요청할 수 있으며, Skill별 UI를 하드코딩할 필요가 없습니다

  • 더 안전한 실행 모델 — 프로젝트 workspace 내부 명령은 자연스럽게 이어서 실행되고, 외부 shell 명령은 계속 명시적 승인을 요구합니다

10. Thinking / Reasoning 표시

원본에는 없는 기능입니다. <think> 블록을 내보내는 LLM(DeepSeek, QwQ 등)을 위해:

  • 스트리밍 thinking — 생성 중 5줄 rolling 표시와 opacity fade

  • 기본 접힘 상태 — 완료 후 thinking 블록은 숨겨지고 클릭하면 펼쳐집니다

  • 시각적 분리 — thinking 콘텐츠는 별도 스타일로 주 응답과 분리되어 표시됩니다

11. Markdown 렌더링: KaTeX 수식과 Mermaid 다이어그램

원본에는 없는 기능입니다. 채팅과 미리보기에서 더 풍부한 Markdown 렌더링을 지원합니다.

  • KaTeX 렌더링 — inline $...$ 및 block $$...$$ 수식을 remark-math + rehype-katex로 렌더링합니다

  • Milkdown math plugin — preview editor가 @milkdown/plugin-math로 수식을 네이티브 렌더링합니다

  • 자동 감지 — bare \begin{aligned} 및 기타 LaTeX environment를 $$ delimiter로 자동 wrapping합니다

  • Unicode fallback — math block 밖의 단순 inline notation을 위해 100개 이상의 symbol mapping(α, ∑, →, ≤ 등)을 제공합니다

  • Mermaid 코드 블록 — fenced mermaid 블록을 flowchart, sequence diagram 등 Mermaid 지원 다이어그램으로 직접 렌더링합니다

  • 간결한 Mermaid 오류 — 문법 오류는 작은 오류 카드 안에 표시되어 원본 parser 출력이 채팅 화면을 채우지 않습니다

12. Review System(비동기 Human-in-the-Loop)

원본은 인제스트 중 사람이 계속 관여할 것을 제안합니다. 우리는 비동기 리뷰 큐를 추가했습니다.

  • LLM이 인제스트 중 사람의 판단이 필요한 항목을 표시합니다

  • 사전 정의된 작업 타입: Create Page, Deep Research, Skip — LLM이 임의 작업을 환각하지 못하도록 제한합니다

  • 인제스트 시점에 생성되는 검색 쿼리 — LLM이 각 리뷰 항목에 대해 최적화된 웹 검색 쿼리를 미리 생성합니다

  • 사용자는 편한 시간에 리뷰를 처리할 수 있습니다. 인제스트를 막지 않습니다

13. Deep Research

<p align="center"> <img src="assets/1-deepresearch.jpg" width="100%" alt="Deep Research"> </p>

원본에는 없는 기능입니다. LLM이 지식 공백을 발견하면:

  • Tavily, SerpApi, SearXNG 기반 웹 검색이 전체 콘텐츠 추출(잘림 없음)로 관련 소스를 찾습니다

  • Provider별 설정 — Tavily와 SerpApi는 독립 API key를 사용합니다. SerpApi는 선택 가능한 engine을 지원하고, SearXNG는 설정된 instance URL과 검색 category를 사용합니다

  • 주제당 여러 검색 쿼리 — 인제스트 시점에 LLM이 생성하고 검색 엔진에 맞게 최적화합니다

  • LLM 최적화 리서치 주제 — Graph Insights에서 시작하면 LLM이 overview.md + purpose.md를 읽고 일반 키워드가 아닌 도메인 특화 주제와 쿼리를 생성합니다

  • 사용자 확인 대화상자 — 리서치 시작 전에 편집 가능한 주제와 검색 쿼리를 표시합니다

  • LLM이 결과를 기존 Wiki와 상호 참조되는 Wiki 리서치 페이지로 종합합니다

  • Thinking 표시 — 합성 중 <think> 블록을 접을 수 있는 섹션으로 표시하고 최신 콘텐츠로 자동 스크롤합니다

  • 자동 인제스트 — 리서치 결과를 자동 처리해 엔티티/개념을 Wiki에 추출합니다

  • 3개 동시 작업을 지원하는 작업 큐

  • Research Panel — 동적 높이와 실시간 스트리밍 진행 상황을 갖춘 전용 사이드바 패널

14. 브라우저 확장(Web Clipper)

<p align="center"> <img src="assets/4-chrome_extension_webclipper.jpg" width="100%" alt="Chrome Extension Web Clipper"> </p>

원본은 Obsidian Web Clipper를 언급합니다. 우리는 전용 Chrome Extension(Manifest V3)을 만들었습니다.

  • Mozilla Readability.js로 정확한 article extraction 수행(광고, nav, sidebar 제거)

  • table 지원이 있는 Turndown.js로 HTML → Markdown 변환

  • Project picker — clip할 Wiki 프로젝트 선택(다중 프로젝트 지원)

  • Local HTTP API(port 19827, tiny_http) — Extension ↔ App 통신

  • 자동 인제스트 — clip된 콘텐츠가 자동으로 2단계 인제스트 파이프라인을 실행합니다

  • Clip watcher — 3초마다 새 clip을 polling하고 자동 처리합니다

  • Offline preview — 앱이 실행 중이 아니어도 추출된 콘텐츠를 표시합니다

15. 다중 형식 문서 지원

원본은 text/markdown에 집중합니다. 우리는 문서 의미 구조를 보존하는 구조화 추출을 지원합니다.

형식방식
PDF파일 캐싱이 포함된 내장 pdf-extract(Rust); 복잡한 레이아웃에는 MinerU Cloud, Local API 또는 Pipeline 모드 사용 가능
DOCXdocx-rs — headings, bold/italic, lists, tables → 구조화된 Markdown
PPTXZIP + XML — slide-by-slide extraction with heading/list structure
XLSX/XLS/ODScalamine — proper cell types, multi-sheet support, Markdown tables
EPUB/MOBI전자책 메타데이터, 장, 본문을 추출해 인제스트 가능한 콘텐츠로 변환
ImagesNative preview(png, jpg, gif, webp, svg 등)
Video/Audio내장 player
Web clipsReadability.js + Turndown.js → clean Markdown

MinerU는 선택 기능입니다. 복잡한 PDF에는 MinerU Cloud, 공식 Local API 또는 로컬 Pipeline 모드를 사용할 수 있습니다. 로컬 모드는 파일을 외부로 전송하지 않으며 추출된 이미지는 프로젝트가 관리하는 wiki/media에 저장됩니다. 실패하면 내장 파서로 fallback합니다.

16. Cascade Cleanup을 포함한 파일 삭제

원본에는 삭제 메커니즘이 없습니다. 우리는 지능적인 cascade deletion을 추가했습니다.

  • 소스 파일을 삭제하면 해당 Wiki 요약 페이지가 제거됩니다

  • 3가지 매칭 방식으로 관련 Wiki 페이지를 찾습니다: frontmatter sources[] 필드, 소스 요약 페이지 이름, frontmatter section references

  • 공유 엔티티 보존 — 여러 소스에 연결된 entity/concept 페이지는 완전히 삭제되지 않고, 삭제된 소스만 sources[] 배열에서 제거됩니다

  • Index 정리 — 삭제된 페이지를 index.md에서 제거합니다

  • Wikilink 정리 — 삭제된 페이지로 향하는 죽은 [[wikilinks]]를 남은 Wiki 페이지에서 제거합니다

17. 설정 가능한 Context Window

원본에는 없는 기능입니다. 사용자는 LLM이 받는 컨텍스트 양을 설정할 수 있습니다.

  • 4K부터 1M tokens까지의 slider — 다양한 LLM capability에 맞게 조정됩니다

  • 비례 예산 할당 — 더 큰 window는 비례해서 더 많은 Wiki 콘텐츠를 받습니다

  • 60/20/5/15 분할 — Wiki pages / chat history / index / system prompt

18. 크로스 플랫폼 호환성

원본은 플랫폼 중립적인 추상 패턴입니다. 우리는 구체적인 크로스 플랫폼 문제를 처리합니다.

  • 경로 정규화 — 22개 이상의 파일에서 통합 normalizePath() 사용, backslash → forward slash

  • Unicode-safe string handling — byte 기반이 아닌 char 기반 slicing(CJK filename crash 방지)

  • macOS close-to-hide — close button은 창을 숨깁니다(앱은 background에서 계속 실행). dock icon을 클릭하면 복원되고 Cmd+Q로 종료합니다

  • Windows/Linux 종료 확인 — 실수로 데이터를 잃지 않도록 종료 전 확인 대화상자 표시

  • Tauri v2 — macOS, Windows, Linux에서 native desktop 제공

  • GitHub Actions CI/CD — macOS(Apple Silicon), Windows(.msi), Linux(.deb / .AppImage) 자동 빌드

19. 기타 추가 사항
  • i18n — 영어 + 중국어 인터페이스(react-i18next)

  • 설정 영속성 — LLM provider, API key, model, context size, language가 Tauri Store에 저장됩니다

  • Obsidian 설정 — 권장 설정이 포함된 .obsidian/ 디렉터리 자동 생성

  • Markdown 렌더링 — 테두리가 있는 GFM tables, 적절한 code blocks, chat과 preview의 wikilink processing

  • 다중 provider LLM 지원 — OpenAI, Anthropic, Google, Ollama, Custom. 각각 provider별 streaming과 header를 지원합니다

  • 설정 가능한 LLM timeout — 느린 로컬 모델과 장시간 작업에 맞춰 요청 제한 시간을 조정할 수 있습니다

  • 설정 가능한 Firecrawl — 선택적 API key와 custom Base URL로 hosted 및 self-hosted 서비스를 지원합니다

  • 접을 수 있는 파일 사이드바 — Knowledge/Files 탐색을 접고 상태를 유지합니다

  • 프로젝트 유지관리 — ZIP 가져오기/내보내기 마이그레이션과 wiki/index.md 재구축을 지원합니다

  • dataVersion signaling — Wiki 콘텐츠가 변경되면 그래프와 UI가 자동 새로고침됩니다

기술 스택

계층기술
DesktopTauri v2(Rust backend)
FrontendReact 19 + TypeScript + Vite
UIshadcn/ui + Tailwind CSS v4
EditorMilkdown(ProseMirror 기반 WYSIWYG)
Graphsigma.js + graphology + ForceAtlas2
SearchTokenized search + graph relevance + optional vector(LanceDB)
Vector DBLanceDB(Rust, embedded, optional)
문서 파싱pdf-extract + MinerU Cloud/Local + docx-rs + calamine + EPUB/MOBI 추출
i18nreact-i18next
StateZustand
LLMStreaming fetch(OpenAI, Anthropic, Google, Ollama, Custom)
Web SearchTavily, SerpApi, SearXNG JSON API

설치

사전 빌드 바이너리

Releases에서 다운로드하세요.

  • macOS: .dmg(Apple Silicon)

  • Windows: .msi

  • Linux: .deb / .AppImage

소스에서 빌드
# 사전 요구 사항: Node.js 20+, Rust 1.88+, protoc
#   macOS:   brew install protobuf
#   Linux:   sudo apt install protobuf-compiler
#   Windows: choco install protoc
git clone https://github.com/nashsu/llm_wiki.git
cd llm_wiki
npm install
npm --prefix mcp-server ci && npm run mcp:build   # mcp-server/dist는 Tauri 리소스로 번들됩니다
npm run tauri dev      # 개발 모드
npm run tauri build    # 프로덕션 빌드
Chrome Extension
  1. chrome://extensions를 엽니다

  2. "Developer mode"를 활성화합니다

  3. "Load unpacked"를 클릭합니다

  4. extension/ 디렉터리를 선택합니다

  5. Alt+Shift+L(macOS에서는 Command+Shift+L)로 현재 페이지를 바로 클립합니다. chrome://extensions/shortcuts에서 단축키를 변경할 수 있습니다

빠른 시작

  1. 앱 실행 → 새 프로젝트 생성(템플릿 선택)

  2. Settings로 이동 → LLM provider 설정(API key + model)

  3. 선택 사항: Settings에서 Web Search provider와 source folder auto-watch 설정

  4. Sources로 이동 → 문서 가져오기(PDF, DOCX, MD 등)

  5. Activity Panel 확인 — LLM이 Wiki 페이지를 자동으로 만듭니다

  6. Chat으로 지식 베이스에 질문합니다

  7. Knowledge Graph에서 연결을 둘러봅니다

  8. Review에서 주의가 필요한 항목을 확인합니다

  9. Lint를 주기적으로 실행해 Wiki 상태를 유지합니다

로컬 HTTP API + MCP Server + AI Agent Skill

LLM Wiki에는 http://127.0.0.1:19828의 내장 로컬 HTTP API가 포함되어 있습니다(Token 보호, 127.0.0.1 전용). 이를 통해 Claude Code, Codex 또는 HTTP를 사용할 수 있는 스크립트 같은 외부 도구가 Wiki에 쿼리할 수 있습니다.

  • GET /api/v1/health — server status(no auth)

  • GET /api/v1/projects — projects list

  • GET /api/v1/projects/{id}/files / files/content — files and content read

  • POST /api/v1/projects/{id}/search — mode, tokenHits, vectorHits, per-result vectorScore를 반환하는 hybrid retrieval(keyword + vector)

  • POST /api/v1/projects/{id}/chat — 비스트리밍 Rust 백엔드 Agent chat 엔드포인트로 assistant message, references, usage, tool events를 반환하며 Wiki/Source/Web/AnyTXT 검색을 지원합니다. mode: "deep"은 증거 수집 범위를 넓힙니다

  • GET /api/v1/projects/{id}/graph — wikilinks graph

  • POST /api/v1/projects/{id}/sources/rescan — backend rescan trigger

  • POST /api/v1/projects/{id}/pages/embed — 전체 벡터 DB를 재구축하지 않고 외부에서 생성하거나 수정한 wiki/*.md 페이지 하나를 인덱싱

Settings → API + MCP에서 API를 활성화하고 token을 생성할 수 있습니다. 필요하면 로컬 unauthenticated access도 켜거나 끌 수 있습니다.

MCP 호환 클라이언트를 위해 LLM Wiki는 mcp-server/도 함께 제공합니다. npm run mcp:build로 빌드한 뒤 Settings → API + MCP에서 현재 머신의 실제 경로가 들어간 MCP client configuration을 복사할 수 있습니다. MCP tools는 같은 API surface를 사용하므로 에이전트는 별도 HTTP glue code 없이 project list, file read, hybrid search, graph inspect, source rescan, 같은 Rust 백엔드 Agent chat endpoint 호출을 실행할 수 있습니다.

한 줄 명령으로 AI 에이전트 연결하기

LLM Wiki용 agent skill은 별도 repo에 있습니다. Claude Code / Codex / skills 호환 runtime에 설치할 수 있습니다.

npx skills add https://github.com/nashsu/llm_wiki_skill.git --skill llm-wiki

설치 후 에이전트는 "내 LLM Wiki는 X에 대해 뭐라고 말해?", "내 지식 베이스에서 Y를 검색해", "내 Wiki graph에서 Z의 이웃을 보여줘", "내 Wiki sources를 다시 스캔해" 같은 프롬프트에 답할 수 있습니다. 로컬에서 실행 중인 앱과 직접 통신하며, 기본값은 read-only이고 앱에서 검증할 수 있도록 Wiki 페이지 경로를 인용합니다.

  • Skill repo: https://github.com/nashsu/llm_wiki_skill

  • Trigger discipline: "내 노트 검색해" / "내 Obsidian / Notion / Logseq 확인해" 같은 일반 요청에는 의도적으로 반응하지 않습니다. LLM Wiki / my wiki / 지식 베이스를 명시했을 때만 trigger됩니다.

프로젝트 구조

my-wiki/
├── purpose.md              # 목표, 핵심 질문, 연구 범위
├── schema.md               # Wiki 구조 규칙, 페이지 타입
├── raw/
│   ├── sources/            # 업로드된 문서(불변)
│   └── assets/             # 로컬 이미지
├── wiki/
│   ├── index.md            # 콘텐츠 카탈로그
│   ├── log.md              # 작업 기록
│   ├── overview.md         # 전체 요약(자동 업데이트)
│   ├── entities/           # 인물, 조직, 제품
│   ├── concepts/           # 이론, 방법, 기술
│   ├── sources/            # 소스 요약
│   ├── queries/            # 저장된 채팅 답변 + 리서치
│   ├── synthesis/          # 소스 간 분석
│   └── comparisons/        # 나란히 비교
├── .obsidian/              # Obsidian vault 설정(자동 생성)
└── .llm-wiki/              # 앱 설정, 채팅 기록, 리뷰 항목

Star History

<a href="https://www.star-history.com/?repos=nashsu%2Fllm_wiki&type=date&legend=top-left"> <picture> <source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/chart?repos=nashsu/llm_wiki&type=date&theme=dark&legend=top-left" /> <source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/chart?repos=nashsu/llm_wiki&type=date&legend=top-left" /> <img alt="Star History Chart" src="https://api.star-history.com/chart?repos=nashsu/llm_wiki&type=date&legend=top-left" /> </picture> </a>

라이선스

이 프로젝트는 GNU General Public License v3.0으로 라이선스됩니다. 자세한 내용은 LICENSE를 참고하세요.

476 files · 469 not served here

Advantages

  • Incremental updates save tokens and time by hashing source files and skipping unchanged content. evidence: README.md
  • Provides a visual knowledge graph with community detection to surface hidden connections and knowledge gaps. evidence: README.md

Limitations

  • Requires consistent LLM API access for the ingest and query pipelines to function. evidence: README.md
  • The system relies on specific folder structures and frontmatter conventions to maintain the wiki. evidence: README.md

Security

Risk level: Low risk

This brain runs

Binaries (5)

  • src-tauri/pdfium/libpdfium-arm64.so: ships native binaries
  • src-tauri/pdfium/libpdfium-x86_64.dylib: ships native binaries
  • src-tauri/pdfium/libpdfium.dylib: ships native binaries
  • src-tauri/pdfium/libpdfium.so: ships native binaries
  • src-tauri/pdfium/pdfium.dll: ships native binaries
  • Low risk: scripts-present (vite.config.ts)

Attribution and licence

First committed by
GitHub avatar of nashsunashsu
Publisher
nash_su (Community)
Source
nashsu/llm_wiki · commit e08cfce
Licence
GNU General Public License v3.0 only (files served here)
  • ATTRIBUTION.md (written by AutoGineer)
Synced
Contributors
nashsu, annieyii, xinyuan0801, Thomas-Piva, b9bt5dp9hg-ship-it

AutoGineer is not affiliated with or endorsed by nashsu.

Install from source

469 of its files are not served here, so there is no ZIP. nashsu/llm_wiki at e08cfce