Agent memory
Also: 代理記憶 · 智能體記憶 · 長期記憶 · agent memory
Information stored outside the model — files, databases — selected and re-injected into context when needed; the model itself retains nothing across calls.
When you will meet it
When the agent has forgotten everything from yesterday's conversation, this is why: the context window is the desktop, memory is the drawer, and they are not the same thing. Miss the distinction and you will think a bigger context window cures forgetting — a bigger desk does not by itself move things out of the drawer.
An analogy
Like a brilliant assistant with amnesia every morning: all the skill, none of yesterday. The fix is a notebook plus rules — write down anything important when it happens (write side), flip to the relevant pages before starting work (read side). A messy notebook is as useless as no notebook.
Minimal example
沒有記憶:
每次 session 從零開始;「我上次叫你別用那個 API」不存在
有記憶(示意):
寫入側:任務結束 → 把決策、教訓、用戶偏好寫進檔案或資料庫
讀取側:新任務開始 → 用關鍵詞或向量檢索挑出相關幾條 → 塞進上下文
本站的三層設計:
Session Log(原始對話記錄)→ Daily Log(當日整理)→ MEMORY.md(長期精華)Both sides are hard, differently: the write side struggles with when to write and at what granularity — left to the agent's goodwill it skips logging when busy, and this site documented an incident where over ninety percent of content never reached the structured log; the read side struggles with which entries to pick — wrong picks are worse than none, injecting stale or irrelevant content as current truth.
What people get wrong
- Conflating memory with the context window. Context is everything the model sees this session and dies with it; memory is durable storage outside, appearing only when actively fetched and injected. RAG puts documents into context by the same re-injection mechanism.
- Solving only the write side, or only the read side. Store everything and inject all of it every time and you have no memory plus a bigger bill; the quality bottleneck of a memory system is usually selection.
Related terms
Next
- Cross-Channel Memory Hub: A Full Record of the Memory System Architecture Design for OpenClaw Agent19 min