33<p >
44 <a href =" https://github.com/2002yy/study-agent/actions/workflows/ci.yml " ><img src =" https://github.com/2002yy/study-agent/actions/workflows/ci.yml/badge.svg " alt =" CI " ></a >
55 <img src =" https://img.shields.io/badge/python-3.12-blue " alt =" Python 3.12 " >
6- <img src =" https://img.shields.io/badge/tests-277 %20passed-green " alt =" 277 tests passed" >
6+ <img src =" https://img.shields.io/badge/tests-290 %20passed-green " alt =" 290 tests passed" >
77</p >
88
99A local AI learning assistant with long-term memory, role-based group chat,
@@ -17,7 +17,7 @@ Study Agent 是一个本地优先的 AI 学习助手,重点不是简单调用
1717- ** 长期记忆** :Markdown memory + safe writer
1818- ** 上下文分层** :fast / light / deep / archive
1919- ** 联网搜索** :RSS / News fetch → article extraction → LLM digest → source tracing
20- - ** RAG MVP** :本地 Markdown / TXT / DOCX / PDF 索引、关键词 / 本地向量原型 / hybrid / backend-vector 检索、可配置 embedding provider、可选 Chroma 持久化、引用上下文、来源块、Streamlit 检索/调试面板、聊天注入和 FastAPI RAG 接口
20+ - ** RAG MVP** :本地 Markdown / TXT / DOCX / PDF 索引、关键词 / 本地向量原型 / hybrid / backend-vector 检索、可配置 embedding provider、可选 Chroma 持久化、受控本地知识检索工具、 引用上下文、来源块、Streamlit 检索/调试面板、聊天注入和 FastAPI RAG / chat / memory 基础接口
2121- ** 工程安全** :SSRF protection、detect-secrets、配置模板
2222- ** 工程质量** :pytest 测试套件、Ruff、GitHub Actions CI、打包检查
2323
@@ -27,11 +27,11 @@ Study Agent 是一个本地优先的 AI 学习助手,重点不是简单调用
2727- ** Model routing** with fast / light / deep / archive context tiers
2828- ** Long-term memory** based on Markdown files and safe-writer persistence
2929- ** Web search pipeline** : feed registry → URL safety checks → article extraction → LLM digest → auditable source trace
30- - ** RAG MVP** : local Markdown / TXT / DOCX / PDF indexing, lexical / local vector prototype / hybrid / backend-vector retrieval, configurable embedding providers, optional Chroma persistence, citation-first context formatting, source blocks, a Streamlit retrieval/debug panel, optional chat injection, and FastAPI RAG endpoints
30+ - ** RAG MVP** : local Markdown / TXT / DOCX / PDF indexing, lexical / local vector prototype / hybrid / backend-vector retrieval, configurable embedding providers, optional Chroma persistence, a controlled local-knowledge retrieval tool, citation-first context formatting, source blocks, a Streamlit retrieval/debug panel, optional chat injection, and FastAPI RAG / chat / memory foundation endpoints
3131- ** SSRF protection** for article fetching, ** detect-secrets** in CI
3232- ** Batched session logging** and multi-layer caching for performance
3333- ** Performance budget** : mode-based ` max_tokens ` bounds on the main chat, WeChat, and news LLM paths
34- - ** 277 pytest tests** , Ruff clean, mypy clean, GitHub Actions CI workflow
34+ - ** 290 pytest tests** , Ruff clean, mypy clean, GitHub Actions CI workflow
3535
3636For a detailed breakdown of the stack and engineering highlights, see [ Technical Stack & Engineering Highlights] ( docs/TECH_STACK.md ) .
3737
@@ -109,7 +109,7 @@ Study Agent 的定位很明确:**一个运行在你本地的、有长期记忆
109109| ** 角色群聊** | 四位角色(三月七、刻晴、纳西妲、流萤)群聊讨论,各有独立人设 |
110110| ** 联网搜索** | Google News + Bing News + RSSHub 多源聚合,页面正文三层提取 |
111111| ** 来源追溯** | 搜索结果写入群聊记录,可回溯依据 |
112- | ** RAG MVP** | 本地 Markdown / TXT / DOCX / PDF 文档索引,前端面板返回带文件路径、行号、分数、命中词和 score breakdown 的引用片段,并可注入单人聊天和微信群互动回复;FastAPI 提供 ` /health ` 、` /rag ` 、` /rag/index ` 、` /rag/query ` |
112+ | ** RAG MVP** | 本地 Markdown / TXT / DOCX / PDF 文档索引,前端面板返回带文件路径、行号、分数、命中词和 score breakdown 的引用片段,并可注入单人聊天和微信群互动回复;FastAPI 提供 ` /health ` 、` /rag ` 、` /rag/index ` 、` /rag/query ` 、 ` /rag/status ` 、 ` /rag/upload ` 、 ` /rag/local-knowledge ` |
113113| ** 课后总结** | 学习完成后自动总结进展,用户确认后写入记忆 |
114114| ** 长期记忆** | 学习者画像、进度追踪、项目上下文、当前焦点,多级记忆档案 |
115115| ** 多 Provider** | 支持 OpenAI / DeepSeek / OpenRouter / SiliconFlow / 本地模型 |
@@ -233,7 +233,7 @@ RAG_EMBEDDING_PROVIDER=local_hash
233233│ ├── llm_router.py # 模型路由分发
234234│ ├── context_builder.py # 上下文构建
235235│ ├── mode_manager.py # 模式管理(版本/性能/氛围)
236- │ ├── api.py # FastAPI health / RAG endpoints
236+ │ ├── api.py # FastAPI health / chat / memory / sessions / RAG endpoints
237237│ ├── role_manager.py # 角色加载与管理
238238│ ├── performance_budget.py # 性能预算(max_tokens 分级)
239239│ ├── memory.py # 记忆系统
@@ -250,6 +250,7 @@ RAG_EMBEDDING_PROVIDER=local_hash
250250│ ├── router.py # 路由配置
251251│ ├── news/ # 新闻聚合链路
252252│ ├── rag/ # 本地 RAG MVP:加载、分块、索引、关键词/向量原型/embedding/可选后端检索
253+ │ ├── tools/ # 受控工具边界:本地知识检索等
253254│ └── ui/ # Streamlit UI 组件
254255├── tests/ # pytest 测试套件
255256├── docs/ # 设计文档与工程说明
@@ -270,7 +271,7 @@ RAG_EMBEDDING_PROVIDER=local_hash
270271## 测试
271272
272273``` bash
273- pytest tests/ -v # current local baseline: 277 passed
274+ pytest tests/ -v # current local baseline: 290 passed
274275pytest tests/ --cov=src # 覆盖率
275276ruff check src/ tests/ # linting
276277mypy --explicit-package-bases src/ # type check
@@ -312,8 +313,8 @@ CI 通过 GitHub Actions 在 push / pull request 上运行,集成 `pytest`、`
312313
313314求职导向的技术演进路线:
314315
315- - [ ] FastAPI service layer (partial) : ` /health ` , ` /rag ` , ` /rag/index ` , ` /rag/query ` implemented; ` /chat ` and ` /memory ` remain planned
316- - [x] RAG MVP: Markdown / TXT / DOCX / PDF loading, chunking, local keyword retrieval, local vector prototype, hybrid retrieval, backend-vector retrieval, configurable embedding provider, optional Chroma adapter, citation context, source blocks, Streamlit retrieval panel, optional single-chat and WeChat interactive injection
316+ - [x ] FastAPI service layer foundation : ` /health ` , ` /chat ` , ` /memory/preview ` , ` /memory/commit ` , ` /sessions ` , ` / rag` , ` /rag/index ` , ` /rag/query ` , ` /rag/status ` , ` /rag/upload ` and ` /rag/local-knowledge ` implemented; streaming, auth and frontend-specific contracts remain planned
317+ - [x] RAG MVP: Markdown / TXT / DOCX / PDF loading, chunking, local keyword retrieval, local vector prototype, hybrid retrieval, backend-vector retrieval, configurable embedding provider, optional Chroma adapter, controlled local-knowledge retrieval, citation context, source blocks, Streamlit retrieval panel, optional single-chat and WeChat interactive injection
317318- [ ] RAG document QA (partial): PDF parsing has file-size, page-count, extracted-text and encrypted-file guards; production embedding requires explicit API/env configuration and Chroma remains optional
318319- [ ] Vector store: Chroma optional adapter implemented; FAISS local prototype and pgvector engineering version remain planned
319320- [ ] Web UI: TypeScript + Vue3 / React, streaming chat, source panel
0 commit comments