AI agents are only as intelligent as their ability to remember. Without persistent memory, every conversation starts from scratch, costing tokens, increasing latency, and delivering disconnected user experiences. In this demo-driven session, I'll show you how to use Azure Cosmos DB as the unified memory layer for your agentic AI applications.
We'll build two essential containers from scratch: a Chat History container that preserves multi-turn conversations across sessions and devices, and a Semantic Cache container that uses vector search to return prior LLM completions for semantically similar prompts, reducing costs and latency by avoiding redundant API calls.
You'll see the data modeling decisions that matter: choosing the right partition key strategy for multi-tenant workloads, designing documents that balance write distribution with query locality, and configuring vector indexes for fast similarity search. I'll demonstrate how context windows work, why your cache needs chat history context to return accurate results, and how to implement TTL policies for automatic data lifecycle management.
Walk away with working code patterns you can apply immediately to give your agents the memory they need to deliver coherent, cost-effective, context-aware experiences.
You will learn:
- About Chat History Implementation using CosmosDB
- About Semantic Caching implementation using CosmosDB
- CosmosDB Performance in the AI World