memory-system

Design memory systems for agents to persist and retrieve information across sessions.

Updated Apr 3, 2026
One-click install
npx skills add https://github.com/Victoriakaey/build-reliable-agents --skill memory-system-victoriakaey
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: memory-system
Source: https://github.com/Victoriakaey/build-reliable-agents/tree/main/skills/memory-system
Command: npx skills add https://github.com/Victoriakaey/build-reliable-agents --skill memory-system-victoriakaey

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Agents lose important context across turns and sessions or bloat their context windows with irrelevant history, causing degraded responses, repeat prompts from users, and increased cost; this Skill shows how to persist, retrieve, and manage only the memories that improve performance.

Core Features & Use Cases

  • Memory taxonomy and mapping: Classifies information into in-context, episodic, semantic, and procedural memory and maps each to the right storage and retrieval strategy.
  • Context window and cost control: Provides token-budgeting, fixed-window, and summarization strategies to keep prompts compact and relevant.
  • Storage, retrieval, and maintenance: Includes schemas for memory items, embedding-based similarity retrieval, extraction prompts, decay and cleanup policies, and system-prompt injection patterns.
  • Use Case: Build a personal assistant that remembers user preferences (semantic), surfaces recent support conversations (episodic), and applies learned behavioral rules at the system prompt (procedural).

Quick Start

Retrieve user-relevant memories by running a semantic similarity query on embeddings, format the top results as a short "What you know about this user" block, and prepend it to the system prompt.

Frequently Asked Questions about memory-system

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

FAQPage Schema
How do I make an AI agent remember context across different sessions?

Agent memory systems persist and retrieve relevant information across sessions by classifying data into episodic, semantic, and procedural memory, then using embedding-based similarity retrieval to inject only relevant context into the prompt.

What is the difference between episodic, semantic, and procedural memory for LLM agents?

Episodic memory stores recent user interactions, semantic memory retains user preferences and facts, and procedural memory applies learned behavioral rules. Mapping these types to specific retrieval strategies ensures agents surface the right context.

How do I manage context window limits when an agent accumulates too much history?

Manage context window limits by applying token-budgeting, fixed-window truncation, and summarization strategies. These techniques keep prompts compact and relevant, preventing degraded responses and increased token costs from history bloat.

How do I retrieve relevant memories using embeddings for a conversational agent?

Retrieve relevant memories by running a semantic similarity query on stored embeddings, formatting the top results into a short context block, and prepending it to the system prompt to provide personalized in-context information.

What is the best way to implement memory decay and cleanup in a retrieval-augmented generation system?

Implement memory decay and cleanup by establishing policies that automatically remove or deprioritize outdated memory items. This maintenance strategy ensures the storage schema remains efficient and only relevant memories are retrieved for generation.

Can I use this memory system approach for a personal assistant that needs long-term personalization?

Yes, this memory system approach supports personal assistants by leveraging semantic memory for user preferences, episodic memory for recent conversations, and procedural memory for behavioral rules, enabling effective long-term personalization.