If you have built AI features on .NET over the last two years, you have probably faced a confusing choice: Semantic Kernel or AutoGen? Both came from Microsoft, both built AI agents, and both pulled in slightly different directions. As of the 1.0 GA release on 2 April 2026, that choice is gone — the two have merged into a single, production-ready SDK called the Microsoft Agent Framework.
This guide explains what the framework is, why Microsoft converged the two libraries, and the core concepts you need to build your first agent in C#.
What is the Microsoft Agent Framework?
The Microsoft Agent Framework is an open-source (MIT-licensed) SDK for building, orchestrating, and deploying AI agents, with a unified programming model across .NET and Python. It is the official successor to both Semantic Kernel and AutoGen, and it is designed from the start for enterprise use.
The short version of its lineage:
- AutoGen was Microsoft Research’s project for multi-agent experimentation. Its strength was simple, elegant agent abstractions and multi-agent conversations.
- Semantic Kernel was the enterprise-grade SDK: session state, dependency injection, type safety, middleware, telemetry, and broad model support.
- Microsoft Agent Framework takes AutoGen’s clean agent model and fuses it with Semantic Kernel’s enterprise plumbing — then adds graph-based workflows for explicit, deterministic multi-agent orchestration.
In other words: the research ergonomics and the production hardening, in one place.
Why the merge matters
Two competing SDKs from the same vendor is a tax on everyone. Teams had to bet on one, tutorials contradicted each other, and moving between them meant rewrites. Consolidating into a single framework means:
- One mental model. You learn agents, tools, threads, and workflows once.
- A clear upgrade path. Both Semantic Kernel and AutoGen projects have documented migration routes to the framework.
- Standards built in. The framework speaks the Model Context Protocol (MCP) for tool/data integration and Agent2Agent (A2A) for agent-to-agent communication — so your agents interoperate beyond the Microsoft ecosystem.
The core concepts
Before writing code, it helps to hold four ideas in your head:
- Agent — an LLM-backed component with instructions, tools it can call, and (optionally) memory. It takes input and produces a response, potentially invoking tools along the way.
- Tools (functions) — plain C# methods you expose to the agent. The model decides when to call them; the framework handles the wiring.
- Threads — the conversation state that lets an agent remember earlier turns.
- Workflows — graph-based orchestration for connecting multiple agents with explicit, inspectable control flow, rather than hoping a prompt coordinates them.
Your first agent in C#
At its simplest, creating an agent means pointing the framework at a chat model, giving it a name and instructions, and running it. Conceptually, the flow looks like this:
using Microsoft.Agents.AI;
using Azure.AI.OpenAI;
using Azure.Identity;
// 1. Point at a chat model (Azure OpenAI shown here)
var chatClient = new AzureOpenAIClient(
new Uri("https://<your-resource>.openai.azure.com"),
new DefaultAzureCredential())
.GetChatClient("gpt-4o-mini");
// 2. Create an agent with a name + instructions
AIAgent agent = chatClient.CreateAIAgent(
name: "TravelAssistant",
instructions: "You are a concise travel assistant. Prefer bullet points.");
// 3. Run it
var reply = await agent.RunAsync("Suggest 3 things to do in Bangalore.");
Console.WriteLine(reply);
The value shows up when you give the agent tools. You annotate ordinary methods and hand them to the agent; the model chooses when to call them:
[Description("Gets the current weather for a city.")]
static string GetWeather(
[Description("The city name")] string city) =>
$"The weather in {city} is 28°C and sunny.";
AIAgent agent = chatClient.CreateAIAgent(
name: "WeatherAssistant",
instructions: "Answer questions using the tools available to you.",
tools: [AIFunctionFactory.Create(GetWeather)]);
var reply = await agent.RunAsync("Should I carry an umbrella in Chennai today?");
Note: APIs evolve across releases. Treat the snippets above as a conceptual map, and always check the official samples (linked below) against the exact package version you install. The concepts — agent, tools, threads, workflows — are stable even as method names get refined.
From one agent to many
A single agent answering questions is useful. The framework’s real ambition is multi-agent workflows: a planner agent that delegates to specialist agents, a reviewer that checks another agent’s output, or a graph of steps where each node is an agent with a specific job. Because these workflows are graph-based rather than prompt-based, you can reason about, test, and observe them like real software — which is exactly what you need before putting agents in front of customers.
Where to go next
- Official docs: Microsoft Agent Framework on Microsoft Learn
- Source & samples: the framework is on GitHub under the MIT license, with .NET and Python samples and Learn modules.
- Migrating? If you have an existing Semantic Kernel or AutoGen project, start with Microsoft’s migration guides rather than a rewrite.
From here, build a complete tool-using agent end to end, connect it to MCP servers, and deploy one to Azure Container Apps or GKE.
Have a correction or a topic you want covered? Email mani.bc72@gmail.com.