# 策展 · X (Twitter) 🔥

> 📖 本站完整內容索引（documentation index）：[llms.txt](/llms.txt)

> 作者：Chao Huang (@huang_chao4969) · 平台：X (Twitter) · 日期：2026-04-04

> 原始來源：https://x.com/huang_chao4969/status/2040478769660805516

## 中文摘要

DeepTutor v1.0 發布 Agent-Native 智能學習平台。

DeepTutor v1.0 是香港大學資料智能實驗室（HKUDS）全新開源的 Agent-Native 智能學習平台，完全重建雙層架構，於 [2026.4.4](https://github.com/HKUDS/DeepTutor/releases/tag/v1.0.0-beta.1) 發布 v1.0.0-beta.1 版本，採用 Apache 2.0 授權，支援 Python 3.10+ 與 Next.js 16。距離初始發布僅三個月，已於 [2026.2.6](https://github.com/HKUDS/DeepTutor) 39 天內達到 10k stars，展現強大社群動能。

**架構與核心能力**
雙層架構包含底層 7 個 tools（knowledge base retrieval、web search、code execution、deep reasoning、brainstorming、paper search、GeoGebra visualization），頂層 5 個 capability modules，每個為 multi-step agent pipeline：
- Chat：工具強化智慧對話。
- Deep Solve：Planning → Reasoning → Writing，多階段問題解決，含精確來源引用。
- Deep Question：自動生成問題，支援 follow-up mode。
- Deep Research：multi-agent 協作深度研究與報告生成。
- Math Animator：輸入數學概念，自動生成 Manim 視覺化影片。

Unified Chat Workspace 讓五種模式共用單一 thread，conversation history、knowledge bases、references 跨模式持久化，使用者可無縫切換不丟失訊息。工具與 workflow 解耦，每模式自行組合工具。

**關鍵功能**
- **個人 TutorBots**：非 chatbot，而是自主 Agent，每個擁有獨立 workspace、記憶、personality、skill set，由 [nanobot](https://github.com/HKUDS/nanobot) 驅動。可設定提醒、學習新能力、隨使用者成長。支援 Soul Templates（可編輯 personality、tone、teaching philosophy，從 Socratic、encouraging、rigorous 等內建原型自訂）；獨立 workspace（各自目錄含分離記憶、sessions、skills、配置，隔離卻存取共享 knowledge layer）；Proactive Heartbeat（主動發起學習檢查、複習提醒、排程任務）；完整工具存取；Skill Learning（新增 skill files 教新能力）；Multi-Channel Presence（整合 Telegram、Discord、Slack、WeChat、Feishu、DingTalk、WhatsApp、email）；Team & Sub-Agents（產生子 Agent 或 multi-agent teams 處理複雜任務）。
- **AI Co-Writer**：完整 Markdown 編輯器，AI 為首要協作者。選取文字執行 Rewrite、Expand、Shorten，從 knowledge base 或 web 抽取脈絡，非破壞性編輯支援 undo/redo，直接存入 notebooks 回饋學習生態。
- **Guided Learning**：將材料轉為結構化視覺學習路徑，提供 topic 並選 notebook records：
  1. 設計學習計劃，從材料識別 3–5 個漸進知識點。
  2. 生成互動頁面，每點轉為富含解釋、圖表、範例的 HTML 頁面。
  3. 啟用脈絡 Q&A，每步邊學邊討論。
  4. 完成後產生學習進度摘要。
  Sessions 持久化，可 pause、resume 或 revisit。
- **Knowledge Hub**：上傳 PDFs、Markdown、text files 建 RAG-ready knowledge bases，支援 incremental 加檔；color-coded notebooks 組織跨 sessions 學習記錄（從 Chat、Guided Learning、Co-Writer、Deep Research 存入）。Knowledge base 主動驅動對話，非被動儲存。
- **Persistent Memory**：透過 Summary（學習進度、主題、理解發展摘要）與 Profile（偏好、知識水平、目標、溝通風格）維持演化理解，跨所有功能與 TutorBots 共享，越用越精準。

**三種使用方式，一個 runtime**
支援 CLI、WebSocket API、Python SDK，適用終端使用者、前端開發者或二次開發。全新 Web 介面包含 Playground（深度能力體驗）、Co-Writer（AI 協作寫作）、Agents（TutorBot 管理與對話）、改進 Guide 學習頁面。

**CLI 操作（Agent-Native 介面）**
完全 CLI-native，每 capability、knowledge base、session、TutorBot 一指令搞定，rich terminal output 給人類，structured JSON 給 AI Agent。將 `SKILL.md` 提供給 tool-using Agent（如 [nanobot](https://github.com/HKUDS/nanobot)），即可自主操作。

- **One-shot execution**：
  ```bash
  deeptutor run chat "Explain the Fourier transform" -t rag --kb textbook
  deeptutor run deep_solve "Prove that √2 is irrational" -t reason
  deeptutor run deep_question "Linear algebra" --config num_questions=5
  deeptutor run deep_research "Attention mechanisms in transformers"
  ```

- **Interactive REPL**：
  ```bash
  deeptutor chat --capability deep_solve --kb my-kb
  # REPL 內：/cap, /tool, /kb, /history, /notebook, /config 即時切換
  ```

- **Knowledge base 生命週期**：
  ```bash
  deeptutor kb create my-kb --doc textbook.pdf
  deeptutor kb add my-kb --docs-dir ./papers/
  deeptutor kb search my-kb "gradient descent"
  deeptutor kb set-default my-kb
  ```

- **雙輸出模式**：
  ```bash
  deeptutor run chat "Summarize chapter 3" -f rich    # 彩色格式輸出
  deeptutor run chat "Summarize chapter 3" -f json    # JSON 事件流
  ```

- **Session 連續性**：
  ```bash
  deeptutor session list
  deeptutor session open <id>
  ```

完整 CLI 指令參考：
- Top-level：`deeptutor run <capability> <message>`（capability：`chat`、`deep_solve`、`deep_question`、`deep_research`、`math_animator`）；`deeptutor chat`（選 `--capability`、`--tool`、`--kb`、`--language`）；`deeptutor serve`（啟動 API server）。
- `deeptutor bot`：`list`、`create <id>`（`--name`、`--persona`、`--model`）、`start <id>`、`stop <id>`。
- `deeptutor kb`：`list`、`info <name>`、`create <name>`（`--doc`、`--docs-dir`）、`add <name>`、`search <name> <query>`、`set-default <name>`、`delete <name>`（`--force`）。
- `deeptutor memory`：`show [file]`（`summary`、`profile`、`all`）、`clear [file]`（`--force`）。
- `deeptutor session`：`list`（`--limit`）、`show <id>`、`open <id>`、`rename <id>`（`--title`）、`delete <id>`。
- `deeptutor notebook`：`list`、`create <name>`（`--description`）、`show <id>`、`add-md <id> <path>`、`replace-md <id> <rec> <path>`、`remove-record <id> <rec>`。
- `deeptutor config / plugin / provider`：`config show`、`plugin list`、`plugin info <name>`、`provider login <provider>`（如 `openai-codex`、`github-copilot`）。

**安裝與部署**
基礎設施重構支援 multi-LLM provider、multiple embedding adapters、10 個 search engines、SQLite session persistence。

- **Option A（推薦）：互動腳本導覽**：
  ```bash
  git clone https://github.com/HKUDS/DeepTutor.git
  cd DeepTutor
  conda create -n deeptutor python=3.11 && conda activate deeptutor
  python scripts/start_tour.py
  ```
  Tour 提供 Web mode（自動安裝 pip + npm、開 Settings 導覽 LLM/Embedding/Search 設定、live testing、重啟）或 CLI mode，結束後運行於 [http://localhost:3782](http://localhost:3782)。

- **Option B：手動安裝**：
  1. 安裝依賴：
     ```bash
     git clone https://github.com/HKUDS/DeepTutor.git
     cd DeepTutor
     conda create -n deeptutor python=3.11 && conda activate deeptutor
     pip install -e ".[server]"
     cd web && npm install && cd ..
     ```
  2. 配置 `.env`：
     ```bash
     cp .env.example .env
     ```
     必要欄位：
     ```dotenv
     LLM_BINDING=openai
     LLM_MODEL=gpt-4o-mini
     LLM_API_KEY=sk-xxx
     LLM_HOST=https://api.openai.com/v1
     EMBEDDING_BINDING=openai
     EMBEDDING_MODEL=text-embedding-3-large
     EMBEDDING_API_KEY=sk-xxx
     EMBEDDING_HOST=https://api.openai.com/v1
     EMBEDDING_DIMENSION=3072
     ```
  3. 啟動：
     ```bash
     python -m deeptutor.api.run_server  # Backend: 8001
     cd web && npm run dev -- -p 3782     # Frontend: 3782
     ```
     開 [http://localhost:3782](http://localhost:3782)。

- **Option C：Docker**：
  1. 配置 `.env`（同上）。
  2a. Pull GHCR [https://github.com/HKUDS/DeepTutor/pkgs/container/deeptutor](https://github.com/HKUDS/DeepTutor/pkgs/container/deeptutor)（linux/amd64、linux/arm64）：
     ```bash
     docker compose -f docker-compose.ghcr.yml up -d
     ```
     Pin 版本編 `docker-compose.ghcr.yml`：`image: ghcr.io/hkuds/deeptutor:1.0.0` 或 `:latest`。
  2b. Build from source：
     ```bash
     docker compose up -d
     ```
  驗證 [http://localhost:3782](http://localhost:3782)；logs `docker compose logs -f`；stop `docker compose down`。

- **遠端部署**：`.env` 加 `NEXT_PUBLIC_API_BASE_EXTERNAL=https://your-server.com:8001`，前端 runtime 套用。
- **開發模式（hot-reload）**：
  ```bash
  docker compose -f docker-compose.yml -f docker-compose.dev.yml up
  ```
- **自訂 ports**：`.env` 設 `BACKEND_PORT=9001`、`FRONTEND_PORT=4000`，重啟。
- **資料持久化**：Docker volumes 映射 `./data/user`（settings、memory、workspace、sessions、logs）、`./data/knowledge_bases`（文件與 vector indices），存活 `docker compose down`。

環境變數參考：
| Variable | Required | Description |
|:---|:---:|:---|
| `LLM_BINDING` | **Yes** | LLM provider (`openai`, `anthropic` 等) |
| `LLM_MODEL` | **Yes** | Model name (e.g. `gpt-4o`) |
| `LLM_API_KEY` | **Yes** | 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` 等) |
| `SEARCH_API_KEY` | No | Search API key |
| `BACKEND_PORT` | No | Backend port (default `8001`) |
| `FRONTEND_PORT` | No | Frontend port (default `3782`) |
| `NEXT_PUBLIC_API_BASE_EXTERNAL` | No | Public backend URL for cloud |
| `DISABLE_SSL_VERIFY` | No | Disable SSL verification (default `false`) |

**CLI Only**：
```bash
pip install -e ".[cli]"
deeptutor chat
deeptutor run chat "Explain Fourier transform"
deeptutor run deep_solve "Solve x^2 = 4"
deeptutor kb create my-kb --doc textbook.pdf
```

**發布歷史**
- [2026.4.4] [v1.0.0-beta.1](https://github.com/HKUDS/DeepTutor/releases/tag/v1.0.0-beta.1)：Agent-native 重寫、兩層 plugin model、CLI & SDK、TutorBot、Co-Writer、Guided Learning、persistent memory。
- [2026.1.23] [v0.6.0](https://github.com/HKUDS/DeepTutor/releases/tag/v0.6.0)：session persistence、incremental document upload、flexible RAG、full Chinese localization。
- [2026.1.18] [v0.5.2](https://github.com/HKUDS/DeepTutor/releases/tag/v0.5.2)：Docling RAG-Anything、logging 優化、bug fixes。
- [2026.1.15] [v0.5.0](https://github.com/HKUDS/DeepTutor/releases/tag/v0.5.0)：unified config、RAG per KB、question generation overhaul、sidebar customization。
- [2026.1.9] [v0.4.0](https://github.com/HKUDS/DeepTutor/releases/tag/v0.4.0)：multi-provider LLM & embedding、新 home page、RAG 解耦、env refactor。
- [2026.1.5] [v0.3.0](https://github.com/HKUDS/DeepTutor/releases/tag/v0.3.0)：Unified PromptManager、GitHub Actions CI/CD、GHCR Docker。
- [2026.1.2] [v0.2.0](https://github.com/HKUDS/DeepTutor/releases/tag/v0.2.0)：Docker、Next.js 16 & React 19、WebSocket security、vulnerability fixes。

**社群與生態**
依賴 [nanobot](https://github.com/HKUDS/nanobot)（TutorBot 引擎）、[LlamaIndex](https://github.com/run-llama/llama_index)（RAG 骨幹）、[ManimCat](https://github.com/Wing900/ManimCat)（Math Animator）。HKUDS 生態： [LightRAG](https://github.com/HKUDS/LightRAG)、[AutoAgent](https://github.com/HKUDS/AutoAgent)、[AI-Researcher](https://github.com/HKUDS/AI-Researcher)、[nanobot](https://github.com/HKUDS/nanobot)。

社群： [Discord](https://discord.gg/eRsjPgMU4t)、Feishu (`Communication.md`)、[WeChat](https://github.com/HKUDS/DeepTutor/issues/78)、[Discussions](https://github.com/HKUDS/DeepTutor/discussions)、[Star History](https://www.star-history.com/#HKUDS/DeepTutor&type=timeline&legend=top-left)。貢獻見 `CONTRIBUTING.md`。多語言文件：`assets/README/README_CN.md` (`assets/README/README_CN.md`)（中文）、`assets/README/README_JA.md` (`assets/README/README_JA.md`)（日本語）等。項目於 [https://github.com/HKUDS/DeepTutor](https://github.com/HKUDS/DeepTutor)。

## 標籤

Agent, 新產品, 開源專案, DeepTutor
