Enki

Microsoft Foundry's agent optimizer turns production traces into ranked fixes

By

Published

Reporting from InfoQ AI

More onAmazonMicrosoft

Foundry's optimizer proposes and scores changes to a hosted agent's prompt, skills and model. AWS charges only for the evaluations behind its version.

What it means for founders

If you already run hosted agents on Foundry, ask for the allow list now and try the optimizer on one agent. Build a small golden dataset for risky actions and a wider regression set, as Harri Jaakkonen, a Microsoft MVP quoted by InfoQ, advises.

Before the first run, point every tool at read-only access or a test copy of your data. Budget for it: by Enki's arithmetic, 100 test tasks with one evaluator and four candidates plus the baseline means 500 eval-model calls per run, plus the optimization model's calls and the agent's own.

Treat a winning candidate as a pull request. Read the diff, check which tasks got worse, and ship in stages with a way back. Hector Flores, writing on DEV Community, put it bluntly, as InfoQ quotes him: "Self-modifying agents with no review gate are an incident waiting to happen."

Wait if you are not on Azure. Moving an agent onto Foundry for a preview feature is a large switch. Enki's story on the Azure AI gateway covers another piece of Microsoft's agent stack, and Enki's Microsoft news page tracks the rest.

What we don't know yet

The Build post promised a public preview within 30 days; five months on, the quickstart still requires an allow list. Microsoft has not said when the optimizer leaves preview or the allow list, or whether it will then carry a fee of its own. It has given no typical cost per optimization run. The 65% router saving and every customer result come from Microsoft or the customer, and none has been checked independently.

The story

Microsoft has added what it calls continuous improvement to Microsoft Foundry, its platform for running AI agents. Announced at Ignite on 17 November, it feeds the record of an agent's live runs, the notes its human experts leave on them and its test scores into an agent optimizer. The optimizer drafts a rewritten system prompt, new skills or a different model, and tests each version against the team's own evaluations. It recommends the strongest, and the team decides what ships, Microsoft said in its Ignite post.

Only part of it is finished. Insights, which groups recurring failures in traces and suggests what caused them, is generally available. So is tracing for agents built with LangGraph, LangChain and CrewAI. The optimizer, sending an insight straight to it, annotations, golden datasets and Programmed Training are all in preview. For a founder with agents in production, the pitch is fewer hours rewriting prompts by hand. Enki's read: the loop is sound, but the hard part is still writing tests worth optimizing against.

Five months from private preview to Ignite

Microsoft introduced the agent optimizer on 3 June at Build as a private preview, promising a public preview within 30 days. That post showed a sample support agent going from a score of 0.60 to 0.92 after one run. It is a demo on Microsoft's own sample, not a customer result.

Ignite adds three optimizer previews: sending a recurring problem from insights to the optimizer in one step, skill optimization, which turns past conversations and expert feedback into versioned skills, and cost optimization, which hunts for cheaper setups such as a smaller model. Microsoft says Foundry's model router saves up to 65% against sending everything to a frontier model, by its own testing.

Customer numbers are Microsoft's too. It says Heidi, which makes an AI care partner for clinicians, trained an open-weight model that matched a popular frontier model on Heidi's own clinical quality measures, for what Microsoft puts at 87% less per note. Gulf Air described drafting roughly 10,000 possible test questions before its Falcon Eye agents went live on 9 November, InfoQ reports, but published no accuracy, latency or cost gains.

The docs carry the warnings

Access is gated. The hosted-agent quickstart says an Azure subscription has to be on an allow list, and you ask a Microsoft representative to add it. To be optimized, a hosted agent must use the Responses protocol.

Each run needs two models deployed in your project, says the agent optimizer overview on Microsoft Learn. An eval model scores answers, and it runs once for every evaluator, task and candidate. An optimization model writes the candidates; Microsoft allows only five gpt-5 versions and two DeepSeek models for that job. Neither page names a separate optimizer fee: the costs are model usage and any charges from the agent's tool calls.

If an agent's tools can change production systems, an optimization run can make unintended or irreversible changes, even if you never promote a candidate. The docs also class any score gain under 0.03 as noise.

AWS charges only for the evaluations

The nearest rival is Amazon's. Per the AgentCore pricing page, AgentCore optimization covers the same ground: Insights for failure analysis, Recommendations that rewrite system prompts and tool descriptions from production traces, and Experiments that test them offline or as A/B tests. Insights is free in public preview, and recommendations are free; you pay for the evaluations they use. Built-in evaluators cost $0.0024 for every 1,000 tokens in and $0.012 for every 1,000 tokens out.

Foundry goes further on targets: skills and model choice, not just prompts and tool descriptions, plus a path to training weights. AWS publishes a clearer price.

Sources

Reporting

More in Products & Launches

How Enki covers newsCorrectionsReport an error