Use AI Agents with Cosmos DB Emulator
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! 🙏