- Home
- AI agents
- Agent memory and context
- Types of agent memory
Build · Agent memory and context
What are the types of AI agent memory?
AI agents use four types of memory. Working memory is the context window, what the model sees on this call. Semantic memory holds facts and preferences about a user or the world. Episodic memory records what happened in past tasks. Procedural memory holds how to act: routines and refined instructions. The split comes from the 2023 CoALA paper.
In this guide: 83 pages
Key takeaways
- Working memory is the only type every agent has. Semantic and episodic memory usually live in a store; procedural memory can also sit in prompts, code or model weights. Each long-term type adds a data-protection duty.
- Vendors use different names for the same types. AWS AgentCore: semantic, user preference, summary, episodic. Microsoft Foundry: user profile, chat summary, procedural. Microsoft 365 Copilot: saved memories, details inferred from chat history, custom instructions.
- Semantic memory (user preferences) is the first long-term type to add, and procedural memory is the one to gate, because it changes behaviour for everyone in its scope.
- AgentCore added episodic memory in December 2025, and it carries a specific leak risk: AWS warns that reflections can span actors.
What is working memory, and what belongs in it?
Working memory is the context window: the instructions, conversation, retrieved content and tool results the model can see on the current call. It is the only memory the model reasons over directly; everything else has to be retrieved into it first.
Enterprise example. A procurement agent checking a purchase order holds, in its window, the system instructions, the order itself, the supplier record it just fetched from the ERP, the contract clause a retrieval step returned, and the last few turns with the buyer. When the task ends, that window is gone unless something writes it elsewhere.
Two limits shape it. Size: windows have grown (Anthropic made a 1M-token window generally available on 13 Mar 2026), but every token sent into it is billed, and the Lost in the Middle study (2023) found models use information in the middle of long inputs worse than at the ends. Overflow: tools exist to trim and summarise. Anthropic’s context editing clears old tool results on the server, by default at 100,000 input tokens while keeping the last three tool uses; compaction (Anthropic beta, OpenAI compact threshold) replaces older turns with a summary.
Between turns, working memory is saved outside the model and replayed: a LangGraph checkpointer, an OpenAI Conversations object, AgentCore short-term events (immutable, timestamped, grouped by actorId and sessionId, kept up to 365 days) or Agent Platform Sessions on Google. The context engineering sub-page covers how to spend the window well.
What is semantic memory?
Semantic memory is the store of facts and preferences about a user or the world that the agent extracted from past interactions: a language preference, a default cost centre, a known allergy. It is the type vendors mean when they advertise personalisation, and the first long-term type most enterprise agents need.
Enterprise example. A field-service agent remembers that a technician covers the night shift, prefers parts from the Hamburg depot and writes reports in German. Payhawk’s Financial Controller Agent, built on Google’s Memory Bank, remembers spending habits and auto-submits small meal expenses; the vendor reports submission time cut by more than 50% (Google Cloud blog, 18 Dec 2025, vendor story).
Product names: AgentCore’s semantic and user preference strategies, Foundry’s user profile memory (retrieve it early in a conversation, Microsoft advises), Memory Bank’s memory profiles (GA 15 Jul 2026), Copilot’s saved memories and the details it infers from chat history.
Controls: scope per user, because a preference is personal data; a TTL at creation (AgentCore minimum 31 days, Foundry store default TTL in the preview) so a stale preference expires; consolidation so a new fact replaces the old one; and a way for the user to see and delete what is stored, which Copilot offers in Settings and which you must build yourself on the developer services.
What is episodic memory?
Episodic memory records what happened: the steps an agent took in a past task, what the user confirmed, what failed. Agents reuse episodes as worked examples for similar tasks, and AWS adds a reflection step that draws lessons from them.
Enterprise example. An IT service-desk agent resolving a VPN error recalls that for the same error last month it reset the user’s certificate, the user confirmed the fix, and a reboot was needed first. The episode becomes a few-shot example on the next ticket of that kind.
Products: AgentCore’s episodic strategy with reflections (added December 2025; records appear only after AgentCore detects that an episode has finished), Foundry’s chat summary memory and AgentCore’s summary strategy for the lighter form, and Memory Bank’s consolidation across sessions.
Controls: this is the type that leaks. AWS warns that episodic reflections can span multiple actors and recommends guardrails or keeping reflections at the actor level. An episode also contains whatever the user typed, so the PII screen on the write path matters most here, and the erasure runbook must cover reflections as well as events.
What is procedural memory?
Procedural memory is how the agent acts: its system prompt and operating rules, and the routines it inferred from past interactions. CoALA notes it is held implicitly in model weights and explicitly in prompts and code. Microsoft added it to Foundry memory in June 2026, in preview; AWS offers no built-in strategy for it.
Enterprise example. An accounts-payable agent learns that invoices from one supplier always need a purchase-order match before approval, and that a particular approver wants amounts in euros. Microsoft’s Foundry procedural memory stores reusable how-to routines and operating patterns inferred from prior interactions and retrieves them when a recurring task comes up; Microsoft reported a 7 to 14 point absolute gain on the Tau-bench benchmark at Build (2 Jun 2026, vendor-reported). It is in preview.
Other forms: LangChain describes the system prompt as procedural memory refined through reflection, and LangMem offers prompt optimisation; Anthropic’s memory tool lets the model keep notes-to-self files under a /memories path that your application stores, which teams use for learned procedures; AGENTS.md files play the same role for coding agents.
Controls: a procedural memory changes behaviour for every user in its scope, so treat a write to it as a prompt change. Review and version it, then evaluate the agent again before it takes effect. We never let an agent update this type in production without a human approval.
Which memory type should an enterprise agent get first?
Session memory, then semantic. Most enterprise agents need only working memory that survives between turns of one task. Add user preferences when people repeat themselves across sessions, episodic memory when past cases measurably improve outcomes, and procedural memory only with a review gate. The table shows the order and the control each type adds.
The four types in the order we add them, with the store, the first product to reach for on each cloud and the control each adds.
| Order | Type | Store | Managed product (status 2 Nov 2026) | Control it adds |
|---|---|---|---|---|
| 1 | Working, kept between turns | Thread or session state | AgentCore short-term events (GA); Agent Platform Sessions (GA); Foundry threads | Expiry with the task |
| 2 | Semantic (user preferences) | Memory store, one namespace per user | AgentCore user preference strategy (GA); Memory Bank memory profiles (GA 15 Jul 2026); Foundry user profile memory (preview) | Scope per user, TTL, user-visible delete |
| 3 | Episodic | Memory store, actor-level reflections | AgentCore episodic strategy (GA, Dec 2025); Foundry chat summary (preview) | PII screen on writes; reflections kept per actor |
| 4 | Procedural | Prompt and routine store, versioned | Foundry procedural memory (preview, 2 Jun 2026); memory tool files; LangMem | Human approval and re-evaluation before it takes effect |
Skip a type when the business case cannot name the repeat question it removes. Memory nobody measured is a data-protection duty with no measured benefit.
How do Microsoft, AWS and Google implement it?
How each cloud names and ships the four types, as the vendor pages showed on 2 Nov 2026.
Capability, Microsoft, AWS, Google
| Capability | Microsoft | AWS | |
|---|---|---|---|
| Working and session memory | Threads in Foundry Agent Service; conversation history in Microsoft 365 Copilot | Short-term events by actorId and sessionId, kept up to 365 days | Agent Platform Sessions (GA December 2025) |
| Semantic memory | Foundry user profile memory (preview); Copilot saved memories and inferred details (preview) | Semantic and user preference strategies (GA) | Memory Bank extraction and consolidation; memory profiles (GA 15 Jul 2026) |
| Episodic memory | Foundry chat summary memory (preview) | Episodic strategy with reflections (December 2025); summary strategy | Consolidation across sessions; revision history |
| Procedural memory | Foundry procedural memory (preview, 2 Jun 2026); Copilot custom instructions, written by the user | No built-in procedural strategy; self-managed strategy or memory tool files | No named procedural type on the pages we read |
Google’s Memory Bank does not label its memories by the CoALA types; the rows above map its features onto them. Foundry memory and Copilot memory were both preview on 2 Nov 2026.
Frequently asked questions
What are the different types of memory in AI agents?
Four: working memory (the context window), semantic memory (facts and preferences), episodic memory (past events and actions) and procedural memory (how to act). The first is short-term; the other three are long-term, kept in a store or, for procedural memory, in prompts, code or model weights.
Is the context window the same as short-term memory?
Yes, in practice. The context window is what the model sees on one call, and short-term or working memory is the same content saved between turns and replayed. Products such as AgentCore short-term events and Agent Platform Sessions store it outside the model so a session can resume.
What is the difference between semantic and episodic memory in an agent?
Semantic memory stores facts and preferences stripped of their context (prefers German, cost centre 4120). Episodic memory stores events with their context (on 3 March the agent reset the certificate and the user confirmed). Episodes are reused as examples; facts are reused as defaults.
Does Microsoft 365 Copilot have procedural memory?
Not under that name. Copilot memory has saved memories, details inferred from chat history and custom instructions; custom instructions are the closest to procedural memory, and the user writes them. Admins cannot restrict what is added to memory, and the feature was preview on the Learn page of 2 Sep 2026.
More in Agent memory and context
Sources
Each source was read on 2 November 2026. The date shown is the date on the page, or the page’s ms.date for Microsoft Learn; an undated page shows the date it was read.
- Cognitive Architectures for Language Agents (CoALA), arXiv 2309.02427
- Memory (LangChain and LangGraph concepts)
- AgentCore Memory strategies
- AgentCore episodic memory strategy
- Create an AgentCore Memory
- What is memory in Foundry Agent Service
- What’s new in Microsoft Foundry at Build 2026
- Manage Copilot personalization and memory
- Memory Bank and Sessions generally available (Agent Builder blog; Vertex AI was renamed Gemini Enterprise Agent Platform on 22 Apr 2026)
- Gemini Enterprise Agent Platform release notes
- Memory tool
- Context editing
- Claude Developer Platform release notes
- Conversation state
- Lost in the Middle: How Language Models Use Long Contexts, arXiv 2307.03172
Planning an AI program?
Talk to the team that builds it and runs it after launch.
- Built to SOC 2, HIPAA and GDPR standards
- EU AI Act-aligned delivery
- Microsoft Solutions Partner