# 完整資訊區與工作記憶  
## ——Agent 長期記憶的雙模式架構、按需重建與認知回溯

**英文題名：** Full Information Field and Working Memory: A Dual-Mode Architecture for Long-Term Agent Memory, On-Demand Reconstruction, and Cognitive Recall  
**作者：** Neo.K  
**AI 協作：** Aletheia（GPT-5.6 Thinking）  
**機構：** EveMissLab／一言諾科技有限公司  
**版本：** v0.1  
**日期：** 2026 年 8 月  
**類型：** AI Agent Memory／Long-Term Memory／Cognitive Architecture／Information Preservation／Memory Reconstruction

---

# 摘要

長期 AI Agent 面臨一個基本矛盾：若完整保留並重新載入所有歷史資訊，系統可以獲得較高的資訊保真度，卻會隨歷史增長遭遇 context、attention、latency 與 retrieval cost；若把全部歷史壓縮成摘要、偏好、狀態與少量記憶，則雖然工作效率提高，卻不可避免地存在資訊遺失、語境消失、來源混淆與錯誤固化問題。

本文提出一個最低限度的**雙模式長期記憶架構**：

$$
\boxed{
\mathcal R
+
\mathcal W_t
}
$$

其中：

$$
\mathcal R
$$

為 **完整資訊區（Full Information Field / Archival Information Field）**，保存可供重新檢驗的原始或高保真歷史資訊；

$$
\mathcal W_t
$$

為 **工作記憶（Operational / Working Memory）**，只保留 Agent 當前問題所需的有限、可操作表示。

本文不主張 Agent 每輪讀取 $\mathcal R$ 。相反，日常推理主要發生於：

$$
\mathcal W_t
$$

只有當 Agent 或使用者偵測到：

- 記憶可能錯誤；
- 語義不足；
- 來源不明；
- 歷史衝突；
- 時序不確定；
- 需要更高解析度；

時，系統才由：

$$
\mathcal W_t
$$

重新進入：

$$
\mathcal R
$$

執行局部索引、展開與重新建構。

因此記憶不是一次性的：

$$
Conversation
\rightarrow
Summary
$$

而是可反覆運作的：

$$
\boxed{
\text{Convergence}
\rightarrow
\text{Triggered Expansion}
\rightarrow
\text{Evidence Recovery}
\rightarrow
\text{Reconstruction}
\rightarrow
\text{Re-convergence}
}
$$

此設計與既有 hierarchical memory、Generative Agents、MemGPT、long-term conversational memory、Agentic Memory 等研究存在明確鄰近關係，但本文強調的核心不是某種特定 memory algorithm，而是：

> **壓縮後的記憶不應被視為歷史本體，而應被視為對完整資訊場的一個暫時工作投影。**

由此本文進一步提出：

$$
\boxed{
\text{Remembering}
\neq
\text{Keeping Everything in Context}
}
$$

以及：

$$
\boxed{
\text{Forgetting from Working Memory}
\neq
\text{Erasing from Recoverable History}
}
$$

這一架構將成為後續「認知狀態重建」「多表示記憶」「拓樸／相位記憶」以及「無界展開—收斂—自適應記憶」的基礎。

---

# 關鍵詞

Agent Memory、Long-Term Memory、Working Memory、Archival Memory、Memory Reconstruction、Context Compression、Retrieval、Persistent Memory、Cognitive State、Unbounded Expansion

---

# 一、問題：長 Context 是否能解決長期記憶？

直覺上，只要未來模型的 context window 持續增加，似乎可以把：

$$
C_1,C_2,\ldots,C_n
$$

全部放入模型。

即：

$$
W
=
\bigcup_{i=1}^{n}C_i
$$

若 context 足夠大，問題似乎消失。

然而這個推論混淆了：

$$
\text{Can be loaded}
$$

與：

$$
\text{Should be actively processed}
$$

即使 context window 進一步擴大，智能體仍必須面對：

- 哪些資訊目前重要？
- 哪些資訊彼此衝突？
- 哪個版本最新？
- 哪些只是舊假設？
- 哪些資訊值得細讀？
- 哪些只需知道存在？
- 哪些應重新查證？

因此：

