Skip to content

RFC: multi-slot memory role architecture - #22

Open
kklouzal wants to merge 3 commits into
openclaw:mainfrom
kklouzal:rfc/multi-slot-memory-role-architecture
Open

RFC: multi-slot memory role architecture#22
kklouzal wants to merge 3 commits into
openclaw:mainfrom
kklouzal:rfc/multi-slot-memory-role-architecture

Conversation

@kklouzal

@kklouzal kklouzal commented Jun 20, 2026

Copy link
Copy Markdown

Summary

Adds a draft RFC for the multi-slot memory role architecture implemented in openclaw/openclaw#88504.

This turns OpenClaw memory from one overloaded global selector into a composable role-based memory surface, so recall, compaction, capture, dreaming/consolidation, and user-model memory can be owned by different plugins without fighting over plugins.slots.memory.

The RFC proposes purpose-specific memory role slots:

  • memory.recall
  • memory.compaction
  • memory.capture
  • memory.dreaming
  • memory.userModel

while preserving legacy plugins.slots.memory as deprecated shorthand for memory.recall.

Problem solved

Today, OpenClaw effectively has one memory plugin slot. That makes sense for simple factual recall, but it breaks down as memory becomes a richer runtime subsystem.

A factual recall provider, capture plugin, compaction memory provider, dreaming/consolidation owner, and user-model plugin are different responsibilities. With only one selector, they either compete for ownership, require plugin-specific side channels, or get pushed toward unrelated extension points such as contextEngine.

This RFC gives those responsibilities explicit config/runtime slots while keeping old configs working.

Scope

This RFC is about the public config/API shape and migration contract for memory role composition.

It covers:

  • canonical global memory role slots under plugins.slots
  • legacy plugins.slots.memory compatibility
  • conservative doctor --fix migration behavior
  • per-agent memory role overrides under agents.list[].plugins.slots
  • keeping contextEngine separate and global
  • role-aware runtime/plugin behavior for validation, startup preload, uninstall cleanup, status, doctor output, skills, and hooks

It intentionally does not cover:

  • removing plugins.slots.memory immediately
  • adding per-agent contextEngine semantics
  • introducing object-valued slot/provenance metadata
  • requiring every memory plugin to implement every role
  • settling all future memory-provider composition work

Implementation reference

Implementation PR: openclaw/openclaw#88504

The implementation updates config schema, slot resolution, plugin loading, memory runtime resolution, doctor repair, uninstall/update cleanup, status output, docs, and tests.

The RFC keeps the detailed implementation file list and proof notes inside the RFC body so this PR description can stay reviewable.

Validation / proof

The implementation PR has source and runtime proof notes attached.

Current implementation head referenced by the RFC:

  • c447e22033ca104cb9d5292edf4313bcb74f81cf

Latest local validation at that head:

pnpm tsgo:prod

passed before push.

Earlier exact-head proof referenced by the RFC:

  • 3f1f547042220aee42b3e39b8cb7ecb15cfac993

That proof covered the role-slot contract, per-agent overrides, legacy compatibility, disabled recall slots, doctor migration/repair behavior, role-slot plugin activation/validation, upgrade behavior, and live gateway/source runtime behavior.

Review focus

Feedback requested on:

  • whether these are the right first-class memory roles
  • whether plugins.slots.memory should be legacy shorthand for memory.recall
  • whether per-agent slot overrides should stay limited to memory roles for now
  • whether contextEngine should remain separate/global in this RFC
  • whether scalar plugin-id slot values are sufficient for this phase
  • whether any role names should change before this becomes public config surface

RFC lifecycle notes

  • Status is draft.
  • issue is intentionally blank until acceptance.
  • rfc_pr is set to this PR.
  • A maintainer-discussion thread should be opened per the RFC repo flow if maintainers want to proceed with formal review there.

