← 返回 Skills 市场
dobrinalexandru

Dual memory

作者 Alex Dobrin · GitHub ↗ · v1.0.11 · MIT-0
cross-platform ✓ 安全检测通过
180
总下载
0
收藏
0
当前安装
10
版本数
在 OpenClaw 中安装
/install dual-memory
功能描述
Run memory-core AND external memory providers (like SuperMemory) together in one slot — with full dreaming support. OpenClaw only allows one memory plugin, s...
使用说明 (SKILL.md)

Dual Memory Plugin

Keep memory-core + dreaming AND add external memory providers like SuperMemory — all in one memory slot. No more choosing between local and cloud.

The Problem

OpenClaw only allows one plugin per kind: "memory". You have to choose between:

  • memory-core — local MEMORY.md, QMD vector search, dreaming (Light/REM/Deep consolidation)
  • External providers like SuperMemory — cloud persistence across sessions, devices, and agents

This plugin eliminates the choice. You get memory-core + dreaming + any external provider in a single slot. The proxy pattern means you never lose native dreaming when adding cloud memory.

How It Works

The plugin legitimately holds the memory slot and delegates to both backends via a proxy pattern:

dual-memory (holds memory slot)
├── Proxy API → memory-core (local)
│   ├── QMD vector search
│   ├── MEMORY.md management
│   └── Dreaming consolidation
└── Proxy API → supermemory (cloud)
    ├── Cloud vector search
    ├── Cross-session persistence
    └── Profile/entity context
  • Searches query both backends, results are merged and deduplicated
  • Writes go to memory-core (local MEMORY.md). SuperMemory captures conversation content automatically via auto-capture hook.
  • Dreaming runs through memory-core's native consolidation cycle
  • Recall injects context from both local (QMD) and cloud (SuperMemory) sources

Install

Via ClawdHub

npx clawhub@latest install dual-memory

Manual

# Clone to extensions
cp -r dual-memory ~/.openclaw/extensions/
cd ~/.openclaw/extensions/dual-memory
npm install

Dependency

This plugin requires openclaw-supermemory as a sibling extension:

~/.openclaw/extensions/
├── dual-memory/   ← this plugin
└── openclaw-supermemory/        ← required sibling

Install supermemory from ClawdHub: npx clawhub@latest install supermemory

Configuration

Add to your OpenClaw config. Disable the individual plugins — the composite replaces them:

plugins:
  entries:
    # Disable individual plugins (composite handles both)
    memory-core:
      enabled: false
    openclaw-supermemory:
      enabled: false
    # Enable composite
    dual-memory:
      enabled: true
      config:
        supermemory:
          apiKey: "${SUPERMEMORY_OPENCLAW_API_KEY}"
          containerTag: "my_agent"
          autoRecall: true
          autoCapture: true
          maxRecallResults: 5
          captureMode: "everything"
        memoryCore:
          dreaming:
            enabled: true
            frequency: "30 2 * * *"

SuperMemory Options

Key Type Default Description
apiKey string env var SuperMemory API key (supports ${ENV_VAR})
containerTag string hostname Isolates memories per agent/machine
autoRecall boolean true Auto-inject relevant memories
autoCapture boolean true Auto-store important info
maxRecallResults number 5 Max memories per conversation (1-20)
captureMode string everything Capture mode
profileFrequency number Profile refresh interval (1-500)
debug boolean false Verbose logging
enableCustomContainerTags boolean false Allow multiple containers
customContainers array Custom container definitions

Memory Core Options

Key Type Default Description
dreaming.enabled boolean true Enable dreaming cycles
dreaming.frequency string cron expr Dreaming schedule

What You Get

Local (memory-core)

  • QMD search — fast local vector search over MEMORY.md and workspace files
  • MEMORY.md management — automatic memory file updates
  • Dreaming — Light (recent recall), REM (consolidation), Deep (pruning) phases
  • Flush plans — controlled memory writes

Cloud (SuperMemory)

  • Cross-session persistence — memories survive restarts, compaction, model switches
  • Cross-device sync — same memories on Mac Mini, Mac Studio, mobile
  • Entity context — user profiles and preferences injected automatically
  • Custom containers — isolate memories per agent or project

