Skip to content

LauraVerghote/Hosted-agents-workshop

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

50 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Hosted Agents Workshop: Building & Deploying AI Agents on Microsoft Foundry

🎯 Workshop Overview

Welcome to this hands-on workshop where you'll learn to build, containerize, and deploy AI agents as hosted agents on Microsoft Foundry Agent Service. You'll use Python and the Microsoft Agent Framework to create production-ready agents that run as managed containerized services with autoscaling, observability, and enterprise-grade security.

What You'll Build

By the end of this workshop, you will have:

  1. Lab 1: A fully functional hosted agent built with Microsoft Agent Framework, tested locally, containerized with Docker, and deployed to Microsoft Foundry Agent Service
  2. Lab 2: Choose from multiple advanced agent patterns — a Web Search Agent, a RAG Agent, or a Multi-Agent Workflow — and publish your agent to channels

Learning Objectives

  • Understand what hosted agents are and when to use them
  • Set up a Microsoft Foundry project with the required resources
  • Build an AI agent using the Microsoft Agent Framework (Python)
  • Use the hosting adapter to test agents locally
  • Containerize your agent with Docker and push to Azure Container Registry
  • Deploy your agent to Microsoft Foundry Agent Service
  • Manage the agent lifecycle — start, stop, scale, and update
  • Monitor agents with OpenTelemetry tracing
  • Publish agents to Teams, Web, and API channels

📋 Prerequisites

Required Knowledge

  • Basic understanding of Python programming
  • Familiarity with REST APIs
  • Basic understanding of Docker and containers
  • Understanding of basic AI/ML concepts

Required Tools

Tool Download Link
Python 3.10+ https://www.python.org/downloads/
VS Code https://code.visualstudio.com/
Git https://git-scm.com/downloads
Docker Desktop https://www.docker.com/products/docker-desktop/
Azure CLI https://learn.microsoft.com/en-us/cli/azure/install-azure-cli

Required Access


🗂️ Workshop Structure

This workshop is divided into two progressive labs, each with multiple sub-labs.

💡 Tip: Lab 1 is required before Lab 2. In Lab 2, you choose one (or more) agent patterns to explore.

Duration: 75–100 minutes

Sub-Lab Description Duration
1.1 Set Up Azure Resources Create Foundry project, deploy models, set up ACR 15–20 min
1.2 Build Your Agent Build a time-zone agent with Microsoft Agent Framework 15–20 min
1.3 Test Locally Use the hosting adapter to test via REST 10–15 min
1.4 Containerize & Deploy Docker build, push to ACR, deploy to Foundry 20–25 min
1.5 Manage & Monitor Start, stop, scale, and observe your agent 15–20 min

Duration: 60–90 minutes (choose your path)

Sub-Lab Description Duration
2.1 Web Search Agent Build an agent that searches the web using Foundry tools 20–25 min
2.2 RAG Agent Build a RAG agent with Azure AI Search integration 20–25 min
2.3 Multi-Agent Workflow Orchestrate multiple agents in a workflow 25–30 min
2.4 Publish & Evaluate Publish to channels and evaluate performance 15–20 min
2.5 Cleanup Resources Delete all Azure resources 5–10 min

💡 In Lab 2, pick the agent pattern(s) that interest you most — you don't need to complete all three (2.1, 2.2, 2.3).


🏗️ Architecture Overview

What Are Hosted Agents?

Hosted agents are containerized agentic AI applications that run on Foundry Agent Service. Unlike prompt-based agents, you build hosted agents through code and deploy them as container images on Microsoft-managed pay-as-you-go infrastructure.

┌────────────────────────────────────────────────────────────────┐
│                    Microsoft Foundry                           │
│                                                                │
│  ┌──────────────┐    ┌──────────────────┐   ┌───────────────┐  │
│  │ Your Agent   │    │  Hosting Adapter │   │ Agent Service │  │
│  │ Code (MAF)   │───>│  (HTTP Server)   │──>│ (Managed)     │  │
│  └──────────────┘    └──────────────────┘   └───────────────┘  │
│         │                                          │           │
│         ▼                                          ▼           │
│  ┌──────────────┐                          ┌───────────────┐   │
│  │  Local Tools │                          │ Autoscaling   │   │
│  │  (Python)    │                          │ Observability │   │
│  └──────────────┘                          │ Conversations │   │
│                                            └───────────────┘   │
└────────────────────────────────────────────────────────────────┘

Key Components

Component Description
Microsoft Agent Framework Python/.NET SDK for building enterprise AI agents with type safety, checkpointing, and multi-agent orchestration
Hosting Adapter Framework abstraction layer that exposes your agent as an HTTP service for local testing and deployment
Agent Service Managed platform that handles provisioning, autoscaling, state management, identity, and observability

Supported Frameworks

Framework Python .NET
Microsoft Agent Framework
LangGraph
Custom code

This workshop uses Python with Microsoft Agent Framework.


🚀 Getting Started

  1. Set up your environment — Install all prerequisites
  2. Start Lab 1 — Build and deploy your first hosted agent
  3. Continue to Lab 2 — Explore advanced patterns

📎 Additional Resources

📄 License

This workshop content is provided for educational purposes.


Ready to begin? Head over to the Setup Guide to get started!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors