MAF AcademyLearnCapstoneSandbox
MAF Academy · Microsoft Agent Framework hands-on workshop · labs verified on agent-framework-core 1.26
← All modules
MODULE 1 OF 8 5 minutes

Introduction to Microsoft Agent Framework

One open-source framework for agents and workflows — the successor to Semantic Kernel and AutoGen.

1.Introduction to Microsoft Agent Framework (MAF)
2.Evolution from Semantic Kernel and AutoGen
3.Understanding the architecture of MAF
4.Key components and capabilities
5.Understanding agents versus workflows
6.Practical enterprise use cases

On this page

What is Microsoft Agent Framework?Evolution: Semantic Kernel + AutoGen → MAFThe layered architectureAgents vs. workflows — who controls the path?Enterprise use casesYour first agent interaction — 6 linesKey takeawaysHands-on activityQuiz
1The big idea

What is Microsoft Agent Framework?

Microsoft Agent Framework (MAF) is an open-source SDK for Python and .NET to build, orchestrate and deploy AI agents and multi-agent workflows.

It gives you two building blocks:

  • Agents — an LLM + instructions + tools + memory that decides what to do next.
  • Workflows — typed, graph-based pipelines where you decide the execution path, with checkpointing and human-in-the-loop.

Everything else — model providers, middleware, telemetry, hosting — plugs into those two.

2History

Evolution: Semantic Kernel + AutoGen → MAF

Microsoft previously had two agent stacks:

Semantic KernelAutoGenAgent Framework
StrengthEnterprise: plugins, filters, telemetry, connectorsResearch: multi-agent conversation patternsBoth, unified
OrchestrationPlanners / processesGroup chat, teamsTyped graph workflows + prebuilt patterns
StateKernel memoryAgent messagesSessions, context providers, checkpoints

MAF is built by the same teams: SK's enterprise foundations + AutoGen's simple agent abstractions and orchestration patterns. Both predecessors now point new projects to MAF.

Semantic Kernel

Enterprise foundations

Plugins & connectorsFilters (middleware)TelemetryEnterprise support

AutoGen

Multi-agent research

Simple agent abstractionGroup chat & teamsMulti-agent patternsResearch velocity

Microsoft Agent Framework

Open source · successor to both

✦ Agents + Workflows
✦ Typed graph orchestration
✦ Sessions & context providers
✦ Checkpoints & HITL
✦ OpenTelemetry built-in
✦ Python & .NET
Two Microsoft agent stacks merged into one framework, built by the same teams.
3Architecture

The layered architecture

Read the stack bottom-up: a chat client talks to a model provider; an agent wraps that client with instructions, tools, sessions and middleware; workflows compose agents and plain Python executors; and hosting + observability wrap everything for production.

Hosting & Observability
OpenTelemetryDevUIA2A protocolAG-UIAzure Functions / Foundry
Workflows & Orchestration
WorkflowBuilder@workflow / @stepSequentialConcurrentHandoffGroup chatMagenticCheckpointsHITL
Agents
Agentinstructionsrun() / streamas_tool()
Agent capabilities
@tool functionsMCP toolsSessionsContext providersMiddlewareSkills
Chat clients
OpenAIChatCompletionClientOpenAIChatClientFoundryAnthropicOllamaGeminiBedrock
Model providers
Azure OpenAIMicrosoft FoundryOpenAIGroqLocal models
Each layer depends only on the one beneath — swap a provider without touching your agents or workflows.
4Mental model

Agents vs. workflows — who controls the path?

Rule of thumb: if you can write the steps down as a flowchart, use a workflow. If the path depends on open-ended reasoning, use an agent. Most real systems are workflows of agents.

Agent

LLMtool Atool Bmemoryanswer

The model loops: think → call tools → think → answer.

Workflow

startagentfunchumanend

You define nodes and edges; the runtime executes them.

Who decides the next step?The LLM, at run timeYou, at design time
PathDynamic, open-endedExplicit graph / code
PredictabilityLower — creativeHigh — auditable
Best forConversations, research, open tasksBusiness processes, pipelines, approvals
State & recoverySessionsCheckpoints, resume, HITL
5Why it matters

Enterprise use cases

Agents shine where work is language-heavy, multi-step and tool-driven. The capstone of this workshop — a Business Operations Assistant — combines several of these patterns.

Customer support

Triage → specialist handoff → resolution with CRM tools

Research & reporting

Gather, analyse and summarise market or competitor data

Business operations

KPIs, forecasting and recommendations from live data

Procurement

Compare vendors, draft POs, route for approval (HITL)

Healthcare admin

Summarise notes, prior-auth checks with human review

Compliance & legal

Contract review, policy Q&A with citations and audit

6First contact

Your first agent interaction — 6 lines

Install the core package plus the OpenAI-compatible connector. We use Groq (bring your own key) through its OpenAI-compatible endpoint — swap one line to move to Azure OpenAI or Microsoft Foundry.

bash
1pip install agent-framework-core agent-framework-openai python-dotenv
hello_maf.py
1from agent_framework import Agent
2from agent_framework.openai import OpenAIChatCompletionClient
3
4client = OpenAIChatCompletionClient(
5 model="llama-3.3-70b-versatile",
6 api_key=GROQ_API_KEY,
7 base_url="https://api.groq.com/openai/v1",
8)
9agent = Agent(client=client, instructions="You are a friendly assistant.")
10print((await agent.run("What is Microsoft Agent Framework?")).text)

Key takeaways

01

MAF = Semantic Kernel's enterprise foundations + AutoGen's agent patterns, in one SDK.

02

Two primitives: Agents (LLM decides) and Workflows (you decide).

03

Chat clients abstract the model provider — swap providers without rewriting agents.

04

Python & .NET, open source, OpenTelemetry built in.

Hands-on activity

Explore the framework and execute a basic AI agent interaction

  1. 1Add your Groq key using the 🔑 button in the top bar.
  2. 2Open the Sandbox → Agent Playground and send: “What is Microsoft Agent Framework?”
  3. 3Open the Execution Trace and find the LLM call, its latency and token usage.
  4. 4Click “Python equivalent” to see the MAF code for exactly what you just ran.
Open Agent Playground Exercise 1 in Code Lab

Reference solution — labs/ex1_first_agent.py (verified on agent-framework-core 1.26)

ex1_first_agent.py
1"""Exercise 1 — Create a basic agent (Modules 1 & 2)."""
2
3import asyncio
4
5from agent_framework import Agent
6from common import make_client
7
8
9async def main() -> None:
10 # 1. A chat client = the connection to a model provider
11 client = make_client()
12
13 # 2. An agent = client + instructions (+ optional name, tools, memory ...)
14 agent = Agent(
15 client=client,
16 name="HelloAgent",
17 instructions="You are a friendly assistant. Answer in two sentences or fewer.",
18 )
19
20 # 3. Run it — one request in, one AgentResponse out
21 response = await agent.run("What is Microsoft Agent Framework in one line?")
22 print(response.text)
23
24
25if __name__ == "__main__":
26 asyncio.run(main())

Check your understanding

0/3

Q1.Which two Microsoft projects does Agent Framework unify?

Q2.You need an invoice-approval process with fixed steps and a manager sign-off. Best fit?

Q3.What does a chat client do in MAF?

M2 · First Agent