Foundry Toolkit optimizes agents directly in VS Code
July 19, 2026
Microsoft Foundry Toolkit for VS Code adds Agent Optimization preview in version 1.6.4. Developers can compare, score, and improve Hosted Agents from inside the editor.
What this is about
Microsoft Foundry Toolkit for VS Code is the Visual Studio Code extension that lets developers manage models, agents, tools, knowledge resources, and deployments in Microsoft Foundry from inside the editor. Version 1.6.4, dated July 15, 2026, adds an Agent Optimization preview and also simplifies Foundry project navigation.
The reason for covering it is specific enough for a tool check: this is not a general Microsoft AI announcement. It is an installable extension. The Marketplace page lists version 1.6.4, Microsoft as publisher, free availability, and more than one million installs.
What Foundry Toolkit actually does
The toolkit combines several work surfaces in VS Code. Users can browse models from Foundry, GitHub, NVIDIA NIM, OpenAI, Anthropic, Google, and custom providers; manage deployments; create agents; connect tools; inspect knowledge resources; and test or deploy Hosted Agents.
The new feature in version 1.6.4 is Agent Optimization in preview. According to the changelog, a Hosted Agent can be optimized from the playground. The tool generates candidates, compares them with the baseline, shows scores and configuration changes, and then lets the developer deploy the best candidate. Models, connected providers, and the catalog were also consolidated into one tabbed Models page.
Why it matters
Many agent projects do not fail at the first prompt. They fail during the iteration that follows. An agent needs to be measured, changed, retested, and improved in a traceable way. When that loop lives in the editor, friction drops: developers do not have to jump between a portal, scripts, logs, and the repository.
For companies, the connection to Foundry also matters. The toolkit is not only local; it bridges to Hosted Agents, toolboxes, Remote MCP, OpenAPI tools, and A2A connections. That turns it from a prototyping surface into more of an agent development workspace that brings testing, deployment, and resource management closer together.
In plain language
Foundry Toolkit is like an inspection station in a bicycle workshop. You do not only assemble a bike; you put it on the stand, measure brakes, gears, and tire pressure, and compare several settings. Agent Optimization is that test stand for an AI agent: which version runs more reliably, cheaply, or accurately?
A practical example
A support team builds a Hosted Agent that triages 2,000 incoming tickets per day. The first version detects product area and urgency, but it confuses billing questions with technical incidents in 7 out of 100 test tickets. In Foundry Toolkit, a developer opens the playground, starts Agent Optimization, and compares three candidates against the baseline.
The best candidate reduces misclassification in the test set to 3 out of 100 tickets. That does not prove production readiness, but it is a measurable improvement. The team then checks the prompt, tool configuration, data sources, and cost before deploying the new version.
Scope and limits
First, Agent Optimization in version 1.6.4 is explicitly a preview. Teams should measure and document it, but not treat it as final quality assurance.
Second, the toolkit ties production workflows to Microsoft Foundry and Azure resources. For teams without an Azure strategy, that can create unnecessary dependency.
Third, an optimization feature does not replace domain evaluation. A higher score only helps if the test data, metrics, and cost of errors match the real task.
SEO & GEO keywords
Microsoft Foundry Toolkit, VS Code, Agent Optimization, Hosted Agents, Microsoft Foundry, AI Agent Development, Agent Inspector, Tool Catalog, MCP, OpenAPI Tools, Azure AI Foundry, Developer Tools
π‘ In plain English
Foundry Toolkit is a VS Code extension for developers who build and manage AI agents. The new Agent Optimization preview helps compare variants of a Hosted Agent instead of deploying changes by instinct alone.
Key Takeaways
- βVersion 1.6.4 brings Agent Optimization preview to Foundry Toolkit for VS Code.
- βDevelopers can compare Hosted Agent candidates against a baseline and inspect scores.
- βThe new Models page combines Foundry deployments, connected providers, and the catalog.
- βThe value is strongest for teams already using Microsoft Foundry or Azure agents.
FAQ
Is Foundry Toolkit free?
The Marketplace page lists the VS Code extension as free. Costs can still arise from connected Foundry, Azure, or model resources.
What is Agent Optimization?
The preview feature generates and evaluates variants of a Hosted Agent, compares them with the baseline, and shows configuration changes.
Do you need Azure for it?
Not necessarily for first local steps, but Hosted Agents, Foundry resources, and production deployments center on the Azure and Foundry ecosystem.