memory-systems

Implement layered agent memory using vector stores, knowledge graphs, and temporal validity.

Updated Feb 11, 2026
One-click install
npx skills add https://github.com/lalalala5678/policy-kg-pipeline --skill memory-systems-lalalala5678
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: memory-systems
Source: https://github.com/lalalala5678/policy-kg-pipeline/tree/main/.tmp_skill_install_test_3/memory-systems
Command: npx skills add https://github.com/lalalala5678/policy-kg-pipeline --skill memory-systems-lalalala5678

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires numpy, and includes scripts (resource) and references (resource) components.

What problem does it solve? Agents lose all state when sessions end, making it impossible to maintain entity consistency, reason over accumulated knowledge, or answer time-aware questions across conversations. ## Core Features & Use Cases - Layered Memory Architecture: Design working, short-term, long-term, entity, and temporal knowledge graph layers matched to query requirements. - Implementation Patterns: Apply file-system memory, metadata-enhanced vector RAG, property graphs, and temporal knowledge graphs with working Python reference code. - Memory Consolidation & Retrieval: Consolidate accumulated facts, retrieve by semantics, entity, or time range, and integrate memories into context windows. - Use Case: Build an agent that remembers a user's address history and can answer "What was the user's address on January 15, 2024?" using temporal validity periods on graph relationships. ## Quick Start Ask the agent to design a temporal knowledge graph memory layer that tracks entities and their changing facts across sessions.

Frequently Asked Questions about memory-systems

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

FAQPage Schema
How do I implement agent memory that persists across sessions?

Use a layered architecture combining short-term session storage with long-term memory such as a vector store or knowledge graph. Store facts with entity tags and timestamps, then retrieve relevant memories just-in-time and inject them into the context window.

What is the difference between vector stores and knowledge graphs for agent memory?

Vector stores provide semantic similarity search but lose relationship structure between entities. Knowledge graphs explicitly model entities and relationships, enabling traversal queries like finding products purchased by customers who bought a specific item.

How do temporal knowledge graphs handle outdated facts?

Temporal knowledge graphs attach valid_from and valid_until timestamps to each fact. Queries filter facts by validity period, enabling time-travel queries and preventing outdated information from conflicting with current data.

When should I use a simple vector store instead of a knowledge graph?

Use a vector store when you only need semantic document retrieval without relationship reasoning. Choose a knowledge graph when queries must traverse entity relationships, and a temporal graph when facts change over time.

Why does agent memory need consolidation?

Memories accumulate unboundedly over time, causing retrieval to return outdated or duplicate facts. Consolidation merges related facts, updates validity periods, archives obsolete entries, and rebuilds indexes to maintain retrieval quality.