← 返回
AI智能

Memory Consolidate

Persistent memory system for OpenClaw agents: reads session logs, extracts facts/decisions/solutions, manages temperature-based lifecycle, and generates MEMO...
OpenClaw智能体持久记忆系统:读取会话日志,提取事实/决策/方案,管理温度生命周期,生成MEMO。
blusehuang1121
AI智能 clawhub v1.0.0 1 版本 100000 Key: 无需
★ 0
Stars
📥 655
下载
💾 17
安装
1
版本
#latest

概述

memory-consolidate

Scripts live in the directory containing this SKILL.md. No copying needed.

OPENCLAW_WORKSPACE (default: ~/.openclaw/workspace) tells scripts where to read/write.

Install

Create required directories:

mkdir -p $OPENCLAW_WORKSPACE/memory/structured/{archive,candidates,semantic}

Patch OpenClaw config to inject snapshot into agent sessions:

gateway config.patch path="hooks.internal" raw='{"enabled":true,"entries":{"bootstrap-extra-files":{"enabled":true,"paths":["MEMORY_SNAPSHOT.md"]}}}'

Add daily cron (read timezone from USER.md, default UTC):

cron add job={
  "name": "Memory Consolidation (daily)",
  "schedule": {"kind": "cron", "expr": "0 3 * * *", "tz": "<tz_from_USER.md>"},
  "payload": {
    "kind": "agentTurn",
    "message": "bash $OPENCLAW_WORKSPACE/scripts/memory_consolidate_report.sh",
    "thinking": "off",
    "timeoutSeconds": 300
  },
  "sessionTarget": "isolated",
  "delivery": {"mode": "announce"}
}

Run initial consolidation and verify:

bash $OPENCLAW_WORKSPACE/scripts/memory_consolidate_report.sh

Semantic Pipeline (LLM-powered)

memory_consolidate_report.sh runs the full pipeline including a semantic consolidation step powered by claude-haiku-4-5-20251001 via the tui provider. This is auto-configured from openclaw.json — no manual API key setup needed. The LLM step clusters related memories, deduplicates, and improves signal quality in MEMORY_SNAPSHOT.md.

Identity

Auto-detected from IDENTITY.md (assistant name) and USER.md (owner name, timezone, language). No config needed if these files exist with - Key: Value format.

Config

Edit config.yaml in the directory containing this SKILL.md:

  • ingest.agent_ids — which agents to scan (default: "main", or ["main", "worker"])
  • ingest.session_hours — lookback window (default: 24)
  • tag_rules — project keyword → tag mapping
  • temperature.age_lambda — decay speed (default: 0.07)

Health check

python3 $OPENCLAW_WORKSPACE/scripts/memory_consolidate_observe.py

🟢 healthy / 🟡 watch / 🔴 needs tuning

Troubleshooting

SymptomFix
--------------
Snapshot shows "Assistant"/"User"Ensure IDENTITY.md/USER.md have Name: format
LLM semantic step failsCheck tui provider config in openclaw.json has baseUrl and apiKey
Semantic pipeline degradedRun memory_candidate_extract.py, check import errors
SNR too lowIncrease temperature.age_lambda in config.yaml
No cold items after 2 weeksIncrease age_lambda (0.07 default should work)
Memory not updatingVerify OPENCLAW_WORKSPACE env var is set and cron job is active

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-03-19 16:05 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

ai-intelligence

Nano Banana Pro

steipete
使用 Nano Banana Pro (Gemini 3 Pro Image) 生成或编辑图像。支持文生图、图生图及 1K/2K/4K 分辨率,适用于图像创建、修改及编辑请求,使用 --input-image 指定输入图像。
★ 417 📥 115,204
ai-intelligence

Self-Improving + Proactive Agent

ivangdavila
自我反思+自我批评+自我学习+自组织记忆。智能体评估自身工作、发现错误并持续改进。
★ 1,358 📥 318,308
ai-intelligence

ontology

oswalpalash
类型化知识图谱,用于结构化智能体记忆与可组合技能。支持创建/查询实体(人员、项目、任务、事件、文档)及关联...
★ 712 📥 243,801