Search

PythonReactSEOPDF
OpenClaw

memory-sync-cn

记忆同步系统 - 自动同步 MEMORY.md 与 CortexGraph,支持遗忘曲线和智能检索

guohongbin-git0 source installs☆ 0 Repository stars

Installation

Follow the repository instructions for this skill and your agent. Review the files and dependencies before adding it to your workflow.

SkillHub CLI

skillhub install guohongbin-git/memory-sync-cn

Inspect the source and compatibility requirements, then follow its installation steps.

Give your agent the source link and ask it to inspect instructions and dependencies before explaining the installation steps.

View source ↗Guides

Skill instructions

记忆同步系统

自动同步 OpenClaw 记忆系统与 CortexGraph(带遗忘曲线)。

架构

MEMORY.md (长期记忆)
     ↕
CortexGraph (智能层)
     ↕
memory/YYYY-MM-DD.md (每日日志)

同步脚本

1. 导入 MEMORY.md 到 CortexGraph
# 运行同步
./scripts/sync-memory.sh
2. 导入每日日志
# 同步今天的日志
./scripts/sync-daily.sh

# 同步指定日期
./scripts/sync-daily.sh 2026-02-18
3. 晋升高价值记忆
# 查看晋升候选
mcporter call cortexgraph.promote_memory auto_detect=true dry_run=true

# 执行晋升
mcporter call cortexgraph.promote_memory auto_detect=true

CortexGraph 工具

核心操作
# 保存记忆
mcporter call cortexgraph.save_memory content="..." tags='["tag1"]' entities='["Entity1"]'

# 搜索记忆
mcporter call cortexgraph.search_memory query="关键词" top_k=5

# 强化记忆(减缓衰减)
mcporter call cortexgraph.touch_memory memory_id="UUID" boost_strength=true

# 查看知识图谱
mcporter call cortexgraph.read_graph limit=10
智能分析
# 分析是否值得记住
mcporter call cortexgraph.analyze_message message="用户说的话"

# 分析是否需要搜索
mcporter call cortexgraph.analyze_for_recall message="用户说的话"

# 自动回忆
mcporter call cortexgraph.auto_recall_process_message message="用户说的话"
维护
# 垃圾回收(删除低分记忆)
mcporter call cortexgraph.gc dry_run=true

# 合并相似记忆
mcporter call cortexgraph.consolidate_memories auto_detect=true mode=preview

# 生成嵌入向量
mcporter call cortexgraph.backfill_embeddings dry_run=true

遗忘曲线算法

CortexGraph 使用 Ebbinghaus 遗忘曲线:

score = (use_count)^β × e^(-λ × Δt) × strength
  • β = 0.6(使用频率权重)
  • λ = ln(2) / half_life(衰减常数,默认 3 天)
  • strength = 1.0-2.0(重要性)

记忆会自然衰减,除非:

  • 被引用(touch_memory)
  • 被搜索到(auto_recall)
  • 晋升到长期记忆(promote_memory)

配置

编辑 ~/.config/cortexgraph/.env:

# 存储路径
CORTEXGRAPH_STORAGE_PATH=~/.config/cortexgraph/jsonl

# 衰减参数
CORT...

Source information

Source
github
Repository
openclaw/skills
Path
skills/guohongbin-git/memory-sync-cn
Version
—
Commit
d96fc0ae3eed8d6a170f6d0ac039bbbb8452ec7a
Classification source
rules
Status
active
Visibility
public

These signals come from indexed source analysis and may lag behind changes. Check the current source files.

README

Memory Sync CN

记忆同步系统 - 自动同步 OpenClaw 记忆系统与 CortexGraph。

功能

  • 🔄 双向同步: MEMORY.md ↔ CortexGraph
  • 🧠 遗忘曲线: 基于 Ebbinghaus 的智能记忆管理
  • 📊 自动晋升: 高价值记忆自动升级到长期存储
  • 🔍 智能检索: 语义搜索 + 衰减评分

安装

# 安装 CortexGraph
uv tool install cortexgraph

# 安装 mcporter
npm install -g mcporter

# 配置 CortexGraph
mcporter config add cortexgraph --command "$(which cortexgraph)"

使用

同步 MEMORY.md
./scripts/sync-memory.sh
同步每日日志
# 今天
./scripts/sync-daily.sh

# 指定日期
./scripts/sync-daily.sh 2026-02-18
晋升高价值记忆
./scripts/promote-to-memory-md.sh

CortexGraph 工具

# 保存记忆
mcporter call cortexgraph.save_memory content="..." tags='["tag1"]'

# 搜索记忆
mcporter call cortexgraph.search_memory query="关键词"

# 强化记忆
mcporter call cortexgraph.touch_memory memory_id="UUID"

# 查看图谱
mcporter call cortexgraph.read_graph

架构

┌─────────────┐
│  MEMORY.md  │ ← 长期记忆(手动维护)
└──────┬──────┘
       │ sync
       ↓
┌─────────────┐
│ CortexGraph │ ← 智能层(自动衰减)
└──────┬──────┘
       │ sync
       ↓
┌─────────────┐
│  daily.log  │ ← 每日日志(自动导入)
└─────────────┘

配置

编辑 ~/.config/cortexgraph/.env:

CORTEXGRAPH_STORAGE_PATH=~/.config/cortexgraph/jsonl
CORTEXGRAPH_DECAY_MODEL=power_law
CORTEXGRAPH_PL_HALFLIFE_DAYS=3.0
CORTEXGRAPH_FORGET_THRESHOLD=0.05
CORTEXGRAPH_PROMOTE_THRESHOLD=0.65

许可证

MIT

Extracted content

SKILL.md
# 记忆同步系统

