← 返回
未分类 中文

Scoped Memory Manager

Installs and manages Scope-Based Memory and Automated REM Sleep (memory consolidation) for OpenClaw agents. Use this skill when an agent's MEMORY.md is bloat...
Installs and manages Scope-Based Memory and Automated REM Sleep (memory consolidation) for OpenClaw agents. Use this skill when an agent's MEMORY.md is bloat...
john-20-ux john-20-ux 来源
未分类 clawhub v1.0.0 1 版本 100000 Key: 无需
★ 0
Stars
📥 497
下载
💾 0
安装
1
版本
#latest

概述

Scoped Memory Manager

This skill upgrades an OpenClaw agent's memory architecture from a single, bloated MEMORY.md to a Scope-Based Memory system with automated REM Sleep (memory consolidation and decay).

Architecture

  1. Global Router (MEMORY.md): Kept extremely lean. Only contains core identity, active focus, and an index of domain-specific memory files.
  2. Domain-Specific Memory (memory/topics/*.md): Stores hyper-specific rules, constraints, and knowledge (e.g., shopify.md, rails.md). Retrieved dynamically via memory_search and memory_get only when relevant.
  3. Automated REM Sleep: A scheduled background job (cron) that wakes up an isolated agent to compress daily logs, extract new patterns, prune outdated "trauma" constraints, and file the distilled knowledge into the correct topic files.

Installation & Setup

When the user asks to install or configure scoped memory / REM sleep, follow these steps:

1. Scaffold the Directory Structure

Run the setup script to create the necessary directories:

sh scripts/setup.sh

2. Schedule the REM Sleep Cron Job

Use the cron tool to schedule the weekly consolidation job.

Call the cron tool with action: "add" and the following payload:

  • name: "Memory REM Sleep (Consolidation)"
  • schedule: { "kind": "cron", "expr": "0 3 0" } (Sundays at 3:00 AM)
  • sessionTarget: "isolated"
  • delivery: { "mode": "announce" }
  • payload:

```json

{

"kind": "agentTurn",

"message": "It is time for your weekly REM sleep cycle. Please read the current MEMORY.md and the daily log files (memory/YYYY-MM-DD.md) from the past 7 days. Your task is to perform memory consolidation: \n1. Extract new patterns and important context from the logs.\n2. Review MEMORY.md and prune obsolete rules or constraints.\n3. Move domain-specific knowledge into the appropriate memory/topics/*.md files.\n4. Rewrite MEMORY.md to be a concise global router.\n5. Summarize what was added, moved, and forgotten."

}

```

3. Migrate Existing Memory

If the agent already has a bloated MEMORY.md, proactively offer to read it and partition the content into memory/topics/*.md files right now.

Usage Guidelines

  • Remind users that MEMORY.md is NOT for storing everything.
  • When learning a new specific framework, proactively create a new topic file in memory/topics/ instead of polluting the global MEMORY.md.

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-03-30 11:19 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

ai-agent

Find Skills

root
帮助用户发现和安装智能体技能,当用户询问如「如何做X」、「找X的技能」、「有能做...的吗」等问题时
★ 1,518 📥 574,680
ai-agent

Agent Browser

rez0
用于 AI 代理的浏览器自动化 CLI。当用户需要与网站交互(包括浏览页面、填写表单、点击按钮、截图等)时使用。
★ 865 📥 344,833
ai-agent

self-improving agent

pskoett
记录自身发现以实现自我改进的技能
★ 4,164 📥 936,115