Bingxi Zhao (Frank) 9f2157c404 update
2026-03-24 18:48:50 +08:00
2026-03-20 20:27:17 +08:00
2026-03-24 18:33:11 +08:00
2026-01-14 13:57:18 +11:00
2026-03-20 20:27:17 +08:00
2026-03-20 20:27:17 +08:00
2025-12-28 23:45:41 +08:00
2026-01-15 18:30:55 +08:00
2026-03-24 18:09:25 +08:00
2026-03-20 20:27:17 +08:00
2026-03-24 18:33:11 +08:00
2026-03-24 18:48:50 +08:00
2026-03-24 18:48:50 +08:00

DeepTutor is an open-source intelligent learning platform that goes far beyond simple Q&A. It brings together conversational AI, personal tutoring agents, knowledge management, and adaptive learning into a unified experience — designed for learners who want depth, not just answers.

DeepTutor Interface

✨ Features

  • Unified Chat Workspace — Five powerful modes (Chat, Deep Solve, Quiz Generation, Deep Research, Math Animator) sharing the same context. Switch freely, as you wish.
  • Personal TutorBots — Autonomous AI tutors with their own workspace, memory, and personality. They set reminders, learn new skills, and grow alongside you.
  • AI Co-Writer — A Markdown editor with AI deeply woven in. Rewrite, expand, summarize — with full access to your knowledge base and the web.
  • Guided Learning — Multi-step visual learning plans built from your own materials. Each step becomes an interactive page you can explore and discuss.
  • Knowledge Hub — Upload documents, build knowledge bases, organize notebooks. Your personal learning infrastructure, always at your fingertips.
  • Persistent Memory — DeepTutor remembers your learning journey — progress, preferences, and goals. The more you use it, the better it understands you.

🚀 Get Started

Install

git clone https://github.com/HKUDS/DeepTutor.git
cd DeepTutor

# Create environment
conda create -n deeptutor python=3.10 && conda activate deeptutor
# Or: python -m venv venv && source venv/bin/activate

# Install core + web
pip install -e ".[server]"

Configure & Launch

Run the Setup Tour — a single command that handles everything from configuration to launch:

python scripts/start_tour.py

The tour begins by asking how you'd like to use DeepTutor:

  • Web mode (recommended) — Configures ports and dependencies, then spins up a temporary server and opens the Settings page in your browser. A four-step guided tour walks you through LLM, Embedding, and Search provider setup with live connection testing. Once complete, DeepTutor restarts automatically with your configuration.
  • CLI mode — A fully interactive terminal flow: choose a dependency profile, configure ports, set up providers, verify connections, and apply — all without leaving the shell.

Either way, you end up with a running DeepTutor at http://localhost:3782.

Start services separately
# Backend (FastAPI)
python -m deeptutor.api.run_server

# Frontend (Next.js)
cd web && npm install && npm run dev -- -p 3782
Service Port
Backend 8001
Frontend 3782
Environment variables reference
Variable Required Description
LLM_BINDING Yes LLM provider (openai, anthropic, etc.)
LLM_MODEL Yes Model name (e.g. gpt-4o)
LLM_API_KEY Yes Your LLM API key
LLM_HOST Yes API endpoint URL
EMBEDDING_BINDING Yes Embedding provider
EMBEDDING_MODEL Yes Embedding model name
EMBEDDING_API_KEY Yes Embedding API key
EMBEDDING_HOST Yes Embedding endpoint
EMBEDDING_DIMENSION Yes Vector dimension
SEARCH_PROVIDER No Search provider (tavily, jina, serper, perplexity, etc.)
SEARCH_API_KEY No Search API key
BACKEND_PORT No Backend port (default 8001)
FRONTEND_PORT No Frontend port (default 3782)

CLI — Agent-Native Interface

DeepTutor exposes a lightweight CLI that doubles as an agent-native skill interface. Every capability, knowledge base, memory, and session is accessible through structured commands — which means your AI agents can use DeepTutor too.