自动同步 OpenClaw 记忆系统与 CortexGraph(带遗忘曲线)。

## 架构

```
MEMORY.md (长期记忆)
     ↕
CortexGraph (智能层)
     ↕
memory/YYYY-MM-DD.md (每日日志)
```

## 同步脚本

### 1. 导入 MEMORY.md 到 CortexGraph

```bash
# 运行同步
./scripts/sync-memory.sh
```

### 2. 导入每日日志

```bash
# 同步今天的日志
./scripts/sync-daily.sh

# 同步指定日期
./scripts/sync-daily.sh 2026-02-18
```

### 3. 晋升高价值记忆

```bash
# 查看晋升候选
mcporter call cortexgraph.promote_memory auto_detect=true dry_run=true

# 执行晋升
mcporter call cortexgraph.promote_memory auto_detect=true
```

## CortexGraph 工具

### 核心操作

```bash
# 保存记忆
mcporter call cortexgraph.save_memory content="..." tags='["tag1"]' entities='["Entity1"]'

# 搜索记忆
mcporter call cortexgraph.search_memory query="关键词" top_k=5

# 强化记忆(减缓衰减)
mcporter call cortexgraph.touch_memory memory_id="UUID" boost_strength=true

# 查看知识图谱
mcporter call cortexgraph.read_graph limit=10
```

### 智能分析

```bash
# 分析是否值得记住
mcporter call cortexgraph.analyze_message message="用户说的话"

# 分析是否需要搜索
mcporter call cortexgraph.analyze_for_recall message="用户说的话"

# 自动回忆
mcporter call cortexgraph.auto_recall_process_message message="用户说的话"
```

### 维护

```bash
# 垃圾回收(删除低分记忆)
mcporter call cortexgraph.gc dry_run=true

# 合并相似记忆
mcporter call cortexgraph.consolidate_memories auto_detect=true mode=preview

# 生成嵌入向量
mcporter call cortexgraph.backfill_embeddings dry_run=true
```

## 遗忘曲线算法

CortexGraph 使用 Ebbinghaus 遗忘曲线:

```
score = (use_count)^β × e^(-λ × Δt) × strength
```

- **β** = 0.6(使用频率权重)
- **λ** = ln(2) / half_life(衰减常数,默认 3 天)
- **strength** = 1.0-2.0(重要性)

记忆会自然衰减,除非:
- 被引用(touch_memory)
- 被搜索到(auto_recall)
- 晋升到长期记忆(promote_memory)

## 配置

编辑 `~/.config/cortexgraph/.env`:

```env
# 存储路径
CORTEXGRAPH_STORAGE_PATH=~/.config/cortexgraph/jsonl

# 衰减参数
CORT...
README
# Memory Sync CN

记忆同步系统 - 自动同步 OpenClaw 记忆系统与 CortexGraph。

## 功能

- 🔄 **双向同步**: MEMORY.md ↔ CortexGraph
- 🧠 **遗忘曲线**: 基于 Ebbinghaus 的智能记忆管理
- 📊 **自动晋升**: 高价值记忆自动升级到长期存储
- 🔍 **智能检索**: 语义搜索 + 衰减评分

## 安装

```bash
# 安装 CortexGraph
uv tool install cortexgraph

# 安装 mcporter
npm install -g mcporter

# 配置 CortexGraph
mcporter config add cortexgraph --command "$(which cortexgraph)"
```

## 使用

### 同步 MEMORY.md

```bash
./scripts/sync-memory.sh
```

### 同步每日日志

```bash
# 今天
./scripts/sync-daily.sh

# 指定日期
./scripts/sync-daily.sh 2026-02-18
```

### 晋升高价值记忆

```bash
./scripts/promote-to-memory-md.sh
```

## CortexGraph 工具

```bash
# 保存记忆
mcporter call cortexgraph.save_memory content="..." tags='["tag1"]'

# 搜索记忆
mcporter call cortexgraph.search_memory query="关键词"

# 强化记忆
mcporter call cortexgraph.touch_memory memory_id="UUID"

# 查看图谱
mcporter call cortexgraph.read_graph
```

## 架构

```
┌─────────────┐
│  MEMORY.md  │ ← 长期记忆(手动维护)
└──────┬──────┘
       │ sync
       ↓
┌─────────────┐
│ CortexGraph │ ← 智能层(自动衰减)
└──────┬──────┘
       │ sync
       ↓
┌─────────────┐
│  daily.log  │ ← 每日日志(自动导入)
└─────────────┘
```

## 配置

编辑 `~/.config/cortexgraph/.env`:

```env
CORTEXGRAPH_STORAGE_PATH=~/.config/cortexgraph/jsonl
CORTEXGRAPH_DECAY_MODEL=power_law
CORTEXGRAPH_PL_HALFLIFE_DAYS=3.0
CORTEXGRAPH_FORGET_THRESHOLD=0.05
CORTEXGRAPH_PROMOTE_THRESHOLD=0.65
```

## 许可证

MIT

Related skills

OpenClaw

ai-maestro

23blocks-os

AI Agent Orchestrator with Skills System - Give AI Agents superpowers: memory search, code graph queries, agent-to-agent messaging. Manage Claude, Codex or any AI Agent from one dashboard. Move Agents between c...

OpenClaw

registry-broker-skills

hashgraph-online

AI agent skills for the Universal Registry - search, chat, and register 72,000+ agents across 14+ protocols. Works with Claude, Codex, Cursor, OpenClaw, and any AI assistant.

OpenClaw

skills-manager

rito-w

A cross-platform skills manager for AI IDEs. Search marketplace, download locally, and install to Claude, Cursor, Windsurf, and more with one click.