Files
knowledge-base/AI/mem0/01-basics.md
hermes-bot 9fd51e7556 refactor: 重构目录结构
- 顶级目录改为 AI/
- 次级目录为具体技术(如 mem0)
- 仓库定位为综合知识库
2026-05-29 16:05:57 +00:00

44 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.
# Mem0 基础概念
## 什么是 Mem0
Mem0 是一个 **AI 记忆层**Memory Layer为大语言模型提供持久化记忆能力。
核心功能:
- 存储 AI 与用户的对话记忆
- 语义搜索相关记忆
- 记忆关联推理
## Self-Host 是什么
Self-host自托管= 把 Mem0 部署在自己服务器上,而不是使用官方云服务。
| 方式 | 说明 | 数据位置 |
|------|------|----------|
| **官方云服务** | 调用 mem0.ai 的 API | 数据在第三方服务器 |
| **Self-host** | 自己部署 mem0 代码 | 数据完全在自己控制 |
### Self-host 的优势
1. **数据隐私** - 所有数据不经过第三方
2. **网络可控** - 可运行在私有网络/内网
3. **成本可控** - 无 API 调用费用,适合大规模使用
4. **定制灵活** - 可修改源码,切换向量数据库
## Mem0 官方仓库
- GitHub: `mem0ai/mem0`
- 主要分支/目录:
- `server/` - FastAPI 服务,完整功能(需 PostgreSQL + pgvector + Neo4j
- `openmemory/` - 轻量版本(已 sunset建议用 server/
## OpenMemory 和 Mem0 的关系
`openmemory/``mem0ai/mem0` 仓库下的一个**子目录/组件**,不是独立项目。
| 目录 | 存储后端 | 架构复杂度 | 状态 |
|------|---------|-----------|------|
| `server/` | PostgreSQL + pgvector + Neo4j | 高 | ✅ 维护中 |
| `openmemory/` | Qdrant only | 低 | ⚠️ 已 sunset |
> ⚠️ 官方建议新部署使用 `server/` 目录