Composite Benefits

  • Merged search — queries both backends, deduplicates results by relevance score
  • Dual recall — local QMD results + cloud SuperMemory context injected together. Writes go to memory-core (local MEMORY.md); SuperMemory captures conversation content automatically via its auto-capture hook.
  • Dreaming — runs natively through memory-core's consolidation cycle (Light/REM/Deep phases)
  • Single slot — clean config, no hacks

Architecture

Proxy Pattern

The plugin creates proxy OpenClawPluginApi objects for each sub-plugin. These proxies intercept:

  • registerMemoryRuntime — captures the runtime from each backend
  • registerMemoryPromptSection — captures prompt injection from each
  • registerMemoryFlushPlan — captures flush plans (memory-core only)

After both sub-plugins register, the composite builds unified versions and registers them on the real API.

Files

File Purpose
index.ts Entry point — loads backends, registers composite
composite-runtime.ts Merged memory runtime
composite-prompt.ts Merged prompt section
composite-search-manager.ts Search merging and deduplication
proxy-api.ts Proxy API factory
config.ts Config parsing
openclaw.plugin.json Plugin manifest

Requirements

  • OpenClaw >= 2026.1.29
  • Node.js 20+
  • openclaw-supermemory extension (sibling directory)
  • SuperMemory API key (supermemory.com)

Security Notes

  • No hardcoded tokens or keys — API keys are read from config or environment variables only
  • Network calls via SuperMemory client — the plugin instantiates a SupermemoryClient for cloud search. This makes HTTPS calls to SuperMemory's API (api.supermemory.com) to search and store memories. The client comes from the openclaw-supermemory sibling extension. No other network calls are made.
  • Required env var: SUPERMEMORY_OPENCLAW_API_KEY — needed for cloud memory. Get one at supermemory.com. No other env vars are read.
  • No file system writes — memory writes are delegated to memory-core's native flush plan
  • No exec/spawn — no shell commands or child processes
  • Relative sibling imports — this plugin imports from ../openclaw-supermemory/ because OpenClaw's extension loader requires plugins to be co-located. This is the standard pattern for composite plugins that wrap other extensions

Troubleshooting

"both backends failed to load" — Check that openclaw-supermemory exists as a sibling extension and npm install was run in both directories.

"memory-core not available" — The plugin tries to resolve memory-core from OpenClaw's built-in extensions. Make sure your OpenClaw version is >= 2026.1.29.

No cloud memories appearing — Verify SUPERMEMORY_OPENCLAW_API_KEY is set in your environment or .env file.

Dreaming not running — Check that memoryCore.dreaming.enabled is true and you have a cron job configured for the dreaming schedule.

License

MIT

