Free Reference Card

AI Agent Memory
Cheat Sheet

The 20 essential concepts every agent builder needs to understand. Bookmark it, print it, share it.

๐Ÿ“„ 20 concepts โฑ 8 min read ๐Ÿ”„ Updated Feb 2026

๐Ÿ”ฅ Core Concepts

01
Context Window
The fixed-size token buffer an LLM can process in a single call. Everything the agent "sees" must fit here. Typical sizes: 128Kโ€“1M tokens. This is the hard constraint everything else works around.core
02
Context Death
When a session ends unexpectedly (crash, timeout, token limit), all in-flight context is lost. The agent wakes up with amnesia. Prevention: periodic checkpoints, auto-save hooks, and graceful shutdown rituals.core
03
Checkpointing
Periodically saving agent state to durable storage so it can recover from context death. Good checkpoints capture: working_on, focus, blockers, and next_steps. Frequency: every 10โ€“15 minutes during heavy work.core
04
Memory Compression
Summarizing older context into shorter representations to free up the context window. Lossy by nature โ€” the art is deciding what to keep. Strategies: rolling summaries, hierarchical compression, importance-weighted pruning.core
05
Session Continuity
The illusion of persistent identity across separate LLM calls. Achieved through: system prompts, memory files, checkpoint loading, and "wake-up" rituals that reconstruct context. Without it, every session is a stranger.core

๐Ÿง  The 8 Memory Types

06
Working Memory
The active context window contents โ€” what the agent is thinking about right now. Volatile, expensive, limited. Analogous to human short-term memory. Managed via system prompt + recent messages.memory type
07
Episodic Memory
Records of specific events and interactions. "What happened on Tuesday." Stored as timestamped logs or daily notes. Critical for answering "Have we discussed this before?" and building relational context.memory type
08
Semantic Memory
General knowledge and facts, decoupled from when they were learned. "Pedro prefers dark mode." Stored as structured key-value pairs or knowledge graphs. Retrieved by topic, not by time.memory type
09
Procedural Memory
How-to knowledge: skills, workflows, tool usage patterns. "To deploy, run vercel --prod." Lives in skill files, runbooks, and TOOLS.md. The agent's muscle memory โ€” hard-won, rarely changes.memory type
10
Declarative Memory
Explicit facts and preferences stored as structured data. Decisions made, rules established, user preferences. The "constitution" that governs agent behavior across sessions. Usually lives in config files.memory type
11
Relational Memory
Knowledge about people, entities, and their relationships. Who works with whom, communication preferences, org charts. Powers personalization and social awareness. Stored as entity profiles with wiki-links.memory type
12
Spatial / Structural Memory
Understanding of project layouts, file structures, codebases, and system architecture. "The API lives in /src/routes." Lets agents navigate complex environments without re-exploring every session.memory type
13
Meta-Memory
Memory about memory: what the agent knows it knows (and doesn't). Confidence levels, source tracking, staleness detection. Enables self-reflection: "I'm not sure about this โ€” let me check."memory type

โšก Strategies & Patterns

14
RAG (Retrieval-Augmented Generation)
Pulling relevant memories into the context window at query time using vector search or keyword matching. The bridge between long-term storage and working memory. Quality depends on chunking, embedding, and retrieval ranking.strategy
15
Memory Hierarchy
Layered storage: hot (context window) โ†’ warm (session files) โ†’ cold (vector DB / archives). Each layer trades speed for capacity. Well-designed agents promote and demote memories between tiers automatically.strategy
16
Structured Capture
Storing memories with metadata (type, category, timestamp, source) instead of raw text dumps. Enables queries like "show me all decisions from last week." The difference between a filing cabinet and a junk drawer.strategy
17
Wake / Sleep Rituals
Standardized routines for session start (load identity, read recent context, check for deaths) and session end (checkpoint, summarize, flag next steps). The bookends that make continuity possible.strategy
18
Memory Consolidation
Periodically reviewing raw logs and distilling them into long-term memory โ€” like a human journaling. Daily notes โ†’ curated insights. Prevents memory bloat while preserving what matters. Best done during idle time (heartbeats).strategy

๐Ÿ— Architecture

19
Knowledge Graph
Connecting memories as nodes and edges rather than flat files. Wiki-links ([[entity]]) build a traversable web. Enables: "What do I know about X?" and "How is X related to Y?" Emergent structure from consistent linking.architecture
20
Multi-Agent Memory Sharing
When multiple agents collaborate, they need shared memory (project state, decisions) and private memory (per-agent context). Patterns: shared vaults, message passing, blackboard systems. The hardest unsolved problem in agent memory.architecture

Want the Full System?

This cheat sheet covers the concepts. The products below give you the actual prompts, templates, and architecture to implement them in your own agents.