Microsoft Agent Framework Developer Guide: AutoGen + Semantic Kernel Unified

TL;DR
Microsoft Agent Framework unifies AutoGen and Semantic Kernel in one SDK: architecture, installation, migration, pricing, and when to pick it over LangGraph.
Last updated: June 22, 2026
| Official Sources | |
|---|---|
| Microsoft Agent Framework Docs | Architecture, installation, agents, workflows |
| Version 1.0 Announcement | Release notes, feature summary |
| BUILD 2026 Announcements | Agent harness, hosted agents, CodeAct |
| GitHub Repository | Source code, examples, issues |
| Foundry Agent Service Pricing | Hosted agents billing |
AutoGen and Semantic Kernel are now one SDK#
On April 3, 2026, Microsoft shipped Microsoft Agent Framework 1.0 - the production-ready unification of AutoGen and Semantic Kernel into a single SDK. The announcement described it as combining "the enterprise-ready foundations of Semantic Kernel with the innovative orchestrations of AutoGen" into stable APIs with long-term support.
This is not a wrapper or compatibility layer. The same teams that built AutoGen and Semantic Kernel built this successor. If you are starting a new agent project in Python or .NET today, Microsoft Agent Framework is the default choice for Microsoft-ecosystem teams.
What it actually does#
The framework has two primary capabilities, per the official docs:
| Capability | Description |
|---|---|
| Agents | Individual agents that use LLMs to process inputs, call tools and MCP servers, and generate responses. Supports Microsoft Foundry, Anthropic, Azure OpenAI, OpenAI, Ollama, and more. |
| Workflows | Graph-based workflows that connect agents and functions for multi-step tasks with type-safe routing, checkpointing, and human-in-the-loop support. |
The foundational building blocks include model clients (chat completions and responses), agent sessions for state management, context providers for agent memory, middleware for intercepting agent actions, and MCP clients for tool integration.
Installation#
Python:
pip install agent-framework
.NET:
dotnet add package Microsoft.Agents.AI.Foundry --prerelease
The framework does not automatically load .env files in Python. Call load_dotenv() at the start of your application or set environment variables directly.
Minimal agent example#
Python:
from agent_framework.foundry import FoundryChatClient
from azure.identity import AzureCliCredential
credential = AzureCliCredential()
client = FoundryChatClient(
project_endpoint="https://your-foundry-service.services.ai.azure.com/api/projects/your-foundry-project",
model="gpt-5.4-mini",
credential=credential,
)
agent = client.as_agent(
name="HelloAgent",
instructions="You are a friendly assistant. Keep your answers brief.",
)
result = await agent.run("What is the largest city in France?")
print(f"Agent: {result}")
.NET:
using System;
using Azure.AI.Projects;
using Azure.Identity;
using Microsoft.Agents.AI;
AIAgent agent = new AIProjectClient(
new Uri("https://your-foundry-service.services.ai.azure.com/api/projects/your-foundry-project"),
new AzureCliCredential())
.AsAIAgent(
model: "gpt-5.4-mini",
instructions: "You are a friendly assistant. Keep your answers brief.");
Console.WriteLine(await agent.RunAsync("What is the largest city in France?"));
From this minimal agent you can add tools, multi-turn conversations, middleware, and workflows to build production applications.
Core architecture#
The framework ships with:
- First-party connectors for Microsoft Foundry, Azure OpenAI, OpenAI, Anthropic Claude, Amazon Bedrock, Google Gemini, and Ollama
- Agent memory with multiple backend options: conversational history, persistent key-value state, and vector-based retrieval
- Multi-agent orchestration patterns: sequential, concurrent, handoff, group chat, and Magentic-One
- Declarative YAML-based agent and workflow definitions
- A2A (Agent-to-Agent) and MCP (Model Context Protocol) support
- DevUI for browser-based debugging
- Hosted agent integration with Microsoft Foundry and Azure Durable Functions
The workflow engine uses graph-based composition for multi-step tasks with type-safe routing and checkpointing. This is the part that came from Semantic Kernel's enterprise experience - production agents need explicit control over execution order, not just autonomous tool use.
When to use agents vs workflows#
The docs give a clear decision framework:
| Use an agent when... | Use a workflow when... |
|---|---|
| The task is open-ended or conversational | The process has well-defined steps |
| You need autonomous tool use and planning | You need explicit control over execution order |
| A single LLM call (possibly with tools) suffices | Multiple agents or functions must coordinate |
The documentation adds a blunt recommendation: "If you can write a function to handle the task, do that instead of using an AI agent."
Migrating from AutoGen or Semantic Kernel#
Both predecessor frameworks are in maintenance mode. Microsoft provides dedicated migration guides:
The framework includes migration assistants specifically designed to help teams transition. If you are currently on AutoGen, the multi-agent orchestration patterns transfer directly. If you are on Semantic Kernel, the session-based state management, middleware, and telemetry patterns carry over.
Hosted agents pricing#
For teams deploying to Azure, hosted agents in Foundry Agent Service bill based on consumption:
| Resource | Price |
|---|---|
| Compute | $0.0994 per vCPU-hour |
| Memory | $0.0118 per GiB-hour |
| Model inference | Billed separately |
| Persistent memory | Billed separately |
Billing began April 22, 2026 during preview. The key cost feature: scale to zero. You pay nothing while the agent is idle, and it scales back up on the next request.
The framework itself is open source under MIT license. Azure AI Foundry services use standard usage-based Azure pricing.
Microsoft Agent Framework vs LangGraph vs CrewAI#
The choice between major agent frameworks depends on your stack and orchestration needs:
| Framework | Best for | Language support | Key strength |
|---|---|---|---|
| Microsoft Agent Framework | .NET and Azure-native teams | Python, .NET | Enterprise features, A2A protocol |
| LangGraph | Stateful production workflows | Python, TypeScript | Checkpointing, human-in-the-loop |
| CrewAI | Role-based multi-agent demos | Python | Fastest prototype-to-working-demo |
Choose Microsoft Agent Framework when:
- Your team uses .NET
- Your team uses Python on Azure
- You need A2A protocol support
- You want a single SDK that combines single-agent and multi-agent patterns
Choose LangGraph when:
- You need maximum control over agent behavior
- Your workflow has complex conditional logic, error recovery, or human-in-the-loop requirements
- You are building for production and need monitoring, persistence, and streaming
- You are in a regulated environment where auditability matters
Choose CrewAI when:
- Your task naturally decomposes into specialist roles
- You want to prototype quickly and iterate on agent design
- Your team includes non-engineers who need to understand the agent architecture
If you are auditing dependencies in 2026, the safe defaults are LangGraph 0.4+, CrewAI 0.105+, and Microsoft Agent Framework 1.0+.
BUILD 2026 additions#
At BUILD 2026 on June 2-3, Microsoft shipped several additions:
- Agent harness: Skills support and standardized agent lifecycle management
- Hosted agents in Foundry Agent Service: Long-running agents and routines
- Tracing and evaluation: Agent optimizer for hosted agents
- CodeAct: Agent pattern for code execution tasks
Sessions covered multi-agent systems, observability, evals, and open-source governance.
The honest caveats#
Microsoft Agent Framework is the obvious default for .NET and Azure-native teams. For everyone else, the calculus is less clear.
Self-hosted enterprise support: The primary deployment path Microsoft offers for enterprise production is through Foundry Agent Service. There is no self-hosted enterprise support without third-party providers.
Ecosystem maturity: LangGraph has a larger ecosystem of community tools and integrations. CrewAI has broader adoption at Fortune 500 companies for prototyping. Microsoft Agent Framework is newer and the third-party ecosystem is still developing.
Model lock-in: While the framework supports multiple providers, the Azure integration is deepest with Microsoft Foundry. Teams not on Azure may find the setup overhead higher than alternatives.
That said, if you are already in the Microsoft ecosystem, the unified SDK, production-grade features, and direct support from the teams that built AutoGen and Semantic Kernel make this the path of least resistance.
FAQ#
What is Microsoft Agent Framework?#
Microsoft Agent Framework is a production-ready SDK for building AI agents and multi-agent workflows in Python and .NET. It is the unified successor to AutoGen and Semantic Kernel, created by the same teams, combining AutoGen's agent abstractions with Semantic Kernel's enterprise features.
Is Microsoft Agent Framework free?#
The framework is open source under MIT license. Hosted agents in Foundry Agent Service use consumption-based Azure pricing: $0.0994 per vCPU-hour for compute, $0.0118 per GiB-hour for memory, with model inference and persistent memory billed separately.
Should I migrate from AutoGen to Microsoft Agent Framework?#
Yes, if you are starting new work. AutoGen is in maintenance mode. Microsoft provides a dedicated migration guide and assistants to help transition. The multi-agent orchestration patterns transfer directly.
Should I migrate from Semantic Kernel to Microsoft Agent Framework?#
Yes, for new agent projects. Semantic Kernel remains supported for existing applications, but new agent-focused work should use Microsoft Agent Framework. Session-based state management, middleware, and telemetry patterns carry over.
Does Microsoft Agent Framework support MCP?#
Yes. The framework includes MCP (Model Context Protocol) clients for tool integration, allowing agents to call MCP servers directly.
Which models does Microsoft Agent Framework support?#
First-party connectors support Microsoft Foundry, Azure OpenAI, OpenAI, Anthropic Claude, Amazon Bedrock, Google Gemini, and Ollama. You can also integrate other providers through the extensible model client architecture.
When should I use LangGraph instead of Microsoft Agent Framework?#
Use LangGraph when you need maximum control over agent behavior, complex conditional logic, or are in a regulated environment where auditability and deterministic control matter. LangGraph has a larger ecosystem and works well for teams not on Azure.
When should I use CrewAI instead of Microsoft Agent Framework?#
Use CrewAI when your task naturally decomposes into specialist roles and you want to prototype quickly. CrewAI is the fastest path from idea to working multi-agent demo, with strong adoption for prototyping at Fortune 500 companies.
Continue Reading#
- Astral Joins OpenAI: What It Means for Python Developers
- Workers RPC Now Bridges Python and JavaScript: No Schemas, No Serialization Code
- Running Fable 5 Agents on Vercel's eve Framework
- Microsoft MXC Developer Guide 2026: Sandbox Your AI Agents at the OS Level
- Microsoft's Work IQ APIs Hit GA: What Agent Builders Actually Get on June 16
- Best AI Agent Frameworks (2026) - CrewAI and other agent frameworks, compared and ranked
- Microsoft Agent Framework in October 2026: What Changed Since 1.0
Sources#
- Microsoft Agent Framework Overview - Microsoft Learn (accessed June 22, 2026)
- Microsoft Agent Framework Version 1.0 - Microsoft Agent Framework Blog (accessed June 22, 2026)
- Microsoft Agent Framework at BUILD 2026 - Microsoft Agent Framework Blog (accessed June 22, 2026)
- microsoft/agent-framework - GitHub (accessed June 22, 2026)
- Foundry Agent Service Pricing - Microsoft Azure (accessed June 22, 2026)
- AI Agent Frameworks Compared - PE Collective (accessed June 22, 2026)
Get the next deep dive like this in your inbox
One email a week on Microsoft and the rest of the AI dev stack. Free.
Read next on AI coding tools
Vercel eve: The Framework for Building AI Agents
Vercel eve is an open-source agent framework billed as Next.js for agents. Define an agent as files and get durable execution, sandboxes and evals built in.
9 min readClaude Agent SDK vs LangGraph: Choosing Your Agent Stack in 2026
Claude Agent SDK vs LangGraph head-to-head: architecture, state handling, multi-agent patterns, and real pricing - plus a decision guide for which agent stack fits your team in 2026.
9 min readOpenAI Agents SDK for TypeScript: A Practical Guide
OpenAI Agents SDK for TypeScript, explained with code: agents, Zod tools, structured outputs, multi-agent handoffs, streaming and human approval steps.
10 min readNew here? Start with
Technical content at the intersection of AI and development. Building with AI agents, Claude Code, and modern dev tools - then showing you exactly how it works.