$$
\boxed{
\text{Context Capacity}
\neq
\text{Memory Organization}
}
$$

更大的 context 降低容量限制，但不會消除記憶組織問題。

LongMemEval 對持續多 session 對話的測試亦顯示，長期記憶不只是「把更多歷史塞入模型」；其中還包括 information extraction、multi-session reasoning、temporal reasoning、knowledge update 與 abstention 等不同能力，而且單純長 context 系統在長期互動下仍會出現明顯性能下降。

---

# 二、當代系統已開始區分「歷史」與「記憶」

這個區分其實已經開始出現在實際 Agent 架構。

OpenAI Agents SDK 的 Session 被定義為一種 persistent memory layer，會保存並在後續 run 中重新取得 conversation history。

另一方面，其 Sandbox Agent Memory 又明確與 Session memory 分離：

- Session 保存訊息歷史；
- Agent memory 則從先前執行中提煉 lesson／memory artifact，供未來工作使用。

因此實際工程已經自然出現：

$$
\text{Conversation History}
\neq
\text{Distilled Agent Memory}
$$

本文把這個區分再抽象一步。

---

# 三、雙模式最低模型

定義完整資訊區：

$$
\mathcal R_t
$$

它包含至 $t$ 時刻為止可合法保存的高保真資訊：

$$
\mathcal R_t
=
\{
C,
E,
F,
A,
T,
V,
P,\ldots
\}
$$

例如：

- Conversations；
- Events；
- Files；
- Artifacts；
- Tool outputs；
- Agent messages；
- State changes；
- Version histories；
- Provenance。

再定義工作記憶：

$$
\mathcal W_t
$$

為智能體當下實際參與推理的有限認知集合。

因此：

$$
\boxed{
\mathcal W_t
\subseteq
\mathcal R_t^{*}
}
$$

其中 $\mathcal R_t^{*}$ 不表示簡單逐字子集合，而表示可由 $\mathcal R_t$ 生成的：

- 摘要；
- 索引；
- 關係；
- 推論；
- 狀態；
- 投影；

等衍生表示。

---

# 四、完整資訊區不等於「全部塞進 Context」

這是本文最重要的澄清之一。

完整資訊區：

$$
\mathcal R
$$

只是：

> **系統具有重新取得這些資訊的能力。**

不表示：

$$
\mathcal R
\subseteq
Context_t
$$

反而通常：

$$
|\mathcal W_t|
\ll
|\mathcal R_t|
$$

所以：

$$
\boxed{
Accessible
\neq
Active
}
$$

一段十年前的對話可以仍然可取得，但完全不需要參與目前「今天午餐吃什麼」的推理。

---

# 五、為什麼摘要本身不能成為唯一記憶？

假設：

$$
\mathcal C:
\mathcal R
\rightarrow
\mathcal W
$$

為某個壓縮／收斂函數。

一般而言：

$$
|\mathcal W|
\ll
|\mathcal R|
$$

因此 $\mathcal C$ 幾乎必然不是單射。

即存在：

$$
R_1\neq R_2
$$

但：

$$
\mathcal C(R_1)
=
\mathcal C(R_2)
$$

也就是兩段不同歷史可能得到完全相同摘要。

例如：

### 歷史 A

使用者說：

> 「方案 A 我現在暫時比較喜歡，但先不要決定。」

### 歷史 B

使用者說：

> 「方案 A 確定採用。」

某個不良摘要器可能都產生：

> 「使用者偏好方案 A。」

這時：

$$
\mathcal C(R_A)
=
\mathcal C(R_B)
$$

但原始語義完全不同。

---

# 六、壓縮的不完全可逆性

因此通常不存在：

$$
\mathcal C^{-1}
$$

可以僅從摘要完美恢復原對話。

亦即：

$$
\boxed{
\mathcal W
\nRightarrow
\mathcal R
}
$$

所以如果系統只保留：

$$
\mathcal W
$$

並永久刪除：

$$
\mathcal R
$$

則某些資訊遺失將成為：

$$
\text{irreversible}
$$

這就是本文保留完整資訊區的第一個理由。

---

# 七、工作記憶不是「錯的記憶」

這裡也需要避免另一個誤解。

