The cognitive layers
A model is stateless: it remembers nothing between calls. Memory is the layer that gives an agent continuity, holding what it has done, learned and been told across runs. It assembles from four cognitive layers, working, episodic, semantic and procedural, each with its own scope and its own storage mechanism.
Short-Term / Working
Tracks the immediate sequence of thoughts, actions and observations within a single run.
Episodic
Stores past experiences, historical actions and conversation logs: remembers HOW a task was accomplished.
Semantic
Long-term retention of facts, concepts and user preferences for personalization and RAG.
Procedural
The agent's rules of operation, instincts and "motor skills": model weights, code, and system prompt.
Extraction & Dual-Store
Stores structured facts instead of raw logs; prevents memory pollution when users change their mind.
Temporal Knowledge Graph
Treats time as a first-class structural dimension: knows a preference or job was superseded.
Segmented Networks
Decouples raw evidence from belief by isolating four memory networks.
Amazon Bedrock Agents (managed tiers)
Organizes memory into three tiers for multi-agent continuity.
Memory Admission Pipeline
Stops memory growing out of control by validating before commit.
Working, episodic, semantic, procedural: how agents actually remember
Memory is one of the harder parts of an agent to get right. Past simple retrieval, the difficulty is in the detail: how long a lookup takes, what schema the memories were harvested into, and whether what comes back is structured well enough to act on. The sophistication sits in retrieval and structure, not in the storing.
Show more
The types above are the well-cited core of agent memory: working memory for the run in progress, episodic for what happened before, semantic for facts and preferences, procedural for rules and skills. Using them together is the hard part, and that difficulty is why a supplier layer has grown around specific kinds of memory, from atomic facts to ephemeral session state.
What is agent memory?
Whatever an agent keeps between calls. The model itself is stateless and forgets everything the moment it replies, so memory is a separate store the agent writes to and reads back. It is what lets an agent still know who you are tomorrow.
What are the four types of agent memory?
Working memory is the conversation you are in. Episodic memory is what happened in past runs. Semantic memory is facts and preferences. Procedural memory is rules and skills. The split borrows from human memory research, and most stacks implement two or three of the four rather than all of them.
What is semantic memory in an AI agent?
The facts the agent stores about you and your world: your name, your stack, what you prefer. Two patterns dominate. One profile document per user that keeps getting patched, or a growing list of separate facts. Profiles read cleanly and get harder to edit as they grow; lists are easy to add to and need conflict resolution.
What is episodic memory in an AI agent?
A record of past runs: what the agent tried, what happened, and whether it worked. It is normally fed back in as examples so the agent repeats an approach that succeeded before. The main failure is pulling up the wrong past episode and confidently repeating the wrong approach.
What is procedural memory in an AI agent?
The rules and skills that shape how an agent behaves: its system prompt, its code, its model weights. Updating it means rewriting instructions rather than storing a fact. Agents that edit their own instructions improve quickly and can drift, so most teams keep a person in that loop.
Do I need a vector database or a memory service?
A vector database does similarity search: embed the query, return the nearest chunks, done. A memory service adds what an agent actually needs on top, pulling out facts, spotting duplicates, and knowing which version of a fact is current. Use a vector DB for document search and a memory service for remembering a user.
When is plain vector search not enough?
When the answer depends on time or on relationships. Similarity search has no idea which of two contradictory facts is newer, and it cannot follow a link from one entity to another. That is the point where teams add timestamps on every fact, a knowledge graph, or both.