Skip to content
  1. Home
  2. AI agents
  3. Agent memory and context
  4. 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

  1. 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.
  2. 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.
  3. 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.
  4. AgentCore added episodic memory in December 2025, and it carries a specific leak risk: AWS warns that reflections can span actors.
The four types of agent memoryWorking memory lives in the context window for this call; its example is the purchase order being checked, and its control is the session expiry you set. Semantic memory holds facts and preferences in a store; its example is a technician who prefers reports in German, and its control is a scope per user with a TTL. Episodic memory holds past events; its example is how a VPN error was fixed last month, and its control is reflections kept per actor. Procedural memory holds how to act; its example is an invoice rule learned for one supplier, and its control is human approval before it takes effect. The three long-term types are retrieved into the window when relevant, and the TTLs and deletion policies you configure apply to them.In the context windowWorking memoryLives in the context window, this callExample: the purchase order in handControl: session expiry you setretrieved into the window when relevant;configured TTLs and deletion policies applyIn a long-term storeSemantic memoryFacts and preferences, in a storeExample: prefers reports in GermanControl: scope per user, TTLEpisodic memoryWhat happened in past tasksExample: how the VPN error was fixedControl: reflections per actorProcedural memoryHow to act: routines, refined rulesExample: one supplier’s invoice ruleControl: human approval before useThe four types of agent memoryWorking memory lives in the context window for this call; its example is the purchase order being checked, and its control is the session expiry you set. Semantic memory holds facts and preferences in a store; its example is a technician who prefers reports in German, and its control is a scope per user with a TTL. Episodic memory holds past events; its example is how a VPN error was fixed last month, and its control is reflections kept per actor. Procedural memory holds how to act; its example is an invoice rule learned for one supplier, and its control is human approval before it takes effect. The three long-term types are retrieved into the window when relevant, and the TTLs and deletion policies you configure apply to them.In the context windowWorking memoryLives in the context window, this callExample: the purchase order in handControl: session expiry you setretrieved when relevantIn a long-term storeSemantic memoryFacts and preferences, in a storeExample: prefers reports in GermanControl: scope per user, TTLEpisodic memoryWhat happened in past tasksExample: how the VPN error was fixedControl: reflections per actorProcedural memoryHow to act: routines, refined rulesExample: one supplier’s invoice ruleControl: human approval before use
The four types, where each lives, and the control each needs. Working memory lives in the context window; the three long-term types live in a store and are retrieved back into the window when relevant.

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.

OrderTypeStoreManaged product (status 2 Nov 2026)Control it adds
1Working, kept between turnsThread or session stateAgentCore short-term events (GA); Agent Platform Sessions (GA); Foundry threadsExpiry with the task
2Semantic (user preferences)Memory store, one namespace per userAgentCore user preference strategy (GA); Memory Bank memory profiles (GA 15 Jul 2026); Foundry user profile memory (preview)Scope per user, TTL, user-visible delete
3EpisodicMemory store, actor-level reflectionsAgentCore episodic strategy (GA, Dec 2025); Foundry chat summary (preview)PII screen on writes; reflections kept per actor
4ProceduralPrompt and routine store, versionedFoundry procedural memory (preview, 2 Jun 2026); memory tool files; LangMemHuman 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

CapabilityMicrosoftAWSGoogle
Working and session memoryThreads in Foundry Agent Service; conversation history in Microsoft 365 CopilotShort-term events by actorId and sessionId, kept up to 365 daysAgent Platform Sessions (GA December 2025)
Semantic memoryFoundry 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 memoryFoundry chat summary memory (preview)Episodic strategy with reflections (December 2025); summary strategyConsolidation across sessions; revision history
Procedural memoryFoundry procedural memory (preview, 2 Jun 2026); Copilot custom instructions, written by the userNo built-in procedural strategy; self-managed strategy or memory tool filesNo 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

Context engineeringRead
Memory privacy and retentioncoming

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.

  1. Cognitive Architectures for Language Agents (CoALA), arXiv 2309.02427 arXiv, 5 September 2023. Version 3, March 2024, published in TMLR.
  2. Memory (LangChain and LangGraph concepts) LangChain docs, undated page, read 2 November 2026
  3. AgentCore Memory strategies AWS documentation, undated page, read 2 November 2026
  4. AgentCore episodic memory strategy AWS documentation, undated page, read 2 November 2026
  5. Create an AgentCore Memory AWS documentation, undated page, read 2 November 2026
  6. What is memory in Foundry Agent Service Microsoft Learn, 2 June 2026
  7. What’s new in Microsoft Foundry at Build 2026 Microsoft Foundry Blog, 2 June 2026
  8. Manage Copilot personalization and memory Microsoft Learn, 2 September 2026
  9. Memory Bank and Sessions generally available (Agent Builder blog; Vertex AI was renamed Gemini Enterprise Agent Platform on 22 Apr 2026) Google Cloud Blog, 18 December 2025
  10. Gemini Enterprise Agent Platform release notes Google Cloud, 28 October 2026
  11. Memory tool Claude Developer Platform docs, undated page, read 2 November 2026
  12. Context editing Claude Developer Platform docs, undated page, read 2 November 2026
  13. Claude Developer Platform release notes Claude Developer Platform docs, undated page, read 2 November 2026
  14. Conversation state OpenAI developer docs, undated page, read 2 November 2026
  15. Lost in the Middle: How Language Models Use Long Contexts, arXiv 2307.03172 arXiv, 6 July 2023

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