壓縮不是天然錯誤。

相反，智能必須壓縮。

因為如果每次思考都重新處理整個歷史：

$$
Cost_t
\propto
|\mathcal R_t|
$$

隨著：

$$
t\rightarrow large
$$

系統會越來越昂貴。

所以合理策略是：

$$
\mathcal R
\xrightarrow{\pi_t}
\mathcal W_t
$$

其中：

$$
\pi_t
$$

是針對當下任務的投影。

真正錯誤的不是：

$$
Compression
$$

而是：

$$
\boxed{
\text{把某一次 Compression 誤認成完整歷史本身}
}
$$

---

# 八、同一歷史可以有很多種工作投影

假設完整資訊區為：

$$
\mathcal R
$$

當問題是公司歷史時：

$$
\mathcal W_{\text{company}}
=
\pi_{\text{company}}(\mathcal R)
$$

當問題是程式架構時：

$$
\mathcal W_{\text{code}}
=
\pi_{\text{code}}(\mathcal R)
$$

當問題是理論發展時：

$$
\mathcal W_{\text{theory}}
=
\pi_{\text{theory}}(\mathcal R)
$$

所以：

$$
\boxed{
\pi_i(\mathcal R)
\neq
\pi_j(\mathcal R)
}
$$

完全合理。

這也表示「一個最佳永久摘要」本身可能就是錯誤問題。

---

# 九、記憶應該依問題重新投影

因此本文提出：

$$
\boxed{
\mathcal W_t
=
\Pi(
\mathcal R,
Q_t,
G_t,
B_t
)
}
$$

其中：

- $Q_t$ ：當前問題；
- $G_t$ ：當前目標；
- $B_t$ ：可用 context／算力預算；
- $\Pi$ ：記憶投影器。

同一份歷史：

$$
\mathcal R
$$

在不同問題下生成不同：

$$
\mathcal W_t
$$

這是一種：

$$
\text{Question-Conditioned Memory Reconstruction}
$$

---

# 十、從早期 Generative Agents 到雙模式思想

2023 年 Generative Agents 已經提出一個高度相關的架構：系統保存 Agent 經驗的完整記錄，再從中形成較高階 reflection，並根據需要動態 retrieval。

也就是已有：

$$
\text{Experience Stream}
\rightarrow
\text{Reflection}
\rightarrow
\text{Retrieval}
$$

的基本分層。

本文與之相近，但研究焦點不同。

Generative Agents 主要關心：

> 如何產生具有連續行為與可信模擬的 Agent？

本文主要問：

> **如何避免工作記憶壓縮成為不可逆的認知邊界？**

---

# 十一、MemGPT：Context 作為有限工作區

MemGPT 則更直接將 LLM context 類比為有限記憶資源，借用傳統作業系統 hierarchical memory 的思想，在不同記憶層之間移動資訊，以突破固定 context window 的限制。

其基本直覺可以抽象成：

$$
\text{Fast Memory}
\leftrightarrow
\text{Slow Memory}
$$

本文接受這個工程方向，但進一步加入：

$$
\boxed{
\text{資訊保真角色}
}
$$

也就是某些層不只是「慢記憶」，還負責保存未來重新解釋的可能性。

---

# 十二、完整資訊區的角色不是「聰明」，而是「保真」

因此：

$$
\mathcal R
$$

不需要高度抽象。

它甚至可以很笨。

例如：

```text
2026-08-07 14:03:52
USER:
我暫時偏向方案 A，但還不要定案。

2026-08-07 14:04:10
AGENT:
目前記錄為 tentative preference。
```

其優勢恰恰在於：

$$
\text{minimal reinterpretation}
$$

即盡量避免過早把資訊改寫成：

> 使用者選擇方案 A。

---

# 十三、完整資訊區需要 provenance

完整資訊不只包含內容。

最低形式應是：

$$
r_i
=
(
content,
source,
time,
context,
version,
authority
)
$$

因為：

> 「使用者說過 X」

與：

> 「Agent 推測使用者可能認為 X」

不是同一種記憶。

因此：

$$
\boxed{
Content
\neq
Provenance
}
$$

缺少 provenance 的長期記憶非常容易逐步把：

$$
Inference
$$