Memory-plugin interop research: the supporting research document validates this RFC as necessary architecture work, not optional extensibility: OpenClaw's own documentation already describes memory as a composable ecosystem where builtin/QMD recall, Honcho user/session modeling, LanceDB recall/capture, Active Memory orchestration, dreaming/consolidation, and Memory Wiki compilation can coexist, but current origin/main collapses every kind: "memory" provider into one exclusive plugins.slots.memory owner, making those documented combinations impossible or dependent on brittle exceptions. This RFC closes that product/docs/runtime gap by replacing the single memory owner with explicit role slots — memory.recall, memory.capture, memory.compaction, memory.dreaming, and memory.userModel — while preserving legacy memory as a recall shorthand, so the documented memory-plugin interop story becomes actually representable in config and runtime behavior.

@clawsweeper

clawsweeper Bot commented Jun 20, 2026

Copy link
Copy Markdown

Codex review: needs real behavior proof before merge. Reviewed August 15, 2026, 3:58 PM ET / 19:58 UTC.

ClawSweeper review

What this changes

The PR adds a draft RFC and research note proposing separate plugin slots for recall, compaction, capture, dreaming, and user-model memory roles.

Merge readiness

⚠️ Ready for maintainer review - 7 items remain

This draft RFC is not ready to merge: it reuses an allocated RFC namespace, lacks the required recorded maintainer discussion, and needs current implementation provenance before its compatibility contract can be accepted.

Priority: P2
Reviewed head: 63fb092a20f8ddb426c202e4f654ba45ec28f4d2
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The RFC is detailed and scoped, but namespace, lifecycle, and current implementation provenance blockers remain before acceptance.
Proof confidence 🌊 off-meta tidepool Not applicable: This PR changes RFC documentation only; runtime proof belongs with the linked implementation before the RFC is accepted.
Patch quality 🦐 gold shrimp (3/6) 3 actionable review findings remain.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This PR changes RFC documentation only; runtime proof belongs with the linked implementation before the RFC is accepted.
Evidence reviewed 4 items RFC lifecycle policy: The repository lifecycle requires every RFC to have a maintainer-discussion thread before acceptance.
Allocated RFC namespace: Current main already uses RFC 0009 for hosted feeds and has populated supporting material under rfcs/0009/.
Compatibility proposal remains unresolved: The draft proposes public role slots and legacy fallback while retaining open questions about names, migration, and per-agent scope.
Findings 3 actionable findings [P2] Use an unallocated RFC identifier
[P2] Record the required maintainer discussion
[P2] Refresh implementation provenance before acceptance
Security None None.

How this fits together

OpenClaw plugin configuration selects memory providers, which the plugin loader and agent runtime use for recall and related memory work. This RFC would change that contract from one shared memory selector to several role-specific selectors.

flowchart LR
  A[Plugin configuration] --> B[Memory role selection]
  B --> C[Legacy memory mapping]
  B --> D[Plugin activation]
  D --> E[Recall and capture services]
  D --> F[Agent runtime]
  F --> G[Status and doctor guidance]
Loading

Decision needed

Question Recommendation
Should OpenClaw adopt these five memory roles and legacy-to-recall migration as the public plugin configuration direction? Sponsor the role model: Approve the role-based direction after the RFC is renumbered, the required discussion is recorded, and the implementation reference is refreshed.

Why: The RFC intentionally leaves role names, scalar slot shape, per-agent scope, and legacy migration policy open; these are public compatibility choices rather than mechanical documentation fixes.

Before merge

  • Add real behavior proof - Not applicable: This PR changes RFC documentation only; runtime proof belongs with the linked implementation before the RFC is accepted.
  • Use an unallocated RFC identifier (P2) - RFC 0009 is already assigned to hosted feeds, and its rfcs/0009/ sidecar directory is populated on main. Rename this RFC file and its sidecar directory together so unrelated RFC material does not share a namespace.
  • Record the required maintainer discussion (P2) - The repository RFC lifecycle requires a maintainer-discussion thread before acceptance, but this draft contains no discussion link or record. Open and link the thread before requesting merge.
  • Refresh implementation provenance before acceptance (P2) - The RFC calls a June 20 commit the current implementation head, but does not establish that it remains current. Replace that assertion with a current implementation reference and evidence before this draft defines public compatibility behavior.
  • Resolve merge risk (P2) - Accepting the role names, legacy fallback, and per-agent scope without a maintainer decision would set a compatibility-sensitive plugin configuration direction.
  • Resolve merge risk (P1) - The linked implementation is central to the RFC's proof claims, but its current head and runtime evidence were not independently available from this checkout.

