Skip to content

Feature: Memory Consolidation Mechanism (Hippocampal-Cortical Transfer) #43002

Description

@chengjialu8888

Problem

OpenClaw's memory system uses a two-layer architecture:

  • memory/YYYY-MM-DD.md — daily append-only logs (short-term)
  • MEMORY.md — curated long-term memory

However, the transfer from short-term to long-term memory is entirely manual. The agent must be explicitly reminded to consolidate memories. There is no automated mechanism for identifying high-value information in daily logs and promoting it to long-term memory.

Proposal: Automated Memory Consolidation

Inspired by the hippocampal-cortical memory consolidation process in neuroscience:

Phase 1: Tagging (during session)

Automatically tag high-signal entries in daily logs based on:

  • Explicit user requests ('remember this')
  • Repeated references to the same entity/topic
  • Decision points and their outcomes
  • Emotional markers (user frustration, satisfaction)

Phase 2: Consolidation (periodic background job)

A cron-based consolidation job that:

  1. Scans recent daily logs for tagged entries
  2. Deduplicates against existing MEMORY.md content
  3. Summarizes and structures new entries
  4. Appends to MEMORY.md with source attribution

Phase 3: Forgetting (memory hygiene)

Implement an Ebbinghaus-inspired decay:

  • Entries not referenced in N days get confidence-downgraded
  • Low-confidence entries are archived (not deleted)
  • Frequently referenced entries get confidence-upgraded

Related Work

  • docs/experiments/research/memory.md — Memory v2 research notes already propose a bank/ architecture with typed memory pages
  • memory-core plugin — current search/get tools
  • compaction.memoryFlush — existing pre-compaction memory write

Impact

  • Reduces manual memory management burden on agents
  • Improves recall quality over time
  • Aligns with the existing Memory v2 research direction

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions