The initial public preview hosting backend is retiring. You must redeploy your agents by using the new model described in this article. Existing agent deployments on the old backend aren’t migrated automatically and are supported only until August 20, 2026.
azure-ai-agentserver-agentframework or azure-ai-agentserver-langgraph packages, or any custom code that used the initial preview hosting APIs.
What changed
The latest version updates the existing platform with a session-based sandbox model. Key changes:- Automatic compute lifecycle — No manual start, stop, or replica management. The platform provisions compute when a request arrives and deprovisions it after 15 minutes of inactivity. See CLI command mapping.
- Session-based isolation — Each session gets its own sandbox with persistent
$HOMEand/filesstorage across turns and idle periods. - Protocol libraries replace framework adapters — The framework-specific adapter packages (
azure-ai-agentserver-agentframework,azure-ai-agentserver-langgraph) are replaced by protocol-specific libraries (azure-ai-agentserver-responses,azure-ai-agentserver-invocations). See Protocol library and framework migration. - Dedicated agent identity from deploy time — Every agent gets its own Entra identity at creation, replacing the shared project managed identity model. See Identity and RBAC changes.
- Dedicated agent endpoint — Each agent gets its own endpoint URL (for example,
{project_endpoint}/agents/{name}/endpoint/protocols/openai/responses). You no longer route through a shared project endpoint withagent_referencein the request body. See Agent invocation changes. - New protocols — Invocations, Activity, and A2A protocols join the existing Responses protocol. A single agent can expose multiple protocols simultaneously.
- REST API for full lifecycle — Complete REST coverage for agent, version, session, and file operations. See SDK method changes.
- Capability host creation removed — The platform handles infrastructure provisioning automatically. You no longer need to create an account-level capability host. See Removed APIs.
Prerequisites
- Azure AI Projects SDK version 2.3.0 or later (was 2.0.0).
-
Azure Developer CLI version 1.23.0 or later with the updated Foundry agents extension:
Migration steps at a glance
The following steps summarize the end-to-end migration. Each links to the detailed section.- Update protocol libraries and agent code — Replace framework adapters with the new protocol libraries and update your agent entry point. Choose your path: Agent Framework, LangGraph, or custom/BYO.
- Update API, CLI, and SDK calls — Remove retired CLI commands, update SDK methods, and switch to the dedicated agent endpoint. See Removed APIs, CLI command mapping, SDK method changes, and Agent invocation changes.
- Update identity and RBAC — Grant downstream resource access to the agent’s dedicated Entra identity. See Identity and RBAC changes.
- Update Azure Developer CLI tooling — Install the latest
azdFoundry agents extension and updateazure.yaml. See Azure Developer CLI changes. - Redeploy and verify — Build your container image, deploy using
azd upor the SDK, and confirm the version reachesactivestatus.
Protocol library and framework migration
The initial preview used framework-specific adapter packages (azure-ai-agentserver-agentframework, azure-ai-agentserver-langgraph) that wrapped your agent code. The latest version replaces these packages with protocol-specific libraries and updated framework integration packages.
Your migration path depends on which framework you use:
- Microsoft Agent Framework — Use the updated Agent Framework packages with the
ResponsesHostServerbridge. - LangGraph — Use the
azure-ai-agentserver-responsesprotocol library directly withResponsesAgentServerHost. - CrewAI, Semantic Kernel, or custom code — Use the protocol libraries directly (
azure-ai-agentserver-responsesorazure-ai-agentserver-invocations).
Package changes
Protocol libraries (all users)
Agent Framework packages (Agent Framework users only)
The Agent Framework packages are also updated for the latest version:Migrate Agent Framework agents
If your agent uses the Microsoft Agent Framework, use theResponsesHostServer bridge from agent-framework-foundry-hosting. This approach keeps your Agent Framework code (agent definition, tools, instructions) intact while using the new protocol library under the hood.
Initial preview:
AzureAIAgentClient->FoundryChatClient(fromagent_framework.foundry).ChatAgent->Agent(fromagent_framework).@ai_function->@tool(approval_mode="never_require")withAnnotatedtype hints for parameter descriptions.from_agent_framework(agent).run()->ResponsesHostServer(agent).run().- Add
default_options={"store": False}because conversation history is managed by the hosting platform.
client.get_mcp_tool() instead of defining tools in the create_version API:
For .NET (C#) Agent Framework migration, the pattern uses
AddFoundryResponses and MapFoundryResponses ASP.NET extensions instead of ResponsesHostServer. See the .NET Agent Framework Hosted agent samples for complete examples.Migrate LangGraph agents
If your agent uses LangGraph, replace theazure-ai-agentserver-langgraph adapter with the azure-ai-agentserver-responses protocol library. Your LangGraph agent logic (graph definition, tools, LLM configuration) stays the same — only the hosting entry point changes.
Initial preview:
azure-ai-agentserver-langgraph->azure-ai-agentserver-responses. The LangGraph-specific adapter is removed.from_langgraph(graph).run()-> ExplicitResponsesAgentServerHostwith a@app.response_handlerthat returns aTextResponse.- Uses
ChatOpenAIwithbase_url=f"{FOUNDRY_PROJECT_ENDPOINT}/openai/v1"instead ofAzureChatOpenAI. This uses the project-scoped endpoint, which requires only project-level permissions. - Conversation history is fetched via
context.get_history()and converted to LangChain message types for multi-turn support. - LangGraph agent logic (tools, graph creation) is unchanged. For fine-grained control over function calls, reasoning items, or multiple output types, use
ResponseEventStreaminstead ofTextResponse.
MCP Toolbox integration
To connect your LangGraph agent to tools in the Foundry Toolbox via MCP, uselangchain-mcp-adapters inside your handler. Load tools dynamically from the MCP endpoint:
requirements.txt:
Migrate custom or BYO agents
If you use CrewAI, Semantic Kernel, or other custom code, use the protocol library directly. The protocol libraries are framework-agnostic — you handle orchestration, tools, and memory in your own code. Responses protocol — UseResponsesAgentServerHost for conversational agents. Register your handler with the @app.response_handler decorator:
TextResponse. For fine-grained control over function calls, reasoning items, or multiple output types, use ResponseEventStream instead of TextResponse.
Invocations protocol — Use InvocationAgentServerHost for agents that need arbitrary JSON payloads (webhooks, non-conversational processing). The handler uses Starlette Request/Response types directly:
@app.get_invocation_handler and @app.cancel_invocation_handler for polling and cancellation.
Choose your protocol based on your agent’s interaction pattern. See What are Hosted agents — Protocols for guidance on which protocol to use.
Protocol version format change
The protocol version format changed from"v1" to semver "1.0.0":
Container protocol 2.0.0
Container protocol version 2.0.0 changes how per-request identity reaches your container and downstream calls. Version 1.0.0 is deprecated. After the deprecation period, the platform blocks requests to agents that still run on protocol 1.0.0. Protocol 2.0.0 also lets one session safely serve multiple users. On 1.0.0, a session is tied to a single caller’s identity, so concurrent users on the same session can interfere with each other. On 2.0.0, each request carries its own user context, so a session can serve many users without their identities racing.
To migrate:
- Set the container protocol version to
2.0.0in theazure.ai.agentservice inazure.yaml. - Forward the per-request
x-agent-foundry-call-idheader on outbound calls to Foundry services (Storage, Toolbox, and other agents). The official SDK adapters do this automatically when you call those services through their clients. If you make raw HTTP calls yourself, readx-agent-foundry-call-idfrom the inbound request and add it, unchanged, to your outbound request. Don’t parse the value - the platform resolves the caller’s identity from it. - To partition data your container stores per user, read the
x-agent-user-idheader. For a worked example, see Multiplex multiple users in one hosted agent session.
Removed APIs
The following APIs from the initial preview aren’t available in the latest version:CLI command mapping
Where
BASE_URL is https://{account}.services.ai.azure.com/api/projects/{project}.
SDK method changes
Agent invocation changes
In the initial preview, you routed to agents through a shared project endpoint by passing anagent_reference in the request body. In the latest version, each agent gets a dedicated endpoint and the SDK binds to it automatically.
Initial preview:
agent_name parameter tells the SDK to target the agent’s dedicated endpoint. For REST calls, use the agent endpoint directly:
Earlier preview builds required a
Foundry-Features: HostedAgents=V1Preview header on REST calls to hosted agent endpoints. As of azure-ai-projects 2.3.0 on the GA v1 API, hosted agents are generally available and this header is no longer required.{project_endpoint}/agents/{name}/endpoint/protocols/openai/{responses|conversations}, while Invocations, Activity, and A2A route directly at {project_endpoint}/agents/{name}/endpoint/protocols/{invocations|activityprotocol|a2a}.
Version status changes
The agent lifecycle states changed from a manual state machine to automatic provisioning statuses:Identity and RBAC changes
The identity model changed significantly:The Foundry RBAC roles were recently renamed. Foundry User, Foundry Owner, Foundry Account Owner, and Foundry Project Manager were previously named Azure AI User, Azure AI Owner, Azure AI Account Owner, and Azure AI Project Manager. You might still see the previous names in some places while the rename rolls out. The role IDs and core permissions are unchanged by the rename.
Action required
- Update RBAC assignments: The project managed identity is no longer the runtime identity. Grant RBAC roles for any downstream Azure resources directly to the agent’s Entra identity instead.
- Simplify deployment roles: You need Foundry Project Manager at project scope to create and deploy Hosted agents.
Azure Developer CLI changes
Agent manifests (
agent.manifest.yaml) and standalone agent definitions (agent.yaml) are deprecated. As of the Foundry azd extensions (azure.ai.agents 1.0.0-beta.1), all hosted agent configuration lives in a single azure.yaml. See Author azure.yaml for hosted agents.Updated commands
Action required
-
Update the Foundry agents extension:
-
If your
azure.yamlspecifiesversion: "v1"for protocol versions in anazure.ai.agentservice, change it toversion: "1.0.0".
Log streaming changes
Known gaps
The following capabilities from the initial preview aren’t yet available in the latest version:Migration checklist
Use this checklist to track your migration:- Update
azure-ai-projectsSDK to version 2.1.0 or later. - Agent Framework users: Update Agent Framework packages (
agent-framework-core,agent-framework-foundry,agent-framework-foundry-hosting, and others). Replacefrom_agent_framework(agent).run()withResponsesHostServer(agent).run(). UpdateAzureAIAgentClienttoFoundryChatClient,ChatAgenttoAgent, and@ai_functionto@tool. - LangGraph users: Replace
azure-ai-agentserver-langgraphwithazure-ai-agentserver-responses. Replacefrom_langgraph(graph).run()with aResponsesAgentServerHosthandler that returns aTextResponse. UseChatOpenAIwith the project-scoped endpoint instead ofAzureChatOpenAI. Addlangchain-mcp-adaptersandmcpif using Foundry Toolbox. - Custom/BYO users: Replace framework adapter packages with protocol libraries (
azure-ai-agentserver-responsesorazure-ai-agentserver-invocations). Rewrite agent entry points usingResponsesAgentServerHostorInvocationAgentServerHost. - Update protocol version strings from
"v1"to"1.0.0"in code andazure.yaml. - Update
azure.yamlif usingazd(protocol version format, and agent settings under theazure.ai.agentservice). - Remove
az cognitiveservices agentCLI calls from scripts and CI/CD pipelines; replace withaz restorazd ai agentcommands. - Remove capability host creation steps from provisioning scripts.
- Update agent invocation code — use
project.get_openai_client(agent_name=...)instead ofextra_bodywithagent_reference. - Review RBAC — grant downstream resource access to the agent’s dedicated Entra identity, not the project managed identity.
- Update
azdFoundry agents extension to the latest version. - Build container image with
--platform linux/amd64(if not already). - Redeploy your agent using
azd upor the SDKcreate_versionmethod. - Verify the new version reaches
activestatus before sending traffic.