DeepTutor: How This Next-Gen AI Personal Learning Assistant is Reshaping Education
Have you ever imagined having an all-knowing personal tutor? One who could not only answer any question from your textbooks but also visualize complex concepts, create customized practice problems tailored to you, and even accompany you on deep academic research missions. It sounds like science fiction, but today, an AI system built on a multi-agent architecture—DeepTutor—is making it a reality.
Article Summary
DeepTutor is a full-stack AI personal learning assistant system. It employs a dual-cycle reasoning architecture that combines an analysis loop with a solving loop, integrating tools like Retrieval-Augmented Generation (RAG), web search, academic paper search, and code execution. The system can process massive documents (like textbooks and papers) to enable intelligent Q&A, interactive visual learning, personalized exercise generation, and systematic deep research, all built upon a unified personal knowledge graph via knowledge bases and notebooks.
From Concept to Reality: What is DeepTutor’s Core Value?
In an age of information overload, the key to efficient learning is no longer about access to information, but about deep comprehension, connection, and application of that information. Traditional learning tools or simple chatbots often provide isolated answers, lacking systematic knowledge integration and the ability to adapt to an individual’s learning pace.
DeepTutor was born to solve this core pain point. It is not a simple Q&A machine, but a full-stack learning ecosystem based on Multi-Agent collaboration. Its design philosophy is to mimic the thinking and teaching process of a top-tier human tutor: first, understand your question and knowledge background; then, mobilize all available resources (books, the web, code) for analysis; and finally, deliver a verified solution in a way you can understand (text, diagrams, interactive pages).
Its core value is manifested in four dimensions:
-
Deep Comprehension: Ensures answers are evidence-based through knowledge bases built from massive documents. -
Interactive Guidance: Transforms the learning process into a visual, step-by-step interactive experience. -
Precise Reinforcement: Generates matching exercises based on your weak points to solidify knowledge. -
Research & Co-Creation: Assists you in moving from learning to innovation, systematically discovering new ideas.
A Deep Dive: DeepTutor’s Four Core Functional Modules
1. The Smart Solver: Beyond Answers, Showing the Complete Thought Process
When you pose a complex problem to DeepTutor, its internal “solver agent” initiates a precise collaboration based on a dual-cycle architecture:
-
The Analysis Loop: First, the InvestigateAgenttries to understand the core of the problem, while theNoteAgentrecords key information. -
The Solving Loop: Next, the PlanAgentdevises a solution plan, theManagerAgentcoordinates resources, theSolveAgentperforms specific calculations or reasoning, and theCheckAgentverifies the answer’s correctness.
The entire process is streamed. You can watch each agent “think” and “act” in real-time on the interface, like observing a tutor working through steps on scratch paper. The tools it calls upon might be relevant sections from your knowledge base (via RAG retrieval), real-time web searches, or a code execution environment. Ultimately, it provides you with a step-by-step breakdown featuring precise citations, telling you whether each conclusion stems from Chapter X of your textbook or a specific webpage.
Output Example: The entire solving process, intermediate steps, and final answer are automatically saved in the data/user/solve/ directory, containing the complete reasoning memory chain and citation records.
2. Interactive Learning & Visualization: Making Abstract Concepts “Click”
Struggling with a complex algorithm or mathematical formula? DeepTutor’s “Guided Learning” module can transform it into an interactive webpage. You simply provide a learning topic or select notes from your personal notebook. The system will then:
-
Locate Knowledge Points: The LocateAgentautomatically analyzes the content, identifying 3-5 progressive core concepts. -
Generate Visual Pages: The InteractiveAgentconverts these concepts into HTML pages containing charts, animations, and step-by-step explanations. -
Provide Contextual Q&A: During the learning session, the ChatAgentcan answer any questions you have about the current page. -
Generate a Learning Summary: Upon completion, the SummaryAgentoutlines the key takeaways from the session.
This is equivalent to dynamically generating a personalized multimedia interactive textbook for you.
3. The Question Generator: Your Personal Exam Creator
Need more targeted practice for an exam? DeepTutor’s Question Generator works on the ReAct (Reasoning-Acting) paradigm. You just provide a knowledge point (e.g., “linear convolution”) and a difficulty level. The system’s QuestionGenerationAgent will:
-
Think: Determine what knowledge is needed to create a question. -
Act: Retrieve relevant content from the knowledge base or the web. -
Observe: Evaluate if the retrieved information is sufficient.
If knowledge is lacking, it will honestly reject the task and explain why. If sufficient, it generates the question, which then goes through a separate verification step to ensure quality and answer correctness. More powerfully, you can upload a real exam paper as a template, and it can mimic its style, format, and difficulty to generate highly realistic practice questions for you.
4. Deep Research & Idea Generation: Bridging from Learner to Explorer
This is the module that most embodies DeepTutor’s “depth.” Its “Deep Research” function uses a systematic architecture called DR-in-KG (Deep Research in Knowledge Graph), consisting of three stages: Planning, Researching, and Reporting.
-
Planning Stage: Optimizes your research topic and decomposes it into logical subtopics. -
Researching Stage: The core is a Dynamic Topic Queue. Multiple ResearchAgents can work in parallel (up to 5 concurrently), each choosing the most suitable tool (paper search, web search, code execution, etc.) to explore a subtopic. TheNoteAgentis responsible for compressing and organizing the gathered information. -
Reporting Stage: Automatically deduplicates information, generates a three-level outline, and writes a structured academic report where every conclusion is linked to a clickable citation marker [[N]](#ref-N).
All citations throughout the process are managed by a central CitationManager to ensure academic rigor. The final research report is saved in Markdown format and can be exported to PDF.
The “Idea Generation” module helps you innovate. It extracts knowledge points from your learning notes and, through a multi-stage process (lenient filtering → idea expansion → strict filtering), generates multiple novel research directions or project ideas for each point.
The Unified Knowledge Infrastructure: Where All Learning Converges
All the impressive features above rely on two foundational modules:
-
Personal Knowledge Base: You can upload textbooks, papers, and other documents in formats like PDF or Markdown. The system automatically processes them into a queryable knowledge base. All data is stored in the data/knowledge_bases/directory. It supports incrementally adding documents without reprocessing everything. -
Personal Notebook: The records and outputs you generate from all modules—Smart Solver, Question Generator, Deep Research, etc.—can be saved to your notebook with one click. Notebooks are organized by topic, forming your personal, structured learning trail library. They can also be used directly as input material for “Guided Learning.”
Together, these two modules form your digital learning brain, ensuring that every learning session is not isolated but part of a continuously accumulating and interconnected process.
Hands-On Guide: How to Get Started with DeepTutor Quickly
System Requirements & Installation
DeepTutor is a full-stack project. The backend uses Python 3.10+ and FastAPI, and the frontend uses Next.js. The one-click installation is the fastest method.
# 1. Clone the project and create a virtual environment
git clone https://github.com/HKUDS/DeepTutor.git
cd DeepTutor
conda create -n aitutor python=3.10
conda activate aitutor
# 2. Run the one-click installation script
bash scripts/install_all.sh
# 3. Configure environment variables
cp .env.example .env
# Edit the .env file with your API keys
Quick Experience: Using Pre-Built Demo Libraries
To let you experience DeepTutor’s capabilities immediately, the project provides two pre-processed demo knowledge bases:
-
Research Paper Collection: Contains 5 cutting-edge papers (20-50 pages each) on RAG and Agent fields, perfect for experiencing a broad knowledge coverage research scenario. -
Data Science Textbook: An in-depth textbook covering 8 chapters and 296 pages, ideal for experiencing a deep knowledge depth learning scenario.
You just need to download the demo package from the provided link, extract it to the data/ directory, and it will be available for use directly in the system upon startup.
Launching & Using DeepTutor
# Launch the complete web service (frontend + backend)
python scripts/start_web.py
After launching, access the main interface in your browser at http://localhost:3782 (the default frontend port). The backend API documentation is at http://localhost:8001/docs.
Creating Your First Knowledge Base
-
Visit the “Knowledge Base” page in the web interface. -
Click “New Knowledge Base” and enter a name. -
Upload your PDF or document files. -
The system will automatically process them in the background (large files may take a few minutes). Once processed, the knowledge base can be called upon in all modules.
Frequently Asked Questions (FAQ)
Q: What should I do if the backend service fails to start?
A: Please check the following:
-
Confirm your Python version is ≥ 3.10. -
Run pip install -r requirements.txtto ensure all dependencies are installed. -
Check if the default port 8001 is occupied. You can modify server.backend_portinconfig/main.yaml. -
Verify that the API key configuration in your .envfile is correct.
Q: After pressing Ctrl+C to interrupt, the port is still occupied and I can’t restart?
A: This is because the backend process might still be running in the background.
-
Linux/macOS: Run lsof -i :8001to find the Process ID (PID), then terminate it withkill -9 <PID>. -
Windows: Run netstat -ano | findstr :8001to find the PID, then terminate it withtaskkill /PID <PID> /F.
Q: How do I add new documents to an existing knowledge base?
A: It’s recommended to use the CLI command for incremental addition. This only processes the new documents, making it efficient and cost-effective:
python -m src.knowledge.add_documents <Your_KB_Name> --docs <Path_to_New_Doc.pdf>
Q: Where is all the learning data generated by the modules stored?
A: All user data is systematically stored under the data/user/ directory:
-
solve/: The complete Smart Solver process and answers. -
question/: Generated questions and verification reports. -
research/: Deep research reports and cache. -
co-writer/: Co-Writer documents and audio files. -
notebook/: Metadata and records for all notebooks. -
guide/: Interactive learning session states.
Q: What if I encounter a “uvloop.Loop” error when initializing a knowledge base?
A: This is a compatibility issue that may occur when extracting numbered items (definitions, theorems) from documents. Please use the provided script directly:
./scripts/extract_numbered_items.sh <Your_KB_Name>
Conclusion: A Learning Companion for the Future
DeepTutor is more than just a toolkit; it represents a new paradigm for learning. By simulating the collaboration and reasoning of human experts, it transforms static knowledge bases into dynamic, interactive, and personalized learning experiences. From solving a specific math problem to completing a complex academic investigation, DeepTutor can act as your “external brain” and “collaborator,” significantly enhancing the depth and efficiency of learning and research.
The project’s architecture is clear, highly modular, and all processes are transparent, traceable, and their results savable. Whether you are a student, a researcher, or a lifelong learner, DeepTutor offers a platform full of potential, allowing us a glimpse into the future of AI-powered education—a personal learning assistant that truly understands you and can guide you forward in your exploration.

