Well, this is a familiar screen, and it's nice that it looks pretty similar to what we saw before.
I'll just show you a few things.
If you come down to settings here, then you can go to like usage and Plan.
This is where you can see, uh, what kind of things that you're working on.
When you get that email with the key, you press Enter Activation Key here to activate or to basically
unlock a few extra features.
And down here it will tell you the version number that you're running, uh, for, for the pros, the
know about this kind of stuff.
When you specify the Docker container, you can put the container name colon.
Next, if you want to be on the sort of latest upcoming version of which, which right now is 2.2. something
for me which but 2.1.3 is, is the sort of the latest official version.
And there's various settings here that that might turn out to be useful for you.
So it's worth knowing about this.
Uh, and if we go back here we are again on this first screen you'll see overview.
There's also a new beta chat version that allows you to chat with the AI to to construct, to work your
way around in, rather than having AI within your workflow.
And there's the same templates.
If you remember that this is a great place to start should you wish to have one that's kind of canned,
that you can use to explore things that other people have built, and we're building from the ground
up in hours just so that you, you really get to understand, um, the plumbing of it and, uh, then,
then then there's the main sections here.
The overview is where we see all of our workflows and where we can get to begin our first workflow,
which is what we'll do now.
Okay.
I pressed start from scratch.
Here we go.
We are.
Let's get rid of that.
There we are looking at a very familiar screen.
It looks the same.
This is the canvas.
Let's see if pressing the plus and minus expands and contracts.
For sure it does.
And see if pressing Tab gets us this.
Of course it does.
We can use our favorite on chat message and then press escape to go back.
Click and press escape to come back here.
We can, uh, press here to to to resize.
Clean everything up.
When a chat message is received, what do we want to do?
Well, press tab to bring up the screen AI.
AI agent and escape.
And we are faced with the usual screen that we know so well.
And it's time for our first chat model when running running, self-hosted.
So I'm going to press here and I'm going to recommend that we go with Open Router, which is what we
set up at the very start, if you remember, because we we can call an open source model that's running
on the cloud.
And since we're feeling like we're we're running this ourselves, open source feels more legit.
But you could equally you could use a llama and run something actually on your computer should you wish.
And if you're familiar with Aloha, maybe you've taken my AI engineering courses, in which case you
can just look at the llama chat model.
Now you probably need to know enough about Docker to to to mess around.
You'll need to run you.
Can you have two choices.
You could run a llama locally on your host, and then just map the port so that you can see that from
within the Docker container.
Or you can use an approach that they recommend on the website, which is to use one of their ready made
Docker compose files, which then will give you a container for for a llama and a container for an and
map between them.
Now the disadvantage of that second approach, whilst it is a very effective approach, a downside is
if you're on a mac, you wouldn't be able to take advantage of your Mac's GPU.
To do that, you would need to run a llama on your host computer, but if you're on a PC, then you
could.
You could do it that way should you wish to do it the technical way.
But for now, we are going to focus on the open router model, because we're going to make a connection
to open router and run open source models in the cloud.
And here we are looking at the credential to connect with.
And we know these credentials well.
We say create new credential.
Up it comes.
It needs an API key.
And this is where I go.
And I copy my API key from Open Router.
And I paste it in here.
And I know to be careful I think it starts src o dash v1 I think.
And I've got it right.
I pasted it in and I'm careful so that I'm not going to be in trouble.
And when I press testing we get the connection was tested successfully.
So did you.
And so now we come back here.
No thank you.
LastPass.
Uh, we have set up our chat model.
We're also going to add in a simple memory.
There we have it and we can have our first chat.
Uh oh.
But we have to select the model first.
I didn't select the model.
Uh it has GPT four or mini but we don't want that at all.
We want a model like deep seq.
Uh, we will choose V3 point two, which for me is the latest and greatest version of the deep seq model
from Chinese startup deep seq AI.
I.
All right, so back we go.
It's time for us to chat with Deep Seek.
Okay, I press open chat and I say hi there and we'll get back something.
Hello?
How can I help you today?
And of course, the great thing about this is that it's all running on the computer.
Deep within the computer, within a Docker container, it's all running beautifully.
It wasn't that easy to set up, but it also wasn't that hard.
And when you think about the enormity of what we're doing, we're running the whole platform on our
computer.
And it's the same if you're on a PC or on a mac, and we're talking through to through APIs to deep
seq and Open Router, and it's all being hanging together on our computer.
That's pretty cool.
Uh, and of course, as I say, you could just deploy this to the cloud yourself, running on your computer
in the same way anywhere.
And it's all working just great.
That is our first AI agent.
Running.
Running locally, self-hosted on our computers.
And of course, it wouldn't really be a agent if we didn't give it a tool.
Uh, because an agent is an LLM in a loop equipped with tools to achieve a goal.
Uh, you remember that?
So we are going to use our old friend market stack.
Remember that?
A nice one to start with.
We have to connect it with a credential.
We say create new credential.
We paste in an API key and you have to get it right.
You have to copy that API key, press save.
We don't get a green thing with this one.
But but I know that I got it right.
Uh, okay.
And now you remember there's some fiddly stuff here.
We want to say that the model can choose which ticker to use.
And then we have to add a filter.
Latest.
And I always forget to turn that on.
You have to turn on the latest filter.
Otherwise it doesn't work.
So that is set up.
And now we have something new to test.
Let's try it.
And I should probably mention that deep seek and open router aren't super reliable at tool calling.
Something funny sometimes happens, so you have to sometimes try a few times, but we'll see.
Uh, I don't know if it's a deep sea problem or an open router problem or a combo between the two.
But anyway, let's give this a try.
So I'm going to say, uh, hi there.
Off it goes.
Stuff happens.
Thinking.
Hello.
I'm here to help you with financial data.
Uh, it's already so it's looked at the tool.
It's found out what it can do.
Uh, when I say it's looked at the tool that was in the system prompt already, the description of the
tool.
And so it's telling us that that's what it can do.
Uh, what stock would you like information about?
Please tell me the price of Apple.
Let's let it do its thing.
See if it calls the tool here.
It didn't call the tool.
You see, you get this thing.
Uh, it's it's responding with, um, uh, function invoke.
Let's try that.
Just simply a please tell me the stock price of Apple.
Let's just try it again.
Look to see whether that tool is getting called or not.
There we go.
I just saw the tool got called.
And it's thinking maybe a long answer here.
Still thinking, but you can see it's got that information right there.
There we go.
Uh, maybe I need to make this a bit bigger for you.
Hang on and expand this up based on the latest available data.
And there is the information.
So for whatever reason, we had to ask the question twice.
Uh, if you wanted to, you could put in, like, an if, uh, node there and put something in to make
sure that it repeats until you get back a good answer.
Uh, if you want to get fancy, but you should experiment with different models, you'll almost certainly
find that it's just just a problem using deep seq 3.2 through Open Router, that it's not always reliably
calling the tool, and there'll be other models that will do it more reliably.
But this is showing you that we've been able to use an open source model.
And then using driven from our self-hosted instance of Nate and using a tool with an agent.
And it's all work great.
And just so we can go with one that's bound to be, uh, completely bulletproof, let's go into our
model here and let's just change this to be open AI, GPT oss 120 be, uh, OpenAI's top open source
model running through open router so it won't be connecting with OpenAI at all.
It's their published weights, uh, being run by but on open routers or one of open routers providers
infrastructure.
Um, okay, let's go back.
Let's, uh, save that.
Go back here.
I'm going to clear this out, and then we will try this one more time.
And so I say hi there.
Hello.
How can I help you today?
It's familiar, isn't it?
It sounds very like, uh, GPT, uh, I'd like to know.
The closing price.
I just say the price.
The price of Apple stock.
Let's see what happens.
Off it goes.
You can see the tool is called.
And it says the most recent closing price for Apple in the data we have is 270.
Uh and so of course OSS super reliable, very bulletproof.
Uh, so you could try this out a few times and then you have another tool, a jankiness.
It should all work very nicely indeed.
And so give this a try and experiment with, with other things you can do with it.
Use some of the things from earlier in the course and confirm that with the exception of webhooks and
OAuth, uh, things will be basically identical.
Give it a try.