From Prototype to Production: Building a Hosted Agent with AI Toolkit & Microsoft Foundry
#AI

From Prototype to Production: Building a Hosted Agent with AI Toolkit & Microsoft Foundry

Cloud Reporter
5 min read

A comprehensive walkthrough of building production-ready AI agents using Visual Studio Code's AI Toolkit and Microsoft Foundry, covering model selection, prototyping, deployment, and operationalization.

In the rapidly evolving landscape of AI development, the journey from prototype to production has become increasingly critical. A recent demonstration by Microsoft showcases how developers can leverage AI Toolkit in Visual Studio Code alongside Microsoft Foundry to build, test, and operationalize hosted AI agents that are not only functional but production-ready.

The Retail Agent Scenario: A Concrete Use Case

The demonstration centers around a fictional DIY and home-improvement retailer called Zava, providing a tangible context for building an AI agent. The agent's purpose is to assist internal teams with two core functions: analyzing sales data (such as identifying top-selling categories from product catalogs) and managing inventory (detecting low-stock products and triggering restock actions). This real-world scenario grounds the technical walkthrough in practical business value.

Chapter 1: Model Selection with GitHub Copilot and AI Toolkit

The development journey begins in Visual Studio Code, where GitHub Copilot works in tandem with AI Toolkit to make informed model selection decisions. Rather than arbitrarily choosing a model, the process involves:

  • Describing the business scenario in natural language
  • Requesting Copilot to perform comparative analysis between candidate models
  • Defining explicit evaluation criteria including reasoning quality, tool support, and analytics suitability

The AI Toolkit's skills transform model selection from guesswork into a transparent, repeatable decision-making process. Developers can then explore the AI Toolkit Model Catalog, which offers access to hundreds of models filterable by hosting platform (GitHub, Microsoft Foundry, local) and publisher (open-source or proprietary). Once the optimal model is identified, deployment to Microsoft Foundry happens with a single click, followed by validation through test prompts.

Chapter 2: Rapid Agent Prototyping with Agent Builder UI

With the model ready, the Agent Builder UI enables rapid configuration of the agent's core characteristics:

  • Agent identity (name, role, responsibilities)
  • Behavioral instructions defining tone and scope
  • Model selection
  • Tools and data sources access

For the Zava scenario, the agent incorporates file search grounded in uploaded sales logs and product catalogs, plus a code interpreter for computing metrics, generating charts, and writing reports. The right-side playground allows immediate testing with business questions like "What were the top three selling categories in 2025?" The responses are data-grounded, with visibility into which tools and data sources produced each answer. The Agent Builder also provides local evaluation and tracing functionalities, essential for iterative development.

Chapter 3: From UI Prototype to Hosted Agent Code

While UI-based prototyping offers speed and flexibility, production solutions often require custom logic. This transition phase uses a built-in workflow to migrate from UI prototype to hosted agent template, generating a production-ready scaffold that includes:

  • Agent code built with Microsoft Agent Framework (available in Python or C#)
  • YAML-based agent definition
  • Container configuration files

Developers can then extend the agent with custom functions, such as creating and managing restock orders. GitHub Copilot accelerates this customization by adapting the template to the specific Zava business scenario, bridging the gap between generic templates and domain-specific requirements.

Chapter 4: Local Debugging and Cloud Deployment

Before cloud deployment, local testing validates the agent's functionality:

  • Identifying products running out of stock
  • Triggering restock actions through custom functions
  • Debugging the complete tool-calling flow

Once validated, deployment to Microsoft Foundry provides more than just compute power. The cloud deployment unlocks built-in features for operationalizing and maintaining the solution in production, including scalability, reliability, and integration with broader enterprise systems.

Chapter 5: Evaluation, Safety, and Monitoring in Foundry

Production readiness extends far beyond initial deployment. The Foundry portal offers comprehensive operational capabilities:

  • Evaluation runs using both real and synthetic datasets
  • LLM-based judges that score responses across multiple metrics with explanations
  • Red teaming where adversarial agents probe for unsafe or undesired behaviors
  • Monitoring dashboards tracking usage, latency, regressions, and cost across the agent fleet

These capabilities transform ad-hoc testing into continuous quality and safety assessment, essential for maintaining production systems over time.

Why This Workflow Matters

This end-to-end flow demonstrates a fundamental principle: Agentic AI isn't just about building agents—it's about operating them responsibly at scale. By combining AI Toolkit in VS Code with Microsoft Foundry, developers gain:

  • A smooth developer experience that bridges experimentation and production
  • Clear separation between development and operational phases
  • Built-in evaluation, safety, and observability capabilities

The workflow addresses a critical gap in AI development: the often-overlooked transition from prototype to production. Many AI prototypes fail to reach production due to scalability issues, lack of testing infrastructure, or operational challenges. This integrated approach provides a structured path that maintains development velocity while ensuring production readiness.

Resources and Next Steps

The demonstration is supported by comprehensive resources:

  • A GitHub repository with sample code and templates
  • Foundry tutorials available on YouTube
  • Documentation covering Microsoft Foundry capabilities

For developers looking to build production-ready AI agents, this workflow represents a mature, enterprise-ready approach that balances rapid prototyping with the rigor required for production deployment. The integration between development tools (VS Code, Copilot) and operational platforms (Microsoft Foundry) creates a cohesive ecosystem that addresses the full lifecycle of AI agent development.

The approach is particularly relevant as organizations increasingly adopt agentic AI for business-critical applications. The ability to move from concept to production with confidence in quality, safety, and scalability becomes a competitive advantage in the AI-driven economy.

Featured image

This article is based on the Microsoft Community Hub post "From Prototype to Production: Building a Hosted Agent with AI Toolkit & Microsoft Foundry" by carlottacaste, published March 13, 2026.

Comments

Loading comments...