Designing Azure Infrastructure for AI Apps and Agents
This lesson describes a reference design for an AI application, which needs an application tier, data stores, retrieval, identity, networking and monitoring, placed in regions that satisfy availability and residency requirements.
Learning outcomes
After completing this lesson, you will be able to:
- Identify the components of a reference Foundry architecture.
- Choose regions and environments from model availability, residency and isolation needs.
- Describe resiliency options for throttling and regional outages.
- Explain how the standard agent setup keeps agent data in the customer's own resources.
A reference architecture
A typical Foundry solution has the following components. The application tier, such as Azure App Service, Azure Container Apps, Azure Functions or Azure Kubernetes Service, hosts the user interface and API and calls the Foundry project endpoint with a managed identity. The Foundry resource holds model deployments and Foundry Tools; a project holds agents, connections and evaluations. Azure AI Search holds indexes for retrieval, Azure Storage holds source documents and media, and Application Insights with a Log Analytics workspace collects traces, logs and metrics.
Agents add state. In the basic agent setup, Foundry Agent Service stores conversations, files and vector stores in Microsoft-managed storage. In the standard agent setup, the customer brings their own Azure Storage account, Azure Cosmos DB account (for conversation state) and Azure AI Search service (for file search vector stores), so that agent data stays in resources the customer controls, encrypts and monitors. The standard setup can be combined with a customer virtual network for network isolation.
The following diagram shows how these components connect, which identity each call uses and where telemetry goes.

The following diagram compares where each setup keeps agent state.

Regions, environments and isolation
Region choice depends on three factors: the models and features available in the region (newer models and preview features often start in a few regions), data residency requirements, and latency to users and data. Global deployments relax the first factor by routing requests across regions, while Data Zone deployments keep processing inside the US or EU data zone.
Development, test and production should be separated. Separate projects in one resource share deployments and quota, which is efficient for development teams; separate resources, often in separate subscriptions, isolate quota, networking and cost, which suits production. Naming, tags and resource groups per environment make cost reporting and clean-up straightforward.
Resiliency
A production design plans for throttling and regional outages. Options include several deployments of the same model in different regions behind Azure API Management with load balancing and circuit breaker policies, Global Standard deployments that route around capacity constraints, provisioned throughput with spill-over to a standard deployment, and a secondary Azure AI Search replica set or service for retrieval. Retry logic with exponential backoff in the application handles transient errors.
Each option protects against a different failure. Retries with backoff handle brief, transient errors, such as a single throttled request, without any architectural change. A Global Standard deployment protects against capacity shortages in one region, because the platform routes requests to regions with available capacity, but it cannot be used when processing must stay in a data zone or region. Several deployments behind API Management protect against the failure of a whole resource or region: the gateway sends traffic to a healthy backend and, with a circuit breaker, stops sending requests to one that keeps failing until it recovers.
Resiliency must cover every dependency, not only the model. An assistant whose model is deployed in two regions still fails if its only Azure AI Search service, in one region, becomes unavailable. Designs therefore list each dependency on the request path, such as the model, the search index, the agent's state store and the identity provider, and decide for each one whether it needs redundancy, a degraded mode, such as answering without retrieval and saying so, or an accepted risk.
Plan for failure
Keeping agent data in the customer's resources
A healthcare provider is building an agent that summarizes clinical notes uploaded by staff. Compliance requires that uploaded files and conversation history be stored in resources the provider controls, encrypted with its own keys, and reachable only from its virtual network.
The basic agent setup does not meet this, because it stores data in Microsoft-managed storage. The standard agent setup with the provider's own Storage, Cosmos DB and Azure AI Search accounts, each encrypted with customer-managed keys and reached through private endpoints, combined with network-secured agents in a delegated subnet, meets all three requirements.
This choice is made on the Storage tab of the Create a Foundry resource page, shown in the following screenshot. By default, threads, messages and files are managed within the Foundry resource. Selecting resources under Agent service brings the organization's own Cosmos DB account, storage account and Foundry IQ (Azure AI Search) service into the setup, and a Key Vault can be selected to hold the credentials of connected tools.

Why use separate subscriptions or resources for production and development?
Show answer
They isolate production quota, network settings and cost, so development work cannot consume production capacity or change its configuration.
Exam Tips
Remember for the exam
- Agent data in your own Storage, Cosmos DB and Azure AI Search: standard agent setup.
- Separate subscriptions or resources isolate production quota, network and cost.
- Region choice weighs model availability, residency and latency.