ClawKit Logo
ClawKitReliability Toolkit
Back to Registry
Official Verified

memory-system-complete

Complete memory system with causal graph, knowledge graph, auto-detection, and evolution features

skill-install — Terminal

Install via CLI (Recommended)

clawhub install openclaw/skills/skills/717986230/memory-system-complete
Or

Memory System Complete v2.0

完整记忆系统:双脑架构 + 因果图谱 + 知识图谱 + 自动检测 + 进化系统

功能介绍

完整的记忆管理系统,支持:

核心功能

  • ✅ 结构化记忆存储(SQLite左脑)
  • ✅ 语义向量搜索(LanceDB右脑)
  • ✅ 自动清理和优化
  • ✅ 完整CRUD操作
  • ✅ 导入/导出功能
  • ✅ 自动安装和验证

v2.0.0 新增功能

  • 因果关系图谱 - 自动检测和存储记忆之间的因果关系
  • 知识点关系图谱 - 自动检测和存储知识点之间的各种关系
  • 自动关系检测 - 基于关键词、相似度、类别的自动检测
  • 记忆系统进化 - 两步思维链、四信号关联度、Louvain社区检测
  • 图谱洞察 - 惊奇连接、知识空白检测
  • 四阶段检索 - 分词搜索→图谱扩展→预算控制→上下文组装
  • 深度研究 - LLM智能生成搜索主题,多查询网络搜索
  • 审核系统 - 异步人机协作,预定义操作
  • Purpose.md - 定义目标和方向

v1.2.x 功能

  • ✅ Theory of Mind (ToM) 心智模型
  • ✅ 情感分析(EQ改进)
  • ✅ 增强检索系统(Memory改进)
  • ✅ 相关记忆检测
  • ✅ 热门记忆分析
  • ✅ Ollama本地模型嵌入
  • ✅ 语义搜索支持

⚠️ 重要说明

此技能不包含任何预置的记忆数据

安装后,用户将获得:

  • ✅ 完整的记忆系统架构
  • ✅ 数据库初始化脚本
  • ✅ 完整的API工具
  • ✅ 使用文档和示例
  • ✅ 因果关系图谱
  • ✅ 知识点关系图谱
  • ✅ 自动检测功能
  • ✅ 进化系统

用户需要根据自己的需求添加记忆数据。


v2.0.0 新功能详解

1. 因果关系图谱

功能: 自动检测和存储记忆之间的因果关系

因果类型:

  • direct - 直接因果
  • indirect - 间接因果
  • conditional - 条件因果
  • probabilistic - 概率因果

核心功能:

  • 添加/删除因果关系
  • 获取原因/结果
  • 获取因果链
  • 检测因果循环
  • 计算/更新因果强度

使用示例:

from scripts.causal_knowledge_graphs import CausalGraph

causal_graph = CausalGraph("memory/database/xiaozhi_memory.db")

# 添加因果关系
causal_graph.add_causal_relation(
    cause_id=1,
    effect_id=2,
    causal_type='direct',
    strength=0.8,
    confidence=0.9,
    evidence='Test evidence'
)

# 获取原因
causes = causal_graph.get_causes(effect_id=2)

# 获取结果
effects = causal_graph.get_effects(cause_id=1)

# 获取因果链
chain = causal_graph.get_causal_chain(start_id=1, max_depth=5)

# 检测因果循环
cycles = causal_graph.detect_causal_cycles()

2. 知识点关系图谱

功能: 自动检测和存储知识点之间的各种关系

关系类型:

  • is_a - 是一种(继承)
  • part_of - 是一部分(组成)
  • related_to - 相关
  • similar_to - 相似
  • opposite_of - 相反
  • depends_on - 依赖
  • precedes - 先于
  • follows - 跟随
  • causes - 导致(因果关系)
  • caused_by - 由...导致(因果关系)
  • contains - 包含
  • contained_in - 包含于
  • exemplifies - 例证
  • exemplified_by - 被例证
  • context_for - 是...的上下文
  • context_of - ...的上下文

核心功能:

  • 添加/删除关系
  • 获取关系
  • 获取相关记忆(多跳)
  • 查找最短路径
  • 检测社区
  • 获取子图

使用示例:

from scripts.causal_knowledge_graphs import KnowledgeGraph

knowledge_graph = KnowledgeGraph("memory/database/xiaozhi_memory.db")

# 添加关系
knowledge_graph.add_relation(
    source_id=1,
    target_id=2,
    relation_type='related_to',
    strength=0.7,
    direction='bidirectional'
)

# 获取关系
relations = knowledge_graph.get_relations(memory_id=1)

# 获取相关记忆(多跳)
related = knowledge_graph.get_related_memories(memory_id=1, relation_type='related_to', max_depth=2)

# 查找最短路径
path = knowledge_graph.find_shortest_path(source_id=1, target_id=3)

# 检测社区
communities = knowledge_graph.detect_communities()

3. 自动关系检测

功能: 基于关键词、相似度、类别自动检测关系

检测方法:

  • 关键词匹配检测
  • 相似度检测(Jaccard相似度)
  • 类别检测
  • 内容分析

使用示例:

from scripts.auto_relation_detector import AutoRelationManager

manager = AutoRelationManager("memory/database/xiaozhi_memory.db")

Metadata

Author@717986230
Stars4473
Views1
Updated2026-05-01
View Author Profile
AI Skill Finder

Not sure this is the right skill?

Describe what you want to build — we'll match you to the best skill from 16,000+ options.

Find the right skill
Add to Configuration

Paste this into your clawhub.json to enable this plugin.

{
  "plugins": {
    "official-717986230-memory-system-complete": {
      "enabled": true,
      "auto_update": true
    }
  }
}
Safety NoteClawKit audits metadata but not runtime behavior. Use with caution.