LearnWiki Agent is a reusable LLM Wiki-based learning system assistant for rapid domain learning.
The goal of this project is to help learners transform scattered learning materials into a structured, maintainable, searchable, and continuously growing Markdown-based knowledge system.
Complex domains such as deep learning, machine learning, statistics, finance, and programming often involve lecture notes, textbooks, papers, code experiments, tutorials, and personal notes.
Directly asking an LLM over raw documents can lead to missing context, repeated reasoning, concept confusion, and unstable answers.
Ordinary RAG can retrieve relevant chunks, but it does not naturally accumulate stable knowledge or maintain a conceptual structure.
LearnWiki Agent aims to compile raw learning materials into a structured LLM Wiki first, then support retrieval-augmented question answering, learning path generation, knowledge linting, and experiment assistance.
LearnWiki Agent is an agentic learning knowledge system.
It is designed to help learners build a domain knowledge system that can grow over time through ingestion, querying, feedback, linting, and evaluation.
The first demo domain is deep learning.
This project is not:
- a one-shot AI note generator
- a simple RAG demo over raw documents
- a static Markdown note collection
- only a deep learning knowledge base
- a chatbot that answers without maintaining knowledge
The project uses a layered architecture:
knowledge_bases/: multi-KB root — each KB has its ownwiki/,raw/,eval/,quality/schema/: rules for ingestion, page structure, querying, citation, linting (shared across KBs)app/: search engine, RAG engine, LLM provider, agent, MCP server, KB managerdocs/: project design documentsexamples/: demo domain descriptions and public examples
LearnWiki Agent is not designed as a one-shot note generation tool.
The knowledge base grows through repeated ingestion, querying, feedback, linting, and evaluation.
New materials may create new wiki pages, update existing pages, add backlinks, revise outdated conclusions, and append changes to wiki/log.md.
Low-quality knowledge bases can reduce answer quality.
LearnWiki Agent introduces source notes, page status, lint rules, known issues, review checklists, and evaluation questions to control knowledge quality.
The system should prefer reviewed or stable wiki pages, mark uncertainty when coverage is insufficient, and use failed answers as feedback to improve the wiki.
- LLM-assisted knowledge ingestion
- Markdown Wiki compilation
index.mdandlog.mdmaintenance- RAG-style retrieval over compiled wiki pages
- structured answers with concepts, formulas, code, examples, use cases, and pitfalls
- learning path generation
- code experiment assistance
- knowledge linting for outdated pages, missing links, unsupported claims, and duplicated concepts
- evaluation questions and reports for answer quality
- reusable templates for different learning domains
The first demo domain is deep learning.
Planned topics include:
- neural networks
- backpropagation
- CNN
- RNN / LSTM
- Attention
- Transformer
- optimization
- regularization
- transfer learning
- model evaluation
- PyTorch experiments
The current stage focuses on repository foundation and knowledge-system design.
The current priority is to improve:
- project brief
- roadmap
- schema rules
- quality layer
- evaluation layer
- first demo wiki pages
The project should not start with complex app code, vector databases, or web UI before the wiki/schema/quality/eval layers are stable.
Stage 0-8 complete. 19 reviewed wiki pages, MCP server (29 tools), knowledge graph, and Web UI.
- Stage 0: Repository foundation, AGENTS.md, docs
- Stage 1: Schema rules, quality tracking, evaluation questions
- Stage 2: 19 compiled wiki pages (14 deep learning + 5 LLM app dev)
- Stage 2.5: 4 learning paths with dependency graphs
- Stage 3: BM25 search engine (Chinese n-gram + English word matching)
- Stage 4: RAG engine, LLM provider abstraction, ReAct agent, MCP server (20 tools)
- Stage 5: Automated evaluation loop (rule-based + LLM modes), quality dashboard
- Stage 6: Multi-KB architecture, KBManager, 4 new MCP tools (24 total)
- Stage 7: Knowledge graph — structured relation extraction, graph query API, 5 new MCP tools (29 total)
- Stage 8: Web UI — FastAPI + vanilla JS SPA, 4 views (Browser, Chat, Graph, Export), KB management, SSE streaming
- Stage 9: Material compilation pipeline (upload → parse → compile → ingest)
# Windows
start.bat
# or
start.ps1
# Cross-platform
python -m appOpen http://127.0.0.1:8000 in your browser.
The project exposes 29 MCP tools for knowledge base management. See .mcp.json for configuration.
# Search
from app.src.search import load_all_pages, SearchIndex
pages = load_all_pages(Path("knowledge_bases/deep_learning/wiki/topics"))
index = SearchIndex()
index.build(pages)
results = index.search("反向传播")
# RAG
from app.src.rag import RAGEngine
engine = RAGEngine() # auto-detects deep_learning KB
answer = engine.answer("什么是 Transformer?")
# Knowledge Graph
from app.src.graph import GraphEngine
from app.src.kb import KBManager
kb = KBManager().get_kb("deep_learning")
graph = GraphEngine(kb)
graph.build()
neighbors = graph.get_neighbors("backpropagation")
shortest = graph.find_path("neural_networks", "transformer")
# Multi-KB
from app.src.kb import KBManager
manager = KBManager()
kb = manager.create_kb("machine_learning", "机器学习")