This skill should be used when the user asks to "implement agent memory", "persist state across sessions", "build knowledge graph", "track entities", or mentions memory architecture, temporal knowledge graphs, vector stores, entity memory, or cross-session persistence.
View on GitHubKalyanikhandare29/Agent-Skills-for-Context-Engineering
cognitive-architecture
skills/memory-systems/SKILL.md
January 21, 2026
Select agents to install to:
npx add-skill https://github.com/Kalyanikhandare29/Agent-Skills-for-Context-Engineering/blob/main/skills/memory-systems/SKILL.md -a claude-code --skill memory-systemsInstallation paths:
.claude/skills/memory-systems/# Memory System Design Memory provides the persistence layer that allows agents to maintain continuity across sessions and reason over accumulated knowledge. Simple agents rely entirely on context for memory, losing all state when sessions end. Sophisticated agents implement layered memory architectures that balance immediate context needs with long-term knowledge retention. The evolution from vector stores to knowledge graphs to temporal knowledge graphs represents increasing investment in structured memory for improved retrieval and reasoning. ## When to Activate Activate this skill when: - Building agents that must persist across sessions - Needing to maintain entity consistency across conversations - Implementing reasoning over accumulated knowledge - Designing systems that learn from past interactions - Creating knowledge bases that grow over time - Building temporal-aware systems that track state changes ## Core Concepts Memory exists on a spectrum from immediate context to permanent storage. At one extreme, working memory in the context window provides zero-latency access but vanishes when sessions end. At the other extreme, permanent storage persists indefinitely but requires retrieval to enter context. Simple vector stores lack relationship and temporal structure. Knowledge graphs preserve relationships for reasoning. Temporal knowledge graphs add validity periods for time-aware queries. Implementation choices depend on query complexity, infrastructure constraints, and accuracy requirements. ## Detailed Topics ### Memory Architecture Fundamentals **The Context-Memory Spectrum** Memory exists on a spectrum from immediate context to permanent storage. At one extreme, working memory in the context window provides zero-latency access but vanishes when sessions end. At the other extreme, permanent storage persists indefinitely but requires retrieval to enter context. Effective architectures use multiple layers along this spectrum. The spectrum includes