WEBVTT

1
00:00:01.120 --> 00:00:03.300
Hi and welcome to this AI in C#

2
00:00:03.300 --> 00:00:05.620
video where we'll be covering the different

3
00:00:05.620 --> 00:00:08.900
options you have to use LLMs in 

4
00:00:08.900 --> 00:00:10.300
C# in 2025.

5
00:00:11.260 --> 00:00:15.400
So we'll be covering Semantic Kernel, Microsoft Extensions

6
00:00:15.400 --> 00:00:21.160
AI and the newest addition, Microsoft Agent Framework.

7
00:00:23.140 --> 00:00:26.360
So let's quickly have a look at the

8
00:00:26.360 --> 00:00:26.680
three.

9
00:00:27.900 --> 00:00:30.540
Semantic Kernel is the oldest, releasing back in

10
00:00:30.540 --> 00:00:35.140
March 2023 and then came along in 2024

11
00:00:35.140 --> 00:00:40.680
October, Microsoft Extensions AI and now in October

12
00:00:40.680 --> 00:00:45.200
2025 we now have the Microsoft Agent Framework.

13
00:00:47.010 --> 00:00:49.510
All of them else are exactly the same,

14
00:00:49.610 --> 00:00:53.090
it's the Microsoft that are maintainer of all

15
00:00:53.090 --> 00:00:53.650
of the three.

16
00:00:55.090 --> 00:00:58.370
Two of them, Semantic Kernel and Microsoft Agent

17
00:00:58.370 --> 00:01:01.210
Framework being the same team while Microsoft Extensions

18
00:01:01.210 --> 00:01:04.230
AI is the .NET team.

19
00:01:05.250 --> 00:01:08.730
Else they're all free, they're all MIT licences

20
00:01:09.210 --> 00:01:11.370
and they're all released as NuGet packages.

21
00:01:13.730 --> 00:01:16.430
So let's do some side-by-side comparison

22
00:01:16.430 --> 00:01:17.090
of them.

23
00:01:18.090 --> 00:01:19.970
First up we just have chat.

24
00:01:21.010 --> 00:01:22.790
In Semantic Kernel you needed to make something

25
00:01:22.790 --> 00:01:27.350
called a kernel builder and add a kind

26
00:01:27.350 --> 00:01:30.290
of mini dependency injection which was a little

27
00:01:30.290 --> 00:01:32.370
funky but it worked.

28
00:01:33.090 --> 00:01:36.350
Then you made a chat completion agent where

29
00:01:36.350 --> 00:01:38.470
you could give your instructions to the agent,

30
00:01:38.610 --> 00:01:39.650
the system instructions.

31
00:01:40.630 --> 00:01:44.110
And then you did an invoke async on

32
00:01:44.110 --> 00:01:46.890
your question and for some reason it was

33
00:01:46.890 --> 00:01:51.370
for each back, not needed really but that

34
00:01:51.370 --> 00:01:52.390
was the way it was done.

35
00:01:54.310 --> 00:01:57.290
Extensions AI is a more low-level system

36
00:01:57.290 --> 00:02:00.030
so it doesn't have the concept of agents

37
00:02:00.770 --> 00:02:05.250
and for that reason it needs to just

38
00:02:05.250 --> 00:02:09.169
make a raw client to whatever you use,

39
00:02:09.190 --> 00:02:10.590
in this case Azure OpenAI.

40
00:02:11.250 --> 00:02:14.150
And then it turns it into an iChat

41
00:02:14.150 --> 00:02:17.830
client that can be used to do this.

42
00:02:18.830 --> 00:02:24.670
And the response is fairly concise but if

43
00:02:24.670 --> 00:02:28.950
you need system messages or instructions it's always

44
00:02:28.950 --> 00:02:31.350
something you need to put into the individual

45
00:02:31.350 --> 00:02:34.810
response which is kind of low-level and

46
00:02:34.810 --> 00:02:38.030
to me one of the most annoying things

47
00:02:38.030 --> 00:02:39.090
about Extensions AI.

48
00:02:40.110 --> 00:02:42.010
But else it's a very concise system.

49
00:02:44.140 --> 00:02:47.080
Microsoft's agent framework takes the best of both