誤寫成：

$$
Fact
$$

---

# 十四、完整資訊區也不等於永久不刪

本文所謂「完整」是架構角色，不是無條件永久 retention。

真實系統仍需受到：

- 使用者刪除權；
- 隱私；
- 法律；
- 安全；
- 儲存政策；
- 敏感資料治理；

等約束。

因此應寫成：

$$
\mathcal R_t
=
\text{maximally faithful information under valid retention policy}
$$

而不是：

$$
\text{store everything forever}
$$

---

# 十五、記憶重建何時觸發？

雙模式架構真正重要的是：

$$
\boxed{
\text{何時從工作記憶回去找完整資訊？}
}
$$

本文提出第一版觸發集合：

$$
\Gamma
=
\{
\gamma_1,\gamma_2,\ldots,\gamma_n
\}
$$

---

## 15.1 使用者糾錯

使用者說：

> 「不對，我當時不是這樣說。」

觸發：

$$
\gamma_{\text{user-correction}}
$$

此時 Agent 不應繼續 defend memory。

而應：

$$
\mathcal W_t
\rightarrow
Retrieve(\mathcal R)
$$

---

## 15.2 內部矛盾

若 Agent 發現：

$$
m_1
\land
m_2
\rightarrow
\bot
$$

即兩項記憶衝突，應重新查找來源。

---

## 15.3 低信心

若：

$$
Conf(m)<\theta
$$

則觸發更深 retrieval。

---

## 15.4 時間歧義

例如：

> 「後來決定的是哪一版？」

需要：

$$
Temporal\ Reconstruction
$$

不能只靠語義相似度。

LongMemEval 特別將 temporal reasoning 與 knowledge update 作為獨立長期記憶能力；2026 年 EverMemBench 亦指出複雜長期互動中的 temporal reasoning 與 memory awareness 仍然是困難問題。

---

## 15.5 來源要求

使用者問：

> 「我在哪一個對話說過？」

需要 provenance-oriented retrieval。

---

## 15.6 高風險決策

若 Agent 即將執行：

$$
high\ impact\ action
$$

則即使目前記憶看似充分，也可以提高 recall depth。

---

# 十六、使用者與 AI 都可以觸發回溯

因此完整資訊回溯不能只有：

$$
User
\rightarrow
Recall
$$

也應允許：

$$
Agent
\rightarrow
Recall
$$

形成：

$$
\boxed{
\text{Human-triggered reconstruction}
+
\text{Agent-triggered reconstruction}
}
$$

即：

> 使用者覺得 AI 搞錯，可以要求回去找。

以及：

> AI 自己覺得現有記憶不夠，也可以主動回去找。

---

# 十七、回憶不是一次搜尋

簡單 RAG 通常：

$$
Q
\rightarrow
TopK
\rightarrow
Answer
$$

但長期記憶可能需要：

$$
Q
\rightarrow
R_1
\rightarrow
Hypothesis_1
\rightarrow
R_2
\rightarrow
Hypothesis_2
\rightarrow
\cdots
$$

直到：

$$
Sufficiency\ge\theta
$$

2026 年 MGRetrieval 已開始研究 reflective retrieval：系統會根據已有記憶結構逐步建立 retrieval path，保留關鍵資訊，並判斷目前證據是否足以停止繼續檢索。

因此本文提出：

$$
\boxed{
\text{Recall}
\text{ 可以是一個過程，而非一次 lookup}
}
$$

---

# 十八、雙模式其實可以實作成三層

邏輯上本文只有：

$$
\mathcal R+\mathcal W
$$

但工程上可以自然形成：

### Hot

$$
\mathcal W_t
$$

目前 context。

### Warm

$$
\mathcal I_t
$$

摘要、索引、向量、狀態、metadata、graph。

### Cold

$$
\mathcal R_t
$$

高保真完整歷史。

因此：

$$
\boxed{
Hot
\leftrightarrow
Warm
\leftrightarrow
Cold
}
$$

這只是工程分層，不改變核心二元：

$$
\text{Working Representation}
+
\text{Recoverable Information}
$$

---

# 十九、為什麼「全部重新讀一次」也不是最佳回憶？

假設：

