Use AI Agents with Cosmos DB Emulator

Use AI Agents with Cosmos DB Emulator

March 18, 2026
โ„น๏ธ
Originally published on LinkedIn

As large language models and coding agents keep getting better, we are witnessing predictable, easy-to-use technologies making a comeback. These are exactly the kind of tools that coding agents work best with, like bash, CLIs, containers, etc. ๐Ÿ”ง

The Azure Cosmos DB vNext emulator is no different. It runs locally as a Docker container ๐Ÿณ Can’t get easier than that!

Seems like a great fit for coding agents! So, I put GitHub Copilot CLI (with Claude Opus 4.6 in autopilot mode) to the test.

Here’s the prompt I used ๐Ÿ‘‡

“I’m getting started with Cosmos DB and need to set up a simple Java Maven app that connects to the local emulator using https, creates a database, adds a few sample items and queries them. Use the latest Azure Cosmos DB Java SDK. Run the app end to end to confirm it’s working. Create a README as well. Here are the emulator docs

Worked like a charm! โœ… Here’s what it did (fully autonomously):

โžก๏ธ Spun up the Cosmos DB Linux emulator (HTTPS) and handled TLS cert setup โžก๏ธ Scaffolded a Java Maven app with the Cosmos DB SDK v4, ran CRUD operations end to end, and generated a README with full setup instructions

Although you might need to steer things a bit depending on the complexity, but more often than not it should “just work” ๐Ÿ˜Ž

The scenarios are endless, but there’s no exact recipe. If you’ve been trying out Cosmos DB with coding agents, I’d love to hear how it went โ€” drop your experience in the comments! ๐Ÿ™

Last updated on