360 Secure SkillHub
360 安全技能中心

Clawhub Memory Engine

该 Skill 说明一个 OpenClaw 记忆引擎插件:通过消息钩子自动捕获对话,提供核心记忆、归档事实、知识图谱、情景回忆和行为反思,并含混合检索、去重、质量整理、备份与仪表盘等 20 个工具。实际运行依赖外部 npm 插件与 setup 脚本。

ytangguo
ytangguo
热度 44.68
最近更新 2026-05-18 11:34:22
分类:知识应用场景:笔记整理 / 摘要总结 / 研究 / 工作流

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add memory-engine-guide
Metadata
name
openclaw-memory-engine
description
MemGPT-style persistent memory with passive auto-capture — your agent remembers everything automatically. 20 tools + 2 hooks. Five-layer architecture: core identity, archival facts with hybrid semantic search, knowledge graph, episodic conversation recall, and behavioral reflection. No manual tool calls needed — hooks capture every message. TRIGGER when: agent needs to recall past conversations, answer factual questions about the user, search memory, manage core identity, generate dashboard, or run quality pass. DO NOT TRIGGER for: in-session context, or tasks unrelated to memory.
tags
["memory","memgpt","hooks","auto-capture","knowledge-graph","episodic","embeddings","semantic-search","persistence"]
requires
{"plugins":["@icex-labs/openclaw-memory-engine"]}

Memory Engine

Your agent remembers everything. Automatically.

What It Does

Two hooks passively capture every conversation. No "let me save that" — memory just happens.

User sends message → hook auto-stores fact + graph triple + embedding
Agent replies      → hook auto-stores reply (deduped)

Plus 20 tools for search, graph traversal, episode recall, reflection, quality management, backup, and dashboard.

Install

openclaw plugins install @icex-labs/openclaw-memory-engine
bash ~/.openclaw/extensions/memory-engine/setup.sh
openclaw gateway restart

Setup handles: interactive core memory, legacy data migration, quality pass, maintenance crons, agent instruction patching. One command.

Architecture

Hooks (passive)    → auto-capture messages into archival
Layer 1: Core      → ~500 tokens identity block
Layer 2: Archival  → unlimited facts, 5-signal hybrid search
Layer 3: Graph     → entity relations, auto-extracted
Layer 4: Episodes  → conversation summaries
Layer 5: Reflection→ behavioral pattern analysis

Search

Five-signal hybrid ranking: keyword (2×) + embedding cosine similarity (5×) + recency + access frequency + importance with forgetting curve.

"Who treats my skin condition?" finds medical records even with zero keyword overlap.

Multi-Agent

Each agent gets isolated memory via ToolFactory pattern. Session key → agent ID → workspace. Zero config.

Self-Healing

  • Missing embeddings → auto-backfill on restart
  • Agent forgets to save → hooks capture passively
  • Duplicates → 60s dedup window + weekly cron
  • Flat importance → quality pass auto-rates

Tools (20) + Hooks (2)

Hooks: message:received (auto-capture user messages), message:sent (auto-capture replies)

Core: core_memory_read, core_memory_replace, core_memory_append

Archival: archival_insert, archival_search, archival_update, archival_delete, archival_stats

Graph: graph_query, graph_add

Episodes: episode_save, episode_recall

Intelligence: memory_reflect, archival_deduplicate, memory_consolidate, memory_quality

Admin: memory_export, memory_import, memory_migrate, memory_dashboard

Links