安全使用建议
This plugin appears to do what it says: it combines local memory-core (with dreaming) and a SuperMemory cloud backend via proxying. Before installing: (1) Review and trust the SuperMemory provider — the plugin will send captured conversation content to that service if you supply an API key and enable autoCapture. (2) Consider setting autoCapture to a restrictive mode or turning it off for sensitive usage. (3) Use an API key with limited scope where possible, and verify the sibling openclaw-supermemory extension code (the SupermemoryClient implementation) because the cloud client lives there. (4) Expect to disable the standalone memory-core and openclaw-supermemory plugins per the README; test in a non-sensitive environment first. If you want stronger assurance, provide the openclaw-supermemory client code for review (network calls and upload behavior are implemented there).
功能分析
Type: OpenClaw Skill Name: dual-memory Version: 1.0.11 The dual-memory plugin is a composite memory provider designed to run local (memory-core) and cloud (SuperMemory) backends simultaneously. It uses a proxy pattern in proxy-api.ts and index.ts to intercept and merge registrations from both sub-plugins, allowing them to share a single memory slot. While it handles sensitive data like the SUPERMEMORY_OPENCLAW_API_KEY and communicates with api.supermemory.com, these actions are transparently documented and essential for its stated purpose of cloud memory persistence.
能力评估
Purpose & Capability
The name/description (dual local+cloud memory) matches the code and manifest: it proxies memory-core and a SuperMemory backend, merges search results, and writes to both backends. Required/declared credential (SUPERMEMORY_OPENCLAW_API_KEY) is appropriate for the stated cloud integration.
Instruction Scope
SKILL.md and the code instruct installing a sibling openclaw-supermemory extension and disabling the individual plugins so the composite holds the memory slot — this is expected. However, default configuration (autoCapture: 'everything') means conversation content may be sent to the cloud provider; that's a privacy/operation impact rather than a coherence issue.
Install Mechanism
No remote download/install URL is used; this is an instruction-only skill that ships source files and a package.json and expects npm install. No extract-from-URL or shorteners present. The plugin expects a sibling extension directory (openclaw-supermemory) which is reasonable but requires manual installation or ClawdHub.
Credentials
Only SUPERMEMORY_OPENCLAW_API_KEY is used as the primary credential (and openclaw.plugin.json marks it optional). That is proportionate for a cloud memory integration. Users should note that the plugin's auto-capture/auto-recall features will send conversation content to the cloud if an API key is provided.
Persistence & Privilege
always is false; the plugin does not seek forced-permanent inclusion. It operates by registering a composite memory capability and does not modify other plugins' code or system-wide agent settings beyond normal plugin registration. The requirement to disable the original plugins is a config change, not an automatic privilege escalation.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install dual-memory
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /dual-memory 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.11
No file or documentation changes detected for this release. - No changes since previous version (1.0.7). - Version number updated to 1.0.11, but implementation and documentation remain the same.
v1.0.10
- Updated write behavior: Writes now go exclusively to memory-core (local MEMORY.md); SuperMemory captures content automatically via its auto-capture hook. - Clarified dreaming: Dreaming runs strictly through memory-core's consolidation (Light/REM/Deep) schedule. - Improved recall description: Both local QMD and cloud SuperMemory results are injected together on recall. - Updated merged search: Searches query both backends and deduplicate results by relevance score. - Expanded composite benefits and revised automatic SuperMemory capture details for accuracy.
v1.0.9
- Fix: remove mistaken "requires.env" OpenClaw metadata key (plugin no longer declares SUPERMEMORY_OPENCLAW_API_KEY as required, just as primary) - No other changes; all features and config remain the same
v1.0.8
- Added skill metadata specifying required environment variables (SUPERMEMORY_OPENCLAW_API_KEY) in SKILL.md. - Updated version to 1.0.7. - No code changes; documentation/metadata update only.
v1.0.7
No changes detected in this version. - Version updated to 1.0.7, but no file or documentation changes were found. - Functionality, configuration, and documentation remain unchanged from previous release.
v1.0.6
- Updated security notes with clarification: network calls to SuperMemory are now explicitly documented, and use of the `SupermemoryClient` from the sibling extension is described. - Highlighted that `SUPERMEMORY_OPENCLAW_API_KEY` is a required environment variable for cloud memory. - No changes to code; documentation update only.
v1.0.4
- Removed the package-lock.json file to simplify or streamline the project repository. - No functional or documentation changes in the skill itself.
v1.0.2
- Plugin renamed from "composite-memory" to "dual-memory" throughout documentation. - All sample installation and configuration instructions updated to reflect new "dual-memory" name. - No code changes detected; update is documentation and naming only. - Functionality and features remain the same as previous version.
v1.0.1
- Renamed the skill from "openclaw-composite-memory" to "composite-memory" for simplicity. - No functional changes or file modifications were made in this version.
v1.0.0
openclaw-composite-memory 1.0.0 — Initial release - Enables simultaneous use of memory-core (with full dreaming support) and external providers like SuperMemory in a single memory slot - Merges search results across both local (MEMORY.md, QMD) and cloud backends; deduplicates and recalls from both - Writes are sent to both local and cloud memory for reliability - Maintains native dreaming cycles from memory-core while ensuring cloud persistence and cross-device sync - Single-slot plugin removes the need to choose between local and cloud memory, simplifying configuration
元数据
Slug dual-memory
版本 1.0.11
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 10
常见问题

Dual memory 是什么?

Run memory-core AND external memory providers (like SuperMemory) together in one slot — with full dreaming support. OpenClaw only allows one memory plugin, s... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 180 次。

如何安装 Dual memory?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install dual-memory」即可一键安装,无需额外配置。

Dual memory 是免费的吗?

是的,Dual memory 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Dual memory 支持哪些平台?

Dual memory 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Dual memory?

由 Alex Dobrin(@dobrinalexandru)开发并维护,当前版本 v1.0.11。

💬 留言讨论