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.
Evolution: Semantic Kernel + AutoGen → MAF
Microsoft previously had two agent stacks:
| Semantic Kernel | AutoGen | Agent Framework | |
|---|---|---|---|
| Strength | Enterprise: plugins, filters, telemetry, connectors | Research: multi-agent conversation patterns | Both, unified |
| Orchestration | Planners / processes | Group chat, teams | Typed graph workflows + prebuilt patterns |
| State | Kernel memory | Agent messages | Sessions, 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
AutoGen
Multi-agent research
Microsoft Agent Framework
Open source · successor to both
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.
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
The model loops: think → call tools → think → answer.
Workflow
You define nodes and edges; the runtime executes them.
| Who decides the next step? | The LLM, at run time | You, at design time |
| Path | Dynamic, open-ended | Explicit graph / code |
| Predictability | Lower — creative | High — auditable |
| Best for | Conversations, research, open tasks | Business processes, pipelines, approvals |
| State & recovery | Sessions | Checkpoints, resume, HITL |
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
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.
1pip install agent-framework-core agent-framework-openai python-dotenv
1from agent_framework import Agent2from agent_framework.openai import OpenAIChatCompletionClient34client = 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
MAF = Semantic Kernel's enterprise foundations + AutoGen's agent patterns, in one SDK.
Two primitives: Agents (LLM decides) and Workflows (you decide).
Chat clients abstract the model provider — swap providers without rewriting agents.
Python & .NET, open source, OpenTelemetry built in.
Hands-on activity
Explore the framework and execute a basic AI agent interaction
- 1Add your Groq key using the 🔑 button in the top bar.
- 2Open the Sandbox → Agent Playground and send: “What is Microsoft Agent Framework?”
- 3Open the Execution Trace and find the LLM call, its latency and token usage.
- 4Click “Python equivalent” to see the MAF code for exactly what you just ran.
Reference solution — labs/ex1_first_agent.py (verified on agent-framework-core 1.26)
1"""Exercise 1 — Create a basic agent (Modules 1 & 2)."""23import asyncio45from agent_framework import Agent6from common import make_client789async def main() -> None:10 # 1. A chat client = the connection to a model provider11 client = make_client()1213 # 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 )1920 # 3. Run it — one request in, one AgentResponse out21 response = await agent.run("What is Microsoft Agent Framework in one line?")22 print(response.text)232425if __name__ == "__main__":26 asyncio.run(main())
Check your understanding
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?