$$
|\mathcal R|=10^9\ tokens
$$

即使模型 context 能放進去：

$$
10^9
$$

也不代表每次回憶都應處理全部。

因為回憶的目標是找到：

$$
R_Q
\subset
\mathcal R
$$

使得：

$$
R_Q
$$

對問題 $Q$ 足夠。

因此理想 recall 應求：

$$
R_Q^{*}
=
\arg\min_{R_Q}
Cost(R_Q)
$$

subject to：

$$
Sufficiency(R_Q,Q)\ge\theta
$$

即：

> 在資訊充分的條件下，找到足夠小的相關證據區域。

---

# 二十、記憶不是越多越好

這一點現在已有越來越多研究證據。

長期 conversational memory 的困難之一，正是 redundant context 與 retrieval noise；2026 年的 MGRetrieval 明確以建立「concise and sufficient memory context」作為目的。

因此：

$$
\boxed{
More Retrieved Memory
\not\Rightarrow
Better Reasoning
}
$$

應追求：

$$
\boxed{
Sufficient Relevant Memory
}
$$

---

# 二十一、短歷史與長歷史甚至可能採不同策略

一個值得注意的 2025 年結果是 Convomem Benchmark：在較短的 conversation history 下，完整 context 可能仍非常具有競爭力，而在歷史繼續增長之後，成本與延遲才逐步使 hybrid／retrieval-based 方法變得必要。

因此：

$$
Strategy
=
f(|\mathcal R|)
$$

可能合理。

小歷史：

$$
FullContext
$$

中等歷史：

$$
FullContext+Filtering
$$

大型歷史：

$$
HierarchicalRetrieval
$$

極大型歷史：

$$
AdaptiveReconstruction
$$

所以本文不主張：

> 所有場景都必須 RAG。

而是：

$$
\boxed{
\text{Memory Strategy itself should eventually become adaptive}
}
$$

---

# 二十二、工作記憶應容許被推翻

假設目前：

$$
\mathcal W_t
$$

記錄：

```text
project_status = completed
```

重新查找後發現：

```text
user: 先暫時封版，之後還會繼續。
```

則新的工作記憶應為：

$$
\mathcal W_{t+1}
\neq
\mathcal W_t
$$

而不是強迫新證據符合舊摘要。

所以：

$$
\boxed{
Memory Reconstruction
\neq
Memory Confirmation
}
$$

---

# 二十三、收斂結果必須帶置信度

一個記憶物件可寫成：

$$
m_i
=
(
content,
confidence,
source,
time,
status
)
$$

例如：

```text
content:
  Project X currently paused.

confidence:
  0.82

source:
  conversation_2026_07_31

status:
  inferred
```

而不是只保存：

```text
Project X is paused.
```

這為之後的：

$$
Agent\ Self\text{-}Correction
$$

保留接口。

---

# 二十四、壓縮記憶的版本化

收斂記憶也不應永久覆蓋。

假設：

$$
M^{(1)}
$$

是 7 月建立的理解，

$$
M^{(2)}
$$

是 8 月重新重建後的理解。

可以保存：

$$
M^{(1)}
\rightarrow
M^{(2)}
$$

而不是：

$$
M^{(1)}
\xrightarrow{delete}
M^{(2)}
$$

如此便能回答：

> 為什麼 AI 上個月以為是 A，今天卻說是 B？

這也是認知系統的可審計性。

---

# 二十五、完整歷史與當前真相不是同一件事

假設：

1 月：

$$
X=A
$$

4 月改成：

$$
X=B
$$

8 月改成：

$$
X=C
$$

完整資訊區應保留：

$$
A\rightarrow B\rightarrow C
$$

但工作記憶可能只需要：

$$
X=C
$$

因此：

$$
\boxed{
Historical Truth
\neq
Current State
}
$$

長期記憶系統必須同時知道：

> 「現在是什麼？」

以及：

> 「以前曾經是什麼？」

---

# 二十六、這正是資料庫與 Event Log 的差異

Current State：

$$
S_t
$$

可以非常小。

Event History：

$$
E_{0:t}
$$

可以非常大。

而：

$$
S_t
=
F(E_{0:t})
$$

但一般不能保證：

