mem0-dream

Consolidates stored memories by merging duplicates, resolving contradictions, and pruning stale entries.

64.5k|7.6k|Updated Jun 20, 2023
One-click install
npx skills add https://github.com/mem0ai/mem0 --skill mem0-dream
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: mem0-dream
Source: https://github.com/mem0ai/mem0/tree/main/integrations/mem0-plugin/.opencode-plugin/opencode-skills/mem0-dream
Command: npx skills add https://github.com/mem0ai/mem0 --skill mem0-dream

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Over time, a project's memory store accumulates duplicate facts, contradictory statements, and outdated entries that degrade search quality. This Skill runs a structured consolidation pass that cleans up the memory store while keeping the user in control of every change.

Core Features & Use Cases

  • Duplicate Detection and Merging: Groups memories by type, finds near-duplicates via keyword-overlap heuristics, and drafts merged versions that preserve the most complete information.
  • Contradiction Resolution: Flags opposing facts (e.g., "Deploy to ECS" vs. "Deploy to Vercel") and lets the user pick a winner interactively before anything is deleted.
  • Retention-Based Pruning: Loads retention policies from .mem0.json or .mem0.md and prunes memories that are too old or low-confidence, while always protecting pinned entries.
  • Auto Mode: Runs non-interactively with --auto, applying merges and prunes silently, skipping contradictions, and storing a reminder memory when manual review is needed.
  • Use Case: After weeks of agent sessions, your project memory feels noisy and search results repeat themselves. Run the consolidation pass, review the diff report, approve the changes, and restore a clean, high-signal memory store.

Quick Start

Ask the assistant to run a memory consolidation pass on the current project and show you the proposed merges, conflicts, and prunes before applying anything.

Frequently Asked Questions about mem0-dream

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I clean up duplicate memories in mem0?

Run the mem0-dream consolidation pass, which fetches all project memories, detects near-duplicates using keyword-overlap similarity heuristics, and drafts merged versions. You review a diff report and confirm before any memories are deleted or replaced.

How does memory consolidation handle contradictory facts?

Contradictory memories, such as opposing deployment targets, are flagged as conflicts and shown side by side. You choose A, B, or skip for each pair, and only the losing memory is deleted after your decision.

Can I configure retention policies for automatic memory pruning?

Yes. Create a .mem0.json file with a retention field mapping memory types to days, or add retention settings to .mem0.md. Without a config, session_state and compact_summary default to 90 days and other types are never pruned.

Does memory consolidation delete pinned or important memories?

No. Memories with metadata.pinned set to true are always skipped during merge, prune, and conflict analysis regardless of age or confidence score. All other changes also require explicit user confirmation in interactive mode.

What does mem0-dream --auto do differently?

Auto mode runs non-interactively: merges and prunes are applied silently, contradictions are skipped, and a reminder memory is stored prompting manual review. A lock file at /tmp/mem0_dream_auto.lock prevents concurrent runs within 10 minutes.