Skip to main content

Wendao: AI learning companion

Example course: MLE4217/5219 Python 3.11+ Flask backend LLM: Anthropic, OpenAI, or Gemini

Wendao (问道, wèn dào, "asking the way") is an AI learning companion. It turns your course materials into two things for students:

  • an interactive knowledge graph of the course's chapters and concepts, and
  • an AI learning agent that answers questions using only the course materials, with a link to the page each answer came from.

It was built for the NUS course MLE4217/5219 Materials Informatics, and this repository uses that course as its example. Nothing in the code is tied to that course, so you can run it on any course written as Markdown pages and Jupyter notebooks.

Guides: teacher guide · server setup · developer notes · plans and ideas

Demo

Knowledge graph

Chapters, pages, and concepts, linked where the course connects them. Drag, zoom, and search; click a concept to read a short introduction from the notes and jump to the course page.

Screen recording: hovering and dragging nodes in the Wendao knowledge graph, searching for a concept and reading its introduction, filtering with the legend, and switching to dark mode and The Economist style

Full video: knowledge_graph_demo.mp4

AI learning agent

Select a node and press Explain, or ask your own question. Answers come only from the course and link to the pages they used. If the course doesn't cover a question, the agent says so.

Screen recording: selecting Convex Hull, asking the Wendao AI learning agent to explain it, asking a follow-up, and opening the course sources

Full video: ai_learning_agent_demo.mp4

Chat widget on your course website

The Wendao widget on a course page: an answer about convex hulls with links to the course pages it used The widget's Graph tab in dark mode: the course knowledge graph, chapters and the concepts that connect them

Install

You need Python 3.11 or newer.

pip install wendao

Students don't install anything: they use your website, the chat widget on your course pages, or one HTML file.

Quick start

wendao init my-course        # a new workspace with a notes/ folder
# copy your notes (Markdown, notebooks, PDF, slides, Word, LaTeX) into my-course/notes/
cd my-course
# choose a model under [model] in wendao.toml, and put its API key in .env
wendao build                 # graph, concepts, and search index
wendao doctor                # checks everything and says how to fix problems
wendao serve                 # opens the course website at http://127.0.0.1:5057/

No model yet? Everything except the AI answers still works, and wendao ask --search-only "..." shows what search finds. To try the example course: git clone https://github.com/deng-group/wendao.git, then cd wendao/examples/mle4217_5219 and run wendao serve --no-check (it is already built; for AI answers, set your own model under [model] in its wendao.toml).

The teacher guide explains each step and setting.

Share it with students

Way How AI answers
One HTML file wendao export, then share build/<course>.html; it opens by double-click needs a server
Website put Wendao on a server (server setup) and share the link yes
Chat widget wendao widget install _build/html --api https://... on your built course website yes

You decide who pays for AI answers: your key (with a daily limit per student and optional sign-in), each student's own key, or either. See How students use AI.

Commands

Command What it does
wendao init my-course Create a new workspace with starter files
wendao build Read your notes; build the knowledge graph, concepts, and search index
wendao doctor Check settings, notes, build, test questions, and model, and say how to fix problems
wendao ask "question" Ask a question (--search-only: see what search finds, without a model)
wendao serve Run the course website (--widget: the API for the chat widget)
wendao export Put the knowledge graph in one HTML file
wendao widget install _build/html Add the chat widget to every page of a built course website
wendao feedback See which answers students marked as not helpful, and why
wendao students See your class list and how many questions each student asked

Run any command with --help to see its options.

How it works

Wendao workflow: course materials are extracted and chunked, feed a retrieval-augmented generation pipeline and an LLM, and surface as an interactive knowledge graph and an AI learning agent

Wendao splits your notes into small pieces, links chapters and concepts that appear together, and, for each question, finds the most relevant pieces with keyword and meaning-based search. If they don't really answer the question, it says so instead of guessing. Otherwise a language model (Claude, GPT, Gemini, DeepSeek, or a local model) writes the answer from them. No training or GPU is needed.

Citation

Wendao is developed by the Deng group in the Department of Materials Science and Engineering at the National University of Singapore, for MLE4217/5219 Materials Informatics. If you use Wendao or adapt it for your own course, please cite this repository:

@software{wendao2026,
  author = {Deng, Yanhao and Deng, Zeyu},
  title  = {Wendao: an AI learning companion with an interactive course knowledge graph},
  year   = {2026},
  url    = {https://github.com/deng-group/wendao}
}

License

Wendao is free software under the GNU General Public License v3.0 or later. You can use, study, change, and share it. If you share a changed version, you must share its source code under the same license.

Metadata

Release files for wendao 0.3.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for wendao 0.3.1
File Size Uploaded
wendao-0.3.1.tar.gz 169.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for wendao 0.3.1
File Interpreter ABI Platform
wendao-0.3.1-py3-none-any.whl Python 3 none any Details

Total release size: 327.1 kB

Release files / wendao-0.3.1.tar.gz

Download URL wendao-0.3.1.tar.gz
Size 169.7 kB
Tags Source
SHA-256 checksum
How to use checksums
650da411c4f2f8a5ce2535ca1345faf049da455dd24b7ae3fbba47415942651c
BLAKE2b-256 checksum
How to use checksums
075fed23542069ae5ed56045ed6170173d4f521de3948e74a7e8f0aa5f7ff46d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 13, 2026.

Transparency log

Release files / wendao-0.3.1-py3-none-any.whl

Download URL wendao-0.3.1-py3-none-any.whl
Size 157.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e7347067e8ee8d3ccffbba8801cb4eaae3b5eeefb27a8d7616841a534153b273
BLAKE2b-256 checksum
How to use checksums
c2182fca9cd2511e534113a361118ec242e4ab3a73359ab6a408cd6ded6cd504
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 13, 2026.

Transparency log

Release history Release notifications | RSS feed

0.3.4

2 release files

0.3.3

2 release files

0.3.2

2 release files

This release

0.3.1 This release

2 release files

0.3.0

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page