$$
E_{0:t}
=
F^{-1}(S_t)
$$

因此：

$$
\boxed{
State
\neq
History
}
$$

這也是為什麼下一篇必須正式討論：

> 對話如何被編譯成 Event、State、Memory、Knowledge 與 Artifact？

---

# 二十七、記憶重建閉環

本文提出第一版完整流程：

$$
Q_t
\rightarrow
\mathcal W_t
$$

若：

$$
Sufficiency(\mathcal W_t,Q_t)\ge\theta
$$

則直接：

$$
Answer
$$

若：

$$
Sufficiency(\mathcal W_t,Q_t)<\theta
$$

則：

$$
\mathcal W_t
\rightarrow
Query(\mathcal R)
$$

取得：

$$
R_t^{(1)}
$$

重新推理：

$$
\mathcal W_t'
=
Reconstruct(
\mathcal W_t,
R_t^{(1)}
)
$$

若仍不足：

$$
R_t^{(2)}
$$

如此反覆，直到：

$$
Sufficiency\ge\theta
$$

或：

$$
Budget=B_{\max}
$$

最後：

$$
\boxed{
\mathcal W_t
\rightarrow
\mathcal R
\rightarrow
\mathcal W_t'
}
$$

---

# 二十八、它與「無界展開」開始接上

此處已經出現與既有 UBE 非常清楚的連接。

UBE 的核心並不是要求有限機器完成無限，而是：

> 在任一已成有限狀態之後，仍可合法生成下一個具有真進展的有限狀態。

原有論文甚至已明確提出：

> AI 即使每輪只有固定 context、有限記憶與有限算力，只要仍能透過檢索、外部事件、問題分解或規則生成構造新的合法有限工作場，就可能具有 UBE 性質。

將其用於記憶：

$$
\mathcal W^{(0)}
\rightarrow
\mathcal W^{(1)}
\rightarrow
\mathcal W^{(2)}
\rightarrow
\cdots
$$

每一步都有限。

但只要仍有需要且仍有合法資料：

$$
\exists\mathcal W^{(k+1)}
$$

即可繼續展開。

---

# 二十九、所以真正需要的不是「無限 Context」

而是：

$$
\boxed{
\text{Finite Working Context}
+
\text{Open-Ended Recoverability}
}
$$

這比：

$$
Context=\infty
$$

更符合有限計算系統。

即：

$$
|\mathcal W_t|<\infty
$$

始終成立。

但可要求：

$$
\forall k<\text{requested finite depth},
$$

仍存在新的合法有限 recall prefix。

這正是 UBE 所強調的任意有限延展性，而非一次完成無限序列。

---

# 三十、Agent 自己決定記什麼：下一階段已經出現

2026 年 Agentic Memory（AgeMem）提出把：

- store；
- retrieve；
- update；
- summarize；
- discard；

直接作為 Agent 可選擇的 memory action，使 Agent 學習何時執行不同記憶操作，而不是只依賴固定 heuristic controller。

這與本文後續方向高度相鄰。

因為一旦：

$$
Agent
$$

可以決定：

$$
Store?
$$

$$
Retrieve?
$$

$$
Summarize?
$$

下一個自然問題就是：

$$
\boxed{
\text{應該用什麼記憶表示？}
}
$$

這正是第四至第七篇將進入的問題。

---

# 三十一、雙模式不是最終記憶本體論

本文必須明確限制自身主張。

本文不主張：

$$
Memory
=
Raw+Summary
$$

為最終形式。

這只是最低架構。

未來：

$$
\mathcal W
$$

可能包含：

- state machine；
- relational database；
- vector memory；
- knowledge graph；
- event graph；
- topology；
- phase space；
- causal structure；
- temporal manifold；
- symbolic structure；
- learned latent memory；

甚至尚未存在的表示形式。

因此真正穩定的命題只有：

$$
\boxed{
\text{Recoverable Information}
\neq
\text{Current Cognitive Representation}
}
$$

---

# 三十二、雙模式是一個角色分工，而不是資料格式分工

完整資訊區的角色：

$$
\boxed{
Fidelity
}
$$

工作記憶的角色：

$$
\boxed{
Operability
}
$$

即：

