当前位置: 首页 > Skill >

MemCore 记忆核心

MemCore 记忆核心

MemCore 记忆核心

v2.1.0 (WAL+VFM enhanced). Five-tier adaptive memory system with WAL indexing, Working Buffer search, and VFM scoring. 为 OpenClaw 打造的五层自适应记忆检索系统,四层自进化记忆模型(L1...

2.1.0 2026.11.17 295
获取Skill文件查看使用说明
作 者:苏川 许可证: 更新时间:2026.11.17
本文目录展开

MemCore 记忆核心

为 OpenClaw 打造的五层自适应记忆系统,自进化。替代全量 MEMORY.md 注入 — 节省 92% token。

Five-tier adaptive memory system with self-evolution for OpenClaw. Drop-in replacement for full MEMORY.md injection — 92% token savings.

v2.1.0 (proactive-agent enhanced) ⭐

  • WAL Protocol: cmd_index now parses SESSION-STATE.md as high-priority traces
  • Working Buffer: SESSION-STATE.md + working-buffer.md searchable in World Model tier
  • VFM Scoring: 4-dimension trace evaluation (frequency, failure reduction, user burden, self cost)
  • New command: python3 scripts/memcore/cli.py vfm — VFM score analysis

Quick Commands

# Startup: generate brief (≤500 tokens, replaces full MEMORY.md)
python3 scripts/memcore/cli.py brief

# Search: 5-tier adaptive fallback
python3 scripts/memcore/cli.py search "<query>" -n 5

# Daily maintenance (index new logs → induce patterns → decay → refresh brief)
python3 scripts/memcore/cli.py run-all

# VFM score analysis
python3 scripts/memcore/cli.py vfm

# Stats overview
python3 scripts/memcore/cli.py stats

# Feedback: log whether retrieved memory was useful
python3 scripts/memcore/cli.py feedback-log <trace_id> used|skipped|good|bad

Startup Integration

On each session start, replace full MEMORY.md loading with:

1. Read SOUL.md → USER.md → MEMORY_BRIEF.md (auto-generated) → .anatomy.md → yesterday+today memory
2. MEMORY.md loaded on-demand only via: python3 scripts/memcore/cli.py search "<keywords>"

The brief generator picks top 5 active patterns, top 3 recent lessons, and current taskboard items — all under 500 tokens.

散会 Integration

Add step 3 to 散会 flow:

python3 scripts/memcore/cli.py index && 
python3 scripts/memcore/cli.py induce && 
python3 scripts/memcore/cli.py feedback

This auto-indexes today's log, induces new patterns, and decays stale traces.

Health Check Integration

When running daily health checks (09:00), append MemCore diagnostic:

# Get system stats
python3 scripts/memcore/cli.py stats

# If anomalies found, search historical similar faults
python3 scripts/memcore/cli.py search "<anomaly keywords>" -n 3

Safety rule: Report only. Never auto-fix. Let human decide.

Search & Feedback Flow

After every memory_search call, log feedback:

# If the retrieved memory was helpful:
python3 scripts/memcore/cli.py feedback-log <trace_id> used

# If irrelevant:
python3 scripts/memcore/cli.py feedback-log <trace_id> skipped

This trains the retrieval system — high-value traces rise, stale ones decay.

Cron Setup

Two 12-hour maintenance jobs (systemEvent, main session, wakeMode: next-heartbeat):

Time (CST) Cron expression Action
04:00 0 4 * * * index + induce + feedback + brief
16:00 0 16 * * * same

These are SQLite-only, no model calls, near-zero resource cost.

Rollback

cp memcore_backup_<date>/AGENTS.md ~/.openclaw/workspace/
cp memcore_backup_<date>/MEMORY.md ~/.openclaw/workspace/

Original MEMORY.md is never modified. All MemCore data lives in separate SQLite files under ~/.openclaw/.

Detailed Reference

  • Architecture: See references/architecture.md for L1-L4 model, 5-tier retrieval details, file structure, and CLI reference.
  • EXO1 Upgrade: See references/upgrade-guide.md for Syncthing-based deployment to EXO1.

推荐文章

更多
PHP时间戳与日期字符串相互转换方法详解

本文介绍PHP中时间数值(Unix时间戳)与日期字符串之间的相互转换方法。通过strtotime和date函数,实现将当前时间、指定日期转换为时间戳,以及将时间戳格式化为可读的日期时间字符串,并提供相关在线计算工具推荐。

2025.11.30 1,017
PHP跨域配置:怎么安全地允许指定域名而非使用通配符

在 PHP 中安全地允许指定域名跨域,核心是解析请求头中的 Origin ,验证其是否在白名单内,然后动态设置 Access-Control-Allow-Origin 响应头。不要使用通配符 * ,也不要硬编码单一域名。

2025.03.29 1,005
JavaScript中利用replace结合正则实现replaceAll效果

JavaScript原生仅支持replace()进行单次或全局替换,缺乏类似Java的replaceAll()便捷方法。本文总结四种在JS中实现全量替换的方案:使用带g标志的正则、带gm标志的正则、扩展String原型以及split后join。通过对比代码示例,展示各方法的实现细节与适用场景,帮助开发者根据需求选择最优解。

2025.04.29 1,003
PHP日期转时间戳时区偏差怎么解决

在 PHP 中将日期字符串转换为时间戳时,若未显式指定时区,默认使用脚本配置的 date.timezone 或系统时区。当服务器时区与业务逻辑预期(如 UTC )不一致时,会产生偏差。解决核心是确保输入字符串携带明确时区信息,或在转换前统一设置时区上下文。

2026.10.24 1,002
PHP实现基础文件上传:HTML表单与$_FILES处理流程

在 HTML 表单中设置 enctype="multipart/form-data" ,并在 PHP 后端通过 $_FILES 数组接收文件,调用 move_uploaded_file() 将临时文件移动到目标目录即可完成上传。

2026.09.07 1,002
Linux内核提权风险待核实,先查版本与补丁

CVE-2026-78901在摘要中被称为Linux内核ext4本地提权漏洞,CVSS评分7.8,但上游正文暂未核实。本文提供通用只读排查命令,帮运维和开发者核对当前运行内核、发行版补丁及升级生效状态。

2026.12.02 1,001
Skill 文件
  • SKILL.md
    • MemCore 记忆核心
    • v2.1.0 (proactive-agent enhanced) ⭐
    • Quick Commands
    • Startup Integration
    • 散会 Integration
    • Health Check Integration
    • Search & Feedback Flow
    • Cron Setup
    • Rollback
    • Detailed Reference
  • 项目或源文件

相关 Skill

更多
Self-Evolving Five-Layer Memory System Self-Evolving Five-Layer Memory System 自进化五层记忆系统,面向AI智能体。基于WorkBuddy五层记忆v4.1,提供L1至L5分层架构、进化机制等功能。
TalonForge Memory System (EN/AR) TalonForge Memory System (EN/AR) 自动搭建三层记忆系统,含长期 MEMORY.md、日常笔记与夜间事实提取,实现持久 AI 记忆管理。
MemPalace Memory System for OpenClaw MemPalace Memory System for OpenClaw MemPalace记忆系统,面向OpenClaw/XClaw/WorkBuddy。将AI对话归档至本地长期存储并支持语义搜索。指令:/mem-arc(归档),...
OpenClaw Memory Upgrade OpenClaw Memory Upgrade Complete guide to upgrading OpenClaw's memory system for persistent, searchable context across sessions. Implements 6 upgrades including enhanced memory flus...
humanizer-test humanizer-test Persistent memory system for AI agents. Remember facts, learn from experience, and track entities across sessions.