docs: add digital employee platform design document
Multi-tenant platform design with unified LLM provider abstraction, RAG knowledge base, and tenant-isolated data storage. MVP uses SQLite + ChromaDB, with planned migration to PostgreSQL + pgvector. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
1 parent
147104819b
commit
5c13f08c03
2 files changed
+641
No files matched your search
@@ -0,0 +1,44 @@
|
||||
# 2026-05-05
|
||||
|
||||
## 纪要
|
||||
|
||||
- 数字员工平台项目启动,完成设计文档
|
||||
|
||||
## 决策
|
||||
|
||||
### 综合型数字员工平台 - 架构决策
|
||||
|
||||
- **结论**:采用方案 A(轻量直连)先行 MVP,演进到方案 C(自研编排 + PostgreSQL 全栈)
|
||||
- **理由**:
|
||||
- MVP 用 SQLite + ChromaDB 零外部依赖,1-2 周可交付
|
||||
- 避免 LangChain 重依赖和频繁 breaking change
|
||||
- 自研 Provider 抽象层保持轻量可控
|
||||
- 生产级方案用 PostgreSQL + pgvector 统一存储
|
||||
- **影响**:
|
||||
- 项目结构按模块化设计,存储层可替换
|
||||
- Provider 抽象层接口需稳定,后续新增 Provider 不改业务代码
|
||||
|
||||
### 技术选型
|
||||
|
||||
- **后端**:Python FastAPI + SQLAlchemy 2.0 async
|
||||
- **前端**:React + TypeScript + Vite + Ant Design
|
||||
- **存储 MVP**:SQLite + ChromaDB
|
||||
- **存储 V1**:PostgreSQL + pgvector + Redis
|
||||
- **LLM MVP**:OpenAI + 通义千问(兼容 OpenAI SDK 格式)
|
||||
|
||||
### 多租户隔离策略
|
||||
|
||||
- 共享服务实例 + API Key 隔离 + 独立知识库(ChromaDB namespace 隔离)
|
||||
- 所有数据表强制 tenant_id 过滤
|
||||
- LLM API Key AES-256 加密存储
|
||||
|
||||
### MVP 范围
|
||||
|
||||
- P0:租户管理、员工配置、对话接口、RAG 知识库、对话历史
|
||||
- P1:管理后台 UI、对话前端 UI
|
||||
- P2:用量统计/计费、权限控制
|
||||
- P3:对话质量评估、模板市场、多渠道接入、审批工作流、审计日志
|
||||
|
||||
## 问题与修复
|
||||
|
||||
(暂无)
|
||||
Reference in new issue
Block a user