The .NET AI stack in 2026: Microsoft.Extensions.AI as the abstraction layer (IChatClient, IEmbeddingGenerator, middleware), Microsoft.Extensions.VectorData for vector stores, Semantic Kernel's plugins and current maintenance status, and the Microsoft Agent Framework (GA as 1.0 in April 2026) for agents and workflows, with guidance for new and existing projects.
As of late 2026 they are layers, not rivals. Microsoft.Extensions.AI is the foundation: IChatClient, IEmbeddingGenerator and middleware for tools, caching and telemetry. Use it directly for most features: a chat endpoint, RAG, tool calling. Microsoft.Extensions.VectorData abstracts vector stores. The Microsoft Agent Framework (GA as 1.0 in April 2026) sits on top for agents: instructions, tools, conversation threads and multi-agent workflows. It is the successor to Semantic Kernel's agent features and AutoGen.
Semantic Kernel is still maintained but no longer the default for new agent work. For a new project, start with Microsoft.Extensions.AI and add the Agent Framework only when you need agents. The trade-off: higher layers give you more for free but add concepts and dependencies.
"I think of it as a stack. At the bottom is Microsoft.Extensions.AI:
IChatClientandIEmbeddingGenerator, with provider adapters for Azure OpenAI, OpenAI, Ollama and others, and a middleware pipeline for function invocation, caching, logging and OpenTelemetry. It's to AI whatILoggeris to logging. Next to it is Microsoft.Extensions.VectorData, which gives one API over Azure AI Search, SQL Server, Cosmos DB, Postgres and an in-memory store. Most features I build, a chat endpoint, a RAG search, a classifier with structured output, need nothing more.On top sits the Microsoft Agent Framework, which reached 1.0 GA in April 2026 for .NET and Python. It's built by the Semantic Kernel and AutoGen teams on the same abstractions, and gives you agents with instructions and tools, conversation threads, MCP tool integration, and graph-based workflows for multi-agent or human-in-the-loop processes. Microsoft positions it as the successor for new agent work. Semantic Kernel is still maintained with fixes, and its kernel and plugin model still works, but I wouldn't start new agent code on it. For example, on [a project that started on Semantic Kernel in 2024], we [kept the plugins running and moved the agent orchestration to the Agent Framework first], because that was where the new features were.
The mistake I see is reaching for the biggest framework for a single prompt. An agent framework adds threads, orchestration and its own abstractions; if my feature is 'call the model with these documents',
IChatClientis simpler, easier to test and easier to reason about. Pick the lowest layer that does the job, and move up when you genuinely need agents or workflows."
| Layer | What it gives you | Use it for |
|---|---|---|
| Microsoft.Extensions.AI | IChatClient, IEmbeddingGenerator, middleware, structured output |
Any LLM call; RAG; tool calling |
| Microsoft.Extensions.AI.Evaluation | Quality and safety evaluators | Testing AI features |
| Microsoft.Extensions.VectorData | Vector store abstraction and connectors | Storing and searching embeddings |
| Microsoft Agent Framework | Agents, threads, tools, MCP, workflows, hosting | Agentic features, multi-agent and long-running processes |
| Semantic Kernel | Kernel, plugins, connectors, planners (older) | Existing codebases; maintained but not the default for new agents |
| Situation | Choice |
|---|---|
| New API with a chat or RAG feature | Microsoft.Extensions.AI + VectorData |
| New feature where the model plans and calls several tools over many turns | Agent Framework |
| Multi-step business process with approvals | Agent Framework workflows (or your existing workflow engine calling the model) |
| Existing Semantic Kernel app that works | Keep it; migrate agent parts incrementally; new code on the lower layers |
On [a document-processing service], replacing a Semantic Kernel planner with plain IChatClient structured-output calls in a fixed sequence cut [average model calls per document from about 6 to 2] and made failures reproducible in unit tests with a fake client; we used the Agent Framework only for the [interactive research assistant] where the model genuinely chose its own steps.
Checks that the candidate knows the current .NET AI stack and chooses by need rather than hype.
Green flags
Red flags
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Your app (API, worker, Blazor) β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β Microsoft Agent Framework: agents, threads, workflows, MCP β (optional)
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β Microsoft.Extensions.AI β Microsoft.Extensions.VectorDataβ
β IChatClient, IEmbeddingGenerator β VectorStore, collections β
β middleware: tools, cache, OTel β connectors β
βββββββββββββββββββββββββββββββββββ΄ββββββββββββββββββββββββββββββββ€
β Providers: Azure OpenAI / Foundry, OpenAI, Ollama, ... β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Kernel, plugins ([KernelFunction]), planners, connectors. AutoGen appears separately for multi-agent research.IChatClient; vector store abstractions move into Microsoft.Extensions.VectorData.Check the official repositories for current support terms; Microsoft has said SK remains maintained, without (as far as I have seen) a published end-of-life date.
AIAgent, commonly ChatClientAgent): instructions + an IChatClient + tools. Create one from any IChatClient with AsAIAgent(...).AIFunctions, MCP servers, hosted tools.A single GetResponseAsync with tools or structured output covers most product features. Agents add non-determinism (the model chooses steps), more calls and more to evaluate. Use them where the task is open-ended.
IChatClient (SK can consume it).[KernelFunction] plugins into AIFunctions (often by pointing AIFunctionFactory at the same methods).ChatCompletionAgent / group chat to Agent Framework agents and workflows.IChatClient; then wrap the same client as an Agent Framework agent and compare code size.AIFunctionFactory.Create and call it via UseFunctionInvocation.The same capability at two layers: plain IChatClient, then an Agent Framework agent built from it.
// Layer 1: Microsoft.Extensions.AI only. Enough for most features.
using System.ComponentModel;
using Azure.AI.OpenAI;
using Azure.Identity;
using Microsoft.Extensions.AI;
IChatClient chat = new ChatClientBuilder(
new AzureOpenAIClient(new Uri(Environment.GetEnvironmentVariable("AZURE_OPENAI_ENDPOINT")!),
new DefaultAzureCredential())
.GetChatClient("gpt-4.1-mini").AsIChatClient())
.UseFunctionInvocation()
.Build();
var options = new ChatOptions { Tools = [AIFunctionFactory.Create(Weather.GetForecast)] };
var answer = await chat.GetResponseAsync("Should I take an umbrella in Sydney today?", options);
Console.WriteLine(answer.Text);
public static class Weather
{
[Description("Gets today's forecast for an Australian city.")]
public static string GetForecast([Description("City name")] string city) =>
city.Equals("Sydney", StringComparison.OrdinalIgnoreCase) ? "Showers, 22Β°C" : "Fine, 25Β°C";
}
// Layer 2: Microsoft Agent Framework (package Microsoft.Agents.AI). Adds instructions,
// threads and a home for multi-turn, multi-tool behaviour; reuses the same IChatClient.
using Microsoft.Agents.AI;
AIAgent agent = chat.AsAIAgent(
name: "TravelHelper",
instructions: "You help staff plan trips between Australian offices. Be brief.",
tools: [AIFunctionFactory.Create(Weather.GetForecast)]);
AgentThread thread = agent.GetNewThread(); // conversation state managed by the framework
Console.WriteLine(await agent.RunAsync("Weather in Sydney?", thread));
Console.WriteLine(await agent.RunAsync("And should I pack a jacket?", thread));
Agent Framework method names have shifted between previews and 1.0; check the current docs for exact signatures before copying.
IChatClient first; add agents when the task is genuinely open-ended.IChatClient / IEmbeddingGenerator.The decision is about autonomy, not libraries. If you can write the steps down, write them in code and call the model at each step with IChatClient: cheaper, faster and testable. Use an agent when the model must choose the steps, and accept the cost of evaluating and observing that freedom.
| Option | When it fits | Cost | When not to |
|---|---|---|---|
| Microsoft.Extensions.AI only | Chat, RAG, extraction, tool calls | Lowest complexity | Long-running multi-agent processes |
| Agent Framework agent | Open-ended tasks with tools across turns | More calls, more to evaluate | Fixed, known steps |
| Agent Framework workflows | Multi-agent or human-in-the-loop processes with checkpoints | New concepts to learn | You already have a workflow engine that can call the model |
| Stay on Semantic Kernel | Existing, working code | Migration later | New agent features |
Measure model calls per task, latency, cost and evaluation scores when you move up a layer; if they don't improve, you didn't need it.
Use Microsoft.Extensions.AI: build an AzureOpenAIClient with the endpoint and DefaultAzureCredential, take the chat client for your deployment and call AsIChatClient(). Register it once with builder.Services.AddChatClient(...), which returns a ChatClientBuilder so you can add logging, OpenTelemetry and caching as middleware. In Azure the app's managed identity gets the Cognitive Services OpenAI User role, so there is no key anywhere.
For streaming, call GetStreamingResponseAsync and return the IAsyncEnumerable (or server-sent events) so the first words reach the browser in under a second. Pass RequestAborted as the cancellation token. The trade-off: streaming improves perceived latency but you can't validate the whole answer before the user sees it.
A workflow runs steps you wrote in code and calls the model at known points: classify an email, extract fields, draft a reply. Control flow and state live in your code (or a durable orchestrator), so each step has a known input and output that you can unit-test, retry and cost up front. An agent gets a goal and tools and chooses the steps itself in a loop until it decides it is done. An example is a support assistant that investigates an order across several systems in whatever order the case needs.
Workflows are cheaper, faster and predictable. Agents handle open-ended tasks with unknown paths, at the cost of more calls, variable latency and harder evaluation. Choose a workflow when you can write the steps down, and an agent only when you can't. Then add an iteration and token cap, least-privilege tools, human approval for actions with real-world effect, and tracing of every step.
How to tell it (STAR)
**S:** We were starting a [claims-triage assistant] and the team wanted to reuse Semantic Kernel planners as on [two earlier services]. **T:** As [the lead on the feature], I needed a stack that would be predictable and cheap to run. **A:** I traced the planner prototype, which made about [seven] calls per request, and ran our [120-case] evaluation set against it and against a plain `IChatClient` version with retrieval and two tools. I wrote an ADR: fixed flows on Microsoft.Extensions.AI, agents on the Agent Framework, SK kept where it works. **R:** The plain version matched quality, cut p95 latency from [14 s to about 4 s] and cost per request by [about 65%].
Last updated 23 Nov 2026.