agent-memory-patterns

Installation
SKILL.md

Agent Memory Patterns

Overview

Memory is the foundation of agent intelligence. Without structured memory, agents repeat mistakes, lose context across sessions, and cannot build compound knowledge over time. A well-designed memory system determines what the agent remembers, how it retrieves relevant context, and when it safely forgets.

When to use: Designing a stateful AI agent or autonomous workflow; reviewing agent code for context management; evaluating retrieval latency or cost; any system where an agent must persist knowledge across conversation turns, sessions, or agent boundaries.

Quick Reference

Memory Type Storage Retrieval Strategy Lifetime Use Case
Short-term Context window (in-memory) Direct inclusion — no retrieval needed Single session Active conversation, current task state
Working Scratchpad / todo file Sequential read — agent writes and reads directly Task duration Reasoning steps, partial results, sub-goals
Long-term episodic Vector DB with timestamps Embedding similarity + recency weighting Months to permanent Past interactions, specific sessions, event log
Long-term semantic Structured store / knowledge graph Keyword or concept-graph traversal Permanent until invalidated Facts, entities, domain knowledge
Procedural File store / instinct YAML Template match on task type Permanent Reusable patterns, learned workflows, instincts

Memory Type Taxonomy

Installs
7
GitHub Stars
4
First Seen
Apr 8, 2026
agent-memory-patterns — mickeyyaya/refactoring-skills