Search

PythonReactSEOPDF
OpenClaw

memory-sync-enhanced

增强版记忆系统 - Ebbinghaus 遗忘曲线 + Hebbian 共现图

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-enhanced

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

增强版记忆系统

结合 Ebbinghaus 遗忘曲线 + Hebbian 共现图 的双层记忆架构。

架构

┌─────────────────────────────────────────────────────────┐
│                    记忆检索                              │
│  semantic_search() + co_occurrence_boost() + decay()    │
└─────────────────────────────────────────────────────────┘
                           │
           ┌───────────────┴───────────────┐
           ▼                               ▼
┌─────────────────────┐       ┌─────────────────────┐
│   Layer 1: 向量库   │       │  Layer 2: 共现图    │
│   (CortexGraph)     │       │  (Hebbian)          │
│                     │       │                     │
│ • 语义相似度        │◄─────►│ • 操作关联          │
│ • Ebbinghaus 衰减   │       │ • 边权重衰减        │
│ • use_count 追踪    │       │ • 跨域桥接          │
└─────────────────────┘       └─────────────────────┘

核心算法

Layer 1: Ebbinghaus 遗忘曲线
score = (use_count)^β × e^(-λ × Δt) × strength
  • β = 0.6(使用频率权重)
  • λ = ln(2) / half_life(默认 3 天)
  • strength = 1.0-2.0(重要性)
Layer 2: Hebbian 共现图
effective_weight = weight × 2^(-age_days / 30)
  • 每次记忆 A 和 B 同时被检索 → 边(A,B) 权重 +1
  • 边权重 30 天半衰期
  • 跨域桥接:音乐记忆 ↔ 编码记忆(因为同时发生)

检索流程

def retrieve_memory(query, top_k=10):
    # 1. 语义搜索
    semantic_results = cortexgraph.search(query, top_k * 2)
    
    # 2. 共现增强
    for mem in semantic_results:
        co_occur_boost = get_co_occurrence_score(mem.id, recent_context)
        mem.boosted_score = mem.semantic_score + co_occur_boost * 0.3
    
    # 3. 遗忘曲线过滤
    for mem in semantic_results:
        mem.final_score = mem.boosted_score * mem.decay_factor
    
    # 4. 返回 Top K
    return sorted(semantic_results, key=lambda x: x.final_score)[:top_k]

记忆类型

STM (短期记忆)
  • JSONL 格式
  • 快速读写
  • 高衰减率(3天 half-life)
  • 存储日常日志
LTM (长期记忆)
  • Obs...

Source information

Source
github
Repository
openclaw/skills
Path
skills/guohongbin-git/memory-sync-enhanced
Version
—
Commit
85945715d10622d3169497fe7207c5aa990574d4
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 Enhanced

增强版记忆系统 - Ebbinghaus 遗忘曲线 + Hebbian 共现图。

架构

Layer 1: CortexGraph (语义搜索 + 遗忘曲线)
Layer 2: Co-occurrence Graph (操作关联)

核心概念

  1. Ebbinghaus 遗忘曲线 - 管理记忆生命周期
  2. Hebbian 共现图 - 记录记忆之间的关联
  3. 双层检索 - 语义相似 + 操作相关

使用

# 同步记忆
./scripts/sync-memory.sh

# 搜索记忆(增强版)
python3 scripts/co_occurrence_tracker.py

参考

  • @Zeph 的 Hebbian 共现图帖子 (The Colony)
  • CortexGraph 遗忘曲线

许可证

MIT

Extracted content

SKILL.md
# 增强版记忆系统

结合 **Ebbinghaus 遗忘曲线** + **Hebbian 共现图** 的双层记忆架构。

## 架构

```
┌─────────────────────────────────────────────────────────┐
│                    记忆检索                              │
│  semantic_search() + co_occurrence_boost() + decay()    │
└─────────────────────────────────────────────────────────┘
                           │
           ┌───────────────┴───────────────┐
           ▼                               ▼
┌─────────────────────┐       ┌─────────────────────┐
│   Layer 1: 向量库   │       │  Layer 2: 共现图    │
│   (CortexGraph)     │       │  (Hebbian)          │
│                     │       │                     │
│ • 语义相似度        │◄─────►│ • 操作关联          │
│ • Ebbinghaus 衰减   │       │ • 边权重衰减        │
│ • use_count 追踪    │       │ • 跨域桥接          │
└─────────────────────┘       └─────────────────────┘
```

## 核心算法

### Layer 1: Ebbinghaus 遗忘曲线

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

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

### Layer 2: Hebbian 共现图

```
effective_weight = weight × 2^(-age_days / 30)
```

- 每次记忆 A 和 B 同时被检索 → 边(A,B) 权重 +1
- 边权重 30 天半衰期
- **跨域桥接**:音乐记忆 ↔ 编码记忆(因为同时发生)

## 检索流程

```python
def retrieve_memory(query, top_k=10):
    # 1. 语义搜索
    semantic_results = cortexgraph.search(query, top_k * 2)
    
    # 2. 共现增强
    for mem in semantic_results:
        co_occur_boost = get_co_occurrence_score(mem.id, recent_context)
        mem.boosted_score = mem.semantic_score + co_occur_boost * 0.3
    
    # 3. 遗忘曲线过滤
    for mem in semantic_results:
        mem.final_score = mem.boosted_score * mem.decay_factor
    
    # 4. 返回 Top K
    return sorted(semantic_results, key=lambda x: x.final_score)[:top_k]
```

## 记忆类型

### STM (短期记忆)
- JSONL 格式
- 快速读写
- 高衰减率(3天 half-life)
- 存储日常日志

### LTM (长期记忆)
- Obs...
README
# Memory Sync Enhanced

增强版记忆系统 - Ebbinghaus 遗忘曲线 + Hebbian 共现图。

## 架构

```
Layer 1: CortexGraph (语义搜索 + 遗忘曲线)
Layer 2: Co-occurrence Graph (操作关联)
```

## 核心概念

1. **Ebbinghaus 遗忘曲线** - 管理记忆生命周期
2. **Hebbian 共现图** - 记录记忆之间的关联
3. **双层检索** - 语义相似 + 操作相关

## 使用

```bash
# 同步记忆
./scripts/sync-memory.sh

# 搜索记忆(增强版)
python3 scripts/co_occurrence_tracker.py
```

## 参考

- @Zeph 的 Hebbian 共现图帖子 (The Colony)
- CortexGraph 遗忘曲线

## 许可证

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.