跳到主要内容Skip to main content

长时记忆Long-term Memory (Agent Memory)

Long-term Memory (Agent Memory)

  • 智能体Agents
  • 第三段 · 用深Stage 3 · Going Deeper
  • 引用核验 2026-11-19refs checked 2026-11-19
解决什么问题What problem it solves

让 Agent 跨会话记住用户偏好、任务状态与关键事实,而不是每次从零开始。Let an agent remember user preferences, task state and key facts across sessions instead of starting from zero each time.

这是什么What it is

通常分三层。工作记忆是当前上下文。情节记忆是历史事件。语义记忆是提炼后的事实与偏好。

写入要有策略:什么值得记、何时提炼、如何过期与删除。否则记忆会变成噪声。

与「上下文窗口」不同:长时记忆是外部存储与检索,不受单次上下文长度限制。

召回也要有门槛:相似度不等于相关,错误记忆比没有记忆更难排查。

It usually has three layers: working memory (current context), episodic memory (past events) and semantic memory (distilled facts and preferences).

Writes need policy: what is worth remembering, when to distil, how to expire and delete; otherwise memory becomes noise.

Unlike a context window, long-term memory is external storage and retrieval, not limited by a single context length.

Recall also needs a threshold: similarity is not relevance, and a wrong memory is harder to debug than no memory.

为什么需要知道Why it matters

2026 年的 Agent 都在卖「记得你」。不懂记忆的写入与召回,就无法判断它是真记得还是临时拼接。Agents in 2026 sell remembering you; without understanding how memory is written and recalled, you cannot tell real memory from a temporary stitch-up.

别名Chinese aliases

Agent Memory · 智能体记忆

出处Sources
  • Anthropic · Building effective agentsAnthropic · Building effective agents ↗
  • LangGraph · Memory conceptsLangGraph · Memory concepts ↗
  • 学 AI · 记忆Learn AI · Memory ↗
用这个术语做任务Use this term in a task

别停在定义:去任务手册看按什么顺序做、验收什么;或者按你手头的任务,筛 3 个工具候选。Don’t stop at the definition: use the task handbook for the order and checks, or filter three tool candidates for the job at hand.

任务手册 →Task handbooks → · 按任务筛 3 个候选 →Filter three candidates →