Findings

  • [P2] Use an unallocated RFC identifier — rfcs/0009-multi-slot-memory-role-architecture.md:1
  • [P2] Record the required maintainer discussion — rfcs/0009-multi-slot-memory-role-architecture.md:7-9
  • [P2] Refresh implementation provenance before acceptance — rfcs/0009-multi-slot-memory-role-architecture.md:355-379
Agent review details

Security

None.

Review metrics

Metric Value Why it matters
RFC namespace 2 added files; 1 already-allocated identifier Both proposed paths use the existing RFC 0009 namespace, preventing isolated RFC and sidecar ownership.

Merge-risk options

Maintainer options:

  1. Resolve the public contract before acceptance (recommended)
    Use the maintainer discussion to settle the role names, legacy fallback, and per-agent scope, then refresh the RFC's implementation provenance.
  2. Defer the direction
    Leave the RFC unmerged if maintainers do not yet want these role slots to become a compatibility commitment.

Technical review

Best possible solution:

Assign a new RFC namespace, record the maintainer discussion, and explicitly sponsor or revise the role-slot and compatibility contract against a current implementation reference.

Do we have a high-confidence way to reproduce the issue?

Not applicable: this is a design RFC, and the proposed runtime behavior belongs to the linked implementation rather than this documentation-only patch.

Is this the best way to solve the issue?

Unclear: role-specific slots are a coherent direction, but their public names, migration behavior, and per-agent boundary require maintainer product approval before this RFC can be accepted.

Full review comments:

  • [P2] Use an unallocated RFC identifier — rfcs/0009-multi-slot-memory-role-architecture.md:1
    RFC 0009 is already assigned to hosted feeds, and its rfcs/0009/ sidecar directory is populated on main. Rename this RFC file and its sidecar directory together so unrelated RFC material does not share a namespace.
    Confidence: 0.99
  • [P2] Record the required maintainer discussion — rfcs/0009-multi-slot-memory-role-architecture.md:7-9
    The repository RFC lifecycle requires a maintainer-discussion thread before acceptance, but this draft contains no discussion link or record. Open and link the thread before requesting merge.
    Confidence: 0.98
  • [P2] Refresh implementation provenance before acceptance — rfcs/0009-multi-slot-memory-role-architecture.md:355-379
    The RFC calls a June 20 commit the current implementation head, but does not establish that it remains current. Replace that assertion with a current implementation reference and evidence before this draft defines public compatibility behavior.
    Confidence: 0.91

Overall correctness: patch is incorrect
Overall confidence: 0.96

AGENTS.md: not found in the target repository.

Codex review notes: model internal, reasoning high; reviewed against af708f0ddb6f.

Labels

Label justifications:

  • P2: This is a bounded architecture RFC whose unresolved compatibility and lifecycle requirements matter before acceptance but do not affect a running release.
  • merge-risk: 🚨 compatibility: The proposal defines legacy plugin-slot behavior and new public per-agent configuration semantics that existing configurations must continue to interpret safely.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🌊 off-meta tidepool and patch quality is 🦐 gold shrimp.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action. Not applicable: This PR changes RFC documentation only; runtime proof belongs with the linked implementation before the RFC is accepted.

Evidence

What I checked:

