Disclaimer: This is not an official Microsoft product, does not represent official Microsoft learning materials, product documentation, or official statements by Microsoft Corporation. The content, opinions, and recommendations presented herein are the authors’ own, provided solely for educational purposes, and should not be construed as official Microsoft guidance or endorsement.
A hands-on, multi-part workshop teaching agentic AI design patterns using pure Python and the OpenAI SDK — no AI frameworks required.
This workshop progresses from LLM fundamentals to advanced multi-agent orchestration patterns:
All exercises work with any of these providers — just set LLM_PROVIDER in your .env:
| Provider | Client | Config |
|---|---|---|
| OpenAI | OpenAI() |
OPENAI_API_KEY |
| Azure OpenAI | AzureOpenAI() |
AZURE_OPENAI_ENDPOINT + AZURE_OPENAI_API_KEY |
| GitHub Models | OpenAI(base_url=...) |
GITHUB_TOKEN |
Click the button below to launch a fully configured environment — no local setup needed:
Once the codespace is ready, configure your .env file and run:
python exercises/00_setup/01_test_connection.py
# 1. Clone the repository
git clone https://github.com/jeffrey-groneberg/AI_Workshop_Agentic_Patterns.git
cd AI_Workshop_Agentic_Patterns
# 2. Create a virtual environment
python -m venv .venv
source .venv/bin/activate # macOS/Linux
# .venv\Scripts\activate # Windows
# 3. Install dependencies
pip install -r requirements.txt
# 4. Configure your provider
cp .env.example .env
# Edit .env with your API keys and provider choice
# 5. Test your connection
python exercises/00_setup/01_test_connection.py
# 6. Launch the interactive workshop TUI
python workshop.py
# Or start the documentation site
mkdocs serve
# Open http://127.0.0.1:8000
AI_Workshop_Agentic_Patterns/
├── exercises/ # Hands-on Python exercises
│ ├── 00_setup/ # Connection test
│ ├── 01_llm_basics/ # Chat completions, system prompts, structured outputs
│ ├── 02_tool_use/ # Function calling, agent loop
│ ├── 03_single_agent/ # Complete single agent
│ ├── 04_sequential/ # Pipeline pattern
│ ├── 05_concurrent/ # Fan-out/fan-in pattern
│ ├── 06_group_chat/ # Round-robin brainstorm + maker-checker
│ ├── 07_handoff/ # Dynamic routing
│ ├── 08_magentic/ # Adaptive planning
│ └── commons/ # Provider abstraction, agent class, utilities
├── docs/ # MKDocs Material site (primary learning material)
│ ├── concepts/ # Chat API, system prompts, function calling,
│ │ # structured outputs, agent loop, payload walkthrough
│ ├── patterns/ # Single agent, sequential, concurrent, brainstorm,
│ │ # maker-checker, handoff, magentic, orchestration overview
│ ├── exercises/ # Per-exercise documentation with interactive widgets
│ └── production-considerations/ # Context management, reliability, choosing patterns
├── mkdocs.yml
├── requirements.txt
└── .env.example
The MKDocs Material site is the primary learning material. It includes:
Start the docs site with mkdocs serve, then follow the navigation from Setup → Concepts → Patterns.
Chapter-by-chapter slide decks to guide participants through the workshop:
| Chapter | File | Topics |
|---|---|---|
| 1 — LLM Foundations | Chapter1_LLM_Foundations.pdf |
Workshop overview, commons module, Chat API, system prompts, structured outputs |
| 2 — Tools & Function Calling | Chapter2_Tools_Function_Calling.pdf |
Tool definitions, 4-step cycle, agent loop, mock tools |
| 3 — Single Agent | Chapter3_Single_Agent.pdf |
Agent dataclass, run() function, persistent conversation |
| 4 — Multi-Agent Orchestration | Chapter4_Multi_Agent.pdf |
Sequential, concurrent, group chat, maker-checker |
| 5 — Advanced Patterns | Chapter5_Advanced_Patterns.pdf |
Handoff, magentic, choosing patterns, context management, reliability |
Read the docs first, then code. The MKDocs site is the primary learning material. Exercises reinforce what you learn — they don’t replace the documentation.
If you find this workshop useful, share it with your network!