六层架构记忆系统 - 你的第二大脑
bash
# 初始化
python3 scripts/init_memory.py
# 搜索记忆
python3 scripts/search.py "关键词"
# 健康检查
python3 scripts/health_check.py
功能说明记忆存储SQLite 本地持久化全文搜索FTS5 搜索引擎向量搜索可选的向量索引云端同步IMA + NAS 双通道自动遗忘检测v2多维度衰减+矛盾检测知识图谱记忆关联分析硬件检测自动识别AVX512/AMX/NEON预测维护预测增长+维护计划对话管理多轮对话历史管理批量操作导入/导出/删除/更新智能标签自动标签/合并/清理WAL模式SQLite性能优化命令行搜索quick_search CLI工具
层级功能核心模块L1 捕获对话记忆捕获conversation_summarizerL2 增强遗忘检测/摘要forget_detectorL3 索引搜索/向量search, vector_storeL4 管理记忆 CRUDmemoryL5 治理安全/权限security, governanceL6 基础配置/路径paths, config
text
yaoyao-memory-v2/
├── SKILL.md # 本文档
├── ARCHITECTURE.md # 架构详解
├── CHANGELOG.md # 版本历史
├── SECURITY.md # 安全声明
├── FUNCTIONS.md # 功能清单 (103个)
│
├── src/
│ ├── core/ # 核心模块
│ └── scripts/ # 工具脚本
│
├── html/ # Web界面
└── tests/ # 测试
bash
# 初始化
python3 scripts/init_memory.py
# 搜索
python3 scripts/search.py "查询内容"
# 统计
python3 scripts/memory_stats.py
bash
# 健康检查
python3 scripts/health_check.py
# 自动修复
python3 scripts/auto_fixer.py fix
# 性能优化
python3 scripts/benchmark.py
bash
# IMA同步
python3 scripts/sync_ima.py
# NAS同步
python3 scripts/sync_to_nas.py
配置文件: ~/.openclaw/workspace/memory/config/
配置项说明memory.dbSQLite 主数据库vectors.db向量数据库feature_flags.json功能开关
文档:
v4.0.0 集成 hermes-bridge 能力:
模块功能error_classifierAPI 错误分类 + 恢复决策smart_routing简单查询 → 便宜模型context_compressor结构化摘要压缩insights使用洞察生成trajectory对话轨迹记录redact敏感信息脱敏rate_limitAPI 限流追踪
API 端点: GET /api/hermes_status
bash
# 启动带 Hermes 的 API Server
python3 scripts/api_server.py --port 8765
版本: 4.0.1 | 更新: 2026-04-15