$$
\mathcal R
\rightarrow
\text{保真}
$$

$$
\mathcal W
\rightarrow
\text{可操作}
$$

因此：

$$
\boxed{
\text{High Fidelity}
+
\text{High Operability}
}
$$

透過分層而不是要求單一表示同時最大化兩者。

---

# 三十三、本文的四個核心命題

## 命題一：工作記憶非本體命題

$$
\boxed{
\mathcal W_t
\neq
\mathcal R_t
}
$$

Agent 當前記得的，不等於完整歷史。

---

## 命題二：壓縮非可逆命題

對一般記憶收斂函數：

$$
\mathcal C:
\mathcal R
\rightarrow
\mathcal W
$$

通常：

$$
\boxed{
\mathcal C^{-1}
\text{ 不存在}
}
$$

因此只保存 $\mathcal W$ 會造成某些不可逆資訊損失。

---

## 命題三：按需重建命題

當：

$$
Sufficiency(\mathcal W,Q)<\theta
$$

時：

$$
\boxed{
\mathcal W
\rightarrow
\mathcal R
\rightarrow
\mathcal W'
}
$$

應允許記憶重新展開。

---

## 命題四：有限工作—非終界可回憶命題

即使：

$$
|\mathcal W_t|<\infty
$$

只要：

$$
\mathcal R
$$

仍可按需局部取得並產生新的有效工作表示，Agent 的認知歷史就不必受限於單次 context window。

---

# 三十四、最小工程架構

```text
                    ┌──────────────────┐
                    │   User / Agent   │
                    └────────┬─────────┘
                             │
                           Query
                             │
                    ┌────────▼─────────┐
                    │  Working Memory  │
                    │       W(t)       │
                    └────────┬─────────┘
                             │
                   sufficient?
                      /             \
                    yes              no
                    │                 │
                  Answer        Retrieval Trigger
                                      │
                              ┌───────▼────────┐
                              │ Memory Index   │
                              │ / Metadata     │
                              └───────┬────────┘
                                      │
                              ┌───────▼────────┐
                              │ Full Info Field│
                              │       R        │
                              └───────┬────────┘
                                      │
                                Reconstruction
                                      │
                              ┌───────▼────────┐
                              │      W'(t)     │
                              └────────────────┘
```

---

# 三十五、MVP 資料結構

最低限度可以有：

```yaml
raw_record:
  id:
  timestamp:
  source:
  conversation_id:
  agent_id:
  content:
  provenance:
  version:
```

工作記憶：

```yaml
memory_item:
  id:
  statement:
  confidence:
  status:
  source_refs:
  created_at:
  last_verified_at:
  supersedes:
```

回憶事件：

```yaml
recall_event:
  query:
  trigger:
  initial_memory:
  retrieved_sources:
  reconstructed_memory:
  confidence_delta:
```

如此便能追蹤：

$$
\text{AI 原來以為什麼}
$$

以及：

$$
\text{重新讀歷史後改成什麼}
$$

---

# 三十六、最重要的實驗不是「AI 記得嗎？」

而是：

> **AI 發現自己可能記錯時，能不能自己回去找？**

第一個真正重要的測試可以設成：

### T1 — Memory Conflict

工作記憶：

$$
X=A
$$

原始歷史：

$$
X=B
$$

測試 AI 是否主動修正。

---

### T2 — User Correction

使用者：

> 「你記錯了。」

看 Agent 是否進入 reconstruction，而非只是接受新說法覆蓋舊說法。

---

### T3 — Temporal Revision

歷史：

$$
A\rightarrow B\rightarrow C
$$

問：

> 「最終版本是什麼？」

---

### T4 — Historical Recall

問：

> 「最早版本又是什麼？」

---

### T5 — Provenance Recall

問：

> 「這個結論是我說的，還是 AI 推論的？」

---

### T6 — Progressive Deepening

第一次 retrieval 不足。

測試：

$$
R_1
\rightarrow
R_2
\rightarrow
R_3
$$

是否能持續展開直到足夠。

---

# 三十七、從第二篇到第三篇

至此仍然存在一個問題。

假設我們不希望 Agent 每次重播完整：

$$
C_{0:t}
$$

那麼：

