Domain 1 of 3 · Chapter 5 of 5

Design and implement Azure Cosmos DB solutions by using AI-assisted tools

Unlock the complete study guide + 25 practice exams totaling 1,500 questions.

Bundled into the existing Building AI Applications with Azure Cosmos DB premium course — no separate purchase.

14-day refund guarantee on one-time purchases and your first subscription charge.

Included in this chapter:

  • Two AI-assisted tools: guidance vs live data access
  • Installing and updating the Agent Kit
  • How the Agent Kit activates and loads rules
  • Inside the skill package
  • The 12 rule categories
  • Following recommended practices with assisted reviews
  • Retrieval code: Vector Search and Full-Text Search rules
  • Agent workflow patterns and the LangGraph async rule
  • Developer Tooling and Monitoring & Diagnostics rules
  • The MCP Toolkit's seven tools
  • Deploying and securing the MCP Toolkit
  • Exam traps: picking the right AI-assisted tool

Development guidance (Agent Kit) vs live data access (MCP Toolkit)

AspectAgent Kit (development guidance)MCP Toolkit (live data access)
What it gives the AICurated best-practice rules for Azure Cosmos DB code and designSeven tools that query and search an existing account
Touches your database?No: code suggestions and best practices onlyYes, read-only: query and search capabilities only
Where it livesInstalled locally in the development environmentAn MCP server hosted on Azure Container Apps (Docker Compose or .NET for local development)
How you set it upnpx skills add AzureCosmosDB/cosmosdb-agent-kitClone the repository, deploy the infrastructure and server, then connect Microsoft Foundry or Visual Studio Code
How it is invokedActivates automatically when you describe an Azure Cosmos DB taskThe agent calls a named tool, such as get_recent_documents
Security modelNone at runtime: it holds no database connectionMicrosoft Entra ID tokens for callers; managed identity to reach Azure Cosmos DB

Decision tree

Guidance only,no live data?YesAgent Kit(development guidance)NoItem IDknown?Yesfind_document_by_idNoNewest itemsneeded?Yesget_recent_documents(1 to 20 items)NoStructure,not content?Yesget_approximate_schemaNoSearch bykeyword?Yestext_searchNoSearch bymeaning?Yesvector_searchNoDiscover whatexists?Yeslist_databases orlist_collectionsNoNot an MCP Toolkit task:write data with the SDK

Cheat sheet

  • Agent Kit supplies development guidance rather than executing database operations
  • Agent Skills compatibility determines whether an assistant can use the kit
  • The documented Agent Kit installation uses the skills command through npx
  • Agent Kit is installed in the development environment rather than enabled as an account capability
  • Installed skills activate from relevant Cosmos DB tasks expressed in natural language
  • Agent Kit is designed for progressive on-demand skill delivery
  • Keeping the installed skill current refreshes its development recommendations
  • SKILL.md describes activation while AGENTS.md supplies compiled rules
  • Individual best-practice rules live in categorized rule files
  • The skill's metadata file records its version rather than database configuration
  • Data Modeling and Partition Key Design rules guide early structural reviews
  • Query and indexing rule categories support different parts of an assisted query review
  • The SDK guidance reviews client construction, retries, and error handling as one implementation context
  • Capacity and consistency advice come from dedicated kit rule categories
  • The Cosmos DB MCP toolkit supplies live database discovery and sampled schema context
  • The MCP recent-document tool supplies live content for freshness checks
  • The MCP identifier lookup retrieves a known record for validation
  • MCP search-tool selection depends on keyword matching versus semantic similarity
  • Vector Search rules help a coding assistant generate Cosmos DB retrieval code
  • Full-Text Search rules extend assisted development beyond vector-only patterns
  • The kit includes a LangGraph pattern for wrapping synchronous Cosmos calls in asynchronous workflows
  • Developer Tooling rules cover validation, SDK currency, and emulator configuration
  • Monitoring and Diagnostics rules help add observability to generated applications
  • Agent Kit's Design Patterns guidance covers materialized views and efficient ranking

Unlock with Premium — includes all practice exams and the complete study guide.

References

  1. https://learn.microsoft.com/en-us/azure/cosmos-db/gen-ai/agent-kit
  2. https://learn.microsoft.com/en-us/azure/cosmos-db/gen-ai/model-context-protocol-toolkit
  3. https://learn.microsoft.com/en-us/credentials/certifications/resources/study-guides/dp-420
  4. https://learn.microsoft.com/en-us/azure/cosmos-db/gen-ai/agent-kit/setup
  5. https://learn.microsoft.com/en-us/python/api/azure-cosmos/azure.cosmos.containerproxy
  6. https://learn.microsoft.com/en-us/azure/cosmos-db/gen-ai/agent-kit/usage
  7. https://learn.microsoft.com/en-us/azure/cosmos-db/request-units
  8. https://learn.microsoft.com/en-us/azure/cosmos-db/gen-ai/agent-kit/compatibility
  9. https://learn.microsoft.com/en-us/azure/cosmos-db/gen-ai/agent-kit/overview
  10. https://learn.microsoft.com/en-us/azure/cosmos-db/troubleshoot-request-rate-too-large
  11. https://learn.microsoft.com/en-us/azure/cosmos-db/nosql/best-practice-dotnet
  12. https://learn.microsoft.com/en-us/azure/cosmos-db/gen-ai/rag
  13. https://learn.microsoft.com/en-us/azure/cosmos-db/vector-search
  14. https://learn.microsoft.com/en-us/azure/cosmos-db/gen-ai/full-text-search
  15. https://learn.microsoft.com/en-us/azure/cosmos-db/gen-ai/hybrid-search
  16. https://learn.microsoft.com/en-us/azure/cosmos-db/gen-ai/integrations
  17. https://learn.microsoft.com/en-us/azure/foundry/how-to/develop/langchain-agents
  18. https://learn.microsoft.com/en-us/azure/cosmos-db/change-feed-design-patterns
  19. https://learn.microsoft.com/en-us/azure/azure-functions/python-scale-performance-reference
  20. https://learn.microsoft.com/en-us/azure/cosmos-db/emulator