{"id":2496,"date":"2026-06-02T09:09:10","date_gmt":"2026-06-02T16:09:10","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/foundry\/?p=2496"},"modified":"2026-06-02T13:42:09","modified_gmt":"2026-06-02T20:42:09","slug":"hosted-agents-build26","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/foundry\/hosted-agents-build26\/","title":{"rendered":"What&#8217;s New in Hosted Agents in Foundry Agent Service"},"content":{"rendered":"<p><span style=\"font-family: arial, helvetica, sans-serif;\">A few weeks ago, we announced the <a href=\"https:\/\/devblogs.microsoft.com\/foundry\/introducing-the-new-hosted-agents-in-foundry-agent-service-secure-scalable-compute-built-for-agents\/\">public preview refresh of hosted\u00a0agents in Foundry Agent Service<\/a> \u2014 a fundamentally re-imagined agent runtime built for operationalizing production-grade AI agents in enterprise systems. Today at Microsoft Build, we are excited to share several updates that make hosted agents easier to deploy, more capable across modalities, and seamless to optimize through the agent loop. This article covers what&#8217;s new, and what&#8217;s coming.<\/span><\/p>\n<h1>The Problems We Set Out to Solve<\/h1>\n<p><span style=\"font-family: arial, helvetica, sans-serif;\">Developers who want to take agents to production find themselves managing a list of things that have nothing to do with the agent&#8217;s actual intelligence:<\/span><\/p>\n<ul>\n<li><span style=\"font-family: arial, helvetica, sans-serif;\"><strong>Containerization and infrastructure<\/strong> \u2014 building images, pushing to registries, managing versions<\/span><\/li>\n<li><span style=\"font-family: arial, helvetica, sans-serif;\"><strong>Security and identity<\/strong> \u2014 provisioning managed identities, scoping access, preventing cross-session data leakage<\/span><\/li>\n<li><span style=\"font-family: arial, helvetica, sans-serif;\"><strong>State persistence<\/strong> \u2014 storing files, memory, and context across turns without building your own persistence layer<\/span><\/li>\n<li><span style=\"font-family: arial, helvetica, sans-serif;\"><strong>Scaling<\/strong> \u2014 right-sizing compute for variable concurrency without paying for idle capacity<\/span><\/li>\n<li><span style=\"font-family: arial, helvetica, sans-serif;\"><strong>Observability<\/strong> \u2014 knowing what your agent is doing, when it fails, and why<\/span><\/li>\n<li><span style=\"font-family: arial, helvetica, sans-serif;\"><strong>Evaluation<\/strong> \u2013 measuring the quality, safety, and reliability of your agent continuously<\/span><\/li>\n<\/ul>\n<p><span style=\"font-family: arial, helvetica, sans-serif;\">Hosted agents in Foundry Agent Service were designed to take all of this off your plate. Each agent session runs in its own <strong>hypervisor-isolated sandbox<\/strong> with a dedicated persistent file system, an automatically provisioned Microsoft Entra ID (agent identity), and built-in OpenTelemetry tracing. You bring your code and your framework; the platform handles the rest.<\/span><\/p>\n<p><span style=\"font-family: arial, helvetica, sans-serif;\">Since the preview launched, we&#8217;ve shipped four additional capabilities that expand what you can do with hosted agents.\u00a0<\/span><\/p>\n<h2>What&#8217;s New<\/h2>\n<h3>1. Deploy Directly from Source Code \u2014 No Container Required<\/h3>\n<p><span style=\"font-family: arial, helvetica, sans-serif;\">Previously, deploying a hosted agent required packaging your application into a container image, pushing that image to Azure Container Registry, and configuring the agent to run it. This container-based approach gives you full control over the runtime environment, including OS dependencies, system libraries, startup behavior, and how your code is packaged and executed \u2014 it continues to be fully supported. However, for many teams, especially during early development, building and managing containers can introduce unnecessary friction. <strong>Direct code deployment<\/strong> removes that friction. You zip your Python or .NET project, upload it to the Foundry Agent Service, and the platform either installs your dependencies at provision time (remote_build mode) or runs your pre-bundled output directly (bundled mode).<\/span><\/p>\n<p><span style=\"font-family: arial, helvetica, sans-serif;\">The result is a significantly shorter path from local development to deployed agent.\u00a0For developers using the <a href=\"https:\/\/learn.microsoft.com\/en-us\/azure\/developer\/azure-developer-cli\/overview?tabs=windows\">Azure Developer CLI (azd)<\/a> or the <a href=\"https:\/\/code.visualstudio.com\/docs\/intelligentapps\/overview\">Foundry Toolkit for VS Code<\/a><strong>,<\/strong> source code deployment is even simpler \u2014 the tooling handles packaging, uploading, polling for active status, and configuring role-based access control automatically.<\/span><\/p>\n<p><span style=\"font-family: arial, helvetica, sans-serif;\">With<\/span> <span style=\"font-family: 'courier new', courier, monospace;\">azd<\/span>, <span style=\"font-family: arial, helvetica, sans-serif;\">the agent deployment takes just two commands:<\/span><\/p>\n<pre class=\"prettyprint language-py\"><code class=\"language-py\"># Initialize \u2014 configure your agent project for source code deployment\r\nazd ai agent init \\\r\n  --src .\/src\/my-agent \\\r\n  --agent-name my-unique-agent \\\r\n  --deploy-mode code \\\r\n  --runtime python_3_13 \\\r\n  --entry-point main.py \\\r\n  --dep-resolution remote_build\r\n\r\n# Deploy \u2014 package, upload, and wait for Active state\r\nazd deploy\r\n\r\n# Invoke Agent\r\nazd ai agent invoke \u201cmessage\u201d\r\n\r\n# Inspect recent agent logs for the failure\r\nazd ai agent monitor --tail 100<\/code><\/pre>\n<p><span style=\"font-family: arial, helvetica, sans-serif;\">The<\/span> <span style=\"font-family: 'courier new', courier, monospace;\">init<\/span> <span style=\"font-family: arial, helvetica, sans-serif;\">command generates the<\/span> <span style=\"font-family: 'courier new', courier, monospace;\">azure.yaml<\/span> <span style=\"font-family: arial, helvetica, sans-serif;\">and<\/span> <span style=\"font-family: 'courier new', courier, monospace;\">agent.yaml<\/span> <span style=\"font-family: arial, helvetica, sans-serif;\">configuration needed for deployment. The deploy command handles zip packaging, SHA verification, upload, and polls until the agent reaches active state \u2014 no manual curl, token management and container registry required.<\/span><\/p>\n<p><span style=\"font-family: arial, helvetica, sans-serif;\">Key flags for<\/span> <span style=\"font-family: 'courier new', courier, monospace;\">azd ai agent init<\/span>:<\/p>\n<table style=\"width: 49.0597%; height: 664px;\">\n<tbody>\n<tr style=\"height: 56px;\">\n<td style=\"height: 56px;\" width=\"149\"><span style=\"font-family: arial, helvetica, sans-serif;\"><strong>Flag<\/strong><\/span><\/td>\n<td style=\"height: 56px;\" width=\"412\"><span style=\"font-family: arial, helvetica, sans-serif;\"><strong>Description<\/strong><\/span><\/td>\n<\/tr>\n<tr style=\"height: 56px;\">\n<td style=\"height: 56px;\" width=\"149\"><span style=\"font-family: arial, helvetica, sans-serif;\">&#8211;src, -s<\/span><\/td>\n<td style=\"height: 56px;\" width=\"412\"><span style=\"font-family: arial, helvetica, sans-serif;\">Path to your agent source code directory<\/span><\/td>\n<\/tr>\n<tr style=\"height: 80px;\">\n<td style=\"height: 80px;\" width=\"149\"><span style=\"font-family: arial, helvetica, sans-serif;\">&#8211;agent-name<\/span><\/td>\n<td style=\"height: 80px;\" width=\"412\"><span style=\"font-family: arial, helvetica, sans-serif;\">Unique agent name (reusing a name creates a new version)<\/span><\/td>\n<\/tr>\n<tr style=\"height: 56px;\">\n<td style=\"height: 56px;\" width=\"149\"><span style=\"font-family: arial, helvetica, sans-serif;\">&#8211;deploy-mode<\/span><\/td>\n<td style=\"height: 56px;\" width=\"412\"><span style=\"font-family: arial, helvetica, sans-serif;\">code (source upload) or container (Docker image)<\/span><\/td>\n<\/tr>\n<tr style=\"height: 56px;\">\n<td style=\"height: 56px;\" width=\"149\"><span style=\"font-family: arial, helvetica, sans-serif;\">&#8211;runtime<\/span><\/td>\n<td style=\"height: 56px;\" width=\"412\"><span style=\"font-family: arial, helvetica, sans-serif;\">python_3_13, python_3_14, or dotnet_10<\/span><\/td>\n<\/tr>\n<tr style=\"height: 56px;\">\n<td style=\"height: 56px;\" width=\"149\"><span style=\"font-family: arial, helvetica, sans-serif;\">&#8211;entry-point<\/span><\/td>\n<td style=\"height: 56px;\" width=\"412\"><span style=\"font-family: arial, helvetica, sans-serif;\">Application entry point (e.g., main.py, MyAgent.dll)<\/span><\/td>\n<\/tr>\n<tr style=\"height: 56px;\">\n<td style=\"height: 56px;\" width=\"149\"><span style=\"font-family: arial, helvetica, sans-serif;\">&#8211;dep-resolution<\/span><\/td>\n<td style=\"height: 56px;\" width=\"412\"><span style=\"font-family: arial, helvetica, sans-serif;\">remote_build (default) or bundled<\/span><\/td>\n<\/tr>\n<tr style=\"height: 80px;\">\n<td style=\"height: 80px;\" width=\"149\"><span style=\"font-family: arial, helvetica, sans-serif;\">&#8211;project-id, -p<\/span><\/td>\n<td style=\"height: 80px;\" width=\"412\"><span style=\"font-family: arial, helvetica, sans-serif;\">Existing Foundry Project resource ID (skips interactive selection)<\/span><\/td>\n<\/tr>\n<tr style=\"height: 56px;\">\n<td style=\"height: 56px;\" width=\"149\"><span style=\"font-family: arial, helvetica, sans-serif;\">&#8211;model<\/span><\/td>\n<td style=\"height: 56px;\" width=\"412\"><span style=\"font-family: arial, helvetica, sans-serif;\">AI model to use (defaults to gpt-4.1-mini)<\/span><\/td>\n<\/tr>\n<tr style=\"height: 56px;\">\n<td style=\"height: 56px;\" width=\"149\"><span style=\"font-family: arial, helvetica, sans-serif;\">&#8211;protocol<\/span><\/td>\n<td style=\"height: 56px;\" width=\"412\"><span style=\"font-family: arial, helvetica, sans-serif;\">invocations or responses<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><span style=\"font-family: arial, helvetica, sans-serif;\">For CI\/CD pipelines, add<\/span> <span style=\"font-family: 'courier new', courier, monospace;\">&#8211;no-prompt<\/span> <span style=\"font-family: arial, helvetica, sans-serif;\">for fully non-interactive execution:<\/span><\/p>\n<pre class=\"prettyprint language-py\"><code class=\"language-py\">azd ai agent init --no-prompt \\\r\n  --project-id \"\/subscriptions\/&lt;sub&gt;\/resourceGroups\/&lt;rg&gt;\/providers\/Microsoft.CognitiveServices\/accounts\/&lt;account&gt;\/projects\/&lt;project&gt;\" \\\r\n  --src .\/my-agent \\\r\n  --agent-name my-unique-agent \\\r\n  --deploy-mode code \\\r\n  --runtime python_3_13 \\\r\n  --entry-point main.py\r\n\r\nazd deploy\r\n<\/code><\/pre>\n<p><span style=\"font-family: arial, helvetica, sans-serif;\">Supported runtimes:<\/span> <span style=\"font-family: 'courier new', courier, monospace;\">python_3_13<\/span>, <span style=\"font-family: 'courier new', courier, monospace;\">python_3_14<\/span>, and <span style=\"font-family: 'courier new', courier, monospace;\">dotnet_10<\/span>. <span style=\"font-family: arial, helvetica, sans-serif;\">Runtime support follows each language&#8217;s upstream end-of-life schedule.<\/span><\/p>\n<p><span style=\"font-family: arial, helvetica, sans-serif;\"><strong>Full guide: <\/strong><a href=\"https:\/\/learn.microsoft.com\/en-us\/azure\/foundry\/agents\/how-to\/deploy-hosted-agent-code?tabs=bash\">Deploy a hosted agent from source code (preview)<\/a><\/span><\/p>\n<h3>2. Built-In Guardrails for Responsible Agentic AI<\/h3>\n<p><span style=\"font-family: arial, helvetica, sans-serif;\">Production agents interact with real users, and real users sometimes send harmful content. Whether it&#8217;s a customer service agent being probed with violent instructions or a coding assistant receiving inappropriate prompts, agents need a safety layer that blocks harmful inputs before they reach agent logic and filters unsafe outputs before they reach end users.<\/span><\/p>\n<p><span style=\"font-family: arial, helvetica, sans-serif;\">Previously, teams building responsible AI agents had to integrate content filtering themselves: standing up a separate <a href=\"https:\/\/learn.microsoft.com\/en-us\/azure\/ai-services\/content-safety\/overview\">Content Safety in Foundry Control Plane<\/a> endpoint, writing middleware to intercept requests and responses, handling streaming edge cases, and managing policy configurations across environments. That&#8217;s table-stakes safety work that every production agent needs, but no team wants to build from scratch.<\/span><\/p>\n<p><span style=\"font-family: arial, helvetica, sans-serif;\">Hosted agents now include <strong>built-in content safety guardrails<\/strong> powered by <a href=\"https:\/\/learn.microsoft.com\/en-us\/azure\/ai-services\/content-safety\/overview\">Content Safety<\/a>, integrated directly into the agent runtime. When enabled, every user prompt is evaluated in real time before it reaches your agent code, and every response is also evaluated before it reaches your users.<\/span><\/p>\n<p><span style=\"font-family: arial, helvetica, sans-serif;\">Here is how you can create guardrail policies, which you can later on pass in the hosted agent definition: <a href=\"https:\/\/learn.microsoft.com\/en-us\/azure\/foundry\/guardrails\/how-to-create-guardrails?tabs=python\">How to configure guardrails and controls in Microsoft Foundry &#8211; Microsoft Foundry | Microsoft Learn<\/a><\/span><\/p>\n<p>&nbsp;<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/foundry\/wp-content\/uploads\/sites\/89\/2026\/06\/Hosted-Agents-guardrails.webp\"><img decoding=\"async\" class=\"alignnone wp-image-2561\" src=\"https:\/\/devblogs.microsoft.com\/foundry\/wp-content\/uploads\/sites\/89\/2026\/06\/Hosted-Agents-guardrails-300x159.webp\" alt=\"Hosted Agents guardrails image\" width=\"1030\" height=\"546\" srcset=\"https:\/\/devblogs.microsoft.com\/foundry\/wp-content\/uploads\/sites\/89\/2026\/06\/Hosted-Agents-guardrails-300x159.webp 300w, https:\/\/devblogs.microsoft.com\/foundry\/wp-content\/uploads\/sites\/89\/2026\/06\/Hosted-Agents-guardrails-1024x544.webp 1024w, https:\/\/devblogs.microsoft.com\/foundry\/wp-content\/uploads\/sites\/89\/2026\/06\/Hosted-Agents-guardrails-768x408.webp 768w, https:\/\/devblogs.microsoft.com\/foundry\/wp-content\/uploads\/sites\/89\/2026\/06\/Hosted-Agents-guardrails-1536x816.webp 1536w, https:\/\/devblogs.microsoft.com\/foundry\/wp-content\/uploads\/sites\/89\/2026\/06\/Hosted-Agents-guardrails-2048x1088.webp 2048w\" sizes=\"(max-width: 1030px) 100vw, 1030px\" \/><\/a><\/p>\n<p><span style=\"font-family: arial, helvetica, sans-serif;\">Content safety guardrails are available today in public preview across all hosted agents regions.\n<\/span><\/p>\n<h3>3. Voice Live Integration and WebSocket Support<\/h3>\n<p><span style=\"font-family: arial, helvetica, sans-serif;\">Agents that reason and act are valuable. Agents that can also speak and listen in real time open an entirely different class of applications \u2014 customer service, accessibility tooling, voice-first interfaces, and more.<\/span><\/p>\n<p><span style=\"font-family: arial, helvetica, sans-serif;\">For developers building text-based hosted agents, <a href=\"https:\/\/learn.microsoft.com\/en-us\/azure\/foundry\/agents\/how-to\/build-voice-agent\">Voice Live integration<\/a> with hosted text agent is now in public preview, enabling real-time voice experiences through both the Responses and Invocations protocols with one click to turn on.<\/span><\/p>\n<p><span style=\"font-family: arial, helvetica, sans-serif;\">For developers building native speech-to-speech hosted agents, hosted agents now support WebSocket and WebRTC for real-time voice scenarios. By combining the Invocations (WebSocket) protocol with frameworks such as Voice Live (as a speech-to-speech model API), Pipecat, or LiveKit within your container, you can deliver fully real-time voice agents \u2014 from microphone input to natural speech output, on the same secure and scalable platform that powers your text-based agents.<\/span><\/p>\n<p><span style=\"font-family: arial, helvetica, sans-serif;\">Leading telephony providers are already leveraging this capability to enable seamless phone-call interactions with hosted agents using speech.<\/span><\/p>\n<p><span style=\"font-family: arial, helvetica, sans-serif;\">The WebSocket endpoint exposes a persistent bidirectional connection:<\/span><\/p>\n<pre class=\"prettyprint language-regex\"><code class=\"language-regex\">wss:\/\/{account}.services.ai.azure.com\/api\/projects\/agents\/endpoint\/protocols\/invocations_ws?project_name={project}&amp;agent_name={name}\r\n<\/code><\/pre>\n<p><span style=\"font-family: arial, helvetica, sans-serif;\">This is distinct from the Responses and Invocations (HTTP) protocols. A single persistent connection handles both inbound audio and outbound speech synthesis without the overhead of repeated HTTP handshakes.<\/span><\/p>\n<p><div class=\"alert alert-primary\">The Invocations (WebSocket) protocol is currently only available in North Central US. Support in additional regions is coming soon.<\/div><\/p>\n<p><span style=\"font-family: arial, helvetica, sans-serif;\">The addition of the Invocations (WebSocket) protocol completes the protocol triad for hosted agents, each relevant for different real-world scenarios:<\/span><\/p>\n<table width=\"624\">\n<thead>\n<tr>\n<td width=\"167\"><span style=\"font-family: arial, helvetica, sans-serif;\"><strong>Protocol<\/strong><\/span><\/td>\n<td width=\"213\"><span style=\"font-family: arial, helvetica, sans-serif;\"><strong>Use-cases <\/strong><\/span><\/td>\n<td width=\"244\"><span style=\"font-family: arial, helvetica, sans-serif;\"><strong>Key Characteristics<\/strong><\/span><\/td>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td width=\"167\"><span style=\"font-family: arial, helvetica, sans-serif;\"><strong>Responses<\/strong><\/span><\/td>\n<td width=\"213\"><span style=\"font-family: arial, helvetica, sans-serif;\">Conversational agents, RAG, Publish to Teams \/ M365<\/span><\/td>\n<td width=\"244\"><span style=\"font-family: arial, helvetica, sans-serif;\">Platform manages history, streaming, and session lifecycle; any OpenAI-compatible SDK works as the client<\/span><\/td>\n<\/tr>\n<tr>\n<td width=\"167\"><span style=\"font-family: arial, helvetica, sans-serif;\"><strong>Invocations (HTTP)<\/strong><\/span><\/td>\n<td width=\"213\"><span style=\"font-family: arial, helvetica, sans-serif;\">Webhooks, structured data, custom streaming (AG-UI, etc.)<\/span><\/td>\n<td width=\"244\"><span style=\"font-family: arial, helvetica, sans-serif;\">Arbitrary JSON in\/out; you control the schema and SSE stream<\/span><\/td>\n<\/tr>\n<tr>\n<td width=\"167\"><span style=\"font-family: arial, helvetica, sans-serif;\"><strong>Invocations (WebSocket)<\/strong><\/span><\/td>\n<td width=\"213\"><span style=\"font-family: arial, helvetica, sans-serif;\">Real-time voice, bidirectional streaming<\/span><\/td>\n<td width=\"244\"><span style=\"font-family: arial, helvetica, sans-serif;\">Persistent connection; pair with Pipecat, LiveKit, or Voice Live<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><span style=\"font-family: arial, helvetica, sans-serif;\">A single hosted agent can expose multiple protocols simultaneously. <strong>The platform automatically bridges the Responses protocol to the Activity protocol<\/strong> for Teams and Microsoft 365 channel delivery \u2014 no additional configuration required. Agent2Agent (A2A) has also been added to allow for agent delegation.<\/span><\/p>\n<h3>4. Agent Optimizer: A Closed-Loop Improvement Engine<\/h3>\n<blockquote><p><em>&#8220;Live&#8221; and &#8220;production-ready&#8221; aren&#8217;t the same thing, and the gap shows up quickly.<\/em><\/p><\/blockquote>\n<p><span style=\"font-family: arial, helvetica, sans-serif;\">Your customer support agent handles requests \u2014 but it forgets to ask for an order number before looking up status. It answers warranty questions without checking the purchase date. It gives electrical wiring advice when it should decline and recommend a professional. Each fix means rewriting your system prompt, testing by hand, and hoping you didn&#8217;t break something else.<\/span><\/p>\n<p><span style=\"font-family: arial, helvetica, sans-serif;\">For one agent, that&#8217;s manageable. For a team running ten agents across different domains, it&#8217;s a bottleneck that doesn&#8217;t scale.<\/span><\/p>\n<p><span style=\"font-family: arial, helvetica, sans-serif;\"><strong>Agent optimizer in Foundry Agent Service<\/strong> solves this by automating the agent improvement loop. It evaluates your hosted agent against defined criteria, generates better configurations, and ranks the results so you can deploy the best one \u2014 all in a few minutes, with no additional infrastructure to provision.<\/span><\/p>\n<h4><span style=\"font-family: arial, helvetica, sans-serif;\">How It Works<\/span><\/h4>\n<p><span style=\"font-family: arial, helvetica, sans-serif;\">The optimizer runs a closed-loop cycle:<\/span><\/p>\n<ol>\n<li><span style=\"font-family: arial, helvetica, sans-serif;\"><strong>Evaluate the baseline<\/strong> \u2014 your agent processes tasks with pass\/fail criteria, producing a composite score from 0.0 to 1.0<\/span><\/li>\n<li><span style=\"font-family: arial, helvetica, sans-serif;\"><strong>Generate candidates<\/strong> \u2014 guided by what failed, the optimizer produces new configurations for your chosen target<\/span><\/li>\n<li><span style=\"font-family: arial, helvetica, sans-serif;\"><strong>Evaluate candidates<\/strong> \u2014 each candidate runs against the same task set<\/span><\/li>\n<li><span style=\"font-family: arial, helvetica, sans-serif;\"><strong>Rank and recommend<\/strong> \u2014 results sorted by score, with per-task breakdowns and token costs visible before you commit<\/span><\/li>\n<li><span style=\"font-family: arial, helvetica, sans-serif;\"><strong>Deploy the winner<\/strong> \u2014 one command promotes the winning configuration as a new versioned deployment<\/span><\/li>\n<\/ol>\n<p><span style=\"font-family: arial, helvetica, sans-serif;\">No model retraining. No code changes. The optimizer uses evaluation signals to identify where the agent fell short, then rewrites its instructions to strengthen return policies, escalation procedures, troubleshooting frameworks, and safety boundaries.<\/span><\/p>\n<h4><span style=\"font-family: arial, helvetica, sans-serif;\">Optimization Targets<\/span><\/h4>\n<ul>\n<li><span style=\"font-family: arial, helvetica, sans-serif;\"><strong>Instruction<\/strong> \u2014 rewrites your agent&#8217;s system prompt to address observed gaps. This is where most teams start.<\/span><\/li>\n<li><span style=\"font-family: arial, helvetica, sans-serif;\"><strong>Skill<\/strong> \u2014 generates reusable, named procedures (escalation steps, troubleshooting sequences) appended to your instructions.<\/span><\/li>\n<li><span style=\"font-family: arial, helvetica, sans-serif;\"><strong>Model<\/strong> \u2014 evaluates your agent across multiple model deployments in a single run, scoring quality\/cost trade-offs.<\/span><\/li>\n<li><span style=\"font-family: arial, helvetica, sans-serif;\"><strong>Tool Descriptions<\/strong> \u2014 refines how your agent understands and invokes external tools: when to call each, parameter requirements, fallback behavior.<\/span><\/li>\n<\/ul>\n<h4><span style=\"font-family: arial, helvetica, sans-serif;\">Solving the Cold-Start Problem<\/span><\/h4>\n<p><span style=\"font-family: arial, helvetica, sans-serif;\">Most teams don&#8217;t have evaluation datasets on day one. The eval <span style=\"font-family: 'courier new', courier, monospace;\">init<\/span> command solves this by generating both a dataset and evaluation criteria from your agent&#8217;s existing instructions and no manual test-writing is required.<\/span><\/p>\n<pre class=\"prettyprint language-py\"><code class=\"language-py\">$ azd ai agent eval init\r\n\r\nEval suite created\r\n  Dataset:    customer-support (2.0), 15 tasks\r\n  Evaluator:  customer-support (1)\r\n\r\n  Evaluator dimensions (6):\r\n    Weight  Dimension\r\n    \u2500\u2500\u2500\u2500\u2500\u2500  \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\r\n        10  policy_compliance\r\n         6  resolution_accuracy\r\n         5  troubleshooting_structure\r\n         4  communication_clarity\r\n         3  safety_boundaries\r\n         5  general_quality<\/code><\/pre>\n<h4>The Full Workflow<\/h4>\n<pre class=\"prettyprint language-py\"><code class=\"language-py\">azd ai agent init               # scaffold your agent\r\nazd deploy                      # ship to Foundry\r\nazd ai agent eval init          # generate evaluation criteria\r\nazd ai agent eval run           # score your agent\r\nazd ai agent optimize           # improve it\r\nazd ai agent optimize apply --candidate &lt;id&gt;\r\nazd deploy                      # deploy the optimized agent as a new version\r\n<\/code><\/pre>\n<p><span style=\"font-family: arial, helvetica, sans-serif;\">Each promoted candidate becomes a new versioned hosted agent deployment \u2014 auditable, rollback-ready, and captured in tracing.<\/span><\/p>\n<p><span style=\"font-family: arial, helvetica, sans-serif;\">Agent optimizer is currently in <strong>private preview<\/strong>, with public preview rolling out in 30 days. <a href=\"https:\/\/aka.ms\/Agent-Optimizer-Private-Preview\">Sign up for early access \u2192<\/a><\/span><\/p>\n<h2>The Road to General Availability<\/h2>\n<p><span style=\"font-family: arial, helvetica, sans-serif;\">Hosted agents are in public preview today, available across 20 Azure regions globally. As we approach General Availability by end of June 2026, our focus areas will include:<\/span><\/p>\n<ul>\n<li><span style=\"font-family: arial, helvetica, sans-serif;\"><strong>Agent optimizer in Foundry Agent Service public preview<\/strong> \u2014 rolling out to all <a href=\"https:\/\/learn.microsoft.com\/en-us\/azure\/foundry\/agents\/concepts\/hosted-agents#region-availability\">hosted agents regions<\/a><\/span><\/li>\n<li><span style=\"font-family: arial, helvetica, sans-serif;\"><strong>Private ACR<\/strong> <strong>in BYO virtual network<\/strong>\u2014 enabling container images in private Azure Container Registries to be deployed to Hosted Agents<\/span><\/li>\n<li><span style=\"font-family: arial, helvetica, sans-serif;\"><strong>Managed virtual network <\/strong>\u2014 extending support of <a href=\"https:\/\/learn.microsoft.com\/en-us\/azure\/foundry\/how-to\/managed-virtual-network?tabs=azure-cli\">Microsoft managed virtual network<\/a> for Hosted agents<\/span><\/li>\n<li><span style=\"font-family: arial, helvetica, sans-serif;\"><strong>Expanding Voice Live \/ WebSocket coverage<\/strong> beyond North Central US to additional regions<\/span><\/li>\n<li><span style=\"font-family: arial, helvetica, sans-serif;\"><strong>Durable, long running agents <\/strong>\u2014 enabling hosted agents to survive container crashes, redeployments, and periods of inactivity with automatic recovery, state persistence across turns, and multi-session context accumulation<\/span><\/li>\n<\/ul>\n<h2>Get Started<\/h2>\n<p><span style=\"font-family: arial, helvetica, sans-serif;\">Developers can get started in minutes by following the <a href=\"https:\/\/learn.microsoft.com\/en-us\/azure\/foundry\/agents\/quickstarts\/quickstart-hosted-agent\">QuickStart<\/a> or with code samples (<a href=\"https:\/\/github.com\/microsoft-foundry\/foundry-samples\/tree\/main\/samples\/python\/hosted-agents\">Python<\/a>\u00a0 \u00b7\u00a0 <a href=\"https:\/\/github.com\/microsoft-foundry\/foundry-samples\/tree\/main\/samples\/csharp\/hosted-agents\">C#<\/a>) which walk through setting up, testing, and deploying a production-ready hosted agent end to end.<\/span><\/p>\n<p><span style=\"font-family: arial, helvetica, sans-serif;\">Check out <a href=\"https:\/\/github.com\/microsoft\/ai-agents-for-beginners\">AI Agents for Beginners<\/a> for a 12-lesson curriculum, then go deeper with guided labs: <a href=\"https:\/\/microsoftlearning.github.io\/mslearn-ai-agents\/\">Develop AI Agents in Azure<\/a>, <a href=\"https:\/\/github.com\/microsoft\/Hosted_Agents_Workshop_dotNET\">Hosted Agents Workshop (.NET)<\/a>, and the <a href=\"https:\/\/github.com\/microsoft\/Learn-Microsoft-Agent-Framework-with-Foundry-ZavaShop-Supply-Chain-Workshop\">ZavaShop Supply Chain Workshop<\/a>.<\/span><\/p>\n<p><span style=\"font-family: arial, helvetica, sans-serif;\">\ud83d\udcfa <strong>Watch:<\/strong> <a href=\"https:\/\/www.youtube.com\/watch?v=iR7_57lJOz8\">Foundry Agent Service + Microsoft Agent Framework Explained<\/a> \u2014 Jeff Hollan walks through how to operationalize AI agents from deployment to real-world impact.<\/span><\/p>\n<p><span style=\"font-family: arial, helvetica, sans-serif;\">If you&#8217;re attending Microsoft Build 2026, or watching on-demand content later, be sure to check out these sessions:<\/span><\/p>\n<ul>\n<li><span style=\"font-family: arial, helvetica, sans-serif;\"><a href=\"https:\/\/build.microsoft.com\/en-US\/sessions\/BRK241?source=sessions\"><strong>BRK241\u00a0\u2014 From prototype to production: build and run agents at scale<\/strong><\/a> | <a href=\"https:\/\/github.com\/microsoft\/build26-brk241\">Session repo<\/a><\/span><\/li>\n<li><span style=\"font-family: arial, helvetica, sans-serif;\"><a href=\"https:\/\/build.microsoft.com\/en-US\/sessions\/BRK242\"><strong>BRK242 &#8212; Turn your agents into action: Connect tools, APIs, and documents<\/strong><\/a> | <a href=\"https:\/\/github.com\/microsoft\/build26-brk240\">session repo<\/a><\/span><\/li>\n<li><span style=\"font-family: arial, helvetica, sans-serif;\"><a href=\"https:\/\/build.microsoft.com\/en-US\/sessions\/BRK243?source=sessions\"><strong>BRK243\u00a0\u2014 Claw and agent harness in Microsoft Foundry<\/strong><\/a> | <a href=\"https:\/\/github.com\/microsoft\/build26-brk243\">session repo<\/a><\/span><\/li>\n<li><span style=\"font-family: arial, helvetica, sans-serif;\"><a href=\"https:\/\/build.microsoft.com\/en-US\/sessions\/DEM333?source=sessions\"><strong>DEM333<\/strong><strong>\u2014 How Foundry integrates with open-source frameworks and tools<\/strong><\/a> | <a href=\"https:\/\/github.com\/microsoft\/Build26-DEM333-how-foundry-integrates-with-open-source-frameworks-and-tools\">session repo<\/a><\/span><\/li>\n<\/ul>\n<p><b>\u00a0<\/b><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"font-family: arial, helvetica, sans-serif;\">\u00a0<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>A few weeks ago, we announced the public preview refresh of hosted\u00a0agents in Foundry Agent Service \u2014 a fundamentally re-imagined agent runtime built for operationalizing production-grade AI agents in enterprise systems. Today at Microsoft Build, we are excited to share several updates that make hosted agents easier to deploy, more capable across modalities, and seamless [&hellip;]<\/p>\n","protected":false},"author":214355,"featured_media":2497,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[49,112,163,1],"tags":[122,34,2,28],"class_list":["post-2496","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-aiagent","category-foundry-agent-service","category-microsoft-build","category-microsoft-foundry","tag-foundry-agent-service","tag-microsoft-build","tag-microsoft-foundry","tag-whats-new"],"acf":[],"blog_post_summary":"<p>A few weeks ago, we announced the public preview refresh of hosted\u00a0agents in Foundry Agent Service \u2014 a fundamentally re-imagined agent runtime built for operationalizing production-grade AI agents in enterprise systems. Today at Microsoft Build, we are excited to share several updates that make hosted agents easier to deploy, more capable across modalities, and seamless [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/foundry\/wp-json\/wp\/v2\/posts\/2496","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/foundry\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/foundry\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/foundry\/wp-json\/wp\/v2\/users\/214355"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/foundry\/wp-json\/wp\/v2\/comments?post=2496"}],"version-history":[{"count":3,"href":"https:\/\/devblogs.microsoft.com\/foundry\/wp-json\/wp\/v2\/posts\/2496\/revisions"}],"predecessor-version":[{"id":2585,"href":"https:\/\/devblogs.microsoft.com\/foundry\/wp-json\/wp\/v2\/posts\/2496\/revisions\/2585"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/foundry\/wp-json\/wp\/v2\/media\/2497"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/foundry\/wp-json\/wp\/v2\/media?parent=2496"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/foundry\/wp-json\/wp\/v2\/categories?post=2496"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/foundry\/wp-json\/wp\/v2\/tags?post=2496"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}