What is Microsoft Agent Framework?

Microsoft Agent Framework (MAF) is an open-source framework for building agentic AI applications - the kind of software where one or more language-model-driven agents reason, plan, call tools, and collaborate to complete real work. It is Microsoft's strategic, production-targeted framework in the agent space, with first-class SDKs for C# (.NET) and Python and tight integration with Azure AI Foundry and Azure OpenAI.

The framework consolidates years of Microsoft's research and product work on agents - AutoGen from Microsoft Research, Semantic Kernel from the .NET side, and the orchestration patterns the Azure AI team had been shipping for hosted scenarios - into one open-source library. The same primitives now power both quick prototypes and large-scale enterprise agent deployments.

Microsoft Agent Framework is the open-source engine for agentic AI apps.- Azure Blog, Introducing Microsoft Agent Framework

Why Microsoft built it

For a couple of years, Microsoft shipped two separate agent stories. AutoGen, out of Microsoft Research, was the experimental multi-agent framework - rich, flexible, beloved by researchers, but not always tuned for production. Semantic Kernel was the enterprise-friendly .NET-first SDK for LLM orchestration - stable and Azure-aligned, but not built around the multi-agent abstractions AutoGen had pioneered.

The two threads were obviously converging. MAF is the convergence:

  • One framework, two ecosystems. The same conceptual model in both C# and Python, with idiomatic APIs in each.
  • Research patterns, production hardening. The agent and workflow primitives AutoGen explored are now baked into a framework with observability, persistence, and lifecycle management ready for real deployments.
  • One Microsoft story. Customers building agentic apps on Azure no longer have to choose between AutoGen and Semantic Kernel. MAF is the path forward for both, with migration guides for existing AutoGen code.

Core building blocks

MAF organises agentic applications around a small number of primitives. Each one maps to a real concept in how agents work, and each one has clean APIs in both languages.

PRIMITIVE

Agents

The unit of intelligence. An agent has a model, a system prompt, a set of tools, and a memory. It can run a single turn, hold a conversation, or be embedded inside a workflow.

PRIMITIVE

Tools

The functions an agent can call. Native code, MCP servers, OpenAPI endpoints, or other agents - all exposed as a typed tool interface the agent can choose from.

PRIMITIVE

Workflows

Multi-agent orchestration. Sequential pipelines, parallel fan-out, conditional routing, and human-in-the-loop checkpoints - described in code, executed by the framework.

PRIMITIVE

Memory

Conversation history, retrieval-augmented context, and long-term state. Pluggable backends - in-memory for tests, durable stores for production.

PRIMITIVE

Threads

Stateful interactions between user and agent. Threads carry context across turns and across the lifecycle events the framework emits.

CROSS-CUTTING

Observability

OpenTelemetry baked in. Logs, traces, and metrics for every agent invocation - so production agents are debuggable the same way any other distributed system is.

The point of the abstraction is composability. A single agent is the simplest unit. A workflow is "agents talking to each other in a structured way". A larger application is "workflows talking to other workflows". The same primitives all the way down.

C# and Python

MAF ships with idiomatic SDKs in both languages from day one. They are not bindings to a common runtime - they are two separate, native implementations of the same conceptual model, kept in lockstep on features and version numbers.

C# Program.cs
using Microsoft.Agents.AI; var agent = new AIAgent() .WithName("researcher") .WithModel("gpt-4o") .WithInstructions("Summarise documents into key points.") .WithTools("fetch_url", "save_summary"); var response = await agent.RunAsync("Summarise https://example.com/whitepaper.pdf");
Python main.py
from agent_framework import AIAgent agent = AIAgent( name="researcher", model="gpt-4o", instructions="Summarise documents into key points.", tools=[fetch_url, save_summary], ) response = await agent.run("Summarise https://example.com/whitepaper.pdf")

The two SDKs are documented side by side. Sample code in the docs typically appears in both languages, and the workflow YAML format (when used) is identical between them. A team that mixes .NET services and Python data-science workloads can use MAF in both halves without translating concepts.

The Azure AI Foundry connection

MAF is open source and runs anywhere - your laptop, AWS, GCP, an on-prem cluster - but it is co-developed with Azure AI Foundry and is the recommended way to build agentic applications targeting that platform.

What that integration buys you:

  • First-class hosting. Agents built with MAF deploy onto Foundry as managed resources. The same code that runs locally during development runs there in production.
  • Identity and policy. Foundry-deployed agents inherit Azure's identity, content-safety, and policy infrastructure - useful for enterprise scenarios where compliance is part of the requirements.
  • Workflow durability. Long-running, multi-step workflows can checkpoint to Foundry's storage, survive restarts, and pick up where they left off.

None of this is required to use MAF. You can wire it up against OpenAI, Anthropic, Azure OpenAI, or any compatible inference endpoint, and run it on any host. The Foundry path is the easiest production target if you are already on Azure - and the cleanest "we have made all the production decisions for you" option if you do not want to make them yourself.

MAF vs AutoGen

If you have AutoGen experience, the transition is gradual but real. Both frameworks are open-source, both target multi-agent applications, both are maintained by overlapping teams. The differences are in priorities.

AUTOGEN

Research-first

  • Multi-agent conversation patterns as the primary primitive
  • Python-only ecosystem
  • Fast iteration on novel patterns, less stable APIs
  • Microsoft Research-owned
  • Best for: experimenting, prototyping, pushing the frontier
MICROSOFT AGENT FRAMEWORK

Production-first

  • Same multi-agent ideas, plus durability, observability, identity
  • First-class C# and Python
  • Versioned, supported, integrated with Azure AI Foundry
  • Microsoft-product-owned
  • Best for: shipping real agentic applications

The official Microsoft guidance: new projects should start on MAF. Existing AutoGen projects can migrate at their own pace - the team publishes migration guides, and many of MAF's APIs are intentionally close to AutoGen's so the move is mostly mechanical.

Getting started

The fastest path is the same regardless of language: install the package, point it at an inference endpoint, write your first agent, run it. The dotnet and pip commands above are the entire setup.

For deeper learning, the canonical materials are collected in our Agentic AI resources page - the official Microsoft Learn overview, both Azure Blog launch posts, and the video walkthroughs covering MAF's workflow model, building blocks, and migration story from AutoGen.

When to reach for MAF

Microsoft Agent Framework is the right choice when:

  • You are building agentic applications on the .NET stack and want a first-class SDK rather than a Python port.
  • You are deploying to Azure and want the cleanest production target for your agents.
  • You have AutoGen prototypes and want a supported path to production.
  • You want to ship multi-agent workflows with durability, observability, and identity built in - not bolted on after the prototype works.

Reach for something else when the project is fundamentally a single agent doing one thing (the OpenAI SDK or Anthropic SDK is probably enough), when your platform is not Azure and you want the most cloud-neutral library (LangGraph and CrewAI both fit that brief), or when you specifically want AutoGen's research-friendly experimentation model and are comfortable with the trade-offs.

For the broad middle - teams shipping real agentic features, with budget for thinking about production from day one - MAF is the framework Microsoft is asking you to adopt, and the one the company is investing the most engineering in.