WEBVTT

1
00:00:00.580 --> 00:00:03.300
In this video, we are going to go

2
00:00:03.300 --> 00:00:07.580
deep dive into what Create AI Agent can

3
00:00:07.580 --> 00:00:07.860
do.

4
00:00:09.480 --> 00:00:12.960
We will show every single little thing you

5
00:00:12.960 --> 00:00:16.260
can do with this in the various two

6
00:00:16.260 --> 00:00:20.400
overloads, and some of them we will just

7
00:00:20.400 --> 00:00:23.640
talk about, and there will be dedicated videos

8
00:00:23.640 --> 00:00:23.920
on.

9
00:00:23.920 --> 00:00:27.880
Others we will just mention for your own

10
00:00:27.880 --> 00:00:31.340
self-discovery, but let's have a look.

11
00:00:31.920 --> 00:00:33.780
So what you can see is we have

12
00:00:33.780 --> 00:00:35.180
two overloads.

13
00:00:35.400 --> 00:00:40.220
One takes a chat client agent options, and

14
00:00:40.220 --> 00:00:43.540
then it takes a client factory, and a

15
00:00:43.540 --> 00:00:45.640
logger factory, and a service provider.

16
00:00:46.380 --> 00:00:51.940
The other one takes instructions, name, description, tools,

17
00:00:52.660 --> 00:00:55.460
client factory, logger factory, and services.

18
00:00:56.120 --> 00:00:58.640
So we can see the last three are

19
00:00:58.640 --> 00:01:02.400
the same, while this one is just one

20
00:01:02.400 --> 00:01:05.420
that gives a little less options than what

21
00:01:05.420 --> 00:01:07.320
is inside this chat client.

22
00:01:08.120 --> 00:01:09.240
So let's start with this.

23
00:01:10.020 --> 00:01:14.080
The first thing we can set is the

24
00:01:14.080 --> 00:01:17.080
instructions, and as we saw in the prompt

25
00:01:17.080 --> 00:01:20.840
video, that is just what we can steer

26
00:01:20.840 --> 00:01:23.100
the model and speak like about it.

27
00:01:28.320 --> 00:01:31.640
Next, we can give the agent a name.

28
00:01:33.020 --> 00:01:35.840
Names are not really something that I used

29
00:01:35.840 --> 00:01:38.100
for the LLM.

30
00:01:38.300 --> 00:01:40.860
It's not like it's getting a name that's

31
00:01:40.860 --> 00:01:44.140
called my agent or anything, but when we

32
00:01:44.140 --> 00:01:48.560
use these agents across various different things in

33
00:01:48.560 --> 00:01:52.940
agent framework, like workflows and agents within agents

34
00:01:52.940 --> 00:01:57.740
and stuff, it might be beneficial to give

35
00:01:57.740 --> 00:02:00.560
a name instead of just an ID that

36
00:02:00.560 --> 00:02:02.020
we don't know.

37
00:02:03.680 --> 00:02:08.000
So we can give something like this, my

38
00:02:08.000 --> 00:02:11.220
agent, and then it will be identified as.

39
00:02:11.800 --> 00:02:15.640
There's a few odd cases where name is

40
00:02:15.640 --> 00:02:19.160
actually mandatory, because it's actually being used by

41
00:02:19.160 --> 00:02:20.260
some features.

42
00:02:20.420 --> 00:02:24.100
For example, something called dev UI needs a

43
00:02:24.100 --> 00:02:24.300
name.

44
00:02:26.280 --> 00:02:30.380
The next field is description, and description is

45
00:02:30.380 --> 00:02:33.980
absolutely optional.

46
00:02:34.460 --> 00:02:36.380
It's not really used for anything.

47
00:02:36.640 --> 00:02:38.240
I have not seen it being used in

48
00:02:38.240 --> 00:02:38.920
the other end.

49
00:02:39.320 --> 00:02:41.060
So the only thing you can really use

50
00:02:41.060 --> 00:02:42.760
it for is when you sit with an

51
00:02:42.760 --> 00:02:45.400
agent and can perhaps see its description.

52
00:02:45.860 --> 00:02:47.660
So it's purely informational.

53
00:02:47.980 --> 00:02:51.280
I have personally never used it, but it

54
00:02:51.280 --> 00:02:53.720
is possible to write something about what this

55
00:02:53.720 --> 00:02:55.220
agent do if need be.

56
00:02:57.360 --> 00:02:58.480
Then there's tools.

57
00:02:59.000 --> 00:03:01.620
Tools we will leave for the dedicated section

58
00:03:01.620 --> 00:03:03.480
about tools, but this is where we put

59
00:03:03.480 --> 00:03:06.520
in tool calling so we can have the

60
00:03:06.520 --> 00:03:11.260
system do various reach out to different action

61
00:03:11.260 --> 00:03:12.800
tools and information tools.

62
00:03:14.360 --> 00:03:17.500
Then there's something called the client factory.

63
00:03:18.080 --> 00:03:22.100
This is a very, very low level step

64
00:03:22.100 --> 00:03:24.080
where we can go in and get the

