Microsoft currently supports multiple ways to host agents.
You can host an Agent Framework application yourself inside an ASP.NET Core application, expose it through protocols such as A2A or AG-UI, or use Microsoft Foundry Agent Service as a managed runtime.
Self-hosted
Your ASP.NET Core application controls routing, identity, authorization, storage, deployment, scaling, and request policies.
Microsoft specifically recommends this pattern when the agent endpoint needs to integrate closely with existing application infrastructure.
Managed with Microsoft Foundry
Foundry Agent Service manages the agent runtime, conversations, tools, identity, observability, and scaling.
This can make sense when the organization wants a managed platform around its agents.