Skip to content
Apixo
Blog
news· 4 min read· via InfoQ AI & ML

Microsoft Foundry Introduces Automated Optimization Loop for Production AI Agents

Microsoft Foundry now offers continuous optimization for AI agents, leveraging production traffic, trace evaluations, and automated tuning to improve model behavior.

Microsoft Foundry Introduces Automated Optimization Loop for Production AI Agents

Microsoft has introduced a continuous optimization loop for production AI agents on its Microsoft Foundry platform, allowing deployed agents to learn from real-world user traffic. Announced at Ignite by Tina Schuchman, Corporate Vice President for Microsoft Foundry, the new framework creates a structured four-stage cycle: establishing benchmarks for success, detecting performance gaps in production, generating targeted optimizations, and validating candidate updates before shipping them to users.

Key Capabilities and How the Loop Works

The update spans both generally available features and preview tools. Production insights, which analyze live traces to group recurring agent failures and suggest fixes, are now generally available. Multi-turn evaluation and tracing capabilities have also reached general availability for agents built outside Foundry using frameworks such as LangChain, LangGraph, and CrewAI. Meanwhile, several core components remain in preview, including the agent optimizer, trace annotations, golden datasets, rubric evaluators with built-in safety coverage, and Programmed Training.

First previewed at Microsoft Build in June, the agent optimizer evaluates hosted agents against user-defined criteria. It generates candidate configurations covering system prompt instructions, available skills, tool descriptions, and model selection, ranking them so developers can select the best candidate. The optimizer supports hosted agents utilizing the Responses protocol and is available across all Foundry regions except Norway East. Running the optimizer requires deploying two models within the Foundry project.

Microsoft notes that incorporating its model router into the optimization loop can yield up to 65% in cost savings compared to routing every query to a premier frontier model. In an engineering deep dive, Microsoft revealed that the "reflector"—a dedicated model tasked with analyzing failed execution traces to diagnose low scores—had a larger impact on final performance than the agent's primary model itself. In testing, upgrading the reflector yielded greater improvements than swapping the agent's underlying model between gpt-4o and gpt-4.1-mini.

Developers can execute the optimization cycle using the Azure Developer CLI with five commands:

  • azd ai agent eval init generates evaluation datasets and evaluators from a short description.
  • azd ai agent eval run calculates baseline performance scores.
  • azd ai agent optimize searches across candidate configurations.
  • azd ai agent optimize apply --candidate <id> applies the chosen candidate locally.
  • azd deploy pushes the updated version to production.

Training Options and Production Realities

When prompt modifications and tool tweaks prove insufficient, teams can escalate to model weight adjustments through Managed Training (formerly managed fine-tuning) or Programmed Training. Under Programmed Training, developers write custom Python scripts to manage supervised fine-tuning or reinforcement learning on open-weight models, while Foundry manages the underlying GPU infrastructure. Microsoft MVP and security architect Harri Jaakkonen noted that Programmed Training requires explicit permission approval and will not execute arbitrary uploaded code, advising developers to exhaust instruction, skill, and tool adjustments before committing to model retraining.

Early production adoption includes airline operator Gulf Air, which implemented the loop for its Falcon Eye operational analytics system. Launched on November 9, the application uses voice and chat agents to query internal operational data through custom APIs and a Postgres Model Context Protocol (MCP) server. To prepare for release, the team generated roughly 10,000 candidate evaluation questions, running batched evaluations of 100 questions and executing a final 400-question run shortly before launch. Eligible instruction and tool errors identified by production insights were routed straight to the optimizer.

What it means for developers

The introduction of automated optimization loops simplifies agent maintenance, but experts emphasize that human review remains critical. Reacting to the announcement on DEV Community, developer Hector Flores warned that the cited 65% router savings should be viewed as an upper limit rather than a guaranteed outcome. He highlighted the necessity of manual review gates before deployment, noting that fully autonomous, self-modifying agents operating without human review risk introducing unexpected production outages.

Jaakkonen echoed this sentiment, recommending that teams carefully review configuration diffs, analyze individual test case regressions, and roll out updates incrementally with clear rollback strategies. He advised maintaining a compact golden dataset for high-stakes operational tasks, a broader regression suite for typical user queries, and isolated safety testing dedicated to prompt injection and unauthorized tool invocation.

For engineering teams experimenting with agent architectures and model selection, access to diverse model providers is essential for finding the right balance between latency, accuracy, and cost. Developers can try top AI models cheaply through one API at https://apixoai.online, simplifying cross-model benchmarking alongside platform-native optimizations.

As agent workflows mature, tools like Microsoft Foundry's optimization loop highlight a broader industry pivot from static prompt engineering to dynamic, trace-driven agent refinement backed by rigorous evaluation suites.


Source: Microsoft Foundry Adds an Optimization Loop for Production Agents — InfoQ AI & ML. Written by the Apixo team from that report.

#ai-news#ai-agents#microsoft-foundry#machine-learning#devops#azure
Try it with your own tools

One key for Claude, GPT, GLM, DeepSeek and more. Pay per token with crypto.

Get your API key

Keep reading