← All questions
AgentsEasy· Memory in Agents

What are the different types of memory in AI agents?

Four labels get used, though in practice two of them collapse into one implementation:

  • Short-term / working memory — the current conversation, living in the context window. Gone the moment the session ends.
  • Long-term memory — anything persisted outside the context window, usually a vector database, that survives across sessions and restarts.
  • Episodic memory — a specific flavor of long-term memory: records of particular past interactions, retrieved when something similar comes up again. “Last week you asked about RAG pipelines, want to continue?”
  • Semantic memory — general knowledge the agent has accumulated over time, independent of any one conversation.

In practice, most agents that ship combine just two things: the current context window for short-term, and a vector store for long-term — with episodic and semantic often turning out to be different retrieval patterns against that same store rather than genuinely separate systems. The four-way taxonomy is useful for thinking clearly about what to store and how to retrieve it, but it’s not four different databases in a typical implementation.

Code playground (Python)