The 7 Types of Agent Memory: A Simple Technical Guide for AI Engineers
Understanding the types of agent memory is now a must for AI engineers. An AI agent is a program that uses a language model to think, plan and act over many steps. The catch is that the model itself forgets things. By default, a large language model (LLM) is stateless. Stateless means it remembers nothing after each call. So agents need extra memory systems to hold on to facts, past events and skills. This guide breaks down all 7 types in plain words.
Think of memory as what makes an agent feel smart over time. Without it, the agent starts fresh every time. With it, the agent learns, recalls and plans. Let us walk through each type, one by one.
Why agents need memory at all
An LLM only “sees” the text you give it in one go. After it answers, that context is gone. For a chatbot, that is fine. For an agent doing a long task, it is a big problem.
Say an agent is booking a trip. It must remember your budget, past choices and the steps it already took. Memory systems store all of this outside the model. The agent then pulls the right piece back when needed. This is the core idea behind every memory type below.
The 7 types of agent memory
1. Working memory (short-term)
This is everything the model can see right now. It includes your prompt, recent messages, tool outputs and the agent’s own reasoning. It is also called in-context memory. Think of it like RAM in a computer: fast, but small and temporary. When the context window fills up, old stuff drops off.
2. Semantic memory (long-term)
This stores plain facts and preferences for the long run. For example, it might save that a user “prefers Python over JavaScript”. The agent can recall this fact in any future chat. It is knowledge that does not depend on when it was learned. It is simply true and ready to use.
3. Episodic memory (long-term)
This records specific past events. It holds full conversations and the results of past tasks. It notes what worked and what failed. This lets the agent learn from experience. Systems like Reflexion and ExpeL use this. They store “post-mortems”, which are reviews of what went wrong, so the agent does better next time.
4. Procedural memory (long-term)
This is memory for “how to do things”. It holds skills, tool-use patterns, workflows and rules. Once an agent learns a procedure, it can repeat it without thinking it through again. This saves time and effort on familiar tasks. It is like muscle memory for an agent.
5. External / retrieval memory (short and long-term)
This stores knowledge outside the model, often in a vector database. A vector database is a special store that finds items by meaning, not exact words. At the moment of use (called inference), the agent searches it for the most relevant pieces. This is the idea behind RAG, or retrieval-augmented generation. RAG means the agent pulls in outside info before it answers.
6. Parametric memory (long-term)
This is knowledge baked into the model’s own weights during training. Weights are the internal numbers a model learns. This memory holds language patterns and broad world knowledge. The downside is that it is frozen. You cannot update it after training without retraining the model.
7. Prospective memory (short and long-term)
This tracks future plans. It holds goals the agent intends to do later but has not done yet. Think of it as the agent’s to-do list and reminders. It is vital for long, multi-step tasks where the agent must remember what comes next.
Quick reference table
| Memory type | Time span | What it holds |
|---|---|---|
| Working / in-context | Short-term | Current prompt, recent messages, tool outputs |
| Semantic | Long-term | Facts and preferences |
| Episodic | Long-term | Past events, conversations, outcomes |
| Procedural | Long-term | Skills, workflows, tool patterns |
| External / retrieval | Short + long | Outside docs in a vector database (RAG) |
| Parametric | Long-term | Knowledge in model weights (frozen) |
| Prospective | Short + long | Future intentions and scheduled goals |
How engineers build these in practice
In real systems, these memory types live in separate stores. The article shows a simple Python sketch. It keeps semantic, episodic, procedural and working memory as different stores. In production, long-term memory usually moves to a vector database.
Several tools help here. The guide names CoALA, a framework from Princeton, and LangChain’s LangMem. It also names databases like MongoDB, Redis and Neo4j. Engineers mix these to give an agent the right memory for each job. Designing this well is closely tied to the rise of new AI systems, such as Japan’s Sakana Fugu multi-model system.
FAQ
Why do LLMs forget things?
LLMs are stateless. That means they keep no memory between calls. Each request is handled on its own. So agents add memory systems on top to hold information over time.
What is the difference between semantic and episodic memory?
Semantic memory stores plain facts, like a user’s preference. Episodic memory stores events, like a full past conversation and its result. Facts versus experiences is the simple way to tell them apart.
What is a vector database?
It is a store that finds items by meaning, not exact words. Agents use it to pull the most relevant notes or documents at the moment they answer. This powers retrieval memory and RAG.
Can you update parametric memory?
Not easily. Parametric memory is locked into the model’s weights at training time. To change it, you must retrain or fine-tune the model. That is why other memory types are used for fresh, changing info.
Why it matters (especially for India / founders)
India has a fast-growing pool of AI engineers and startups. Many are now building agents, not just chatbots. Knowing these 7 memory types is a basic skill for that work. It helps teams design agents that actually learn and improve.
For founders, good memory design is a real edge. An agent that remembers customers feels smarter and more useful. That can mean happier users and lower costs. Many of the named tools are free or open, so small teams can start cheaply. This space is moving fast, alongside big bets like the FAA’s $875 million plan to cut flight delays using better systems.
The takeaway
Agent memory is what turns a forgetful model into a capable assistant. The 7 types, from working memory to prospective memory, each play a clear role. AI engineers who mix them well can build agents that learn, recall and plan. For India’s growing AI scene, this is foundational knowledge worth mastering.