# DeepTutor

> A self-hosted study workspace where tutoring, quizzes, research and practice share one memory

- Category: AI Productivity & Writing / Learning & Tutoring
- Language: Python
- Licence: Apache-2.0
- Repository: https://github.com/HKUDS/DeepTutor
- Website: https://deeptutor.info
- Canonical page: https://ai-tldr.dev/tools/deeptutor/

## In short

DeepTutor comes from HKUDS, the Data Intelligence Lab at the University of Hong Kong — the group behind LightRAG and RAG-Anything. It sits in the Learning & Tutoring category of the AI Productivity & Writing tools and is open-source, written in Python and licensed Apache-2.0. To get started: install from PyPI.

## Overview

DeepTutor comes from HKUDS, the Data Intelligence Lab at the University of Hong Kong — the group behind LightRAG and RAG-Anything. It is an agent-native learning workspace rather than a chat wrapper: tutoring, problem-solving, quiz generation, research, visualisation and mastery practice run as modes of a single runtime, so the context you build up in one mode is available in the others.

That shared context is the design point. Knowledge bases, books, drafts, notebooks and personas are defined once and reused across workflows, and retrieval is not tied to one engine — LlamaIndex, PageIndex, GraphRAG, LightRAG and self-hosted options are all supported. Memory is organised in three inspectable layers: L1 traces, L2 summaries and L3 synthesis, each with visible evidence links, so you can see what the tutor is drawing on instead of taking an answer on trust. Persistent "partners" and subagents carry their own model and channel configuration.

The modes cover more ground than a tutor usually does: Chat, Ask Questions, Quiz, Research, Visualize, Solve, Course Study, Mastery Path, Immersive Reading and Immersive Watching. Tools extend through MCP servers, CLI apps and installable community skills. It is distributed as ordinary software — a PyPI package, a source checkout and a container image on GitHub Container Registry — under the Apache 2.0 licence, not as reproduction code attached to a paper.

## What it does

- One runtime, many modes: Chat, Ask Questions, Quiz, Research, Visualize, Solve, Course Study, Mastery Path and immersive reading/watching
- Knowledge bases, books, drafts, notebooks and personas defined once and reused across every workflow
- Multi-engine retrieval over LlamaIndex, PageIndex, GraphRAG, LightRAG and self-hosted backends
- Three-layer inspectable memory — L1 traces, L2 summaries, L3 synthesis — with visible evidence links
- Persistent partners and subagents, each with their own model and channel
- Extensible through built-in tools, MCP servers, CLI apps and installable community skills
- Ships as a PyPI package, a source checkout and a container image

## Getting started

The PyPI package is the route the project recommends. All commands below come from the repository README.

1. Install from PyPI

   Create a working directory, install the package, initialise it and start the server.

```bash
mkdir -p my-deeptutor && cd my-deeptutor
pip install -U deeptutor
deeptutor init
deeptutor start
```

2. Or run the container image

   The published image binds to localhost and keeps its state in a named volume.

```bash
docker run --rm --name deeptutor -p 127.0.0.1:3782:3782 \
  -v deeptutor-data:/app/data ghcr.io/hkuds/deeptutor:latest
```

3. Or build from source for development

   A source checkout additionally builds the web front end.

```bash
git clone https://github.com/HKUDS/DeepTutor.git
cd DeepTutor
python3 -m venv .venv && source .venv/bin/activate
python -m pip install -e .
( cd web && npm ci --legacy-peer-deps )
deeptutor init && deeptutor start --dev
```

4. Load the material you are studying

   Add a knowledge base or book so every mode shares the same source material, then pick a retrieval engine for it.

```text
Knowledge → New → upload documents → choose retrieval engine
```

5. Work through a mastery path

   Switch modes against the same context: ask questions, generate a quiz, visualise a concept, or follow a mastery path, checking the L1/L2/L3 memory panel for the evidence behind each answer.

```text
Mode → Quiz / Research / Visualize / Mastery Path
```

## When to use it

- Reach for it when studying a specific corpus — your own papers, books or course notes — rather than asking a general chatbot
- Reach for it when you need to see the evidence behind a tutor's answer instead of trusting it
- Reach for it when quizzes and spaced mastery practice should draw on the same context as your reading
- Reach for it when the retrieval engine matters and you want to compare GraphRAG, LightRAG and PageIndex on the same material
