
Conversation Memory
Design tiered short-term, long-term, and entity memory so your agent remembers users across sessions without blowing the context window.
Overview
Conversation Memory is an agent skill most often used in Build (also Operate, Grow) that teaches tiered short-term, long-term, and entity memory patterns for persistent LLM conversations.
Install
npx skills add https://github.com/sickn33/antigravity-awesome-skills --skill conversation-memoryWhat is this skill?
- Tiered memory model: in-context buffer, session short-term, cross-session long-term, and entity facts
- Covers persistence, retrieval, and consolidation patterns—not full RAG or knowledge-graph builds
- Maps to Mem0, LangChain Memory, and Redis as primary integration anchors
- Explicit scope boundaries: no semantic search implementation or DB administration deep-dives
- Recommended pairing with context-window management and RAG implementation skills
- Six capability areas: short-term, long-term, entity memory, persistence, retrieval, consolidation
Adoption & trust: 1.2k installs on skills.sh; 40.1k GitHub stars; 2/3 security scanners passed (skills.sh audits).
What problem does it solve?
Your agent forgets everything when the session ends or the context window rolls, so users repeat themselves and trust erodes.
Who is it for?
Solo builders adding durable user and entity recall to a chat or agent product without redesigning the whole stack as a knowledge graph.
Skip if: Teams that only need one-shot Q&A with no cross-session continuity, or projects whose main gap is semantic search/RAG pipeline design rather than memory tiers.
When should I use this skill?
You are building or extending a conversational AI that must remember users, entities, or prior turns beyond the current context window.
What do I get? / Deliverables
You leave with a clear tiered memory design and storage/retrieval strategy you can implement with Mem0, LangChain Memory, or Redis-backed session state.
- Tiered memory architecture (buffer, short-term, long-term, entity)
- Storage and retrieval strategy aligned to your agent stack
Recommended Skills
Journey fit
Spans multiple journey phases - primary shelf plus alternate fits below.
Memory architecture is implemented while building conversational AI and agent products—the canonical shelf is agent tooling during the Build phase. Subphase agent-tooling covers reusable patterns (buffers, persistence, retrieval) that agents need beyond a single chat turn.
Where it fits
Define buffer vs long-term stores before coding your first Mem0 or Redis-backed memory module.
Adjust consolidation rules when stored memories grow noisy or stale in production.
Reuse entity facts for onboarding nudges and return-user flows without re-prompting for profile data.
How it compares
Focuses on conversational memory tiers and persistence patterns—not a turnkey Mem0 install guide or full RAG retrieval pipeline skill.
Common Questions / FAQ
Who is conversation-memory for?
Indie and solo builders implementing conversational AI who need session and cross-session recall and understand basic databases or key-value stores.
When should I use conversation-memory?
During Build when wiring agent-tooling and memory layers; during Operate when tuning retention and consolidation; during Grow when lifecycle messages should reference stored user facts.
Is conversation-memory safe to install?
Review the Security Audits panel on this Prism page and inspect the skill bundle in your repo before granting filesystem, network, or secrets access to your agent.
Workflow Chain
Requires first: context window management, rag implementation
SKILL.md
READMESKILL.md - Conversation Memory
# Conversation Memory Persistent memory systems for LLM conversations including short-term, long-term, and entity-based memory ## Capabilities - short-term-memory - long-term-memory - entity-memory - memory-persistence - memory-retrieval - memory-consolidation ## Prerequisites - Knowledge: LLM conversation patterns, Database basics, Key-value stores - Skills_recommended: context-window-management, rag-implementation ## Scope - Does_not_cover: Knowledge graph construction, Semantic search implementation, Database administration - Boundaries: Focus is memory patterns for LLMs, Covers storage and retrieval strategies ## Ecosystem ### Primary_tools - Mem0 - Memory layer for AI applications - LangChain Memory - Memory utilities in LangChain - Redis - In-memory data store for session memory ## Patterns ### Tiered Memory System Different memory tiers for different purposes **When to use**: Building any conversational AI interface MemorySystem { // Buffer: Current conversation (in context) buffer: ConversationBuffer; // Short-term: Recent interactions (session) shortTerm: ShortTermMemory; // Long-term: Persistent across sessions longTerm: LongTermMemory; // Entity: Facts about people, places, things entity: EntityMemory; } class TieredMemory implements MemorySystem { async addMessage(message: Message): Promise<void> { // Always add to buffer this.buffer.add(message); // Extract entities const entities = await extractEntities(message); for (const entity of entities) { await this.entity.upsert(entity); } // Check for memorable content if (await isMemoryWorthy(message)) { await this.shortTerm.add({ content: message.content, timestamp: Date.now(), importance: await scoreImportance(message) }); } } async consolidate(): Promise<void> { // Move important short-term to long-term const memories = await this.shortTerm.getOld(24 * 60 * 60 * 1000); for (const memory of memories) { if (memory.importance > 0.7 || memory.referenced > 2) { await this.longTerm.add(memory); } await this.shortTerm.remove(memory.id); } } async buildContext(query: string): Promise<string> { const parts: string[] = []; // Relevant long-term memories const longTermRelevant = await this.longTerm.search(query, 3); if (longTermRelevant.length) { parts.push('## Relevant Memories\n' + longTermRelevant.map(m => `- ${m.content}`).join('\n')); } // Relevant entities const entities = await this.entity.getRelevant(query); if (entities.length) { parts.push('## Known Entities\n' + entities.map(e => `- ${e.name}: ${e.facts.join(', ')}`).join('\n')); } // Recent conversation const recent = this.buffer.getRecent(10); parts.push('## Recent Conversation\n' + formatMessages(recent)); return parts.join('\n\n'); } } ### Entity Memory Store and update facts about entities **When to use**: Need to remember details about people, places, things interface Entity { id: string; name: string; type: 'person' | 'place' | 'thing' | 'concept'; facts: Fact[]; lastMentioned: number; mentionCount: number; } interface Fact { content: string; confidence: number; source: string; // Which message this came from timestamp: number; } class EntityMemory { async extractAndStore(message: Message): Promise<void> { // Use LLM to extract entities and facts