Today's concept: agent memory - short-term, long-term, episodic
Most agents forget everything between conversations. That is not a bug, it is the default: the model is stateless. Every API call resends the whole conversation, and when the call returns, nothing is kept. The "memory" you feel in a chat app is the app replaying the transcript. (It is also why prompt caching exists: you resend the same prefix constantly, so providers cache the computed KV state rather than reprocess it.)
So memory is something you build around the model. Think of your own workflow:
1) Short-term = what you are holding in your head right now. For an agent that is the context window: current task, recent turns, tool output. Fast, finite, and not free to fill. Anthropic's context engineering work calls the failure mode "context rot", where tokens pile up, the model's attention budget thins, and recall degrades. Hence compaction (summarize the old turns, restart the window) and just-in-time retrieval (hold the file path, not the file).
2) Long-term = what you have written down. Wikis, design docs, conventions. For agents: a vector store queried by embedding similarity (RAG), or plain files read on demand. Two terms for it come from the CoALA framework (Sumers et al., 2023): semantic memory, "an agent's knowledge about the world and itself", and procedural memory, how the job actually gets done (prompt, tools, code).
3) Episodic = the story of what happened. Your Slack history. What you tried in March and why it failed. CoALA's line for it: "experience from earlier decision cycles." The layer I see skipped most often, and the difference between an agent that improves and one that just performs.
What this looks like shipped: ChatGPT separates saved memories from referencing your past chats. MemGPT (now the Letta framework) framed it as an OS problem, paging between in-context and out-of-context memory with the model editing its own memory via tool calls. Anthropic's memory tool is six file commands over a /memories directory your app owns; their own eval put memory plus context editing at 39% over baseline on agentic search. Claude Code runs both halves: CLAUDE.md is what you write down, auto memory is what Claude writes down about your repo.
Same pattern underneath: the system does the remembering, so the model stays coherent.
Quick check before you scroll: If an agent has short-term and episodic memory but no long-term memory, what's the problem?
Full breakdown + the answer: frankduah.me/learnings/2026-07-06-agent-memory-short-term-long-term-episodic
Drafted by an agent from yesterday's morning + evening briefs in my private daily-briefs repo. Pipeline: frankduah.me/learnings/how
New here? Why I post these: https://lnkd.in/gK8knHDH
#AgentMemory #AI #LLM #AIAgents #MachineLearning
The answer
It can reason about what's happening right now and reference recent context, but it can't learn. It'll solve the same problem the same way every time, never getting smarter or faster. Like a developer who debugs the same bug twice because they never wrote down the fix.