Stop Burning RUs: Live AI App Code Review with the Cosmos DB Agent Kit | Azure Cosmos DB Conf 2026
Andrew Liu demonstrates how the Cosmos DB Agent Kit can review an AI app’s data layer directly in the editor, correlating code and Bicep IaC to spot partitioning and indexing issues that waste Azure Cosmos DB RUs and drive up production costs.
Overview
The session is a live demo from Azure Cosmos DB Conf 2026 focused on preventing expensive Azure Cosmos DB mistakes in production (partition key choice, indexing policy, and data model design) by running an in-editor review of an application’s Cosmos DB data layer.
Demo scenario: a multi-agent travel planner with Cosmos DB-backed memory
Andrew walks through a multi-agent travel-planner app (a 5-day LA family trip assistant) that persists different kinds of agent memory in Azure Cosmos DB:
- Short-term memory
- Long-term memory
- Vector memory (for semantic retrieval)
He calls out several memory patterns stored in Cosmos DB:
- Declarative facts
- Procedural preferences
- Episodic trip data
- Vectors
Tooling shown
Azure Cosmos DB VS Code extension
- Query, browse, and inspect a Cosmos DB account inline in VS Code (without switching to the Azure portal).
Cosmos DB Agent Kit
- Installed via a single CLI command.
- Can be installed at project scope or global scope.
- Provides “agent skills” intended to encode Cosmos DB expertise (data modeling, partitioning, indexing, and RU economics) as context for an AI assistant.
What the live review analyzes
The demo highlights a review workflow that reads and correlates:
- The application’s actual data access code
- The application’s Bicep infrastructure-as-code
The goal is to validate that the Cosmos DB configuration matches real access patterns, including:
- Partition keys
- Index policies
- Document shapes
Example findings called out in the session
The review produces concrete, prioritized recommendations, including:
- Missing composite indexes for
ORDER BYqueries - A wrong partition key on the “memories” container
- A prioritized fix list ranked by expected RU savings
Why it matters: RU economics before production
The core message is that catching partitioning/indexing/data-model issues before production can be the difference between:
- A low-cost app (e.g., ~$50/month)
- A runaway bill at scale due to inefficient RU consumption
Key takeaways
- If you’re new to Azure Cosmos DB, the Agent Kit is positioned as a way to get partitioning and data modeling guidance “on demand” inside the editor.
- If you already build on Cosmos DB, pointing the kit at existing projects can surface performance and cost wins by aligning indexing and partitioning with real query patterns.