65
00:03:24.080 --> 00:03:29.000
underlying iChat clients, which happens behind the AI

66
00:03:29.000 --> 00:03:31.580
agent, and manipulate that.

67
00:03:31.680 --> 00:03:33.260
So we can go in and get this

68
00:03:33.260 --> 00:03:37.460
agent, and we need to return it again

69
00:03:37.460 --> 00:03:39.320
after we are done.

70
00:03:41.260 --> 00:03:43.940
So let's set the breakpoint here.

71
00:03:45.260 --> 00:03:46.320
There we go.

72
00:03:47.440 --> 00:03:49.720
So we need to do that, and then

73
00:03:49.720 --> 00:03:52.420
on this chat client, we can begin to

74
00:03:52.420 --> 00:03:55.060
use it in its raw format.

75
00:03:56.220 --> 00:04:00.020
Not really ever so far been a need

76
00:04:00.020 --> 00:04:02.700
for me, but if you really, really need

77
00:04:02.700 --> 00:04:06.240
to go deep, you can actually get down

78
00:04:06.240 --> 00:04:07.100
to that level.

79
00:04:10.920 --> 00:04:13.860
Then we have the logger factory, which is

80
00:04:13.860 --> 00:04:16.600
just the normal iLogger system.

81
00:04:16.839 --> 00:04:19.820
So if you want to put in logging

82
00:04:19.820 --> 00:04:24.140
for your agent, it is possible here on

83
00:04:24.140 --> 00:04:25.440
a fairly low level.

84
00:04:26.060 --> 00:04:28.820
There is middleware as well for logging, which

85
00:04:28.820 --> 00:04:30.980
we will cover in later videos.

86
00:04:32.380 --> 00:04:36.540
But here we could make some loggers.

87
00:04:37.420 --> 00:04:39.940
And the final thing is we can add

88
00:04:39.940 --> 00:04:44.240
an iServiceProvider as a dependency injection here.

89
00:04:45.080 --> 00:04:49.140
So AI tools should be able to use

90
00:04:49.140 --> 00:04:50.100
this.

91
00:04:50.660 --> 00:04:53.820
I will show a dedicated video on this

92
00:04:53.820 --> 00:04:58.100
as well in the advanced section of this.

93
00:04:58.520 --> 00:05:01.740
It is fairly niche to use, but it

94
00:05:01.740 --> 00:05:02.740
is possible to do.

95
00:05:05.030 --> 00:05:07.370
So that is the easy version of it

96
00:05:07.370 --> 00:05:07.730
all.

97
00:05:09.310 --> 00:05:13.330
We can also take the approach where we

98
00:05:13.330 --> 00:05:15.930
actually give an entire object here.

99
00:05:17.030 --> 00:05:18.910
This one gives even more options.

100
00:05:19.490 --> 00:05:21.530
It also has the other ones, but we

101
00:05:21.530 --> 00:05:23.230
just saw them, so I won't cover them

102
00:05:23.230 --> 00:05:23.590
here.

103
00:05:25.710 --> 00:05:27.450
We need two more of these.

104
00:05:42.820 --> 00:05:43.940
What am I missing?

105
00:05:45.140 --> 00:05:46.460
That's the one for that one.

106
00:05:50.040 --> 00:05:50.660
No matter.

107
00:05:51.180 --> 00:05:53.380
So here we can also give the name.

108
00:05:53.840 --> 00:05:55.700
We can even give an ID if we

109
00:05:55.700 --> 00:05:56.180
want to.

110
00:05:56.280 --> 00:05:58.080
Else it will auto-generate one.

111
00:05:58.680 --> 00:06:00.020
We can give the description.

112
00:06:02.510 --> 00:06:05.350
And we can control what is called a

113
00:06:05.350 --> 00:06:07.290
chat message store factory.

114
00:06:07.990 --> 00:06:12.890
So whenever we use the conversation chat loop,

115
00:06:13.110 --> 00:06:17.690
we have the agent thread.

116
00:06:18.650 --> 00:06:20.530
Behind the scenes it had a chat message.

117
00:06:20.970 --> 00:06:23.310
So if we wanted to have those messages,

118
00:06:23.610 --> 00:06:26.830
which were just in memory, were for example

119
00:06:26.830 --> 00:06:28.790
stored in a SQL server or on the

120
00:06:28.790 --> 00:06:33.030
disc, we could override that by putting that

121
00:06:33.030 --> 00:06:33.570
in here.

122
00:06:34.350 --> 00:06:36.050
So that's the option.

123
00:06:36.410 --> 00:06:38.690
We will have a dedicated video on that

124
00:06:38.690 --> 00:06:39.810
in the advanced section.

125
00:06:41.310 --> 00:06:44.750
We also have an AI context provider factory.

126
00:06:45.270 --> 00:06:47.710
This is a place where we can go

127
00:06:47.710 --> 00:06:52.330
in and do a pre and post LLM

128
00:06:52.330 --> 00:06:54.970
call, where we can go in and check

129
00:06:54.970 --> 00:06:59.150
before the LLM call is being called, do

