Skip to content

Microsoft Agent Framework Workshop

Welcome to this beginner-friendly Microsoft Agent Framework workshop. Every exercise is based on official Microsoft Learn documentation and the microsoft/agent-framework repository so you can trust the patterns you learn here.

The examples use lightweight healthcare and life-sciences scenarios to keep a consistent thread across all lessons.

What this workshop covers

# Lesson What you will learn
00 Prerequisites Azure subscription, Python environment, Foundry project and model deployment
01 Your First Agent Create an agent with FoundryChatClient, get non-streaming and streaming responses
02 Conversations & Memory Multi-turn conversations with AgentSession, persistent memory with InMemoryHistoryProvider
03 Tools & Function Calling Define function tools with @tool, let the agent call custom code
04 Your First Workflow Build a deterministic two-agent pipeline with executors and edges
05 Dynamic Orchestration Coordinate specialist agents dynamically with MagenticBuilder
06 Observability Trace agent runs with OpenTelemetry
07 DevUI Launch the browser-based developer UI and interact with your agents visually

Design goals

  • Keep the flow easy to follow.
  • Favour official documentation over custom theory.
  • Keep examples short and runnable.
  • Use a lightweight docs-first web UI.

Official sources used

Repository layout

.
├── docs/           ← lesson pages (served by MkDocs)
├── examples/       ← runnable Python scripts
├── mkdocs.yml
├── requirements.txt
└── SETUP.md

Quick start

  1. Clone the repository and set up the Python environment:

    git clone https://github.com/beyondelastic/maf-workshop.git
    cd maf-workshop
    python -m venv .venv && source .venv/bin/activate
    pip install -r requirements.txt
    
  2. Sign in to Azure:

    az login
    
  3. Configure your environment variables:

    cp .env.example .env   # fill in your values
    
  4. Follow the lessons on this site starting with Prerequisites.

Full setup instructions are in SETUP.md.