50
00:02:47.080 --> 00:02:47.480
worlds.

51
00:02:48.300 --> 00:02:50.820
It still does the same as Extensions AI

52
00:02:50.820 --> 00:02:54.900
by newing up the raw client but instead

53
00:02:54.900 --> 00:02:57.480
of as an iChat client it says create

54
00:02:57.480 --> 00:02:58.400
AI agents.

55
00:02:59.120 --> 00:03:01.180
And here you can directly give the instructions

56
00:03:01.180 --> 00:03:04.360
and they are kept so they will be

57
00:03:04.360 --> 00:03:08.100
sent with every call to the agent.

58
00:03:08.900 --> 00:03:12.560
So you just make a run async and

59
00:03:12.560 --> 00:03:15.760
get your response back which is more or

60
00:03:15.760 --> 00:03:17.520
less the same as the chat response.

61
00:03:17.940 --> 00:03:20.180
In general these two are very much alike

62
00:03:20.180 --> 00:03:24.420
but with the agent on top it makes

63
00:03:24.420 --> 00:03:27.860
agent framework more easy in my opinion.

64
00:03:30.440 --> 00:03:32.100
When it comes to tool calling they can

65
00:03:32.100 --> 00:03:32.800
all do that.

66
00:03:33.700 --> 00:03:38.460
Semantic kernel need to have special classes that

67
00:03:38.460 --> 00:03:40.340
are decorated with a kernel function.

68
00:03:43.700 --> 00:03:46.440
And then we do the same stuff again

69
00:03:46.440 --> 00:03:49.380
but on the kernel we import the plugin

70
00:03:49.380 --> 00:03:53.040
as they call them into the kernel.

71
00:03:53.600 --> 00:03:56.740
And then when we do the agent we

72
00:03:56.740 --> 00:03:59.160
need to tell it with a bunch of

73
00:03:59.160 --> 00:04:02.420
kernel arguments and Azure AI prompts here that

74
00:04:02.420 --> 00:04:04.180
it's allowed to call them else it won't

75
00:04:04.180 --> 00:04:04.640
call them.

76
00:04:06.140 --> 00:04:10.600
And then you just do the normal loop

77
00:04:10.600 --> 00:04:13.300
for chat and you use the tool.

78
00:04:16.579 --> 00:04:22.480
Extensions AI uses delicate methods for tools so

79
00:04:22.480 --> 00:04:25.580
you can either just assign them using an

80
00:04:25.580 --> 00:04:28.540
AI function create here or you can do

81
00:04:28.540 --> 00:04:31.360
use some reflection to find all your functions

82
00:04:31.360 --> 00:04:32.160
in a class.

83
00:04:33.820 --> 00:04:37.020
Again we need to have the system message

84
00:04:37.020 --> 00:04:39.480
out by itself so but beyond that it

85
00:04:39.480 --> 00:04:42.640
is very simple and we don't need to

86
00:04:42.640 --> 00:04:44.380
tell that it's allowed to call them they

87
00:04:44.380 --> 00:04:47.760
are auto tool calling by default.

88
00:04:50.830 --> 00:04:54.810
Agent framework is exactly the same but whenever

89
00:04:54.810 --> 00:04:58.450
you create your agent you can tell which

90
00:04:58.450 --> 00:05:00.070
tools that agent have available.

91
00:05:00.370 --> 00:05:02.890
Down here you needed to tell what tools

92
00:05:02.890 --> 00:05:05.570
you wanted to use for each individual call.

93
00:05:06.030 --> 00:05:07.890
Here you can define all the calls on

94
00:05:07.890 --> 00:05:10.870
the agent and just make your different calls.

95
00:05:12.450 --> 00:05:14.810
But beyond that they are very much the

96
00:05:14.810 --> 00:05:17.150
same they're using the same way of defining

97
00:05:17.150 --> 00:05:22.470
tools so a little more easy because of

98
00:05:22.470 --> 00:05:24.590
the agents but nothing more than that.

99
00:05:26.900 --> 00:05:29.780
When it comes to unstructured outputs they all

100
00:05:29.780 --> 00:05:34.680
use some kind of output object in this

