Episodic Memory (Agent)
Ask a colleague how to deploy the service and you get the documented procedure. Ask what happened the last time they deployed it and you get something else entirely — the migration that hung, the flag someone had to set at 2am. Episodic memory is an agent's store of that second kind of knowledge: a record of specific past episodes, kept with their context, rather than general facts.
What an episode is
An episode is one concrete thing the agent lived through, written down as it happened:
- the task it was given and the plan it chose;
- the tool calls it made and what came back, including the failures;
- the outcome, plus a timestamp and a task or thread id to anchor it.
Why a loop needs it
Without episodic recall an agent restarts naive every session: it repeats the tool call that failed yesterday, rediscovers the directory layout, asks the user a question already answered. Episodes are embedded into a vector store so a later run retrieves the relevant ones by similarity rather than re-reading a whole transcript — which is also what separates episodic memory from semantic memory (facts, stripped of when they were learnt) and procedural memory (how to perform a skill). LangGraph persists per-thread history for exactly this purpose. The failure mode is over-trusting recall: an agent that retrieves the wrong episode turns a one-off workaround into a standing rule, so relevance and recency filters matter as much as the storage itself.
Episodic memory is an agent's record of specific past events — the task it was given, the steps it took, the tool results it saw, whether it worked — stored with timestamps and retrieved later by similarity to the current situation. It differs from semantic memory, which holds facts without their context. Episodic recall is what stops an agent repeating a tool call that already failed or re-discovering what it learnt last session.
You know two different kinds of things about your own kitchen. One is general: salt goes in before the water boils. The other is a memory of an occasion — the night the oven tripped the fuse. Episodic memory is that second kind, given to software.
When a program is working through a long job on its own, it helps enormously if it can remember particular episodes: what it was asked to do last Tuesday, what it tried, and what went wrong. Without that, it starts every session as a complete beginner, cheerfully repeating a mistake it made the day before. With it, it can notice that this situation looks like one it has already been through.