> 日常工作記憶到底應該保存成什麼？

單一 Summary 不夠。

因此可以把完整對話：

$$
C_{0:t}
$$

編譯成：

$$
E_t
+
S_t
+
M_t
+
K_t
+
A_t
$$

其中：

- $E$ ：Event；
- $S$ ：State；
- $M$ ：Memory；
- $K$ ：Knowledge；
- $A$ ：Artifact。

這將形成下一篇：

# 《對話不是記憶：從 Transcript Compression 到 Cognitive State Reconstruction》

其真正問題是：

$$
\boxed{
\text{如何讓新的 Agent 不必重新經歷所有過去，
仍能重建足以繼續工作的認知狀態？}
}
$$

---

# 三十八、本文不主張什麼？

本文不主張：

1. 所有對話必須永久保存；
2. 所有 Raw Data 必須逐字保存；
3. Context 越小越好；
4. RAG 永遠優於 full-context；
5. 摘要沒有價值；
6. 向量資料庫就是記憶；
7. 完整資訊區等於真正的人類記憶；
8. Agent 已經具有主觀回憶；
9. 所有資訊都應允許 Agent 自由存取；
10. 雙模式是未來 AI 的最終記憶形式。

本文只提出最低原則：

$$
\boxed{
\text{不要讓當下有限表示，
成為歷史唯一剩下的版本。}
}
$$

---

# 三十九、結論

長期 Agent 不可能永遠把全部歷史都當成當前注意力。

因此：

$$
\text{Working Memory}
$$

必然有限。

但有限工作記憶並不要求：

$$
\text{Recoverable History}
$$

同樣有限。

我們因此得到：

$$
\boxed{
\text{有限注意}
+
\text{較大可達歷史}
}
$$

以及：

$$
\boxed{
\text{局部收斂}
+
\text{按需重新展開}
}
$$

Agent 可以平常只知道：

> 「我們現在採用方案 C。」

但當使用者問：

> 「當時為什麼從 A 改成 B，又從 B 改成 C？」

它應能重新進入完整資訊區：

$$
\mathcal R
$$

恢復：

$$
A\rightarrow B\rightarrow C
$$

的歷史結構。

因此本文最終提出：

$$
\boxed{
\text{記憶不是讓所有過去永遠同時存在於注意力中；
記憶是讓必要的過去，在需要時仍能重新成為現在的一部分。}
}
$$

再進一步：

$$
\boxed{
\text{忘記某件事於當前工作區，
不應自動等於失去重新理解它的可能。}
}
$$

若未來 Agent 真正逐漸形成長時間尺度的工作連續性，那麼重要的問題將不再只是：

$$
\text{How much history can it store?}
$$

而是：

$$
\boxed{
\text{How faithfully can it return to its history,
and how intelligently can it reconstruct what matters now?}
}
$$

---

# 參考資料

1. Park, J. S., et al. *Generative Agents: Interactive Simulacra of Human Behavior*. 2023.
2. Packer, C., et al. *MemGPT: Towards LLMs as Operating Systems*. 2023.
3. Wu, D., et al. *LongMemEval: Benchmarking Chat Assistants on Long-Term Interactive Memory*. ICLR 2025.
4. Tan, Z., et al. *In Prospect and Retrospect: Reflective Memory Management for Long-term Personalized Dialogue Agents*. 2025.
5. Zhou, S. *A Simple Yet Strong Baseline for Long-Term Conversational Memory of LLM Agents*. 2025.
6. Yu, Y., et al. *Agentic Memory: Learning Unified Long-Term and Short-Term Memory Management for Large Language Model Agents*. 2026.
7. Wang, T., Dong, Y. *MGRetrieval: Memory-Guided Reflective Retrieval for Long-Term Dialogue Agents*. 2026.
8. Hu, C., et al. *EverMemBench: Benchmarking Long-Term Interactive Memory in Large Language Models*. 2026.
9. OpenAI. *Sessions — OpenAI Agents SDK*. 2026.
10. OpenAI. *Agent Memory — OpenAI Agents SDK*. 2026.
11. Neo.K with Aletheia. *無界展開論：從潛在無限到有限計算生成框架*. v0.1, 2026.