101
00:05:34.680 --> 00:05:35.400
case a person.

102
00:05:36.960 --> 00:05:41.900
Semantic kernel needs to on the agent say

103
00:05:41.900 --> 00:05:44.580
that that agent should always give a response

104
00:05:44.580 --> 00:05:47.400
format of the type of the person in

105
00:05:47.400 --> 00:05:51.720
this case and then normally call and the

106
00:05:51.720 --> 00:05:55.740
message back here would be a JSON string

107
00:05:55.740 --> 00:05:58.220
that you then need to deserialize.

108
00:05:59.720 --> 00:06:03.940
Extension AI make it much easier in that

109
00:06:03.940 --> 00:06:08.180
you have a generic method of the call

110
00:06:08.180 --> 00:06:11.460
to the LLM where you just give the

111
00:06:11.460 --> 00:06:14.020
object that you want back and then you

112
00:06:14.020 --> 00:06:16.900
get that back as a response so you

113
00:06:16.900 --> 00:06:19.940
get your object so you don't need to

114
00:06:19.940 --> 00:06:23.080
tell anything what type it is that happens

115
00:06:23.080 --> 00:06:25.840
in the call and you don't need to

116
00:06:25.840 --> 00:06:26.900
deserialize yourself.

117
00:06:29.280 --> 00:06:33.380
Agent framework does the same but of course

118
00:06:33.380 --> 00:06:36.980
again have the agent part and it needs

119
00:06:36.980 --> 00:06:40.060
to do a run async instead of a

120
00:06:40.060 --> 00:06:42.440
get response async but else they are exactly

121
00:06:42.440 --> 00:06:42.940
the same.

122
00:06:45.160 --> 00:06:48.240
There is certain type of agents that can't

123
00:06:48.240 --> 00:06:53.900
do this meaning the chat client agents are

124
00:06:53.900 --> 00:06:56.000
the only ones that can do it but

125
00:06:56.000 --> 00:06:58.300
they have some more advanced agents that are

126
00:06:58.300 --> 00:07:01.220
not allowed to use structured output.

127
00:07:04.810 --> 00:07:08.010
Other concepts well if we do a little

128
00:07:08.010 --> 00:07:10.730
side-by-side comparison the number of new

129
00:07:10.730 --> 00:07:12.330
gets you need in order to do hello

130
00:07:12.330 --> 00:07:14.430
world is two in each one of them.

131
00:07:15.790 --> 00:07:17.530
You can see the names here.

132
00:07:19.130 --> 00:07:19.770
Embeddings.

133
00:07:22.010 --> 00:07:24.010
Microsoft Extension AI is the only one who

134
00:07:24.010 --> 00:07:24.770
have embeddings.

135
00:07:25.170 --> 00:07:26.690
The two others leverage them.

136
00:07:26.950 --> 00:07:29.190
Semantic kernel had an old one but I

137
00:07:29.190 --> 00:07:32.210
haven't listed it here because nowadays if you

138
00:07:32.210 --> 00:07:35.190
use semantic kernel you just leverage Microsoft Extension

139
00:07:35.190 --> 00:07:35.490
AI.

140
00:07:38.250 --> 00:07:41.190
Agents semantic kernel and agent framework have that

141
00:07:41.190 --> 00:07:45.330
concept while extensions AI being a more low

142
00:07:45.330 --> 00:07:48.650
-level system you need to more control your

143
00:07:48.650 --> 00:07:51.810
own system messages and stuff like that.

144
00:07:53.050 --> 00:07:56.130
So everything happens on each individual call instead

145
00:07:56.130 --> 00:07:59.610
of defining everything on an agent and then

146
00:08:00.310 --> 00:08:01.250
working from there.

147
00:08:02.850 --> 00:08:03.530
Workflows.

148
00:08:03.870 --> 00:08:05.990
Semantic kernel have a workflow they call it

149
00:08:05.990 --> 00:08:10.190
process framework and agent framework of course have

150
00:08:10.190 --> 00:08:11.470
the workflows.

151
00:08:12.910 --> 00:08:17.030
Extensions AI don't have that concept so you

152
00:08:17.030 --> 00:08:18.350
can't leverage that.

