When to reach for it
- The agent needs to learn from past cases.
- Recurring tasks follow similar solution paths.
- Context including time, goal, and outcome is relevant.
/pattern/episodic-memory/
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.
In practiceA software-debugging agent stores each resolved bug as an episode, then retrieves the three closest past episodes by embedding similarity when it encounters a new error.
When to reach for it
When it backfires
The tradeoff
Experience-based adaptation is gained against high curation and data privacy maintenance efforts.
Past episodes are stored and retrieved by similarity.
Episodes from a deprecated tool surface stay matchable. The planner picks an old strategy and runs it against an API that no longer exists.
Fix · Tag episodes with a tool-surface version. Filter or expire episodes when the surface they referenced changes.
Ranking by embedding similarity only, a superficially-worded match outranks the genuinely relevant recent success, and the agent replays a strategy that never applied here.
Fix · Score retrieval by recency + importance + relevance combined (per Generative Agents), not similarity alone, and weight successful outcomes above mere textual match.
Keep going
Search patterns, frameworks, and pages.