๐ Workshop Overview
A progressive 7-exercise workshop for building AI agents and multi-agent workflows with Microsoft Agent Framework in Python. From creating your first agent to designing multi-agent pipelines with streaming events โ all powered by Microsoft Foundry.
How to Use This Workshop
- Complete the Setup โ Install prerequisites, configure Dev Container, set up Azure credentials
- Click an exercise in the sidebar (or the curriculum table below)
- Open your terminal alongside this site โ each exercise tells you exactly what to code
- Use the ๐ Walkthrough links for conceptual guidance without seeing the full solution
- Track your progress with the sidebar progress bar
[!TIP] Each exercise has a
starter.pywith# TODO:markers. Fill in the blanks, then runcheck.shto validate. Reference solutions are insrc/demo*.pyif you get stuck.
Skill Progression
Exercise 1 Exercise 2 Exercise 3 Exercise 4 Exercise 5 Exercise 6 Exercise 7
Run Agent โ Web Search โ MCP Tool โ Struct Output โ Multi-Agent โ DevUI โ Capstone
โญ โญ โญโญ โญโญ โญโญโญ โญโญโญ โญโญโญโญ
create add hosted MCP stdio Pydantic workflow visual design your
& run web search tool via + response_ edges + debugger own agent
agent tool npx format streaming + API
| Phase | Exercises | Scaffolding Level | What you do |
|---|---|---|---|
| ๐ข Foundations | 1, 2 | High โ fill-in-the-blank | Complete TODO markers in mostly-written code |
| ๐ก Integration | 3, 4 | Medium โ guided | Implement key functions with hints and references |
| ๐ Orchestration | 5, 6 | Low โ goal-oriented | Build toward a described outcome with minimal starter code |
| ๐ด Capstone | 7 | None โ from scratch | Design and implement your own agent end-to-end |
Curriculum
| # | Title | Key Concepts | Difficulty | Time |
|---|---|---|---|---|
| Setup | Setup & Installation | Dev Container, Azure CLI, environment variables | โ | 15-30 min |
| 1 | Run Your First Agent | FoundryChatClient, .as_agent(), run(), async lifecycle |
โญ | 15-20 min |
| 2 | Web Search Tool | client.get_web_search_tool, Bing grounding, tool integration |
โญ | 20-30 min |
| 3 | MCP Stdio Tool | Model Context Protocol, MCPStdioTool, local tool servers |
โญโญ | 20-30 min |
| 4 | Structured Output | response_format, Pydantic BaseModel, output parsing |
โญโญ | 20-25 min |
| 5 | Multi-Agent Workflow | Workflow orchestration, agent edges, streaming events | โญโญโญ | 30-40 min |
| 6 | DevUI | DevUI server, entity discovery, OpenAI-compatible API | โญโญโญ | 25-35 min |
| 7 | Capstone Project | All prior concepts โ build your own agent or workflow | โญโญโญโญ | 45+ min |
Total: 7 exercises across 4 phases โ estimated ~5 hours
What is Microsoft Agent Framework?
Microsoft Agent Framework is a Python SDK for building AI agents backed by Microsoft Foundry. It provides a structured way to create agents that can use tools, produce structured output, and orchestrate multi-agent workflows โ all with streaming support and a visual debugging UI.
Key Features
- ๐ค Agent Creation โ
FoundryChatClientโ.as_agent()โrun()lifecycle - ๐ Tool Integration โ Hosted tools (Web Search) and local tools (MCP stdio)
- ๐ Structured Output โ Pydantic models with
response_formatparameter - ๐ Workflow Orchestration โ Multi-agent pipelines with
WorkflowBuilderand edges - ๐บ DevUI โ Visual debugger with OpenAI-compatible API endpoint
- ๐ Azure-native โ Entra ID authentication, Foundry project integration
Quick Start
# 1. Clone and open in Dev Container / Codespaces
git clone https://github.com/shinyay/getting-started-with-agent-framework.git
cd getting-started-with-agent-framework
# Open in VS Code โ "Reopen in Container"
# 2. Configure environment
cp .env.example .env
# Edit .env with your Microsoft Foundry values
# 3. Authenticate
az login --use-device-code
# 4. Verify setup โ run Exercise 1's solution
python src/demo1_run_agent.py
For detailed setup, see the Setup & Installation page.
Exercise Structure
Each exercise directory (workshop/exercises/ex<N>_*/) contains:
| File | Purpose |
|---|---|
README.md |
Objectives, concepts, step-by-step instructions |
starter.py |
Skeleton code with # TODO: markers |
check.sh |
Validation script to verify your solution |
Solutions are in src/demo*.py. Detailed walkthroughs are available as ๐ links in the sidebar.
Requirements
- Azure subscription with AI Foundry project access
- Python 3.10+ (3.11+ recommended)
- Azure CLI installed and authenticated
- Node.js / npx (for MCP exercises)
- VS Code with Dev Container support (recommended)
โ ๏ธ Version note: This workshop targets Agent Framework
1.2.2(April 29, 2026 stable). Online documentation may describe a newer version with API differences. When in doubt, trust the code in this repository.
๐ Start the Setup โ