Choosing Memory Strategies for Single Agents and Agent Teams
This lesson explains the memory strategies that allow agents to personalize and learn from past interactions, both a single agent's memory about its users and memory that a team of agents shares, and how Foundry and custom implementations provide them.
Learning outcomes
After completing this lesson, you will be able to:
- Combine session memory with user memory for a single agent.
- Describe Foundry Agent Service memory stores.
- Distinguish private, workflow-shared and cross-workflow memory, and control who may write to each.
Single-agent memory
A single agent typically combines session memory, the current conversation, with user memory that persists across sessions: profile facts (role, location), preferences (language, format), and summaries of past interactions. At the start of a conversation or step, relevant memories are retrieved and injected; at the end, new memories are extracted and stored. Extraction can be done by a model that identifies durable facts, with consolidation that merges duplicates and updates contradicted facts.
The memory cycle of a conversation
Foundry Agent Service memory
Foundry Agent Service provides managed memory stores (preview). A memory store is configured with chat and embedding model deployments; it extracts user profile and chat summary memories from conversations, consolidates them and returns relevant memories to the agent, scoped by a user identifier. Updates in 2026 added procedural memory, viewing and editing of individual memory items, and time-to-live settings on stores. Agents use memory through a memory search tool or the Memory Store API. Because the feature is in preview, behaviour and limits can change.
Foundry memory stores
Multi-agent memory
In a team, memory can be private to an agent (its own procedures and learned patterns), shared within a workflow (the case file that all agents working on a case read) or shared across workflows (customer facts used by every agent that serves that customer). The design decides which agents may read and which may write each kind. Allowing every agent to write shared memory risks one agent's mistake or a prompt injection polluting the memory that others trust, so writes are restricted to designated agents or go through validation.
The following table summarizes the strategies.
| Memory | Scope | Writers | Example |
|---|---|---|---|
| Session | One conversation | The agent in the conversation | Current troubleshooting steps |
| User | One user, across sessions | Extraction process with consolidation | Preferred language and delivery option |
| Case or workflow | One case | Designated agents | Verified facts and decisions on a claim |
| Procedural | One agent or team | Reviewed updates | Steps that resolved a recurring issue |
Kinds of memory in a team
Polluted shared memory
In a support team of four agents, any agent can write to shared customer memory. After a web-search agent processed a forum page, the memory recorded that a customer was entitled to a free replacement, and other agents offered it.
Write access to shared customer memory should be limited to the agent that handles verified account data, with validation of entitlement-related facts against the system of record. The web-search agent should not write shared memory at all. A guardrail on tool responses would reduce injections, but the write permission is the root cause.
How is shared memory protected from being polluted by one agent?
Show answer
By restricting which agents may write to it and validating important facts before they are stored.
Exam Tips
Remember for the exam
- User memory: extract, consolidate, retrieve, scoped per user.
- Foundry memory stores (preview) provide user profile and chat summary memories.
- Restrict which agents may write shared memory; validate important facts.