หมายเหตุ
การเข้าถึงหน้านี้ต้องได้รับการอนุญาต คุณสามารถลอง ลงชื่อเข้าใช้หรือเปลี่ยนไดเรกทอรีได้
การเข้าถึงหน้านี้ต้องได้รับการอนุญาต คุณสามารถลองเปลี่ยนไดเรกทอรีได้
When you run Microsoft Foundry Agent Service with a bring-your-own virtual network (VNet), you're responsible for sizing the delegated subnet, planning IP allocation, and understanding how agent traffic flows through the platform. This article explains the network architecture behind hosted and prompt agents, the IP-allocation model, and the signals that indicate capacity issues. It's intended for cloud and network architects who already chose bring-your-own VNet for Foundry Agent Service. To configure the network, see Set up private networking for Foundry Agent Service.
If you use a coding agent like GitHub Copilot to plan your VNet, subnet, and capacity model, the Microsoft Foundry Skill can help you reason through the architecture and apply Foundry networking guidance in your own environment.
Network architecture overview
The following diagram shows the two zones involved in any Foundry Agent Service request: the Microsoft-managed Foundry platform network on the left, and your customer VNet on the right.
The platform network hosts the Foundry endpoint, the Micro VM host layer that runs Hosted agents, the Tools Service, and the Data Proxy host layer. Your customer VNet contains a delegated subnet (where Micro VMs and the Data Proxy consume IPs) and a private endpoint subnet that connects to your storage, databases, and Key Vault.
Two request flows traverse this architecture:
- Hosted agent: Client to Foundry endpoint to Micro VM (
/invoke) to Tools Service to Data Proxy to customer resources through private endpoints. - Prompt agent: Client to Foundry endpoint to Tools Service to Data Proxy to customer resources through private endpoints. There's no Micro VM on this path.
Key concepts
| Term | What it means |
|---|---|
| Foundry instance | Your Microsoft Foundry resource. The top-level container that holds your projects, agents, and networking configuration. |
| Hosted agent | An agent you build and deploy yourself, either from your own container image in Azure Container Registry or from source code. You control CPU, memory, and code. |
| Prompt agent | An agent where compute and scaling are fully managed by Microsoft. You define behavior through configuration. No container image or infrastructure management is required. |
| Single-tenant data proxy | A platform-managed networking component dedicated to your Foundry project that handles outbound connectivity for your agents. Each project gets its own isolated data proxy instance. All tool calls route through the data proxy. |
| Tool server | A backend service registered at the project level that your agents can call to perform actions, such as querying a database or invoking an external API. In bring-your-own VNet configurations, tool server traffic routes through the single-tenant data proxy. |
| Delegated subnet | The subnet in your VNet that you delegate to Foundry Agent Service. All agent infrastructure (data proxies and Micro VMs) deploys into this subnet and consumes IPs from it. |
| Micro VM | The lightweight virtual machine that runs a Hosted agent. |
| Version | A change that affects how your agent runs, such as new code, a new container image, or a configuration update. Only runtime-affecting changes create a new version. |
How traffic flows
Every Foundry Agent Service request enters at the Foundry endpoint and exits to your customer resources through private endpoints. The agent type determines what happens in between.
Inbound to the Foundry endpoint
Clients send HTTPS requests to your Foundry endpoint (for example, <your-resource>.services.ai.azure.com). The platform's API gateway authenticates the request and routes it based on the target agent type.
Hosted agent path
For a hosted agent, the platform forwards the request to a micro VM connected to your delegated subnet over the /invoke protocol. Outbound traffic follows these routes:
| Traffic type | Route |
|---|---|
| Agent's own outbound traffic | Direct, through the delegated subnet. |
| Tool server calls | Through the single-tenant data proxy, regardless of agent type. |
Hosted agent sessions share subnet IP addresses. Each session runs in its own VM-isolated sandbox. Tool invocations route through the data proxy.
Prompt agent path
For a prompt agent, the agent runs in Microsoft-managed compute. The Foundry endpoint forwards the request directly to the Tools Service, which calls the single-tenant data proxy. IPs are allocated at the project level, so all prompt agents within a project share the same data proxy infrastructure.
Egress to customer resources
Outbound traffic from the data proxy reaches your storage accounts, databases, and Key Vault through private endpoints in your private endpoint subnet. Configure the corresponding Private DNS zones (for example, privatelink.blob.core.windows.net, privatelink.database.windows.net, and privatelink.vaultcore.azure.net) so name resolution stays inside the VNet.
For tool calls, such as OpenAPI and MCP calls, the data proxy resolves host names by using the DNS servers configured on the virtual network that contains the delegated subnet. If you set custom DNS servers on that virtual network, the data proxy sends its queries to them, so they must be reachable from the delegated subnet. To reach a private tool endpoint, make sure that those DNS servers resolve the endpoint's host name to its private IP address, for example through a private DNS zone or a conditional forwarder. The host name doesn't need a record in a public DNS zone.
Subnet sizing and IP allocation
Subnet configuration applies at the Foundry account level. All projects in the account share the same subnet configuration, and hosted and prompt agents share the same delegated subnet. The recommended size has to cover combined IP usage from agents across every project, platform upgrades, and scaling events.
Recommended subnet size
The delegated subnet must be /27 or larger. Choose its size by using the planned hosted-session capacities, and account for project-level networking components, upgrades, and scaling.
Note
The session capacity estimates in this article apply only to hosted agents, not prompt agents. For prompt-agent networking requirements, see Prompt agents networking behavior.
Plan subnet capacity in this order:
- Estimate peak concurrent hosted agent sessions across all projects in the account for the region. Projects in the account share subnet capacity. All Foundry accounts and projects in the subscription and region share the session quota separately.
- Check the region's default concurrent session quota in Default service limits.
- Compare your target concurrency with the planned hosted-session capacities by subnet size. Account for project-level networking requirements and operational headroom during upgrades and scaling.
- If the target exceeds the regional default, request a limit increase. Specify the subscription, region, and expected concurrency. Increases depend on regional capacity.
- If the subnet can't accommodate the combined IP demand and operational headroom, plan a new deployment with a larger subnet.
Supported IP ranges
Your subnet must use RFC 1918 private IPv4 ranges only:
10.0.0.0/8172.16.0.0/12(covers172.16.x.xthrough172.31.x.x, but172.30.0.0/16and172.31.0.0/16are reserved)192.168.0.0/16
Public IP ranges and CGNAT ranges (for example, 100.64.0.0/10) aren't supported and cause routing failures.
Some ranges inside RFC 1918 space are reserved by the platform, including 172.30.0.0/16 and 172.31.0.0/16. Your agent VNet and every VNet peered with it, including a hub VNet in a hub-and-spoke design, can't overlap these ranges. Check this before you pick a landing-zone or hub address plan. For the full list of reserved ranges, see Private networking limitations.
For hosted agents, also avoid private endpoint addresses in 192.168.0.0/24 because of an internal sandbox network overlap. See Private networking limitations.
How IPs are consumed
IP addresses from the delegated subnet support hosted agent sessions and project-level networking components. Use the planned hosted-session capacities when choosing a subnet size.
Actual consumption also depends on project count, scaling, and platform maintenance. Project-level networking components consume addresses in addition to session-related IP demand. Plan capacity by concurrent sessions, networking overhead, and usable subnet IPs, not by infrastructure units such as pods.
Subnet size and concurrent sessions
The following table shows the planned concurrent hosted-agent session capacity for each BYO VNet delegated subnet size. Each session runs in its own VM-isolated sandbox. The capacity is aggregate across all projects that share the subnet, not per project.
Your per-subscription regional session quota separately limits actual concurrency. The table doesn't increase that quota or apply to prompt agents.
Use a subnet of size /24 or larger to support any production workloads.
| CIDR | Planned hosted agent sessions (sandboxes) |
|---|---|
| /27 | 7,500 |
| /26 | 15,000 |
| /25 | 30,000 |
| /24 | 60,000 |
| /23 | 120,000 |
| /22 | 240,000 |
| /21 | 480,000 |
| /20 | 960,000 |
These numbers are planning estimates, not guaranteed concurrency. Project-level networking requirements, scaling, and platform maintenance also affect the capacity available to your workload.
For example, the /24 row gives a planned subnet capacity of 60,000 hosted sessions. If your regional service quota is 1,000 concurrent sessions, that quota limits concurrency unless an increase is approved.
The minimum supported subnet size is /27.
A session represents hosted-agent compute and persisted file state, not conversation history. Session capacity therefore doesn't determine how many conversations your application can maintain. With the Responses protocol, a conversation is associated with a session, while other invocation patterns can reuse a session without platform-managed conversation history. For details, see Sessions versus conversations.
To increase your concurrent session quota, create an Azure support request with the subscription, region, and expected number of concurrent sessions. Quota increases depend on regional capacity; a larger subnet doesn't increase the quota automatically. For the current quotas, see Foundry Agent Service quotas.
Project capacity
Project capacity depends on the combined IP usage of project-level networking components and hosted sessions.
A Foundry instance can support approximately 250 projects at low traffic. Under heavy traffic, effective capacity can be as low as 25 projects. These figures are workload-dependent planning estimates, not guaranteed capacity.
Don't infer project capacity from the planned hosted-session capacities alone. When IPs are exhausted, new project provisioning fails.
Important
Don't plan to run at theoretical maximum capacity. Leave operational headroom for upgrades and scaling.
Behavior during platform maintenance
Platform upgrades run old and new infrastructure in parallel, which temporarily increases IP consumption. Reserve headroom for these temporary spikes alongside your normal workloads, even when sessions share IP addresses. Infrastructure upgrades are fully Microsoft-managed, including their timing.
Outbound connectivity
Hosted agents run in microVMs attached to your delegated subnet and use that for outbound communication. Tool calls always route through the single-tenant data proxy. For source-code agent deployments, the provisioning step also requires outbound access to specific endpoints. See Firewall requirements for private virtual networks.
Performance and scaling
Hosted agents support custom CPU and memory configurations. You select from available CPU and memory pairs when you create an agent version. Starting or resuming a session can require compute provisioning. If the subnet doesn't have enough available IP addresses, the platform can't provision compute for additional sessions.
BYO VNet injection is optimized to limit IP allocation, network attachment, and communication overhead. Session startup and end-to-end request latency also depend on compute provisioning, model calls, tools, and your application.
Prompt agents networking behavior
Prompt agents also run on Azure Container Apps, but compute and scaling are fully managed by Microsoft. You don't configure CPU or memory.
Versions and IP usage
Unlike hosted agent sessions, prompt agent versions don't consume IPs. Project-level networking components still consume addresses from the delegated subnet.
Outbound connectivity
Prompt agents use the single-tenant data proxy for all outbound connectivity. IPs are allocated at the project level, so all prompt agents within a project share the same data proxy infrastructure.
Limits and performance
There's no hard limit on the number of prompt agents you can deploy per Foundry instance. Because compute and scaling are fully managed, there are no expected latency or performance issues tied to the number of prompt agents deployed.
VNet peering and IP overlap
Overlapping IP ranges cause routing failures, so all peered VNets must use unique, non-overlapping IP ranges. This rule applies to bidirectional peering configurations as well. Only RFC 1918 private IPv4 ranges are supported. CGNAT addresses (for example, 100.x.x.x) aren't.
Peered VNets also can't overlap the reserved ranges, such as 172.30.0.0/16 and 172.31.0.0/16. This restriction includes a hub VNet that the agent VNet peers with. For the full list, see Private networking limitations.
If you can't avoid IP overlap, use Managed virtual network instead of bring-your-own VNet. Managed VNet automates the network setup and eliminates IP overlap concerns.
Monitor IP usage and detect exhaustion
The Azure portal doesn't currently expose IP utilization for delegated subnets, so you can't monitor it directly. The primary indicators of IP exhaustion are HTTP 5xx errors from the data proxy and, for hosted agents, HTTP 429 subnet_exhausted errors during session creation or resume. When IPs are exhausted, data proxy scaling and new project provisioning fail, and hosted agents can't allocate compute for new or resumed sessions. Monitor data proxy health and hosted agent session success as leading indicators of capacity issues.
Consider deploying a new Foundry instance with a fresh subnet when you observe:
- The data proxy returning 5xx errors.
- Hosted agent session creation or resume failing with HTTP 429
subnet_exhaustederrors. - New project provisioning failures.
Important
The platform doesn't proactively warn you when IP capacity is running low. Monitor the signals listed earlier to avoid unexpected provisioning failures.
Quick reference
| Topic | Recommendation |
|---|---|
| Subnet size | /27 is the minimum. Use /24 or larger for all production workloads. Use the planned hosted-session capacities by subnet size; session quotas apply separately. |
| Operational headroom | Account for project-level networking components, upgrades, and scaling when planning capacity. |
| Supported IP ranges | RFC 1918 only: 10.x, 172.16 through 172.31.x, and 192.168.x. 172.30.0.0/16 and 172.31.0.0/16 are reserved. No public or CGNAT ranges. |
| Project capacity | Workload-dependent planning estimates: approximately 250 projects at low traffic and as few as 25 under heavy traffic. Validate combined IP demand and headroom. |
| IP consumption | Hosted sessions and project-level networking components consume subnet IPs. Prompt agent versions don't consume IPs per version. |
| Outbound connectivity | Hosted agent sessions use the delegated subnet. All tool calls route through the single-tenant data proxy. |
| Hosted compared to prompt | Hosted: custom CPU and memory, deployed from your container image or source code. Prompt: fully managed scaling. |
| VNet peering | Peered VNets, including a hub VNet, must have non-overlapping IP ranges and can't use reserved ranges such as 172.30.0.0/16 and 172.31.0.0/16. Use Managed VNet if overlap exists. |
| Monitoring | No direct IP monitoring in the portal. Watch for data proxy 500 errors. |
| Performance | IP allocation, network attachment, and communication are optimized to limit networking overhead. Compute provisioning and downstream calls also affect total latency. |