mem0-dream

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

1|Updated Jan 13, 2022
One-click install
npx skills add https://github.com/jayho-k/TIL --skill mem0-dream-jayho-k
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: mem0-dream
Source: https://github.com/jayho-k/TIL/tree/main/AI/mem0/code/mem0_code_analize/mem0/integrations/mem0-plugin/.opencode-plugin/opencode-skills/mem0-dream
Command: npx skills add https://github.com/jayho-k/TIL --skill mem0-dream-jayho-k

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Over time, a project's stored memories accumulate duplicates, contradictions, and stale entries, making search results noisy and unreliable. This Skill runs a structured consolidation pass that cleans up the memory store while keeping you in control of every change. ## Core Features & Use Cases - Duplicate Merging: Detects near-duplicate memories using similarity heuristics and drafts a merged version that is more complete than either original. - Contradiction Resolution: Flags conflicting memories (e.g., "Deploy to ECS" vs. "Deploy to Vercel") and lets you pick the winner interactively. - Retention-Based Pruning: Removes memories older than configured retention policies from .mem0.json or .mem0.md, always skipping pinned entries. - Auto Mode: Run with --auto for non-interactive cleanup that applies merges and prunes automatically, skips contradictions, and uses a lock file to prevent concurrent runs. - Use Case: After weeks of coding sessions, your project has hundreds of memories and search results feel repetitive. Run the consolidation pass, review the diff report, approve the changes, and restore a clean, high-quality memory store. ## Quick Start Ask the assistant to run a memory consolidation pass on this project and show me 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 memory consolidation pass, which fetches all project memories, detects near-duplicate pairs using similarity heuristics, and drafts merged versions. You review a diff report and approve before any memory is deleted or replaced.

How does memory consolidation handle contradictory memories?

Contradictory pairs, such as opposing deployment decisions, are flagged in the diff report with both IDs shown. You choose A, B, or skip for each pair interactively; in auto mode contradictions are skipped and a reminder memory is stored for manual review.

Can I configure retention policies for automatic memory pruning?

Yes, define a retention field mapping memory types to days in a `.mem0.json` or `.mem0.md` file in the project root. Without config, session_state and compact_summary default to 90 days and other types are never pruned.

Are pinned memories ever deleted during consolidation?

No, any memory with metadata.pinned set to true is always skipped, regardless of age, confidence score, or duplication status. This protects memories you explicitly marked as important.

What does mem0-dream auto mode do differently?

Auto mode runs non-interactively: merges and prunes are applied silently, contradictions are skipped, and a lock file at /tmp/mem0_dream_auto.lock prevents concurrent runs within a 10-minute window. A compact summary is printed instead of the full diff.