Yaoyao Memory Homo

Other

六层架构记忆系统 - 让 AI 跨会话保持上下文、沉淀知识、持续进化 【本地存储】SQLite 数据库 【全文搜索】FTS5 搜索引擎 【模块化】核心+可选模块,按需安装

Install

openclaw skills install yaoyao-memory-v2

yaoyao-memory 🦞

六层架构记忆系统 - 你的第二大脑


快速开始

# 初始化
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_summarizer
L2 增强遗忘检测/摘要forget_detector
L3 索引搜索/向量search, vector_store
L4 管理记忆 CRUDmemory
L5 治理安全/权限security, governance
L6 基础配置/路径paths, config

目录结构

yaoyao-memory-v2/
├── SKILL.md              # 本文档
├── ARCHITECTURE.md       # 架构详解
├── CHANGELOG.md         # 版本历史
├── SECURITY.md          # 安全声明
├── FUNCTIONS.md         # 功能清单 (103个)
│
├── src/
│   ├── core/            # 核心模块
│   └── scripts/         # 工具脚本
│
├── html/                # Web界面
└── tests/              # 测试

常用命令

记忆操作

# 初始化
python3 scripts/init_memory.py

# 搜索
python3 scripts/search.py "查询内容"

# 统计
python3 scripts/memory_stats.py

系统维护

# 健康检查
python3 scripts/health_check.py

# 自动修复
python3 scripts/auto_fixer.py fix

# 性能优化
python3 scripts/benchmark.py

云同步

# IMA同步
python3 scripts/sync_ima.py

# NAS同步
python3 scripts/sync_to_nas.py

配置

配置文件:~/.openclaw/workspace/memory/config/

配置项说明
memory.dbSQLite 主数据库
vectors.db向量数据库
feature_flags.json功能开关

安全

  • ✅ 上下文隔离标签
  • ✅ 子Agent工具过滤
  • ✅ RBAC权限控制
  • ✅ 安装前安全扫描
  • ✅ subprocess timeout

文档:


变更记录


🔗 Hermes Bridge 集成

v4.0.0 集成 hermes-bridge 能力:

模块功能
error_classifierAPI 错误分类 + 恢复决策
smart_routing简单查询 → 便宜模型
context_compressor结构化摘要压缩
insights使用洞察生成
trajectory对话轨迹记录
redact敏感信息脱敏
rate_limitAPI 限流追踪

API 端点GET /api/hermes_status

# 启动带 Hermes 的 API Server
python3 scripts/api_server.py --port 8765

版本: 4.0.1 | 更新: 2026-04-15