Engineering

Engineering

Types of AI Agent Memory: Sensory to Long-Term Explained

Types of AI Agent Memory: Sensory to Long-Term Explained

Types of AI Agent Memory: Sensory to Long-Term Explained

Types of AI agent memories

Every LLM-based AI agent starts each session the same way: with no memory of anything that came before. That's not a bug; it's the default. Unless an agent is deliberately given a memory system, it has no more continuity between conversations than a fresh instance of the model itself.

The clearest way to understand what that memory system needs to do is to look at how human memory already solves the same problem. Human cognition doesn't use one kind of memory; it uses several, each built for a different job: holding a fleeting impression, keeping a task in mind for a few seconds, or retaining a skill for decades. AI agent memory borrows this same structure because the underlying problem, deciding what's worth keeping and for how long, is the same problem.

In this post, we'll walk through the major types of human memory with everyday examples, and for each one, show what its equivalent looks like in an AI agent.

What is Memory?

At its core, memory is the mental process by which we encode, store, and retrieve information. It helps us retain information from our past, enabling us to make decisions and predictions about the present and future. Memory isn't just about remembering a specific fact or event; it's about how we navigate the world, build new knowledge, and even make sense of our identities.

AI agents face a version of the same problem, without any of the biology. A model has no built-in mechanism for retaining anything between calls. Whatever "memory" an agent appears to have is something engineers had to design and add on purpose, using the human memory system as the closest working model of what a memory system needs to do.

Types of Memory in Humans

Memory can be broken down into several distinct types. Each type serves a different function, from storing sensory impressions to retaining long-term knowledge. These types can be categorized as follows:

  1. Sensory Memory

  2. Short-Term Memory (or Working Memory)

  3. Long-Term Memory, which includes:

    • Episodic Memory

    • Semantic Memory

    • Procedural Memory

Let’s explore each of these in detail with everyday examples.

1. Sensory Memory

Sensory memory is the briefest form of memory. It allows us to hold sensory information (what we see, hear, taste, smell, or touch) for a very short period, usually just a fraction of a second. This type of memory helps us process the world around us without becoming overwhelmed by sensory input.

Examples:

Visual Sensory Memory: Have you ever seen a flash of light and, for a split second, still "see" a ghostly afterimage in your mind? This is your iconic memory, a type of sensory memory.

Auditory Sensory Memory: You might hear a phone ringing, and for a brief moment after it stops, you can still "hear" the ringing in your mind. This is echoic memory.

Sensory memory helps you register the immediate world around you, but it doesn't last long enough for you to really "remember" it. It's a quick impression, just long enough for your brain to decide what's important to focus on.

Sensory Memory's Equivalent in AI Agents

In AI agents, the closest equivalent to sensory memory is the raw input buffer: the unprocessed text, audio, or image data an agent receives for a fraction of a second before it gets tokenized or embedded into a form the model can actually reason over.

Unlike human sensory memory, this raw form usually isn't retained on purpose. The moment input arrives, it's converted into tokens or embeddings and either used immediately or discarded. Most AI systems don't need a dedicated sensory-memory analog the way humans do, because there's no equivalent of "deciding what's worth paying attention to" before processing. The system just processes everything it receives; the filtering happens later, at the point where the agent decides what's worth storing in short-term or long-term memory.

2. Short-Term Memory (or Working Memory)

Short-term memory holds information for a brief period, usually up to 30 seconds, before it is either discarded or transferred to long-term memory. This type of memory is essential for tasks that require you to hold information temporarily, like solving a problem or recalling a phone number long enough to dial it.

Example: You are given a 10-digit phone number and repeat it to yourself over and over until you dial it. This is a classic use of short-term memory.

When you're juggling several tasks at once, such as cooking dinner while keeping an eye on a conversation, your short-term memory helps you stay on top of both activities.

In addition to holding information temporarily, working memory is a slightly more complex form of short-term memory. It allows us to manipulate and work with the information we're holding in mind. For instance, you might need to remember the ingredients for a recipe while also keeping track of the cooking time, both of these tasks rely on short-term and working memory.

Working Memory in AI Agents

In AI agents, working memory corresponds most directly to the context window: the span of tokens a model can hold and reason over during a single exchange. Everything the model is actively "thinking about" in a given turn has to fit inside it, the same way a phone number has to stay in your head long enough to dial it.

Related read: Context Window vs Persistent Memory

Session-scoped memory works the same way at a slightly larger scale. It holds context for the duration of a single conversation or task, then gets discarded once the session ends, rather than being promoted to long-term storage. For more on how this scoping decision works in practice, see our short-term vs. long-term memory in AI blog.

3. Long-Term Memory

Long-term memory stores information over extended periods, ranging from minutes to an entire lifetime. It holds everything from the skills you’ve learned to important life events and general knowledge. Long-term memory is divided into three major categories: episodic memory, semantic memory, and procedural memory.

3.1 Episodic Memory

Episodic memory refers to the ability to remember personal experiences and events from our past, often with vivid details like time, place, and emotions.

Example: Recalling the first time you rode a bike, or remembering your high school graduation day, the people, the place, and the emotions you felt.

Recalling a family vacation where you spent a day at the beach. You might remember the sound of the waves, the taste of an ice cream cone, and the way the sun felt on your skin.

Episodic memory helps us relive past experiences, creating a personal timeline of events that define us. It's what makes us feel connected to our past and gives us a sense of continuity.

Episodic Memory in AI Agents

In AI agents, episodic memory is the record of a specific past interaction or outcome, tied to a particular moment rather than a general fact. "Last time we deployed this model, the latency increased" is an episodic memory: it's about one event, not a pattern.