Likely related people:

  • Dallin Romney: Introduced the current RFC sidecar-layout and lifecycle guidance used by this review. (role: RFC lifecycle contributor; confidence: high; commits: 3aa7d727383f; files: README.md)
  • Gio Della-Libera: Most recently added material under the already-allocated RFC 0009 namespace. (role: existing RFC 0009 contributor; confidence: high; commits: 2d213ae23462; files: rfcs/0009-hosted-feeds-for-plugins-and-skills.md, rfcs/0009/)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Rename the RFC and sidecar directory to an unused identifier.
  • Record the maintainer-discussion thread and its outcome.
  • Refresh the linked implementation reference with current compatibility evidence.

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (50 earlier review cycles; latest 8 shown)
  • reviewed 2026-08-09T23:10:20.216Z sha 63fb092 :: needs real behavior proof before merge. :: [P2] Assign an unused RFC identifier | [P2] Record the required maintainer discussion | [P2] Refresh implementation provenance before acceptance
  • reviewed 2026-08-11T09:10:13.975Z sha 63fb092 :: needs real behavior proof before merge. :: [P2] Assign an unused RFC identifier | [P2] Record the required maintainer discussion | [P2] Refresh implementation provenance before acceptance
  • reviewed 2026-08-11T21:15:53.407Z sha 63fb092 :: needs real behavior proof before merge. :: [P2] Assign an unused RFC identifier | [P2] Record the required maintainer discussion | [P2] Refresh linked implementation provenance
  • reviewed 2026-08-12T01:54:27.239Z sha 63fb092 :: needs real behavior proof before merge. :: [P2] Assign an unused RFC identifier | [P2] Record the required maintainer discussion | [P2] Refresh linked implementation provenance
  • reviewed 2026-08-13T23:22:43.730Z sha 63fb092 :: needs real behavior proof before merge. :: [P2] Use an unused RFC identifier | [P2] Refresh implementation provenance before acceptance
  • reviewed 2026-08-14T10:12:17.166Z sha 63fb092 :: needs real behavior proof before merge. :: [P2] Use an unused RFC identifier | [P2] Record the required maintainer discussion | [P2] Refresh implementation provenance before acceptance
  • reviewed 2026-08-14T11:16:16.304Z sha 63fb092 :: needs real behavior proof before merge. :: [P2] Assign an unused RFC identifier | [P2] Record the required maintainer discussion | [P2] Refresh linked implementation provenance before acceptance
  • reviewed 2026-08-15T17:54:14.164Z sha 63fb092 :: needs real behavior proof before merge. :: [P2] Assign an unused RFC identifier | [P2] Record the required maintainer discussion | [P2] Refresh linked implementation provenance

@clawsweeper clawsweeper Bot added rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. P2 Normal priority bug or improvement with limited blast radius. merge-risk: 🚨 other 🚨 Merging this PR has meaningful risk outside the owned taxonomy. feature: ✨ showcase ClawSweeper spotlight: unusually compelling feature idea for maintainer attention. labels Jun 20, 2026
@clawsweeper clawsweeper Bot added rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. proof: sufficient Contributor real behavior proof is sufficient. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Jun 20, 2026
@clawsweeper clawsweeper Bot removed proof: sufficient Contributor real behavior proof is sufficient. merge-risk: 🚨 other 🚨 Merging this PR has meaningful risk outside the owned taxonomy. labels Jul 29, 2026
@clawsweeper clawsweeper Bot added merge-risk: 🚨 compatibility 🚨 Merging this PR could break existing users, config, migrations, defaults, or upgrades. merge-risk: 🚨 session-state 🚨 Merging this PR could lose, corrupt, stale, or mis-associate session or agent state. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. merge-risk: 🚨 session-state 🚨 Merging this PR could lose, corrupt, stale, or mis-associate session or agent state. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. labels Jul 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature: ✨ showcase ClawSweeper spotlight: unusually compelling feature idea for maintainer attention. merge-risk: 🚨 compatibility 🚨 Merging this PR could break existing users, config, migrations, defaults, or upgrades. P2 Normal priority bug or improvement with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant