root 5c13f08c03 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>
2026-05-05 05:54:05 +08:00

45 lines
1.4 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 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对话质量评估、模板市场、多渠道接入、审批工作流、审计日志
## 问题与修复
(暂无)