153
00:08:20.150 --> 00:08:23.950
Agentic workflows is something agent framework have picked

154
00:08:23.950 --> 00:08:30.630
up from their other team called Autogen and

155
00:08:30.630 --> 00:08:32.250
that's now in the agent framework.

156
00:08:32.530 --> 00:08:35.510
It wasn't really in the semantic kernel and

157
00:08:35.510 --> 00:08:38.970
again Microsoft Extensions AI don't have any concept

158
00:08:38.970 --> 00:08:39.549
of this.

159
00:08:43.300 --> 00:08:48.620
Vector stores is something neither extensions AI or

160
00:08:48.620 --> 00:08:50.100
agent framework have.

161
00:08:50.540 --> 00:08:55.620
They have the embeddings but they don't have

162
00:08:55.620 --> 00:08:58.100
anything to actually put it up into a

163
00:08:58.100 --> 00:09:01.720
vector store like Azure AI search or into

164
00:09:01.720 --> 00:09:03.600
a SQL server or something like that.

165
00:09:04.060 --> 00:09:07.940
For that something called Microsoft Extensions vector data

166
00:09:07.940 --> 00:09:09.020
exists.

167
00:09:09.180 --> 00:09:11.700
It's a NuGet package and that NuGet package

168
00:09:11.700 --> 00:09:14.120
actually lives inside semantic kernel.

169
00:09:15.340 --> 00:09:18.960
At some point semantic kernel need to pull

170
00:09:18.960 --> 00:09:21.340
it out because it's not really semantic kernel

171
00:09:21.340 --> 00:09:23.560
that have the support for vector stores.

172
00:09:24.120 --> 00:09:28.060
It's just a NuGet package that the semantic

173
00:09:28.060 --> 00:09:31.360
kernel repo owns that have that support.

174
00:09:32.460 --> 00:09:36.300
So it's only in namespace only that they

175
00:09:36.300 --> 00:09:37.860
support it while the others don't.

176
00:09:38.960 --> 00:09:41.480
But in real life you will still use

177
00:09:41.480 --> 00:09:44.980
this part over in agent framework or in

178
00:09:44.980 --> 00:09:47.720
extensions AI if you use that for it.

179
00:09:50.290 --> 00:09:53.010
If we need to give some props to

180
00:09:53.010 --> 00:09:55.490
each one of them what is they better

181
00:09:55.490 --> 00:09:56.990
at than any of the others?

182
00:09:57.670 --> 00:10:00.190
Well semantic kernel is better at setting reasoning

183
00:10:00.190 --> 00:10:03.430
effort on LLMs. So which if you for

184
00:10:03.430 --> 00:10:06.390
example have chat GPT-5 you need to

185
00:10:06.390 --> 00:10:10.630
set between minimal, low, medium or high in

186
00:10:10.630 --> 00:10:14.370
reasoning effort and it has a nice little

187
00:10:14.370 --> 00:10:17.430
thing on your agent that you can just

188
00:10:17.430 --> 00:10:18.350
set that value.

189
00:10:19.750 --> 00:10:22.990
Neither extensions AI or agent framework have this.

190
00:10:24.050 --> 00:10:27.110
So for that reason technically semantic kernel is

191
00:10:27.110 --> 00:10:28.330
better at setting them.

192
00:10:29.070 --> 00:10:30.790
All of the three can do it but

193
00:10:30.790 --> 00:10:31.470
it's just better.

194
00:10:31.790 --> 00:10:33.530
It's more cumbersome over here.

195
00:10:35.530 --> 00:10:38.030
Extensions AI is better in embeddings because it's

196
00:10:38.030 --> 00:10:40.230
the only one who can do it as

197
00:10:40.230 --> 00:10:40.510
such.

198
00:10:40.710 --> 00:10:42.790
So I don't really know if you can

199
00:10:42.790 --> 00:10:45.290
make it better by being the only one

200
00:10:45.290 --> 00:10:45.710
who can.

201
00:10:46.670 --> 00:10:50.690
While agent framework is better at chats it's

202
00:10:50.690 --> 00:10:54.890
more concise than agent framework and because of

203
00:10:54.890 --> 00:10:57.150
the system information you can put directly on

