Episodic Memory

Episodic Memory is a type of long-term memory that stores specific events, experiences, and interactions that an agent has encountered, indexed by time, context, and sequence. In cognitive science, episodic memory is the “what happened, where, and when” memory — it’s your personal diary of past experiences.

CN

情景记忆(Episodic Memory) 是一种长期记忆,用于存储智能体所经历过的具体事件、体验和交互,并按时间、上下文和序列进行索引。在认知科学中,情景记忆就是“发生了什么、在哪里、何时发生”的记忆——它是你个人经历的日记。

Imagine you’re a detective. Short-term memory is your notepad — you write down what the suspect just said. Semantic memory is your law book — facts and rules you’ve memorized. Episodic memory is your case file archive — every interrogation, every clue you found, every mistake you made, and what worked in past cases. When a new case comes in, you don’t just rely on the law book; you flip through your old case files to see how you solved similar cases before.

CN — 用人话比喻

想象你是一名侦探。短期记忆是你的记事本——你记下嫌疑人刚说的话。语义记忆是你的法律书——你记住的事实和规则。情景记忆是你的案件档案库——每一次审讯、每一条线索、每一个你犯过的错误、以及过去哪些方法有效。当新案件到来时,你不仅依赖法律书,还会翻阅旧案件档案,看看以前你是怎么解决类似案件的

2. What Does Historical Task Records Include?

EN

“Historical task records” (历史任务记录) is the practical implementation of episodic memory for task-oriented agents. It stores:

ComponentDescription
Task IDUnique identifier for each task
Task DescriptionWhat the user asked the agent to do
Actions TakenSequence of tool calls, reasoning steps, and decisions
OutcomeSuccess/failure, final result, error messages
TimestampWhen the task occurred
ContextUser ID, session ID, relevant metadata
EmbeddingVector representation for semantic retrieval

CN

“历史任务记录”是情景记忆在面向任务的智能体中的实践实现。它存储:

组件描述
任务ID每个任务的唯一标识符
任务描述用户要求智能体做什么
执行的动作工具调用序列、推理步骤和决策
结果成功/失败、最终结果、错误信息
时间戳任务发生的时间
上下文用户ID、会话ID、相关元数据
向量嵌入用于语义检索的向量表示

The Four Memory Operations (四原语) in Episodic Context

OperationENCN
StoreSave a completed task with its full trajectory保存已完成的任务及其完整轨迹
RecallRetrieve similar past tasks by semantic similarity通过语义相似度检索相似的过往任务
UpdateModify a stored record (e.g., mark as “deprecated”)修改已存储的记录(如标记为”已废弃”)
ForgetPrune old/low-value records by time or reward按时间或奖励值清理旧/低价值记录

3. Core Components of Episodic Memory System

Key Takeaways 

要点 (Key Point)ENCN
情景记忆的定义Episodic memory stores specific events, experiences, and interactions indexed by time and context情景记忆存储按时间和上下文索引的具体事件、经历和交互
历史任务记录的本质Historical task records are the practical implementation of episodic memory for task-oriented agents历史任务记录是情景记忆在面向任务的智能体中的实践实现
检索基于相关性而非新鲜度Recall works by relevance (semantic similarity), not recency回忆基于相关性(语义相似度)而非新鲜度
四原语操作Four memory operations: Store, Recall, Update, Forget四种记忆操作:存储、回忆、更新、遗忘
向量嵌入是检索的关键Embeddings enable semantic similarity search for relevant past experiences嵌入使得对相关过往经历的语义相似度搜索成为可能
失败也是重要的记忆Failed tasks often have HIGH importance because they teach the agent what NOT to do失败的任务通常具有高重要性,因为它们教会智能体”不要做什么”
跨会话连续性Episodic memory gives the agent continuity across sessions情景记忆给智能体提供跨会话的连续性
记忆清理策略Prune by time, keep newest N, or keep top by importance/reward按时间清理、保留最新的N条、或按重要性/奖励值保留最高分