# AI agents use three types of memory - short-term (conversation context), long-term (vector stores for persistent knowledge), and episodic (past experiences for similar tasks)

**Date:** 2025-12-18  
**Tags:** AI, Agents, Memory  
**URL:** https://kelexine.is-a.dev/til/ai-agent-memory-patterns

---

TIL: AI agents use three types of memory - short-term (conversation context), long-term (vector stores for persistent knowledge), and episodic (past experiences for similar tasks). The combination enables agents to maintain context across sessions and learn from their execution history.


```javascript
const agentMemory = {
  shortTerm: conversationContext,  // ~4k tokens
  longTerm: vectorDatabase.query(currentTask),
  episodic: pastExecutions.findSimilar(goal)
};
const context = synthesize(agentMemory);
```




---

*This content is available at [kelexine.is-a.dev/til/ai-agent-memory-patterns](https://kelexine.is-a.dev/til/ai-agent-memory-patterns)*
