In this video, we are going to go
deep dive into what Create AI Agent can
do.
We will show every single little thing you
can do with this in the various two
overloads, and some of them we will just
talk about, and there will be dedicated videos
on.
Others we will just mention for your own
self-discovery, but let's have a look.
So what you can see is we have
two overloads.
One takes a chat client agent options, and
then it takes a client factory, and a
logger factory, and a service provider.
The other one takes instructions, name, description, tools,
client factory, logger factory, and services.
So we can see the last three are
the same, while this one is just one
that gives a little less options than what
is inside this chat client.
So let's start with this.
The first thing we can set is the
instructions, and as we saw in the prompt
video, that is just what we can steer
the model and speak like about it.
Next, we can give the agent a name.
Names are not really something that I used
for the LLM.
It's not like it's getting a name that's
called my agent or anything, but when we
use these agents across various different things in
agent framework, like workflows and agents within agents
and stuff, it might be beneficial to give
a name instead of just an ID that
we don't know.
So we can give something like this, my
agent, and then it will be identified as.
There's a few odd cases where name is
actually mandatory, because it's actually being used by
some features.
For example, something called dev UI needs a
name.
The next field is description, and description is
absolutely optional.
It's not really used for anything.
I have not seen it being used in
the other end.
So the only thing you can really use
it for is when you sit with an
agent and can perhaps see its description.
So it's purely informational.
I have personally never used it, but it
is possible to write something about what this
agent do if need be.
Then there's tools.
Tools we will leave for the dedicated section
about tools, but this is where we put
in tool calling so we can have the
system do various reach out to different action
tools and information tools.
Then there's something called the client factory.
This is a very, very low level step
where we can go in and get the
underlying iChat clients, which happens behind the AI
agent, and manipulate that.
So we can go in and get this
agent, and we need to return it again
after we are done.
So let's set the breakpoint here.
There we go.
So we need to do that, and then
on this chat client, we can begin to
use it in its raw format.
Not really ever so far been a need
for me, but if you really, really need
to go deep, you can actually get down
to that level.
Then we have the logger factory, which is
just the normal iLogger system.
So if you want to put in logging
for your agent, it is possible here on
a fairly low level.
There is middleware as well for logging, which
we will cover in later videos.
But here we could make some loggers.
And the final thing is we can add
an iServiceProvider as a dependency injection here.
So AI tools should be able to use
this.
I will show a dedicated video on this
as well in the advanced section of this.
It is fairly niche to use, but it
is possible to do.
So that is the easy version of it
all.
We can also take the approach where we
actually give an entire object here.
This one gives even more options.
It also has the other ones, but we
just saw them, so I won't cover them
here.
We need two more of these.
What am I missing?
That's the one for that one.
No matter.
So here we can also give the name.
We can even give an ID if we
want to.
Else it will auto-generate one.
We can give the description.
And we can control what is called a
chat message store factory.
So whenever we use the conversation chat loop,
we have the agent thread.
Behind the scenes it had a chat message.
So if we wanted to have those messages,
which were just in memory, were for example
stored in a SQL server or on the
disc, we could override that by putting that
in here.
So that's the option.
We will have a dedicated video on that
in the advanced section.
We also have an AI context provider factory.
This is a place where we can go
in and do a pre and post LLM
call, where we can go in and check
before the LLM call is being called, do
something.
And after the LLM has been called and
it's given the response back, do something.
This is good for, for example, implementing memory
into an agent, and we will have a
dedicated video on that as well.
We also have chat options, and this is
again a lower level place.
And this is what, if you begin to
set something here, it is what the agent
framework team is calling breaking glass, meaning you
can go to the lower level parts of
everything.
It's in here, you can set the instructions
if you don't use the other overload.
So that is not really breaking glass, but
then you get to some advanced stuff like
continuation tokens, allow multiple tool calls, background responses.
Some of these we will cover, others we
won't, because this is very, very low level.
But there are certain things like, for example,
max output tokens, which is a requirement of
Claude, the Entropic provider.
So there we would need to set that.
We can set the model directly here, if
we for some reason don't have access to
it up in the way we generate the
agent itself.
That is for certain models that we need
to do that.
But the main thing is this raw representation
factory, where we can go in and set
things like thinking modes and stuff like that,
because that is very, very provider specific.
So this raw representation factory is one of
the places you go and do that.
The response format is also a place where
you can go in and begin to work
with structured output, which we'll also cover in
a later session.
Temperatures, which is kind of the thing you
did in the past with the older models,
where you set temperature to zero to make
it less random.
You can still do that, but very, very
rarely used anymore.
And here we can set the tools as
well.
So there's a lot of options in here,
if you need to really, really go deep.
We won't need to do that too often,
but especially for reasoning, we are going to
use this, but again, dedicated videos on that.
So that is actually everything that is here
in order for you to begin to explore
that there's a much deeper layer here, if
need be.
But for now, we will probably stick mostly
to putting the instructions, which is to me
kind of mandatory to always set, then tools.
Those are the two you would use in
day-to-day and the rest is for
more niche scenarios.