So let's begin to use the agent framework
part now that we have the raw connection
in place.
What we're going to do is we're going
to get a chat client which is that
we can work with chat.
We could also use what is called the
responses client which is a more advanced version
of this but I tend to use the
chat client because it's the most compatible version
with all providers and here and here we
need a model.
For this course I will use some very
very cheap models so you don't spend a
lot of money while you're trying out this
but let's quickly go and see what models
we have available.
So we can go to the dashboard up
here and we can see the different models
up here.
I will use the model called chat-gpt5-nano
so this is the name
that we're gonna put in here.
chat-gpt5-nano.
It's a very very cheap model but it's
more than capable of what we need to
do in these samples.
Of course in real life you might have
more advanced stuff you do with the AI
and need bigger models but this is more
than capable.
And what we can now say is create
AI agents and if we do that we
get what is called a chat client agent
from Microsoft agent framework.
The agents we can now use to talk
with the LLM and we do that using
something called RunAsync.
So we need the await keyword and we
need to ask something and that could be
what is the capital of France.
If we do that we get something called
an agent run response back and that agent
one response we can simply just write out
into the console.
We can take the entire object because the
two string will just be the same as
what is called text here and this is
actually everything that needs to be here.
We don't need the hello world from this
and we just have our API key, our
raw client, our agent, our call to the
LLM and we should be able to run.
So let's do that and let me move
system over here and we get the answer
back that it's Paris.
What we have here is a thinking model
so the answers will be a bit slow
at times.
I will also draw these using a non
-reasoning model which is the chat gpt-4.1-nano
in this case as well and
what we will be able to see if
I run this is that the answer comes
back much faster.
What we also saw that an AI is
non-deterministic so the first time I just
said the word Paris the second time I
said the capital of France is Paris.
So that is actually everything there is to
getting started.
From here on it's more just building more
and more on top of this which we'll
do in the following videos.