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: found issues before merge. Reviewed July 3, 2026, 8:27 AM ET / 12:27 UTC.

Summary
Adds a draft multi-slot memory-role RFC plus sidecar interop research for splitting OpenClaw memory ownership into recall, capture, compaction, dreaming, and user-model slots.

Reproducibility: not applicable. this is a design RFC, not a runtime bug. The concrete checks are the PR diff, RFC lifecycle docs, current-main numbering, and linked implementation proof/status.

Review metrics: 3 noteworthy metrics.

  • Diff Surface: 2 files added, 798 lines added. The PR is a design/API RFC plus research sidecar, so review centers on product direction and repository lifecycle rather than executable code.
  • Public Config Surface: 5 role slots, 1 legacy shorthand, 1 per-agent override surface. These names and compatibility rules would become durable public OpenClaw configuration guidance if accepted.
  • Linked Implementation State: 1 linked implementation PR open; GitHub reports CONFLICTING. Final RFC acceptance should stay coordinated with the implementation that proves and exercises the proposed contract.

Merge readiness
Overall: 🦐 gold shrimp
Proof: 🐚 platinum hermit
Patch quality: 🦐 gold shrimp
Result: needs maintainer review before merge.

Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch.

Rank-up moves:

Risk before merge

  • [P1] Merging without renumbering would publish two top-level RFC documents using the 0009 id because RFC: Hosted feeds for plugins and skills #19 already landed as RFC 0009.
  • [P1] The proposed role names, defaults, legacy shorthand behavior, disabled-slot semantics, and per-agent override scope become durable public config/API direction if accepted.
  • [P1] The RFC remains in draft state with a blank implementation issue, so final merge still needs the repository lifecycle update after maintainer acceptance.
  • [P1] The linked implementation at feat(memory): add multi-slot memory role architecture openclaw#88504 is open, currently conflicting, and has moved beyond the implementation head cited in this RFC.

Maintainer options:

  1. Renumber And Refresh Before Merge (recommended)
    If maintainers accept the direction, update the RFC number, sidecar path, lifecycle metadata, and implementation-head/proof references before landing.
  2. Coordinate With Implementation Review
    Pause final RFC acceptance until feat(memory): add multi-slot memory role architecture openclaw#88504 has converged enough for maintainers to trust the public API shape.
  3. Defer The Memory Role Taxonomy
    Close or pause this PR if maintainers do not want these memory role slots to become near-term OpenClaw direction.

Next step before merge

  • [P2] Maintainers need to choose the RFC number, acceptance state, public memory-role API, and coordination point with the linked implementation PR.

Security
Cleared: The diff only adds Markdown RFC/research files and does not change executable code, dependencies, workflows, secrets handling, or package metadata.

Review findings

  • [P2] Assign a unique RFC number before merge — rfcs/0009-multi-slot-memory-role-architecture.md:1
  • [P2] Refresh the implementation head before acceptance — rfcs/0009-multi-slot-memory-role-architecture.md:355-359
Review details

Best possible solution:

If maintainers accept the direction, assign a unique RFC id, update the sidecar path and links, set accepted lifecycle metadata, and refresh the linked implementation status/proof before merge.

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

Not applicable: this is a design RFC, not a runtime bug. The concrete checks are the PR diff, RFC lifecycle docs, current-main numbering, and linked implementation proof/status.

Is this the best way to solve the issue?

No for merge as-is: the RFC repository is the right review vehicle, but the number, lifecycle metadata, and stale implementation reference need maintainer decisions and updates before landing.

Full review comments:

  • [P2] Assign a unique RFC number before merge — rfcs/0009-multi-slot-memory-role-architecture.md:1
    Current main already contains rfcs/0009-hosted-feeds-for-plugins-and-skills.md from RFC: Hosted feeds for plugins and skills #19. This added RFC should be renumbered, including its sidecar path and relative links, before merge so two accepted documents do not claim the same id.
    Confidence: 0.94
  • [P2] Refresh the implementation head before acceptance — rfcs/0009-multi-slot-memory-role-architecture.md:355-359
    The RFC says the current implementation head is c447e22033ca104cb9d5292edf4313bcb74f81cf, but feat(memory): add multi-slot memory role architecture openclaw#88504 is now open at 4e4d3b190ea2c510ce51e0dd5dbd27296c6e95a3 and GitHub reports it as conflicting. Accepted RFC text should not publish stale implementation/proof status.
    Confidence: 0.89

