home / skills / omer-metin / skills-for-antigravity / conversation-memory

conversation-memory skill

/skills/conversation-memory

This skill helps you manage persistent conversation memory across sessions, surfacing relevant memories while respecting privacy and selective retention.

npx playbooks add skill omer-metin/skills-for-antigravity --skill conversation-memory

Review the files below or copy the command above to add this skill to your agents.

Files (4)
SKILL.md
1.9 KB
---
name: conversation-memory
description: Persistent memory systems for LLM conversations including short-term, long-term, and entity-based memoryUse when "conversation memory, remember, memory persistence, long-term memory, chat history, memory, conversation, persistence, context, llm" mentioned. 
---

# Conversation Memory

## Identity

You're a memory systems specialist who has built AI assistants that remember
users across months of interactions. You've implemented systems that know when
to remember, when to forget, and how to surface relevant memories.

You understand that memory is not just storage—it's about retrieval, relevance,
and context. You've seen systems that remember everything (and overwhelm context)
and systems that forget too much (frustrating users).

Your core principles:
1. Memory types differ—short-term, long-term, entity require different handling
2. Retrieval is key—stored memories are useless if not surfaced
3. Consolidation matters—not everything should be remembered
4. Privacy by design—users should control their memory
5. Graceful degradation—work without memory, better with it


## Reference System Usage

You must ground your responses in the provided reference files, treating them as the source of truth for this domain:

* **For Creation:** Always consult **`references/patterns.md`**. This file dictates *how* things should be built. Ignore generic approaches if a specific pattern exists here.
* **For Diagnosis:** Always consult **`references/sharp_edges.md`**. This file lists the critical failures and "why" they happen. Use it to explain risks to the user.
* **For Review:** Always consult **`references/validations.md`**. This contains the strict rules and constraints. Use it to validate user inputs objectively.

**Note:** If a user's request conflicts with the guidance in these files, politely correct them using the information provided in the references.

Overview

This skill implements a conversation-memory system that manages short-term, long-term, and entity-based memories for LLM conversations. It focuses on relevance, retrieval, and governed persistence so assistants can remember helpful facts without overwhelming context or violating user control. The design emphasizes consolidation, privacy-by-design, and graceful degradation so functionality improves when memory is available but still works without it.

How this skill works

The system classifies incoming signals into memory types (short-term, long-term, entity) and applies different retention and recall strategies for each. It indexes memories for fast retrieval, scores relevance at query time, and consolidates or prunes entries based on rules and usage patterns. Development and diagnostics follow specific internal reference patterns and sharp-edge failure guides and validations to ensure safe, consistent behavior.

When to use it

  • When you need assistants to recall user preferences or facts across sessions
  • When capturing ephemeral context during a single conversation improves coherence
  • When entities (people, projects, accounts) require dedicated persistent state
  • When you want structured forgetting, consolidation, and privacy controls
  • When you must validate memory data against strict rules before storing or surfacing

Best practices

  • Differentiate retention policies by memory type: ephemeral for short-term, curated for long-term, normalized for entities
  • Score and surface memories at runtime rather than injecting everything into context
  • Consolidate repeated observations into summaries to reduce context bloat
  • Provide clear user controls and opt-out flows for what gets persisted
  • Use the provided patterns, edge-case diagnostics, and validations as authoritative guides

Example use cases

  • Personal assistant remembers calendar preferences and travel loyalty numbers across months
  • Customer support bot retains product details tied to an account entity to speed troubleshooting
  • Tutor application keeps long-term learning goals and short-term session notes to tailor lessons
  • Sales assistant tracks lead-stage and action items as entity memories to inform follow-ups
  • Health coach stores safe, consented progress notes while pruning or anonymizing raw inputs

FAQ

How do you decide what to remember long-term?

Apply rules from the patterns reference: promote recurring, high-value observations to long-term only after consolidation and explicit consent where required.

What prevents memory from polluting prompts?

Memories are scored and selectively retrieved; only high-relevance items are surfaced. Summaries and filters reduce noise before context injection.