Store Chat History in Microsoft Agent Framework using Cosmos DB or Blob Storage. Real C# examples showing how to persist state at scale.
Here’s what you’ll learn in this video: 🔥
📌 The 3 critical questions you must ask yourself before choosing a production storage engine.
📌 ChatHistoryProvider core mechanics: how ProviderSessionState, ProvideChatHistoryAsync, and StoreChatHistoryAsync orchestrate data flow.
📌 Storing chat messages in Azure Blob Storage for a straightforward, file-based approach.
📌 Production-ready Cosmos DB integration using the native CosmosChatHistoryProvider combined with hierarchical partitioning and precise index exclusions to minimize RU costs.
📌 Full session serialization to Azure Blob Storage using SerializeSessionAsync to atomically snapshot the entire framework StateBag without complex database schemas.
📌 The Final Comparison: Blob Storage vs. Azure Cosmos DB vs. Azure SQL Database vs. Azure Managed Redis to help you select the exact right fit for your workload
👉 Blog post: https://deployedinazure.com/chat-hist...
-----
0:00 Intro
1:16 3 Important Questions
7:10 How ChatHistoryProvider works
16:31 Chat History in Blob Storage
23:22 CosmosChatHistoryProvider
35:16 AgentSession in Blob Storage
41:37 The Final Comparison
48:45 Outro
-----
Follow me 👉
🌐 Blog: https://deployedinazure.com
💻 GitHub: https://github.com/deployed-in-azure/...
🔗 LinkedIn: / deployed-in-azure