Loading patterns…
Generative Agents Memory(GAM)
Give an agent a memory stream of timestamped observations that is retrieved by a weighted score of recency, importance, and relevance rather than similarity alone. Periodically the agent reflects, synthesizing higher-level insights from recent memories and writing them back into the stream so they drive future planning. This is the design from the Stanford generative agents (Smallville) study.
In 30 seconds
- What
- Maintains timestamped observation stream scored by recency, importance, and relevance; periodically synthesizes insights back into stream to shape future decisions.
- When to use
- Long-running agents needing to learn patterns from past interactions and adapt behavior based on accumulated context over hours or days.
- Watch out
- Reflection synthesis can hallucinate patterns or drift agent behavior away from original intent if importance scoring lacks clear grounding.
Ask the AI expert about this pattern
Opens the assistant with your question prefilled. You review it before sending.
Generative Agents Memory: Overview
Give an agent a memory stream of timestamped observations that is retrieved by a weighted score of recency, importance, and relevance rather than similarity alone. Periodically the agent reflects, synthesizing higher-level insights from recent memories and writing them back into the stream so they drive future planning. This is the design from the Stanford generative agents (Smallville) study.
- Append-only memory stream of observations
- Recency, importance, relevance scoring
- Exponential recency decay on last access
- LLM-rated importance (poignancy) scores
- Periodic reflection into higher-level insights
- Reflections feed planning and behavior
The Agent Architect
One pattern, one tradeoff, one production failure story. A short weekly briefing for people building agentic systems.
Weekly email, one-click unsubscribe. We only use your address to send the briefing.
References
The papers, specifications, and repositories this pattern is based on.
From the engineer behind this catalog
Get your agent architecture reviewed
This page documents one pattern. Your system runs dozens, and most failures live in how they fit together. Have the whole design reviewed against the 288 patterns in this catalog: architecture, reliability, evaluation and cost, every finding mapped to the pattern that fixes it.
€750 instead of €1,500, one week, written report and walkthrough call, until 30 September