130
00:06:59.150 --> 00:06:59.670
something.

131
00:07:00.510 --> 00:07:02.990
And after the LLM has been called and

132
00:07:02.990 --> 00:07:05.190
it's given the response back, do something.

133
00:07:05.930 --> 00:07:09.550
This is good for, for example, implementing memory

134
00:07:09.550 --> 00:07:11.710
into an agent, and we will have a

135
00:07:11.710 --> 00:07:13.290
dedicated video on that as well.

136
00:07:15.830 --> 00:07:19.570
We also have chat options, and this is

137
00:07:19.570 --> 00:07:21.790
again a lower level place.

138
00:07:23.870 --> 00:07:25.810
And this is what, if you begin to

139
00:07:25.810 --> 00:07:29.470
set something here, it is what the agent

140
00:07:29.470 --> 00:07:35.270
framework team is calling breaking glass, meaning you

141
00:07:35.270 --> 00:07:37.590
can go to the lower level parts of

142
00:07:37.590 --> 00:07:38.030
everything.

143
00:07:39.890 --> 00:07:41.290
It's in here, you can set the instructions

144
00:07:41.290 --> 00:07:44.290
if you don't use the other overload.

145
00:07:44.650 --> 00:07:48.150
So that is not really breaking glass, but

146
00:07:48.150 --> 00:07:51.990
then you get to some advanced stuff like

147
00:07:51.990 --> 00:07:57.070
continuation tokens, allow multiple tool calls, background responses.

148
00:07:57.690 --> 00:07:59.810
Some of these we will cover, others we

149
00:07:59.810 --> 00:08:03.650
won't, because this is very, very low level.

150
00:08:05.210 --> 00:08:07.350
But there are certain things like, for example,

151
00:08:07.350 --> 00:08:10.170
max output tokens, which is a requirement of

152
00:08:10.170 --> 00:08:13.270
Claude, the Entropic provider.

153
00:08:13.530 --> 00:08:15.050
So there we would need to set that.

154
00:08:15.930 --> 00:08:18.710
We can set the model directly here, if

155
00:08:18.710 --> 00:08:22.370
we for some reason don't have access to

156
00:08:22.370 --> 00:08:26.030
it up in the way we generate the

157
00:08:26.030 --> 00:08:26.930
agent itself.

158
00:08:27.150 --> 00:08:29.210
That is for certain models that we need

159
00:08:29.210 --> 00:08:29.790
to do that.

160
00:08:30.710 --> 00:08:32.970
But the main thing is this raw representation

161
00:08:32.970 --> 00:08:37.510
factory, where we can go in and set

162
00:08:37.510 --> 00:08:41.049
things like thinking modes and stuff like that,

163
00:08:41.090 --> 00:08:44.070
because that is very, very provider specific.

164
00:08:45.250 --> 00:08:48.170
So this raw representation factory is one of

165
00:08:48.170 --> 00:08:49.890
the places you go and do that.

166
00:08:51.590 --> 00:08:54.250
The response format is also a place where

167
00:08:54.250 --> 00:08:55.870
you can go in and begin to work

168
00:08:55.870 --> 00:08:58.890
with structured output, which we'll also cover in

169
00:08:58.890 --> 00:08:59.630
a later session.

170
00:09:01.410 --> 00:09:03.870
Temperatures, which is kind of the thing you

171
00:09:03.870 --> 00:09:05.950
did in the past with the older models,

172
00:09:06.210 --> 00:09:08.370
where you set temperature to zero to make

173
00:09:08.370 --> 00:09:10.750
it less random.

174
00:09:11.110 --> 00:09:14.350
You can still do that, but very, very

175
00:09:14.350 --> 00:09:17.310
rarely used anymore.

176
00:09:18.330 --> 00:09:20.090
And here we can set the tools as

177
00:09:20.090 --> 00:09:20.290
well.

178
00:09:20.650 --> 00:09:23.430
So there's a lot of options in here,

179
00:09:24.150 --> 00:09:26.890
if you need to really, really go deep.

180
00:09:27.630 --> 00:09:30.430
We won't need to do that too often,

181
00:09:30.810 --> 00:09:33.970
but especially for reasoning, we are going to

182
00:09:33.970 --> 00:09:38.110
use this, but again, dedicated videos on that.

183
00:09:38.990 --> 00:09:43.290
So that is actually everything that is here

184
00:09:43.290 --> 00:09:46.270
in order for you to begin to explore

185
00:09:46.270 --> 00:09:49.730
that there's a much deeper layer here, if

186
00:09:49.730 --> 00:09:50.310
need be.

187
00:09:51.230 --> 00:09:55.510
But for now, we will probably stick mostly

188
00:09:55.510 --> 00:10:00.170
to putting the instructions, which is to me

189
00:10:00.170 --> 00:10:04.310
kind of mandatory to always set, then tools.

190
00:10:04.750 --> 00:10:06.990
Those are the two you would use in

191
00:10:06.990 --> 00:10:09.030
day-to-day and the rest is for

192
00:10:09.030 --> 00:10:10.570
more niche scenarios.