Hand the SKILL.md at the project root to your agent (nanobot, Openclaw, Zeroclaw, or any tool-using LLM), and it will know how to configure and operate DeepTutor on your behalf.

deeptutor chat                                   # Interactive REPL
deeptutor run chat "Explain Fourier transform"   # One-shot capability
deeptutor run deep_solve "Solve x^2 = 4"         # Multi-agent problem solving
deeptutor kb create my-kb --doc textbook.pdf     # Build a knowledge base
deeptutor serve --port 8001                      # Start API server
Full CLI command reference

Top-level

Command Description
deeptutor run <capability> <message> Run any capability in a single turn (chat, deep_solve, deep_question, deep_research, math_animator)
deeptutor serve Start the DeepTutor API server

deeptutor chat

Command Description
deeptutor chat Interactive REPL with optional --capability, --tool, --kb, --language

deeptutor bot

Command Description
deeptutor bot list List all TutorBot instances
deeptutor bot create <id> Create and start a new bot (--name, --persona, --model)
deeptutor bot start <id> Start a bot
deeptutor bot stop <id> Stop a bot

deeptutor kb

Command Description
deeptutor kb list List all knowledge bases
deeptutor kb info <name> Show knowledge base details
deeptutor kb create <name> Create from documents (--doc, --docs-dir)
deeptutor kb add <name> Add documents incrementally
deeptutor kb search <name> <query> Search a knowledge base
deeptutor kb set-default <name> Set as default KB
deeptutor kb delete <name> Delete a knowledge base (--force)

deeptutor memory

Command Description
deeptutor memory show [file] View memory (summary, profile, or all)
deeptutor memory clear [file] Clear memory (--force)

deeptutor session

Command Description
deeptutor session list List sessions (--limit)
deeptutor session show <id> View session messages
deeptutor session open <id> Resume session in REPL
deeptutor session rename <id> Rename a session (--title)
deeptutor session delete <id> Delete a session

deeptutor notebook

Command Description
deeptutor notebook list List notebooks
deeptutor notebook create <name> Create a notebook (--description)
deeptutor notebook show <id> View notebook records
deeptutor notebook add-md <id> <path> Import markdown as record
deeptutor notebook replace-md <id> <rec> <path> Replace a markdown record
deeptutor notebook remove-record <id> <rec> Remove a record

deeptutor config / plugin / provider

Command Description
deeptutor config show Print current configuration summary
deeptutor plugin list List registered tools and capabilities
deeptutor plugin info <name> Show tool or capability details
deeptutor provider login <provider> OAuth login (openai-codex, github-copilot)

📖 Explore DeepTutor

💬 Chat — Unified Intelligent Workspace

Five distinct modes coexist in a single workspace, bound by a unified context management system. Conversation history, knowledge bases, and references persist across modes — switch between them freely within the same topic, whenever the moment calls for it.

Mode What It Does
Chat Fluid, tool-augmented conversation. Choose from RAG retrieval, web search, code execution, deep reasoning, brainstorming, and paper search — mix and match as needed.
Deep Solve Multi-agent problem solving: plan, investigate, solve, and verify — with precise source citations at every step.
Quiz Generation Generate assessments grounded in your knowledge base (Custom mode) or replicate the style of uploaded reference exams (Mimic mode), with built-in validation.
Deep Research Decompose a topic into subtopics, dispatch parallel research agents across RAG, web, and academic papers, and produce a fully cited report.
Math Animator Turn mathematical concepts into visual animations and storyboards powered by Manim.

Tools are decoupled from workflows — in every mode, you decide which tools to enable, how many to use, or whether to use any at all. The workflow orchestrates the reasoning; the tools are yours to compose.

Start with a quick chat question, escalate to Deep Solve when it gets hard, generate quiz questions to test yourself, then launch a Deep Research to go deeper — all in one continuous thread.


🤖 TutorBot — Your Personal AI Tutor

TutorBot is not a chatbot. It is a persistent, autonomous tutor built on nanobot — a lightweight agent engine that gives each instance its own independent agent loop.

