<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>AI Agent 记忆 on Techunder</title>
    <link>https://techunder.tech/docs/03-ai-agent-memory/</link>
    <description>Recent content in AI Agent 记忆 on Techunder</description>
    <generator>Hugo</generator>
    <language>zh-CN</language>
    <atom:link href="https://techunder.tech/docs/03-ai-agent-memory/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>AI Agent MemGPT</title>
      <link>https://techunder.tech/docs/03-ai-agent-memory/01-memgpt/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://techunder.tech/docs/03-ai-agent-memory/01-memgpt/</guid>
      <description>&lt;!-- Copyright © 2026 Techunder (Guanhua Liu) | All Rights Reserved | https://techunder.tech | Email: techunder@163.com --&gt;&#xA;&lt;div class=&#34;page-title&#34;&gt;AI Agent MemGPT&lt;/div&gt;&#xA;&lt;div class=&#34;page-info&#34;&gt;&#xA;   &lt;span class=&#34;organized-tag&#34;&gt;整理&lt;/span&gt;&#xA;  发布时间：2026-07-06 | 更新时间：2026-07-06&#xA;&lt;/div&gt;&#xA;&#xA;&lt;p&gt;本文解读一篇 UC Berkeley 2023 年提出的给 LLM 做&lt;strong&gt;分层长期记忆管理&lt;/strong&gt;的论文：&lt;/p&gt;&#xA;&lt;blockquote class=&#39;book-hint &#39;&gt;&#xA;&lt;p&gt;《&lt;em&gt;MemGPT: Towards LLMs as Operating Systems&lt;/em&gt;》&lt;br&gt;&#xA;by Charles Packer et al., UC Berkeley → ICLR 2024&lt;/p&gt;&#xA;&lt;/blockquote&gt;&lt;h1 id=&#34;一句话核心思想&#34;&gt;一句话核心思想&lt;a class=&#34;anchor&#34; href=&#34;#%e4%b8%80%e5%8f%a5%e8%af%9d%e6%a0%b8%e5%bf%83%e6%80%9d%e6%83%b3&#34;&gt;#&lt;/a&gt;&lt;/h1&gt;&#xA;&lt;p&gt;&lt;strong&gt;把 LLM 当作 CPU，把它的上下文窗口当作 RAM，把长期记忆当作磁盘——让 LLM 自己通过 &amp;ldquo;系统调用&amp;rdquo;（tool calling）来管理自己的多级记忆，像操作系统管理虚拟内存分页一样。&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h1 id=&#34;它要解决什么问题&#34;&gt;它要解决什么问题&lt;a class=&#34;anchor&#34; href=&#34;#%e5%ae%83%e8%a6%81%e8%a7%a3%e5%86%b3%e4%bb%80%e4%b9%88%e9%97%ae%e9%a2%98&#34;&gt;#&lt;/a&gt;&lt;/h1&gt;&#xA;&lt;p&gt;LLM 有一个根本矛盾：&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;上下文窗口有限&lt;/strong&gt;（GPT-4 早期 8K/32K），模型受限于 Transformer 注意力 O(n²) 复杂度，而真实场景需求中，长期会话、用户偏好积累、海量文档分析等&lt;strong&gt;需要&amp;quot;无限&amp;quot;记忆&lt;/strong&gt;，但利用 RAG 只能被动检索，&lt;strong&gt;无法做到&amp;quot;主动压缩、主动关联、主动遗忘&amp;quot;&lt;/strong&gt;。&lt;/p&gt;&#xA;&lt;p&gt;MemGPT 论文观察到：LLM 的瓶颈不是&amp;quot;知道什么&amp;quot;，而是&amp;quot;&lt;strong&gt;同一时刻能看见什么&lt;/strong&gt;&amp;quot;。于是它借用了操作系统的经典解法——&lt;strong&gt;分层内存 + 按需分页&lt;/strong&gt;。&lt;/p&gt;</description>
    </item>
    <item>
      <title>AI Agent OpenMemory</title>
      <link>https://techunder.tech/docs/03-ai-agent-memory/02-openmemory/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://techunder.tech/docs/03-ai-agent-memory/02-openmemory/</guid>
      <description>&lt;!-- Copyright © 2026 Techunder (Guanhua Liu) | All Rights Reserved | https://techunder.tech | Email: techunder@163.com --&gt;&#xA;&lt;div class=&#34;page-title&#34;&gt;AI Agent MemGPT&lt;/div&gt;&#xA;&lt;div class=&#34;page-info&#34;&gt;&#xA;   &lt;span class=&#34;organized-tag&#34;&gt;整理&lt;/span&gt;&#xA;  发布时间：2026-07-06 | 更新时间：2026-07-06&#xA;&lt;/div&gt;&#xA;&lt;link rel=&#34;stylesheet&#34; href=&#34;https://techunder.tech/katex/katex.min.css&#34; /&gt;&lt;script defer src=&#34;https://techunder.tech/katex/katex.min.js&#34;&gt;&lt;/script&gt;&lt;script defer src=&#34;https://techunder.tech/katex/auto-render.min.js&#34; onload=&#34;renderMathInElement(document.body, {&amp;#34;delimiters&amp;#34;:[{&amp;#34;left&amp;#34;:&amp;#34;$&amp;#34;,&amp;#34;right&amp;#34;:&amp;#34;$&amp;#34;,&amp;#34;display&amp;#34;:false},{&amp;#34;left&amp;#34;:&amp;#34;$$&amp;#34;,&amp;#34;right&amp;#34;:&amp;#34;$$&amp;#34;,&amp;#34;display&amp;#34;:true},{&amp;#34;left&amp;#34;:&amp;#34;\\[&amp;#34;,&amp;#34;right&amp;#34;:&amp;#34;\\]&amp;#34;,&amp;#34;display&amp;#34;:true}]});&#34;&gt;&lt;/script&gt;&#xA;&lt;p&gt;本文解读开源项目 &lt;a href=&#34;https://github.com/CaviraOSS/OpenMemory&#34;&gt;&lt;strong&gt;OpenMemory&lt;/strong&gt;&lt;/a&gt; 的知识结构。&lt;/p&gt;&#xA;&lt;h1 id=&#34;分区记忆&#34;&gt;分区记忆&lt;a class=&#34;anchor&#34; href=&#34;#%e5%88%86%e5%8c%ba%e8%ae%b0%e5%bf%86&#34;&gt;#&lt;/a&gt;&lt;/h1&gt;&#xA;&lt;p&gt;OpenMemory 是&lt;strong&gt;数字化复刻了生物脑记忆系统&lt;/strong&gt;，按标准认知心理学对人类的长时记忆划分为 Episodic、Semantic、Procedural、Emotional、Reflective 五层记忆：&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;strong&gt;外显记忆&lt;/strong&gt;（可主动口述、有意识回忆）&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;strong&gt;Episodic 情景记忆&lt;/strong&gt;：带时间、场景的个人经历（&lt;strong&gt;海马体主导&lt;/strong&gt;）&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Semantic 语义记忆&lt;/strong&gt;：客观事实、知识、偏好（&lt;strong&gt;新皮层存储&lt;/strong&gt;）&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;内隐记忆（无意识、技能 / 条件反射）&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;strong&gt;Procedural 程序记忆&lt;/strong&gt;：操作流程、习惯、技能（&lt;strong&gt;基底神经节&lt;/strong&gt;）&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Emotional 情绪记忆&lt;/strong&gt;：事件附带情绪感受（&lt;strong&gt;杏仁核&lt;/strong&gt;）&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;元认知记忆（人类独有）&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;strong&gt;Reflective 反思记忆&lt;/strong&gt;：自我复盘、总结经验、修正认知（&lt;strong&gt;前额叶&lt;/strong&gt;）&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;OpenMemory 直接把这五类脑内独立记忆系统，拆成五个&lt;strong&gt;隔离存储分区&lt;/strong&gt;，每一层对应&lt;strong&gt;独立向量编码&lt;/strong&gt;、&lt;strong&gt;独立遗忘衰减速率&lt;/strong&gt;、&lt;strong&gt;独立检索逻辑&lt;/strong&gt;。&lt;/p&gt;&#xA;&lt;blockquote class=&#39;book-hint &#39;&gt;&#xA;&lt;p&gt;人类大脑机构请参考&lt;a href=&#34;https://techunder.tech/docs/98-biology/97-nervous-sys/#%E5%A4%A7%E8%84%91%E7%BB%84%E6%88%90&#34;&gt;&lt;strong&gt;大脑组成&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&lt;details &gt;&lt;summary&gt;&lt;strong&gt;1. Episodic 情景记忆&lt;/strong&gt;（对应人脑自传事件记忆）&lt;/summary&gt;&lt;div class=&#34;markdown-inner&#34;&gt;&#xA;&lt;p&gt;&lt;strong&gt;心理学依据&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;Tulving 1972 年提出，「精神时间旅行」，存储绑定时间、上下文、对话内容，依赖&lt;strong&gt;海马体&lt;/strong&gt;时序编码，人能回忆 “那天发生了什么完整过程”。&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;工程设计&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;存储：时间戳、事件时序、原始对话内容、会话 ID，不压缩原文；&lt;/li&gt;&#xA;&lt;li&gt;检索：支持时间区间过滤、事件时序检索，还原完整聊天上下文；&lt;/li&gt;&#xA;&lt;li&gt;遗忘：衰减速度中等，近期对话保留完整，久远会话自动提炼下沉至语义层；&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;&lt;strong&gt;业务例子&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;昨天和用户聊代码报错、上周一起梳理项目需求的完整对话。&lt;/p&gt;&#xA;&lt;blockquote class=&#39;book-hint &#39;&gt;&#xA;&lt;p&gt;对应 MemGPT：Recall Memory。&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