This is what lets an agent avoid repeating a mistake instead of just knowing a static preference.

3.2 Semantic Memory

Semantic memory is the storage of general knowledge, facts, and concepts that we've learned over time. Unlike episodic memory, semantic memory isn't tied to specific personal experiences, but rather to concepts we understand and apply in everyday life.

Example: You know that Paris is the capital of France, or that water boils at 100°C. These facts live in your semantic memory.

Knowing that a dog is a mammal, or that 2 + 2 equals 4, is all part of semantic memory. These are general facts that we understand and use daily without needing to recall a specific event.

Semantic memory allows us to accumulate knowledge about the world and apply it to new situations. It forms the basis for language, understanding, and problem-solving.

Semantic Memory in AI Agents

In AI agents, semantic memory is generalized knowledge accumulated across many interactions rather than tied to any single one, things like a user's role, domain, or recurring preferences. "This user works in fintech and prefers concise answers" is a semantic memory: it's a pattern the agent has noticed, not a record of one specific conversation.

This is what lets an agent apply what it's learned to a new situation it hasn't seen before, the same way knowing water boils at 100°C applies regardless of which pot you're using.

3.3 Procedural Memory

Procedural memory involves the memory of how to perform tasks and actions. It's what allows us to remember how to do things, even if we haven't done them in a while.

Example: Riding a bike or driving a car: Even if you haven't ridden a bike in years, you can still get on one and ride it without thinking too hard about it. This muscle memory is procedural memory at work.

Playing a musical instrument, like the piano. The sequence of notes and hand movements you've practiced becomes ingrained in your procedural memory.

Procedural memory is what allows you to perform skills and tasks without needing to consciously think about every step. It's like second nature once you've learned how to do something.

Procedural Memory in AI Agents

In AI agents, procedural memory is knowledge of how to do something, not knowledge of a fact. Where semantic memory stores "this user works in fintech," procedural memory stores "when this user asks for a report, format it as a table with totals at the bottom," a learned behavior built up from repeated patterns rather than something the agent was explicitly told once.

This shows up most clearly in coding agents and workflow automation, where the value isn't remembering a fact about the user but remembering the sequence of steps that reliably gets a task done correctly.

AI Agent Memory: A Quick Comparison Table

Let's compare the human memory type to its AI agent memory equivalent:

Human Memory Type

AI Agent Equivalent

Example

Sensory Memory

Raw input buffer (pre-tokenization/embedding)

The unprocessed text, audio, or image data an agent receives before it's converted into tokens

Short-Term / Working Memory

Context window / session-scoped memory

The active conversation history held for the duration of a single session

Episodic Memory

Episodic memory (event-specific records)

"Last time we deployed this model, the latency increased"

Semantic Memory

Semantic memory (generalized facts)

"This user works in fintech and prefers concise answers"

Procedural Memory

Procedural memory (learned behavior patterns)

"Always run tests before suggesting a deploy"

Read more about the comparison between all 3 types of memories: Semantic vs Episodic vs Procedural Memory in AI Agents

Conclusion

Human memory is a remarkable system that helps us understand and navigate the world around us. From the fleeting impressions of sensory memory to the lasting knowledge stored in long-term memory, each type of memory serves a vital function in shaping how we learn, grow, and experience life.

That same structure turns out to be the clearest available blueprint for giving AI agents memory that actually works. An agent that only has a context window is operating with working memory and nothing else; it can hold a thought for the length of a conversation, then lose it entirely. Real continuity requires the equivalent of long-term memory: a place for episodic records, semantic facts, and procedural patterns to live outside any single session, and a system that knows when to write to it and when to retrieve from it.

This is what Mem0 is built to do. Rather than treating memory as a single undifferentiated blob of past conversation, Mem0 extracts and scopes memories the way the human system above does: distinguishing a one-off event from a standing fact from a learned behavior, and retrieving the right one at the right moment instead of replaying everything at once.

Frequently Asked Questions

Q. What are the main types of human memory?

Human memory splits into sensory memory, short-term (working) memory, and long-term memory. Long-term memory further divides into episodic memory (specific past events), semantic memory (general facts and concepts), and procedural memory (learned skills and actions). See the breakdown above for examples of each.

Q. How do AI agents implement long-term memory?

AI agents implement long-term memory as a storage and retrieval layer that sits outside the model's context window, similar to how humans store episodic, semantic, and procedural memory outside momentary awareness. Systems like Mem0 extract facts, past interactions, and learned behaviors as they happen, then retrieve only the relevant ones at the right moment instead of replaying the full history every time.

Q. What's the difference between episodic and semantic memory in AI agents?

Episodic memory records a specific past event, like a particular deployment or conversation outcome. Semantic memory stores a generalized fact learned across many interactions, like a recurring preference, that isn't tied to any single event. Episodic memory answers "what happened"; semantic memory answers "what's generally true."

Q. Does an AI agent need sensory memory?

Not in the way humans do. Human sensory memory briefly holds raw input before the brain decides what's worth attending to. In AI agents, the closest equivalent is the raw input buffer before tokenization or embedding, but since most systems process that input immediately rather than holding onto a raw impression, a dedicated sensory-memory system isn't typically necessary.

Q. Is a context window the same as working memory?

They're closely related but not identical. A context window is the technical mechanism, the fixed span of tokens a model can process at once. Working memory is the functional role of holding and manipulating active information during a task. In practice, a context window combined with session-scoped memory serves the same function that working memory serves in humans.

GET TLDR from:

Summarize

Website/Footer

Summarize

Website/Footer

Summarize

Website/Footer

Summarize

Website/Footer