/pattern/operational/memory/

Operational category

Memory

What the agent remembers.

Conversational Memory

The running message history the agent reads each turn.

Recent conversation turns are retained and replayed so the model has context for the next turn — as a full transcript, a fixed-size window of the last N turns, or a running summary once the raw history outgrows the budget. This is the short-term tier of agent memory.

Trade-off Improved conversational context is gained against higher token costs, privacy risks, and context window exhaustion.

Episodic Memory

Past tasks, persisted, so the agent can recognise its own déjà vu.

Completed interactions are stored as discrete, timestamped episodes — a natural-language memory stream — and retrieved later by a combined recency, importance, and relevance score, so the agent can reuse what worked in a similar past situation.

Trade-off Experience-based adaptation is gained against high curation and data privacy maintenance efforts.

Semantic / Vector / Graph Memory

What the agent knows, indexed for retrieval.

Long-term knowledge is stored structurally, as embeddings, or as entities and relations, independently of single conversations. Match the store to the access pattern and start simple: vector DBs for similarity recall, key-value (Redis) for fast exact lookup, relational for structured/auditable querying, and graph DBs only once vector-plus-relational becomes the bottleneck.

Trade-off Reusable, highly structured knowledge is gained against significant updating, modelling, and ranking challenges.

Working Memory / Scratchpad

Per-task notes the agent keeps while it reasons.

A temporary working state holds intermediate steps, variables, and open tasks during a single execution run.

Trade-off Better control during a single run is gained against the need for additional state management logic.

Virtual Context Management

The agent as its own memory manager: page facts in and out like an OS.

The agent treats its finite context window like RAM and an external store like disk, paging information between the tiers under its own control so it can operate over histories far larger than the window.

Trade-off Effectively unbounded memory under a fixed window is gained against extra inference calls to manage the paging and the risk of evicting something the agent later needs.

Recorder

Snapshot the state so the run can be resumed, not restarted.

System state — reasoning and world model — is explicitly captured and externalised to allow recovery after aborts or failures.

Trade-off Increased resilience and resumability are gained against higher storage costs and persistence overhead.

Skill Build

Turn winning trajectories into named, reusable procedures.

The agent distils successful action sequences into reusable, named skills — often executable code — and stores them in a growing skill library it retrieves and composes on future tasks, instead of re-planning from scratch. This is procedural memory.

Trade-off Continuous performance improvement is gained against the risk of over-fitting or catastrophic forgetting of older skills.

Search

Search patterns, frameworks, and pages.