Persisting State Across Session, Team and Long-Term Tiers
This lesson describes the three tiers of state in a multi-agent system, conversations that last minutes, workflows that wait days and memories that last months, and the policies for each, since storing all of it in one place either wastes money or loses durability.
Learning outcomes
After completing this lesson, you will be able to:
- Describe the requirements and stores for session state.
- Describe how shared team state is kept durable.
- Define policies for long-term semantic memory, including tenant isolation.
Session state
Session state covers one conversation or run: messages, temporary variables and tool results. It needs low latency and expires after inactivity. Foundry Agent Service stores conversations for its agents. Custom agents use Azure Managed Redis (the successor to Azure Cache for Redis, which is being retired) for fast access with expiry, or Azure Cosmos DB items with a time-to-live (TTL) when durability across restarts matters.
The following diagram shows the three tiers of state.

Which state tier?
Shared team state
Shared team state is the state of a multi-agent workflow: which steps are complete, the shared blackboard, pending approvals and intermediate results. It must be durable and consistent, because a workflow that pauses for approval must resume exactly where it stopped, possibly on another instance. Agent Framework checkpoints and LangGraph checkpointers persist this state to storage such as Cosmos DB or Azure Blob Storage; Foundry workflows persist it automatically. Concurrent writers need optimistic concurrency (ETags) or a single writer per field.
Durable shared state
Long-term semantic memory and its policies
Long-term semantic memory holds facts, preferences and summaries with embeddings for retrieval: Foundry memory stores (preview), Azure AI Search indexes or Cosmos DB with vector search. Two kinds of policy govern it. Lifecycle policies define retention periods, TTL, consolidation of duplicates and deletion on request. Tenant-isolation policies keep each tenant's data separate: a container, database or index per tenant for strong isolation, or a tenant partition key with mandatory filters for efficient sharing.
The following table summarizes the three tiers.
| Tier | Requirements | Typical Azure components |
|---|---|---|
| Session state | Low latency, expiry | Foundry conversations, Azure Managed Redis, Cosmos DB with TTL |
| Shared team state | Durability, consistency, resume | Workflow checkpoints in Cosmos DB or Blob Storage |
| Long-term semantic memory | Vector retrieval, retention, isolation | Foundry memory stores, AI Search, Cosmos DB vector search |
Lifecycle or tenant isolation?
A multi-tenant SaaS assistant
A software vendor offers an assistant to 400 business customers. Each customer's memories must never be visible to another, two large customers require physically separate storage, and workflows that wait for customer approval must survive service restarts.
Workflow checkpoints go to a durable store such as Cosmos DB. Long-term memory uses a shared store partitioned by tenant ID with filters applied by the service's code for most customers, and dedicated containers or indexes for the two large customers. Relying on instructions such as "only use this tenant's memories" would not isolate data, and in-memory session state would lose waiting workflows on restart.
What lets a paused workflow survive a restart?
Show answer
Workflow checkpoints, which persist its state so it can resume.
Exam Tips
Remember for the exam
- Session state expires; team state must resume; long-term memory needs retention rules.
- Workflow checkpoints make paused workflows survive restarts.
- Tenant isolation: separate stores for strong isolation, partition keys plus enforced filters otherwise.