Hi and welcome to this AI in C#
video where we'll be covering the different
options you have to use LLMs in
C# in 2025.
So we'll be covering Semantic Kernel, Microsoft Extensions
AI and the newest addition, Microsoft Agent Framework.
So let's quickly have a look at the
three.
Semantic Kernel is the oldest, releasing back in
March 2023 and then came along in 2024
October, Microsoft Extensions AI and now in October
2025 we now have the Microsoft Agent Framework.
All of them else are exactly the same,
it's the Microsoft that are maintainer of all
of the three.
Two of them, Semantic Kernel and Microsoft Agent
Framework being the same team while Microsoft Extensions
AI is the .NET team.
Else they're all free, they're all MIT licences
and they're all released as NuGet packages.
So let's do some side-by-side comparison
of them.
First up we just have chat.
In Semantic Kernel you needed to make something
called a kernel builder and add a kind
of mini dependency injection which was a little
funky but it worked.
Then you made a chat completion agent where
you could give your instructions to the agent,
the system instructions.
And then you did an invoke async on
your question and for some reason it was
for each back, not needed really but that
was the way it was done.
Extensions AI is a more low-level system
so it doesn't have the concept of agents
and for that reason it needs to just
make a raw client to whatever you use,
in this case Azure OpenAI.
And then it turns it into an iChat
client that can be used to do this.
And the response is fairly concise but if
you need system messages or instructions it's always
something you need to put into the individual
response which is kind of low-level and
to me one of the most annoying things
about Extensions AI.
But else it's a very concise system.
Microsoft's agent framework takes the best of both
worlds.
It still does the same as Extensions AI
by newing up the raw client but instead
of as an iChat client it says create
AI agents.
And here you can directly give the instructions
and they are kept so they will be
sent with every call to the agent.
So you just make a run async and
get your response back which is more or
less the same as the chat response.
In general these two are very much alike
but with the agent on top it makes
agent framework more easy in my opinion.
When it comes to tool calling they can
all do that.
Semantic kernel need to have special classes that
are decorated with a kernel function.
And then we do the same stuff again
but on the kernel we import the plugin
as they call them into the kernel.
And then when we do the agent we
need to tell it with a bunch of
kernel arguments and Azure AI prompts here that
it's allowed to call them else it won't
call them.
And then you just do the normal loop
for chat and you use the tool.
Extensions AI uses delicate methods for tools so
you can either just assign them using an
AI function create here or you can do
use some reflection to find all your functions
in a class.
Again we need to have the system message
out by itself so but beyond that it
is very simple and we don't need to
tell that it's allowed to call them they
are auto tool calling by default.
Agent framework is exactly the same but whenever
you create your agent you can tell which
tools that agent have available.
Down here you needed to tell what tools
you wanted to use for each individual call.
Here you can define all the calls on
the agent and just make your different calls.
But beyond that they are very much the
same they're using the same way of defining
tools so a little more easy because of
the agents but nothing more than that.
When it comes to unstructured outputs they all
use some kind of output object in this
case a person.
Semantic kernel needs to on the agent say
that that agent should always give a response
format of the type of the person in
this case and then normally call and the
message back here would be a JSON string
that you then need to deserialize.
Extension AI make it much easier in that
you have a generic method of the call
to the LLM where you just give the
object that you want back and then you
get that back as a response so you
get your object so you don't need to
tell anything what type it is that happens
in the call and you don't need to
deserialize yourself.
Agent framework does the same but of course
again have the agent part and it needs
to do a run async instead of a
get response async but else they are exactly
the same.
There is certain type of agents that can't
do this meaning the chat client agents are
the only ones that can do it but
they have some more advanced agents that are
not allowed to use structured output.
Other concepts well if we do a little
side-by-side comparison the number of new
gets you need in order to do hello
world is two in each one of them.
You can see the names here.
Embeddings.
Microsoft Extension AI is the only one who
have embeddings.
The two others leverage them.
Semantic kernel had an old one but I
haven't listed it here because nowadays if you
use semantic kernel you just leverage Microsoft Extension
AI.
Agents semantic kernel and agent framework have that
concept while extensions AI being a more low
-level system you need to more control your
own system messages and stuff like that.
So everything happens on each individual call instead
of defining everything on an agent and then
working from there.
Workflows.
Semantic kernel have a workflow they call it
process framework and agent framework of course have
the workflows.
Extensions AI don't have that concept so you
can't leverage that.
Agentic workflows is something agent framework have picked
up from their other team called Autogen and
that's now in the agent framework.
It wasn't really in the semantic kernel and
again Microsoft Extensions AI don't have any concept
of this.
Vector stores is something neither extensions AI or
agent framework have.
They have the embeddings but they don't have
anything to actually put it up into a
vector store like Azure AI search or into
a SQL server or something like that.
For that something called Microsoft Extensions vector data
exists.
It's a NuGet package and that NuGet package
actually lives inside semantic kernel.
At some point semantic kernel need to pull
it out because it's not really semantic kernel
that have the support for vector stores.
It's just a NuGet package that the semantic
kernel repo owns that have that support.
So it's only in namespace only that they
support it while the others don't.
But in real life you will still use
this part over in agent framework or in
extensions AI if you use that for it.
If we need to give some props to
each one of them what is they better
at than any of the others?
Well semantic kernel is better at setting reasoning
effort on LLMs. So which if you for
example have chat GPT-5 you need to
set between minimal, low, medium or high in
reasoning effort and it has a nice little
thing on your agent that you can just
set that value.
Neither extensions AI or agent framework have this.
So for that reason technically semantic kernel is
better at setting them.
All of the three can do it but
it's just better.
It's more cumbersome over here.
Extensions AI is better in embeddings because it's
the only one who can do it as
such.
So I don't really know if you can
make it better by being the only one
who can.
While agent framework is better at chats it's
more concise than agent framework and because of
the system information you can put directly on
agents it's easier.
It's better at agents.
The agents are much more evolved than semantic
kernels.
It's better at workflows.
It's a new version of the workflow and
the identic workflow is the only one that
that is over here.
When it comes to LLMs extensions AI and
agent framework are exactly the same because they
both leverage that anything that supports an iChat
client it can support and that's virtually everything
out there.
Semantic kernel has its own connectors which is
a problem of course because if new features
come along they need to implement it instead
of just leveraging the raw clients like the
two others do.
But they do support OpenAI, Azure OpenAI, AI
Foundry, Google, offline modes which is also of
course supported by the two others and they
have a sort of connection to Cloud.
So unless you're using the OpenAI, Azure OpenAI,
I would be more worried sticking with semantic
kernel in having those.
So that's everything I have for you in
terms of comparison.
I'm definitely gonna stick with agent framework.
I find extensions AI too low level, too
much extra work here and there compared to
what agent framework can do.
And on top of that it gives all
the nice workflows as well.
And semantic kernel I see it as a
legacy product now that agent framework will supersede
in every way.
I think there's one thing with Amazon Bedrock
agents that are not supported yet in agent
framework but beyond that it can do everything
that semantic kernel could do.
Say for the vector stores of course which
again is just a namespace only that is
there.
So that is the only place I will
ever use a NuGet package going forward and
I will be migrating all my semantic kernel
over to agent framework which in turn then
just use the extensions AI behind the scenes
for the low level stuff.
So that's everything.
See you in the next one.