DeepTutor is the AI tutor that remembers every lesson

DeepTutor is an open source AI tutor you host yourself, and its memory keeps three readable layers: raw traces of what you did, summaries of those traces, and the synthesis it teaches from. You can open any of it, correct it, and trace a claim back to the turn that produced it.
Key Takeaways
- DeepTutor remembers your weak spots and teaches from them next time.
- You can open that memory, read it, and fix what it got wrong.
- It teaches from your own PDFs, notes, or an Obsidian vault.
- Another AI agent can drive the whole thing from the command line.
- It is free and self-hosted, but you pay your model provider per token.
What an open source AI tutor does that a chat assistant doesn’t
A chat assistant keeps a hidden list of facts about you, and you never get to see it. DeepTutor keeps a record on disk that you can open in a text editor.
Every mode runs on one agent loop: chat, quiz, research, visualize, solve, and mastery practice. You change the goal and keep the same engine underneath. Your context follows you across all of them, so a quiz knows what the research run just produced.

Your own material becomes the curriculum. Documents go into a private knowledge base . Answers then cite the passage they came from. Mastery Path grades you against a threshold per question type, so “you have learned this” becomes a measured claim.
The work you do also sticks around. Notebooks, a question bank, saved sessions, and compiled books all live in your workspace. Books can be rebuilt when the sources under them change.
The project comes from the University of Hong Kong data intelligence lab , the group behind LightRAG. There is an arXiv preprint describing the design. It also introduces TutorBench, a test built around simulated learner profiles in five university subjects. The authors are grading their own system there, so read it as a design document with numbers attached.
One catch belongs up front. This is a self-hosted app with a Python backend, a Node frontend, and a model provider you pay for. It is not a website you log into.
The three-layer memory, and why you can read it
Memory in DeepTutor lives in plain files on disk. Layer one holds traces: a running record of turns, answers, and mistakes as they happened. Layer two holds curated facts, one short markdown file per surface.
Layer three is the synthesis, the picture of you the tutor actually teaches from. It covers your profile, recent activity, scope, and preferences. Layer two cites layer one, and layer three cites layer two. So nothing in your profile arrives without a source.
A memory graph sits over all three and draws the pyramid. Synthesis sits at the centre, curated facts in the middle ring, raw traces on the outside. Click any claim and you land on the exact event behind it. So you can check where “you are weak on integration by parts” came from.

A wrong belief about your level is a file you can edit, and the command line reaches the same files. deeptutor memory show prints the layer two and layer three documents, and deeptutor memory clear wipes the raw traces or everything.
There is a real cost, though. More memory means more tokens in every prompt, because the synthesis layer rides along with your turns.
Teaching from your own documents
DeepTutor ships an unusual number of ways to build a knowledge base, and each base binds to one engine:
- LlamaIndex , the default local vector and keyword search.
- PageIndex, hosted retrieval that reasons across pages and cites them.
- GraphRAG and LightRAG , both knowledge-graph search.
- A LightRAG server you connect over HTTP.
- A linked Obsidian vault the tutor reads and writes in place.
Indexes are versioned. Re-indexing writes a fresh version-N directory and keeps the old ones, so a working index never dies halfway through a rebuild. You can also drop one failed document from a base stuck in an error state, so a single bad file no longer forces a full rebuild.
Parsing is pluggable too. You pick between MinerU , Docling, markitdown, and PyMuPDF4LLM, with image extraction for diagrams buried inside PDFs. FAISS is available as the vector backend , which keeps search fast on a big base.

| What you attach | Where it works |
|---|---|
| PDF, DOCX, XLSX, PPTX | Knowledge base or a single chat turn |
| Plain text, code, SVG | Knowledge base or a single chat turn |
| An Obsidian vault | Linked in place, read and written by the tutor |
| A prebuilt index | Linked with no re-index |
The Book Engine sits on top of this. It compiles your sources into a living book of typed blocks: text, quizzes, flash cards, timelines, figures, animations, and widgets. Each page gets its own chat. Fingerprint commands flag when the sources have drifted away from the compiled pages.

Letting another agent drive the tutor
One deeptutor binary offers two ways in. deeptutor chat opens an interactive session, and deeptutor run <capability> "<message>" fires a single turn and exits.
Add --format json and each turn streams JSON, one event per line, every line tagged with its session id, ready for a calling program to parse. Sessions also chain. Capture the id from a research run, feed it into a quiz run, and the questions come from the survey you just generated.
SID=$(deeptutor run deep_research "Survey 2026 papers on RAG" \
--config mode=report --format json \
| jq -r 'select(.type=="done").session_id')
deeptutor run deep_question "Quiz me on that survey" --session "$SID" --format jsonRuns are headless-safe by design. A prompt that would normally wait for a person clears itself with an empty reply, so an unattended script keeps moving. The repository also ships a root SKILL.md of about 200 lines. It teaches a tool-using model the whole CLI surface in one read, and coding agents pick it up on their own.
The reverse direction works as well. From inside a lesson you can call a live coding agent. Claude Code , Codex, Gemini, Kimi, opencode, and MiMo are all supported. DeepTutor runs the other agent for real and streams its work into an activity panel.

Partners are the lasting version of the same idea. Each one is a companion with its own persona, library, and private memory, reachable over Discord, Telegram, Slack, Mattermost, and Zulip. A partner reads its owner’s memory but writes only its own.
Community skills install from the EduHub hub with deeptutor skill install, and a safety gate stands in front of that command. It checks the registry’s security verdict, blocks binaries, and strips any always: flag so a downloaded skill cannot force itself into every prompt. The hub, version, and install time go into a lock file you can audit later.
What it costs to run and where it is rough
The software is free under Apache 2.0, but the model behind it costs money. You connect your own provider, and long sessions with three memory layers in the prompt burn a lot of tokens.
Local models are the fix if that worries you. LM Studio, llama.cpp , vLLM, Ollama-style endpoints, and Lemonade all work. That turns a per-question cost into a fixed one. On the cloud side you can sign in with an existing ChatGPT plan through OpenAI Codex, or validate a GitHub Copilot session, instead of pasting an API key.
The release pace is relentless, with seven point releases inside a single month. The project opened in 2025. The 245 closed issues say the maintainers actually answer people. But a release every few days means you should pin a version in anything you depend on.
Installation needs Python 3.11 or newer plus a Node 20 runtime. Pick a workspace directory, run pip install -U deeptutor, then deeptutor init and deeptutor start. Docker images are published for anyone who would rather not. The CLI-only package is separate and has not reached PyPI yet, so a terminal-only install still means building from a source checkout.
| DeepTutor | A chat assistant’s study mode | |
|---|---|---|
| Memory | Three readable layers on disk | Hidden, vendor-managed |
| Your documents | Versioned bases, six retrieval engines | Uploads per conversation |
| Grading | Threshold per question type | Conversational |
| Automation | JSON command line | None |
| Cost | Free software, your token bill | Flat subscription |
The weakness is how much it tries to do. One app covers tutoring, quizzing, research, drafting, book building, retrieval, chat bots, and a skill registry, and all of it changes every few days. Documentation drift is the real risk, so check the release notes for the version you install.
Four things still have no public numbers behind them, so do not assume any of them:
- The token cost of an hour of tutoring with all three memory layers active.
- Whether the memory graph’s evidence links survive a knowledge base re-index.
- How the grading holds up on open-ended answers instead of multiple choice.
- Whether any independent educator has tested learning outcomes, rather than features.
Botmonster Tech