Azure Cosmos DB Design Patterns
Architecture and integration patterns for Azure Cosmos DB applications, including AI agent orchestration with LangGraph.
When to Apply
Reference these guidelines when:
- Implementing materialized views with change feed
- Building ranking or leaderboard features
- Hydrating document references across containers
- Building LangGraph multi-agent applications with Cosmos DB
- Implementing human-in-the-loop flows
- Managing chat history and agent routing
Rules
- pattern-change-feed-materialized-views - Use Change Feed for cross-partition query optimization
- pattern-efficient-ranking - Efficient ranking approaches
- pattern-service-layer-relationships - Service layer for relationship hydration
- pattern-langgraph-multi-agent - StateGraph with conditional edges for multi-agent routing
- pattern-langgraph-interrupt-human - LangGraph interrupt for human-in-the-loop
- pattern-langgraph-resume-checkpoint - Resume from checkpoint after interrupt
- pattern-langgraph-agent-routing-cosmosdb - Persist active agent in Cosmos DB
- pattern-langgraph-fastapi-startup - Initialize LangGraph agents in FastAPI
- pattern-langgraph-chat-history-separate - Store chat history in dedicated container
- pattern-background-task-writes - FastAPI background tasks for non-blocking writes
- pattern-langgraph-async-cosmos-routing - Async Cosmos DB calls in LangGraph routing
- pattern-langgraph-async-cosmos-writes - Async active agent writes
- pattern-langgraph-agent-name-attribution - Tag AI messages with agent name
- pattern-ai-grounding-access - AI grounding access patterns