Skip to content

feat: declare kind: memory for OpenClaw memory slot compatibility#2

Open
rrriiiccckkk wants to merge 1 commit into
Tencent:mainfrom
rrriiiccckkk:add-memory-kind
Open

feat: declare kind: memory for OpenClaw memory slot compatibility#2
rrriiiccckkk wants to merge 1 commit into
Tencent:mainfrom
rrriiiccckkk:add-memory-kind

Conversation

@rrriiiccckkk
Copy link
Copy Markdown

Summary

Add "kind": "memory" to openclaw.plugin.json so the plugin can properly occupy OpenClaw's memory slot.

Problem

OpenClaw uses plugins.slots.memory to select which plugin owns the memory slot. The slot resolution logic in resolveMemorySlotDecisionShared checks:

if (!hasKind(params.kind, "memory")) return { enabled: true };

Without kind: "memory" in the manifest, the plugin is silently skipped — even if the user explicitly sets plugins.slots.memory = "memory-tencentdb". This means the memory slot ends up empty (no auto-recall, no Dreaming, etc.).

Fix

One-line addition to openclaw.plugin.json:

{
  "id": "memory-tencentdb",
  "kind": "memory",  // ← added
  ...
}

What this enables

Users can now replace the default memory stack with a single config:

{
  "plugins": {
    "slots": {
      "memory": "memory-tencentdb",
      "contextEngine": "memory-tencentdb"
    }
  }
}

This gives them the full TencentDB Agent Memory pipeline (L0→L3 + Context Offload) as the sole memory provider, without needing Hindsight/memory-core/active-memory running in parallel.

Compatibility

  • kind is an optional field in the OpenClaw manifest spec
  • Existing setups without plugins.slots.memory are unaffected (the default slot assignment still applies)
  • No runtime code changes — manifest-only

Add `kind: "memory"` to the plugin manifest so that OpenClaw's
`plugins.slots.memory` configuration can route to this plugin.

Without this field, OpenClaw's slot resolution logic
(`resolveMemorySlotDecisionShared`) skips the plugin entirely:
```
if (!hasKind(params.kind, 'memory')) return { enabled: true };
```

This one-line manifest change enables users to set:
```json
{ "plugins": { "slots": { "memory": "memory-tencentdb" } } }
```

and have the plugin properly occupy the memory slot, replacing
the default memory-core or hindsight-openclaw.
@Maxwell-Code07
Copy link
Copy Markdown
Collaborator

Hi @rrriiiccckkk, thanks for the investigation and the detailed analysis of the resolveMemorySlotDecisionShared code path! 👍

After internal discussion, we've decided to hold off on adding kind: "memory" to the manifest for now. Our current design intentionally does not claim the memory slot — the plugin registers its capabilities through hooks (allowConversationAccess) rather than occupying the plugins.slots.memory slot. This is a deliberate architectural choice to avoid conflicts with OpenClaw's built-in memory subsystem (memory-core).

That said, we understand the use case you're describing — if a user explicitly sets plugins.slots.memory = "memory-tencentdb", they'd expect it to work. We'll evaluate whether to support this in a future version as an opt-in mode.

We'll keep this PR open for reference. Thank you for digging into the internals and raising this — it's a valuable discussion! 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants