Back to Blog
AI.NETSemantic KernelMicrosoft Agent FrameworkC#AI Agents

Semantic Kernel or Microsoft Agent Framework? What to Use for .NET AI in 2026

Microsoft shipped Agent Framework 1.0 in April 2026 and calls it Semantic Kernel's successor. Here's what that means for AI features already running on Semantic Kernel, what changes in the code, and three questions that decide which one to use.

27 October 20266 min read

If your .NET app got an AI feature in 2024 or 2025, there's a good chance it runs on Semantic Kernel. So do the code patterns on my own AI integration page. Then, in April 2026, Microsoft shipped Agent Framework 1.0 and started calling it Semantic Kernel's successor.

That leaves two questions. Is your Semantic Kernel code now a liability? And should anything new start on Agent Framework instead? The short answers are no, and yes. Here is the detail, with the dates and the code.

What actually happened

Agent Framework isn't a rival product. It comes from the same Microsoft team, and it merges Semantic Kernel with AutoGen, Microsoft's research framework for multi-agent systems. When the team introduced it in October 2025, they described it as, in effect, Semantic Kernel v2.0.

Version 1.0 shipped on April 3, 2026, for both .NET and Python, with stable APIs and a commitment to long-term support. The Semantic Kernel repository on GitHub now opens with a plain statement: Agent Framework is "the enterprise-ready successor to Semantic Kernel."

Is Semantic Kernel dead?

No. Microsoft's October 2025 post says Semantic Kernel v1.x stays supported "for the foreseeable future". The team keeps fixing critical bugs and security issues, and promised to do so for at least a year after Agent Framework's general release. That release came with 1.0 in April 2026, so the floor is April 2027. No end date has been announced.

What stops is the new work. Most new features now land in Agent Framework, not Semantic Kernel. Microsoft also says plainly that staying on Semantic Kernel is "perfectly fine" for existing projects, or when you need to ship quickly.

Nothing breaks on a date. Your Semantic Kernel feature keeps working; it just stops getting new features.— Kathan N. Patel

What changes in the code

The ideas carry over: an agent, its instructions, the tools it can call, a conversation. What changes is how much ceremony sits around them. These two snippets do the same job: an agent that answers order questions and can call one C# method. Both compile against the current packages (Semantic Kernel 1.81 and Agent Framework 1.26).

Semantic Kernel

using System.ComponentModel;
using Microsoft.SemanticKernel;
using Microsoft.SemanticKernel.Agents;

var builder = Kernel.CreateBuilder();
builder.AddOpenAIChatCompletion("gpt-4.1-mini", Environment.GetEnvironmentVariable("OPENAI_API_KEY")!);
Kernel kernel = builder.Build();
kernel.Plugins.AddFromType<OrderTools>();

ChatCompletionAgent agent = new()
{
    Instructions = "Answer questions about orders.",
    Kernel = kernel,
    Arguments = new KernelArguments(new PromptExecutionSettings
    {
        FunctionChoiceBehavior = FunctionChoiceBehavior.Auto()
    })
};

await foreach (var item in agent.InvokeAsync("Where is order 1042?"))
    Console.WriteLine(item.Message);

public class OrderTools
{
    [KernelFunction, Description("Gets the status of an order")]
    public string GetOrderStatus(int orderId) => $"Order {orderId} is out for delivery.";
}

Agent Framework

using System.ComponentModel;
using Microsoft.Agents.AI;
using Microsoft.Extensions.AI;
using OpenAI;

IChatClient chatClient = new OpenAIClient(Environment.GetEnvironmentVariable("OPENAI_API_KEY"))
    .GetChatClient("gpt-4.1-mini")
    .AsIChatClient();

AIAgent agent = chatClient.AsAIAgent(
    instructions: "Answer questions about orders.",
    tools: [AIFunctionFactory.Create(OrderTools.GetOrderStatus)]);

AgentSession session = await agent.CreateSessionAsync();
AgentResponse response = await agent.RunAsync("Where is order 1042?", session);
Console.WriteLine(response.Text);

static class OrderTools
{
    [Description("Gets the status of an order")]
    public static string GetOrderStatus(int orderId) => $"Order {orderId} is out for delivery.";
}

Four differences stand out.

No Kernel. In Semantic Kernel every agent needs a Kernel. In Agent Framework you turn any chat client into an agent with AsAIAgent.

Tools are plain methods. The [KernelFunction] attribute and the plugin wrapper go away. A [Description] is optional, and you pass the method straight in.

One agent type. Semantic Kernel had a different agent class for each service. Agent Framework uses one, built on IChatClient from Microsoft.Extensions.AI, with connectors for Microsoft Foundry, Azure OpenAI, OpenAI, Anthropic's Claude, Amazon Bedrock, Google's Gemini and Ollama.

Run, not Invoke. InvokeAsync becomes RunAsync, which returns one response holding all its messages. And the agent creates its own session, instead of you picking the right thread type.

What Agent Framework adds

If you only call a chat model with a couple of tools, the gain is mostly tidier code. The bigger differences show up when an AI feature grows into a process. Version 1.0 includes:

Workflows drawn as graphs, with branching, parallel steps and checkpoints, so a long-running process can stop and resume. Multi-agent patterns (sequential, concurrent, handoff, group chat and Magentic-One), with steps where a person approves before the work continues. Middleware for logging, safety filters and compliance checks, without touching your prompts. Memory providers for conversation history and vector retrieval. And MCP and A2A, the open protocols for calling external tools and for agents working with other agents.

Some pieces are still in preview, including the local debugger and parts of the Foundry integration such as observability and evaluations. Preview APIs can change, so keep production code on the stable parts.

Which one should you use? Three questions

1. Are you starting something new?

Start on Agent Framework. That's Microsoft's own advice, and it's where the new features are going. Starting a new project on Semantic Kernel today means planning a migration before you've shipped.

2. Do you have a Semantic Kernel feature that works?

Keep it, and plan the move rather than rushing it. Fixes are promised until at least April 2027, and the bigger risk is changing a working feature without tests. Move it the next time you do real work on it.

3. Does the feature need workflows, several agents or human approvals?

Then move now. Checkpointed workflows, the orchestration patterns and MCP support are where Agent Framework is ahead, and building them yourself on Semantic Kernel is work you'd throw away later.


How to move a Semantic Kernel feature safely

Treat it like any other migration: small steps, each one tested, with the old path still there.

1. Collect real examples first. Save twenty or thirty real inputs and the answers your current feature gives. Model output can change when the plumbing changes, and you need something to compare against.

2. Move the tools. Remove [KernelFunction], keep or add [Description], and register the methods directly. This is usually the bulk of the code, and it's mostly mechanical.

3. Swap agent creation and the calls. Replace the kernel set-up with a chat client, InvokeAsync with RunAsync, and threads with sessions. Microsoft's migration guide maps each change, and version 1.0 added migration assistants that analyse existing code.

4. Run both behind a flag. Send some traffic to the new path, compare its answers with your saved examples, then switch over. If something looks wrong, switch back.

If you've read my legal-tech AI post or the AI integration page, those Semantic Kernel examples still work and are still supported. For a new build in 2026, I'd start on Agent Framework.

Got a Semantic Kernel feature from 2024 or 2025 and not sure whether to move it? Book a free 30-minute call and we'll go through it.

Sources

Microsoft, Microsoft Agent Framework Version 1.0 (April 3, 2026)
Microsoft, Semantic Kernel and Microsoft Agent Framework (October 7, 2025)
Microsoft Learn, Semantic Kernel to Microsoft Agent Framework Migration Guide
GitHub, microsoft/semantic-kernel README

Found this useful?

Share it with your network — it helps others find this too.

https://kathanpatel.vercel.app/blog/semantic-kernel-or-microsoft-agent-framework-2026

From demo to production

Building AI into a real product?

I integrate Gemini, Azure OpenAI, and Semantic Kernel into production .NET applications — rate limiting, fallbacks, cost control, and all the parts tutorials skip.