|

The 7 Types of Agent Memory: A Technical Guide for AI Engineers

Large language fashions are stateless by default. Each API name begins contemporary. The mannequin forgets your final message as soon as the response returns. That is okay for a single query. It breaks the second you construct an agent.

Agents plan, name instruments, and run throughout many steps. They want to recollect. Memory is the infrastructure that fixes this. It turns a stateless mannequin right into a system that retains context. That system can be taught from expertise and act over time.

What is Agent Memory

Memory is any mechanism that carries data throughout a mannequin’s reasoning. Some of it lives contained in the context window. Some of it lives outdoors, in databases or mannequin weights. Each kind shops a special class of data for a special length.

Memory varies by type and by time. Form means parametric, saved in weights, or non-parametric, saved as textual content. Time means short-term or long-term. The seven varieties beneath map onto these two axes.

The Seven Types of Agent Memory

1. In-Context / Working Memory (Short-Term): This is all the things the mannequin can at the moment see inside its context window. It consists of the system immediate, latest messages, software outputs, and reasoning steps. Think of it as RAM. It is quick and important, however short-term and size-limited. Every different reminiscence kind competes for house right here.

2. Semantic Memory (Long-Term): This is a persistent retailer of information, preferences, and area data. It holds entries like “the person prefers Python over JavaScript.” The data is decoupled from when it was realized. It is the agent’s organized encyclopedia a couple of person or matter.

3. Episodic Memory (Long-Term): This logs particular previous occasions, full conversations, and activity runs. It information what labored and what failed. The agent makes use of it to be taught from expertise. Systems like Reflexion and ExpeL write verbal post-mortems and retailer conclusions for future runs.

4. Procedural Memory (Long-Term): This is the agent’s data of tips on how to do issues. It covers abilities, software utilization patterns, workflows, and behavioral guidelines. A assist agent dealing with its hundredth password reset doesn’t re-reason the workflow. It executes a realized process as an alternative.

5. External / Retrieval Memory (Short-Term + Long-Term): This is data saved outdoors the mannequin in a vector database. It is pulled into context at inference time utilizing similarity search. This is RAG utilized to agent historical past or paperwork. Retrieval high quality turns into the bottleneck quick.

6. Parametric Memory (Long-Term): This is data baked immediately into the mannequin’s weights throughout coaching. It holds language, reasoning patterns, and common world data. The mannequin doesn’t look something up. It generates from realized associations. The tradeoff is that this reminiscence is frozen at coaching time.

7. Prospective Memory (Short-Term + Long-Term): This is the agent’s skill to recollect future intentions and scheduled targets. It tracks issues the agent deliberate however has not but executed. It is important for long-horizon and multi-step planning brokers. Without it, an agent forgets its personal commitments.

Side-by-Side: How the Seven Compare

The desk beneath maps every kind to its timescale, location, and typical implementation.

Memory kind Timescale Where it lives What it shops Common implementation
Working / In-context Short-term Context window Prompt, messages, software outputs Native to the LLM
Semantic Long-term External retailer Facts, preferences, area data Vector DB or profile schema
Episodic Long-term External retailer Past occasions, activity runs, outcomes Vector DB plus occasion logs
Procedural Long-term Prompt or weights Skills, workflows, behavioral guidelines System immediate or fine-tune
Retrieval / External Both Vector database Documents, historical past chunks RAG pipeline
Parametric Long-term Model weights World data, language, reasoning Pre-training or fine-tuning
Prospective Both State retailer Future intentions, scheduled targets Task queue or scheduler

Interactive Explainer