Overall correctness: patch is incorrect
Overall confidence: 0.88

AGENTS.md: not found in the target repository.

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

Label changes

Label justifications:

  • P2: The PR proposes a normal-priority memory architecture improvement with meaningful API-review scope but no urgent production regression.
  • merge-risk: 🚨 other: Merging before maintainer acceptance would publish unresolved RFC numbering, lifecycle metadata, and public memory-role API direction.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🐚 platinum hermit and patch quality is 🦐 gold shrimp.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action. Sufficient (logs): The RFC links to an implementation PR with redacted upgrade, doctor/status, CLI live-turn, and gateway-dispatched runtime proof, though the implementation head should be refreshed before final acceptance.
  • proof: sufficient: Contributor real behavior proof is sufficient. The RFC links to an implementation PR with redacted upgrade, doctor/status, CLI live-turn, and gateway-dispatched runtime proof, though the implementation head should be refreshed before final acceptance.
Evidence reviewed

What I checked:

  • Target AGENTS.md check: No AGENTS.md exists in the target openclaw/rfcs checkout; the only AGENTS.md found was in the surrounding ClawSweeper workspace and was not applied as target policy.
  • RFC lifecycle policy: The README says new RFCs should not be merged while draft, require a maintainer-discussion thread, and accepted RFCs should set an implementation issue before merge. (README.md:80, a8e0ba2701d6)
  • PR draft metadata: The proposed RFC still has status draft and a blank issue field, which is correct for review but not final accepted merge metadata. (rfcs/0009-multi-slot-memory-role-architecture.md:7, 63fb092a20f8)
  • Current-main RFC number collision: Current main already contains merged RFC 0009 for hosted feeds, so this branch needs a new RFC id before merge. (rfcs/0009-hosted-feeds-for-plugins-and-skills.md:1, a8e0ba2701d6)
  • PR diff surface: GitHub reports two added RFC files: 442 lines in the proposal and 356 lines in the sidecar research document. (63fb092a20f8)
  • Stale linked implementation reference: The RFC cites c447e22033ca104cb9d5292edf4313bcb74f81cf as the current implementation head after CI remediation. (rfcs/0009-multi-slot-memory-role-architecture.md:355, 63fb092a20f8)

Likely related people:

  • kevinlin-openai: History and blame tie the draft/accepted/issue lifecycle rules that govern this PR to this contributor. (role: RFC process contributor; confidence: high; commits: e366ea9825a4, bbb4058da234, f4fdf38f4717; files: README.md, rfcs/0000-template.md)
  • Dallin Romney: History and blame tie the sidecar layout rules used by this PR's research file to this contributor. (role: recent RFC structure contributor; confidence: medium; commits: 3aa7d727383f; files: README.md, rfcs/0000-template.md)
  • giodl73-repo: Current main's merged hosted-feeds RFC owns the 0009 number that this PR currently reuses. (role: adjacent RFC number contributor; confidence: medium; commits: 89cf322325b0, a8844eb53a2b; files: rfcs/0009-hosted-feeds-for-plugins-and-skills.md)
What the crustacean ranks mean
  • 🦀 challenger crab: rare, exceptional readiness with strong proof, clean implementation, and convincing validation.
  • 🦞 diamond lobster: very strong readiness with only minor maintainer review expected.
  • 🐚 platinum hermit: good normal PR, likely mergeable with ordinary maintainer review.
  • 🦐 gold shrimp: useful signal, but proof or patch confidence is still limited.
  • 🦪 silver shellfish: thin signal; proof, validation, or implementation needs work.
  • 🧂 unranked krab: not merge-ready because proof is missing/unusable or there are serious correctness or safety concerns.
  • 🌊 off-meta tidepool: rating does not apply to this item.

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.

How this review workflow works
  • 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.

@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 commented Jul 16, 2026

Copy link
Copy Markdown

ClawSweeper status: review started.

I am starting a fresh review of this pull request: RFC: multi-slot memory role architecture This is item 1/1 in the current shard. Shard 0/1.

This placeholder means the worker is alive and reading the current context. I will edit this same comment with the actual review when the claws are done clicking.

Crustacean status: shell secured, claws on keyboard, evidence pebbles being sorted.

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: 🚨 other 🚨 Merging this PR has meaningful risk outside the owned taxonomy. P2 Normal priority bug or improvement with limited blast radius. proof: sufficient Contributor real behavior proof is sufficient. 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