mem0-pin

Pins or unpins mem0 memories to protect them from pruning during dream consolidation.

Updated Jun 29, 2026
One-click install
npx skills add https://github.com/nhatnguyen1122/Agent-Memory-Eval --skill mem0-pin-nhatnguyen1122
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: mem0-pin
Source: https://github.com/nhatnguyen1122/Agent-Memory-Eval/tree/main/mem0/integrations/mem0-plugin/.opencode-plugin/opencode-skills/mem0-pin
Command: npx skills add https://github.com/nhatnguyen1122/Agent-Memory-Eval --skill mem0-pin-nhatnguyen1122

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Important memories such as architecture decisions, security constraints, and team conventions can be removed during automated memory consolidation. This Skill marks critical memories as pinned so they survive pruning cycles. ## Core Features & Use Cases - Pin existing memories: Search memories by query or ID, then append a [PINNED] marker via the update_memory tool so the protection travels with the memory content. - Pin new content: Store new critical text directly with pinned metadata (pinned: true, confidence: 1.0) using add_memory with infer disabled. - Unpin memories: Remove the [PINNED] marker prefix to restore normal pruning behavior. - Use Case: After a team agrees on a database migration strategy, pin that decision memory so it is never pruned during dream consolidation and remains available to all future sessions. ## Quick Start Pin the memory about our PostgreSQL migration decision so it is never removed during consolidation.

Frequently Asked Questions about mem0-pin

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

FAQPage Schema
How do I pin a memory in mem0?

Pin a memory by searching for it with search_memories or providing its ID, then calling update_memory to prepend a [PINNED] marker to the memory text. The marker travels with the memory content so pruning logic can recognize and skip it.

How do I protect important memories from being deleted in mem0?

Use the pin workflow to mark critical memories like architecture decisions or security constraints. Pinned memories carry a [PINNED] text marker and pinned metadata, protecting them from removal during dream consolidation pruning.

Can I pin new text that is not stored as a memory yet?

Yes. Call add_memory with the text prefixed by [PINNED], metadata set to pinned true and confidence 1.0, and infer disabled. Then call get_event_status with the returned event_id to retrieve the new memory ID.

How do I unpin a pinned memory in mem0?

Call get_memory to read the current content, remove the [PINNED] prefix from the text, and call update_memory with the cleaned text. The memory then returns to normal pruning eligibility.

What are the limitations of pinning memories with text markers?

The pin marker is stored inside the memory text itself, so it depends on the consolidation process respecting the [PINNED] prefix. If the memory text is rewritten by other operations without preserving the marker, the pin protection is lost.