The Six Types of Memory an AI Agent Needs (and How Copilot Studio and Foundry Handle Them)
A practical guide for architects and engineers building production agents on Microsoft Copilot Studio and Microsoft Foundry. Product details were checked against Microsoft Learn on 24 November 2026.
In short: agent memory is not one store. It is six kinds of state with different lifetimes, owners and ways of failing. Decide what may be written, whose it is, how long it lives and how it is deleted before you choose where to keep it. Copilot Studio and Foundry both ship memory features now, and their documentation tells you a lot about where the risks are.









Swipe or scroll sideways for all 9 slides. Images: AI-generated.
A typical failure
An HR agent is asked about the travel policy. It answers confidently with last year's mileage rate. Nobody changed the agent. What happened is that, months ago, a user pasted the old policy into a chat, the agent saved the figure as a "fact", and nothing ever told it the figure had expired. The current policy sits in SharePoint, but the remembered figure arrived first and sounded certain.
The same pattern shows up in other shapes. An agent replays a five-step workflow that broke when an API changed. An agent shares with one user something it learned from another. A follow-up the agent promised never happens because the chat session it lived in was closed.
None of these is a storage problem. A bigger or faster vector database fixes none of them. They are problems of admission (what may be written), scope (whose memory it is), lifecycle (when it expires or is replaced) and authority (whether a memory can override a policy or a permission). That is why it helps to stop thinking of memory as one bucket.
The six types of agent memory
The names come from cognitive science, and each has an everyday human version. The useful part for an engineer is that each type has its own lifetime and its own typical failure:
| Type | Human example | What it holds (agent) | How it usually fails |
|---|---|---|---|
| Working | The number you hold in your head while you dial | The current turn: instructions, recent messages, tool results | Bloat: every turn pays for tokens it does not need, and the useful part gets diluted |
| Episodic | Remembering last year's trip | What happened before: past runs, decisions, outcomes, with dates | A one-off event gets treated as a general rule |
| Semantic | Knowing how a colleague takes her tea | Facts the agent has learned: entities, preferences, definitions | Unverified text gets saved as fact and repeated with confidence |
| Procedural | Cooking a recipe your hands just know | How work gets done: workflows, tool sequences, skills | Silent drift when an API, schema or approval rule changes |
| Prospective | Remembering to post a letter on Friday | What was promised for later: follow-ups, pending approvals, scheduled checks | The promise disappears when the chat session ends |
| Knowledge and retrieval | Knowing which shelf to look on | Curated content the agent looks up: policies, documents, search indexes | Retrieval that ignores who is asking, or old drafts treated as current |
1. Working memory
Everything in the model's context for the current turn: system instructions, recent messages, retrieved passages, tool results and any scratch state. It is the only memory the model actually "sees". The failure is bloat: a long conversation plus large tool outputs means every turn pays for tokens (or Copilot Credits) it does not need, and the useful part gets lost among the rest. Keep retrieved payloads short, summarise old turns, and drop tool output once it has been used.
2. Episodic memory
A record of what happened: which run, when, what was decided, what the outcome was. It lets an agent say "last time we tried supplier A, the delivery was late". The failure is treating an episode as a rule. One unusual week becomes "the user always wants weekly reports". Keep dates on episodes, keep the raw log separate from the short summary the agent reads, and let episodes age out.
3. Semantic memory
Distilled facts: a user's role, a customer's preferred contact method, what an internal acronym means. This is what most people mean by "the agent remembers me". The failure is garbage in: text that was never verified gets stored as a fact and repeated with confidence. Facts need a source, a date and a rule for what happens when a new fact conflicts with an old one.
4. Procedural memory
How work gets done: the sequence of tools for a refund, the checks before a purchase order, a skill the agent has learned. It is powerful because it changes behaviour, and that is exactly why it is dangerous. The failure is silent drift: the procedure was right when it was learned, then an API, a schema or an approval rule changed. Treat procedures like code: versioned, reviewed, and never rewritten by an unreviewed conversation or a failed run.
5. Prospective memory
Memory of the future: "remind the manager on Friday", "check the order again when the supplier replies", "wait for approval, then send". The failure is that the intention lives only in a chat thread, and when the session times out it is gone. Prospective memory belongs in something durable that can wake the agent up: a trigger, a schedule, a queue or a workflow with state.
6. Knowledge and retrieval
The curated content the agent looks up rather than learns: policies, product documentation, contracts, search indexes. Some outlines merge this with the model's own training ("parametric memory"), but the two behave differently. The model's weights do not change while your agent runs and you cannot govern them per user, so the only safe stance is that the model's prior knowledge is never authoritative. Retrieval is where governance lives: the failure is retrieval that ignores who is asking, or that serves a draft as if it were the approved version. (Our article on document permissions shows how much permission handling varies by source.)
Microsoft draws the same line. Copilot Studio's documentation lists memory, conversation history, knowledge and tools as separate sources, and Foundry's memory documentation says to use memory for user-specific context learned over time and a Foundry IQ knowledge base for curated organisational content.
What gets missed in demos
A memory demo shows the agent remembering something. Production needs the opposite skills as well.
Forgetting is a feature
Every memory item needs either an expiry (a time-to-live, or TTL) or a rule that replaces it when a newer version arrives. Foundry's memory store lets you set a default TTL per store, and a value of 0 means memories never expire, so "forever" is a choice you make by default if you do nothing. In a Foundry Standard setup, conversation threads in your own Cosmos DB persist until you delete them. Decide retention per memory type, in line with your data protection policy, before go-live.
Scope comes from identity, never from the prompt
Whose memory is this? The answer must come from the authenticated user and tenant, not from text such as "I am the
finance director". Foundry makes this concrete: its low-level memory APIs require you to set scope
explicitly on every request, and automatic scoping from the caller's identity is only supported through the memory
search tool with the scope set to {{$userId}}. If your code builds the scope from anything the user typed,
one user can read another's memories.
Memory is context, not authority
Copilot Studio's documentation says it plainly: memory "isn't a source of authority. It can't grant permissions or bypass approvals." Inject memories as clearly labelled background, below the system instructions, and never let a remembered "the manager said this is approved" replace an actual approval step.
Shared memory changes the privacy model
Copilot Studio agents that have their own account (a Frontier preview feature) use shared memory rather than personal memory: one memory across everyone the agent works with. Microsoft's own notice says memories can include summaries of files and chats and can be used in responses to any user, "even users without permissions to the files or chats and regardless of sensitivity label". Shared memories are deleted after 28 days without interaction, and in this preview users cannot opt out. That can be the right design for a team assistant, but it is a different risk profile from personal memory, and your users should know which one they are talking to.
A write gate in front of durable memory
Most memory systems decide what to save with a model's judgement. Copilot Studio's documentation is honest about this: its rules on what not to save "aren't a filter that blocks content". Foundry's documentation warns about prompt injection and memory corruption and recommends prompt-injection detection and adversarial testing. For anything that matters, put a deterministic check between the conversation and durable memory: right scope, allowed memory type, no credentials or special-category data, not a duplicate, no conflict with a newer item, and nothing from a failed tool run.
Test forgetting and abstention, not just recall
Most memory tests ask "did it find the right memory?". Also test the negative cases: a superseded fact must not be used, one user's memory must never appear for another, and when nothing verified is stored the agent must say it does not know. We call the first of these negative recall: checking that what should not be found is not found. The same retrieval-versus-generation split we use for RAG applies; see Evaluating RAG with a golden set.
Reference architecture: Copilot Studio and Microsoft Foundry
In a Microsoft stack, Copilot Studio and Foundry are complementary rather than rival choices. Copilot Studio is strong for conversational agents, Microsoft 365 grounding and business workflows built by makers. Foundry gives developers deeper control over models, tools, retrieval pipelines and state. Here is where each memory type typically lives:
| Memory type | Microsoft Copilot Studio | Microsoft Foundry |
|---|---|---|
| Working | Conversation history and the orchestrator's context for the current conversation | The agent's thread and run state; you control what each turn sends to the model |
| Episodic | Memory notes on ongoing work and running records, per user | Chat summary memory (preview); full threads in Cosmos DB in a Standard setup |
| Semantic | Memory notes about a person: role, expertise, preferences | User profile memory (preview), consolidated by the service |
| Procedural | Instructions, topics, tools and agent flows; feedback memories | Procedural memory (preview), plus your agent definitions and tools |
| Prospective | Event triggers, scheduled agent flows and approval steps | Your own triggers, queues or workflow state (for example Logic Apps or Durable Functions) |
| Knowledge and retrieval | Knowledge sources such as SharePoint and Dataverse | Foundry IQ (Azure AI Search) knowledge bases and the file search tool |
Notes on the table:
- Copilot Studio Memory keeps short plain-text notes per user account (about the person, feedback, ongoing work, references and running records). Users can view, search and delete their memories in a memory portal. Microsoft says Memory is rolling out for general availability and may still be in preview in some regions. Turning Memory off stops the agent using memories but does not delete them straight away.
- Memory in Foundry Agent Service is in preview. It extracts memories from conversations, merges duplicates and resolves conflicts with a model, and retrieves them later. You can create, read, update and delete individual items, and handle "remember this" and "forget that" requests directly.
- Event triggers in Copilot Studio authenticate with the agent maker's credentials. A triggered run can therefore reach data the end user cannot, which matters when that run reads or writes memory.
- Microsoft Purview helps around the edges rather than inside the memory store: Data Security Posture Management for AI can capture prompts and responses from apps built on Foundry, and Copilot Studio honours sensitivity labels for SharePoint and Dataverse knowledge sources. Shared memory, as noted above, does not follow sensitivity labels.
Build order
- Start stateless. Working memory plus good retrieval answers more questions than people expect.
- Add semantic memory for preferences once users are clearly repeating themselves, with a memory portal or an equivalent way to see and delete what is stored.
- Add episodic summaries when tasks span several sessions, and keep the raw audit log separate.
- Move prospective work into workflows (triggers, schedules, approvals) as soon as the agent promises anything for later.
- Allow procedural memory last, and only with review: a procedure the agent learned should be promoted by a person or an evaluation, not by the conversation that produced it.
Pre-launch checklist
- No "save everything": raw tool payloads, dead-end reasoning and small talk stay out of long-term memory.
- Write gate enforced: scope, memory type, sensitive data, duplicates and conflicts are checked by code before a durable write.
- Procedures protected: untrusted text and failed runs cannot change procedural memory.
- Expiry for every item: a TTL or a supersession rule, and a retention period you can justify.
- Scope from identity: memory reads and writes use the authenticated user and tenant, and never widen access.
- Memory framed as context: memories are injected as labelled background, never as instructions.
- Users can see and delete: a portal, a command or an API for "what do you remember?" and "forget that".
- Evaluations include negative recall and abstention, not just top-k similarity.
- Cost and audit telemetry: tokens or credits per turn, memory writes per day, retrieval hit rate, and an audit trail of memory changes.
- Memory model documented: personal or shared, preview or generally available, which region.
Frequently asked questions
Is a vector database enough for agent memory?
No. A vector store is one way to retrieve stored items. Agent memory also needs rules for what may be written, who it belongs to, how long it is kept, how conflicts are resolved and how it is deleted.
What is the difference between memory and knowledge?
Memory is what the agent learns from its own interactions, such as a user's preferences or the outcome of a previous run. Knowledge is curated reference content, such as policies and documents, that the organisation owns and maintains. Microsoft documents them separately in both Copilot Studio and Foundry.
Does Copilot Studio have memory?
Yes. Copilot Studio Memory keeps short notes per user account, such as role, preferences, feedback and ongoing work, and users can view and delete them in a memory portal. Microsoft says it is rolling out for general availability and may still be in preview in some regions.
Does Microsoft Foundry have memory?
Yes, in preview. Memory in Foundry Agent Service stores user profile, chat summary and procedural memory in a memory store, with a scope you set and an optional default time-to-live.
Can memory give a user access to something they could not see before?
It should not, and Microsoft states that Copilot Studio memory cannot grant permissions or bypass approvals. But shared memory in agents with their own account can surface summaries to users who lack access to the original files, regardless of sensitivity label, so check which memory model your agent uses.
How do I test agent memory?
Besides checking that the right memory is found, test that stale or superseded memories are not used, that one user's memories never reach another user, and that the agent says it does not know when nothing verified is stored.
Conclusion
Agent memory is easy to switch on and hard to run well. The six types give you a vocabulary for asking the right question about each piece of state: who may write it, whose is it, how long does it live, and can it ever override a policy? Answer those, and the choice between Copilot Studio Memory, Foundry's memory store, Cosmos DB or a search index becomes a detail rather than the design.
Building agents on Microsoft? Our live online courses cover these platforms hands-on: Copilot Studio agents (AB-620), Azure AI apps and agents in Microsoft Foundry (AI-103) and, for architects, Agentic AI Business Solutions Architect (AB-100). All on UK time, with mock assessments before you book the exam.
Published by Anika Tech Academy. This article is an independent technical explanation, not an official Microsoft publication, and Anika Tech Academy is not affiliated with or endorsed by Microsoft. The failure example is illustrative. Product capabilities and preview status were checked on 24 November 2026 and should be rechecked before deployment.
Official documentation
- Memory in Copilot Studio
- How agents determine what to remember
- Memory management and privacy
- FAQ for agent accounts (shared memory)
- Event triggers in Copilot Studio
- Memory in Foundry Agent Service (preview)
- Create and use memory in Foundry Agent Service
- Foundry Standard agent setup (Cosmos DB, Storage, Foundry IQ)
- Microsoft Purview for Microsoft Foundry
- Microsoft Purview for Copilot Studio