Azure Cosmos DB in the Agentic Era: Data Tools for Developers and AI Agents
Microsoft’s Azure Cosmos DB extension for Visual Studio Code integrates GitHub Copilot tools to let AI agents safely query databases, sample schemas, and execute commands with developer oversight.
Video
Video available
Microsoft has updated its Azure Cosmos DB extension for Visual Studio Code to let GitHub Copilot assist with database tasks directly within the Query Editor. The changes allow agents to inspect schema, sample data, and generate queries without leaving the editor, reducing the need to switch contexts or manually validate outputs. Developers retain control over account selection, query execution, and request unit consumption, addressing concerns about hidden costs or incorrect assumptions in AI-generated queries.
The extension introduces dedicated agent skills for Cosmos DB, teaching Copilot the NoSQL query dialect, supported functions, and editor tools like schema sampling and query execution. It also includes the Azure Cosmos DB Agent Kit, which provides over 100 recommendations on data modeling, partition keys, indexing, and optimization. These skills aim to prevent common errors, such as using relational JOINs or inefficient scans, by embedding database-specific knowledge into the agent’s workflow.
Schema sampling and query execution require explicit developer consent, with metadata like row counts and request charges recorded instead of raw documents. This approach aligns with Anthropic’s ‘collaboration paradox,’ where developers delegate low-risk tasks but retain oversight for consequential work like database access. The extension avoids exposing sensitive data in agent-facing histories, ensuring transparency and control over AI interactions with the database.
The updates reflect a broader shift in AI-assisted development, where agents handle tactical tasks while humans direct and evaluate outcomes. By integrating Cosmos DB tools into the editor and providing structured agent skills, Microsoft aims to bridge the gap between AI collaboration and practical database management, enabling safer and more efficient workflows for developers.