Overview
Microsoft Agent Framework (MAF) is an open, multi-language framework for building AI agents and multi-agent workflows in .NET and Python. It brings together ideas from Microsoft's earlier AutoGen and Semantic Kernel projects under one consistent set of APIs.
It is aimed at teams taking agents from prototype to production. MAF covers orchestration that goes beyond a single prompt or a stateless chat loop, with graph-based patterns such as sequential, concurrent, handoff, and group collaboration, plus features like checkpointing, observability, and human-in-the-loop control.
As an app framework, it keeps provider choices open. It supports a broad ecosystem including Microsoft Foundry, Azure OpenAI, OpenAI, and the GitHub Copilot SDK, so the architecture can change as requirements evolve without major rewrites.
What it does
- Consistent APIs across both Python and C#/.NET
- Graph-based orchestration: sequential, concurrent, handoff, and group collaboration patterns
- Checkpointing, streaming, human-in-the-loop, and time-travel for workflows
- Middleware system for request/response processing, exception handling, and custom pipelines
- Built-in OpenTelemetry integration for distributed tracing and debugging
- Declarative agents defined in YAML, plus a DevUI for testing and debugging
Getting started
Install the framework for your language, then build a basic agent. The Python quickstart uses Microsoft Foundry and authenticates with the Azure CLI.
Install (Python)
Install the meta-package, which pulls in all sub-packages. First install on Windows can take a minute.
pip install agent-frameworkInstall (.NET)
Add the core package, plus the Foundry and Azure packages used in the .NET quickstart.
dotnet add package Microsoft.Agents.AI
# For Foundry integration:
dotnet add package Microsoft.Agents.AI.Foundry
dotnet add package Azure.AI.Projects
dotnet add package Azure.IdentityAuthenticate with Azure
The Python quickstart authenticates against Microsoft Foundry using the Azure CLI before running the agent.
az loginCreate a basic agent (Python)
Build a chat agent backed by Microsoft Foundry. The endpoint, deployment name, and API version can be set via environment variables or passed to FoundryChatClient directly.
import asyncio
from agent_framework import Agent
from agent_framework.foundry import FoundryChatClient
from azure.identity import AzureCliCredential
async def main():
agent = Agent(
client=FoundryChatClient(
credential=AzureCliCredential(),
),
)
asyncio.run(main())Commands and code are distilled from the project's own documentation — always check the official repo for the latest.
When to use it
- Taking a prototype agent into production with durability, restartability, and observability
- Coordinating several agents with graph workflows (sequential, concurrent, handoff, or group collaboration)
- Adding human-in-the-loop checkpoints to an agent pipeline before actions are taken
- Keeping provider choice open across Microsoft Foundry, Azure OpenAI, and OpenAI as needs change
How Microsoft Agent Framework compares
Microsoft Agent Framework alongside other open-source agent frameworks & builders tools AI/TLDR tracks, ranked by GitHub stars.
| Tool | Stars | What it does |
|---|---|---|
| AutoGPT | ★ 186k | One of the earliest autonomous agent projects, now a platform for building and running agents from reusable blocks and workflows. |
| Agno | ★ 41.6k | A fast Python framework (formerly Phidata) for building agents with memory, tools, and multimodal inputs, plus a runtime for deploying them in production. |
| LangGraph | ★ 38.8k | A library from the LangChain team for building stateful, graph-based agent workflows with explicit control over steps, memory, and human-in-the-loop checkpoints. |
| AgentGPT | ★ 36.3k | AgentGPT lets you name a custom AI, give it a goal, and watch it plan tasks, run them, and learn from the results, all from a web browser. |
| STORM | ★ 30.8k | Stanford OVAL's LLM-powered knowledge curation system that researches a topic and generates a Wikipedia-style article with citations. |
| Composio | ★ 29.5k | Composio is an open-source SDK for Python and TypeScript that gives AI agents ready-made tools to act on real apps and APIs across many agent frameworks. |
| GPT Researcher | ★ 28.8k | Autonomous research agent that searches the web (and local files) in parallel and writes long, cited reports on any topic. |
| Microsoft Agent Framework | ★ 12.6k | Build production AI agents and multi-agent workflows in Python and .NET |