Agent Internals
Memory & State
11 min+110 XPStep 1/11
Three kinds of memory, three different systems
'Agent memory' is three problems wearing one name:
- Working memory — the context window itself: this run, this task, this budget. Gone when the run ends.
- Episodic memory — past runs: 'last time the user asked this, we tried X and it failed.' Retrieve by similarity, inject as a note.
- Semantic/procedural memory — distilled facts and learned playbooks: 'user prefers terse output', 'deploy requires the staging flag'. Structured, curated, long-lived.
Conflating them is the classic mistake: dumping chat history into a vector store gives you episodic noise, not semantic knowledge.