Every TutorBot lives in its own workspace with its own memory and skill set, while staying connected to DeepTutor's shared memory layer. Think of it as a real tutor who remembers everything and keeps getting better.

  • Custom Soul — Shape your tutor's personality, tone, and values through editable Soul templates. Socratic, encouraging, rigorous — you decide.
  • Independent Memory — Each bot maintains its own workspace and conversation history, separate from other bots, yet connected to DeepTutor's global memory.
  • Reminders & Scheduling — Set up recurring study check-ins, review reminders, and periodic tasks through the built-in heartbeat system.
  • DeepTutor Integration — Bots can call into DeepTutor's full capabilities: search your knowledge bases, execute code, browse the web, and more.
  • Skill Learning — Teach your bot new abilities by adding skill files to its workspace. It learns as you expand its reach.

✍️ Co-Writer — AI Inside Your Editor

Co-Writer brings the intelligence of Chat directly into a writing surface. It is a full-featured Markdown editor where AI is a first-class collaborator — not a sidebar, not an afterthought.

Select any text and choose Rewrite, Expand, or Shorten — optionally drawing context from your knowledge base or the web. The editing flow is non-destructive with full undo/redo, and every piece you write can be saved straight to your notebooks, feeding back into your learning ecosystem.


🎓 Guided Learning — Visual, Step-by-Step Mastery

Guided Learning turns your personal materials into structured, multi-step learning journeys. Provide a topic, optionally link notebook records, and DeepTutor will:

  1. Design a learning plan — Identify 3–5 progressive knowledge points from your materials.
  2. Generate interactive pages — Each point becomes a rich visual HTML page with explanations, diagrams, and examples.
  3. Enable contextual Q&A — Chat alongside each step for deeper exploration.
  4. Summarize your progress — Upon completion, receive a learning summary of everything you've covered.

Sessions are persistent — pause, resume, or revisit any step at any time.


📚 Knowledge — Your Learning Infrastructure

Knowledge is where you build and manage the document collections that power everything else in DeepTutor.

  • Knowledge Bases — Upload PDF, TXT, or Markdown files to create searchable, RAG-ready collections. Add documents incrementally as your library grows.
  • Notebooks — Organize learning records across sessions. Save insights from Chat, Guided Learning, Co-Writer, or Deep Research into categorized, color-coded notebooks.

Your knowledge base is not passive storage — it actively participates in every conversation, every research session, and every learning path you create.


🧠 Memory — It Learns As You Learn

DeepTutor maintains a persistent, evolving understanding of you through two complementary dimensions:

  • Summary — A running digest of your learning progress: what you've studied, which topics you've explored, and how your understanding has developed.
  • Profile — Your learner identity: preferences, knowledge level, goals, and communication style — automatically refined through every interaction.

Memory is shared across all features and all your TutorBots. The more you use DeepTutor, the more personalized and effective it becomes.


⭐ Star History

Stargazers    Forkers

Star History Chart

🤝 Contributing

We hope DeepTutor becomes a gift for the community. 🎁

Contributors

See CONTRIBUTING.md for guidelines on setting up your development environment, code standards, and pull request workflow.

🌐 Community & Ecosystem

DeepTutor stands on the shoulders of outstanding open-source projects:

Project Role in DeepTutor
nanobot Ultra-lightweight agent engine powering TutorBot
LlamaIndex RAG pipeline and document indexing backbone
ManimCat AI-driven math animation generation for Math Animator

From the HKUDS ecosystem:

⚡ LightRAG 🤖 AutoAgent 🔬 AI-Researcher 🧬 nanobot
Simple & Fast RAG Zero-Code Agent Framework Automated Research Ultra-Lightweight AI Agent
Description
DeepTutor: Lifelong Personalized Tutoring(港大 HKUDS 个性化 AI 辅导)
Readme Apache-2.0 468 MiB
Languages
Python 66%
TypeScript 32.5%
CSS 0.8%
JavaScript 0.6%