Context
Who requested the task, what constraints applied, and what environment was active.
Agent Memory Design
Episodic memory stores what happened during prior tasks: the context, decisions, evidence, actions, result, and feedback. The design challenge is deciding what deserves to be remembered and when it should be retrieved.
Store structured episodes, not raw transcripts. Retrieve only episodes relevant to the current goal, apply retention and privacy policies, and evaluate whether memory improves task success rather than merely increasing context length.
Use these dimensions to make the architecture decision explicit and testable.
Who requested the task, what constraints applied, and what environment was active.
The chosen plan, important alternatives, and evidence used.
Whether the task succeeded, failed, or required escalation.
Human corrections, objective scores, and lessons that can generalize.
Use these dimensions to make the architecture decision explicit and testable.
Write an episode after meaningful completion, correction, or failure—not after every message.
Store a structured summary plus pointers to source evidence.
Separate verified facts from model interpretations.
Expire sensitive or low-value episodes based on purpose and policy.
Use these dimensions to make the architecture decision explicit and testable.
Filter by user, tenant, task type, time, permissions, and confidence before similarity search.
Prefer episodes with successful outcomes and recent validated feedback.
Present memory as evidence with provenance, not as an unquestioned instruction.
Compare task success, correction rate, latency, and privacy incidents with and without memory.
Use this as a design-review gate before release.
Place this pattern inside a broader agent architecture and operating model.
Browse memory, planning, frameworks, reliability, safety, and observability.
Open the tutorial library →Start with agent features, design patterns, benefits, challenges, and industry applications.
Open the guide →