204
00:10:57.150 --> 00:10:58.410
agents it's easier.

205
00:10:59.130 --> 00:11:00.090
It's better at agents.

206
00:11:00.390 --> 00:11:04.850
The agents are much more evolved than semantic

207
00:11:04.850 --> 00:11:05.350
kernels.

208
00:11:06.030 --> 00:11:07.310
It's better at workflows.

209
00:11:07.690 --> 00:11:10.390
It's a new version of the workflow and

210
00:11:10.390 --> 00:11:12.270
the identic workflow is the only one that

211
00:11:13.120 --> 00:11:14.250
that is over here.

212
00:11:16.270 --> 00:11:21.390
When it comes to LLMs extensions AI and

213
00:11:21.390 --> 00:11:24.010
agent framework are exactly the same because they

214
00:11:24.010 --> 00:11:27.270
both leverage that anything that supports an iChat

215
00:11:27.270 --> 00:11:31.230
client it can support and that's virtually everything

216
00:11:31.230 --> 00:11:31.970
out there.

217
00:11:34.260 --> 00:11:37.420
Semantic kernel has its own connectors which is

218
00:11:37.420 --> 00:11:41.280
a problem of course because if new features

219
00:11:41.280 --> 00:11:43.820
come along they need to implement it instead

220
00:11:43.820 --> 00:11:47.020
of just leveraging the raw clients like the

221
00:11:47.020 --> 00:11:47.740
two others do.

222
00:11:48.180 --> 00:11:52.720
But they do support OpenAI, Azure OpenAI, AI

223
00:11:52.720 --> 00:11:57.240
Foundry, Google, offline modes which is also of

224
00:11:57.240 --> 00:11:59.860
course supported by the two others and they

225
00:11:59.860 --> 00:12:02.460
have a sort of connection to Cloud.

226
00:12:03.060 --> 00:12:07.780
So unless you're using the OpenAI, Azure OpenAI,

227
00:12:08.320 --> 00:12:11.900
I would be more worried sticking with semantic

228
00:12:11.900 --> 00:12:13.660
kernel in having those.

229
00:12:15.580 --> 00:12:18.020
So that's everything I have for you in

230
00:12:18.020 --> 00:12:19.040
terms of comparison.

231
00:12:19.760 --> 00:12:22.720
I'm definitely gonna stick with agent framework.

232
00:12:22.940 --> 00:12:28.760
I find extensions AI too low level, too

233
00:12:28.760 --> 00:12:33.520
much extra work here and there compared to

234
00:12:33.520 --> 00:12:34.940
what agent framework can do.

235
00:12:35.140 --> 00:12:37.280
And on top of that it gives all

236
00:12:37.280 --> 00:12:40.260
the nice workflows as well.

237
00:12:40.760 --> 00:12:42.540
And semantic kernel I see it as a

238
00:12:42.540 --> 00:12:48.420
legacy product now that agent framework will supersede

239
00:12:48.420 --> 00:12:50.560
in every way.

240
00:12:51.080 --> 00:12:56.380
I think there's one thing with Amazon Bedrock

241
00:12:56.380 --> 00:12:59.040
agents that are not supported yet in agent

242
00:12:59.040 --> 00:13:01.460
framework but beyond that it can do everything

243
00:13:01.460 --> 00:13:03.820
that semantic kernel could do.

244
00:13:05.800 --> 00:13:08.520
Say for the vector stores of course which

245
00:13:08.520 --> 00:13:13.200
again is just a namespace only that is

246
00:13:13.200 --> 00:13:13.420
there.

247
00:13:13.880 --> 00:13:16.400
So that is the only place I will

248
00:13:16.400 --> 00:13:19.240
ever use a NuGet package going forward and

249
00:13:19.240 --> 00:13:22.080
I will be migrating all my semantic kernel

250
00:13:22.080 --> 00:13:25.680
over to agent framework which in turn then

251
00:13:25.680 --> 00:13:28.860
just use the extensions AI behind the scenes

252
00:13:28.860 --> 00:13:30.260
for the low level stuff.

253
00:13:31.220 --> 00:13:32.180
So that's everything.

254
00:13:32.940 --> 00:13:34.020
See you in the next one.
