Okay, and now I'm going to do a CTRL-C to stop the server from running.
It's no longer running.
I'll clear that screen with clear.
Okay, it's time for us to add some functionality.
We've got another way to prompt our LLM.
We want to do more.
So at this point, I want to mention
that it's important to be taking backups as we go,
to be checkpointing,
because at any point, particularly when you're YOLOing,
you could mess everything up,
or the agent could mess everything up,
and you have to start all over again, which would be a pain.
Now, the right way to do this is using Git
and using features of Git that allow us to commit at various points,
and we will be doing that in the future.
And if you know how to do that already, then for sure, do that.
But otherwise, the simple way to do it,
the poor person's version of Git,
is simply to copy and paste,
to duplicate the entire folder site
and keep a backup of it that way.
That way, you've got a snapshot
that you could always switch back in if you need to.
So make sure you've done that,
just in case what we do next messes everything up,
so you can always recall.
And if you know how to use Git, then of course, just commit.
And be careful of the fact that there's already going to be a Git repo
under the web directory that you'll need to remove
and then just have one Git repo, if you know that.
If you don't, just take a copy.
All right, now time to ask our agent to do more.
Okay, so here we go.
I'm going to paste in here my next instruction. That's great.
Please now add the ability to have an AI chat with a digital twin,
which can answer questions about my career.
Please use OpenRooter.
My OpenRooter API key is in the .emv file in the project root.
Please use the model named.
Okay, and now I just want to bring up OpenRooter itself.
This is OpenRooter.
If you go to the models page in the main navigation,
we can look at all the different models that OpenRooter offers.
If you type free, you get to see all the free ones.
I want to look for ones called GPT-OSS,
which is open source models.
There's a free version and a paid version.
The free version, you can only use it occasionally.
I'm going to pick the paid version.
It's still super cheap, but you can choose to use either.
This is the version.
I need to refresh that.
And then I'm going to copy that model name into the clipboard,
go back to cursor, paste that in here, like so.
That is the name of the model.
That is all I need to do.
Make the changes. Changes.
Make sure it works.
Let me know when ready for me. That's all.
Let's set that going.
Off goes our AI agent.
I will see you back here in a few moments
when the YOLOing is complete.
Okay, well, it tells me that an AI digital twin is wired up and ready.
The site now includes digital twin.
It calls up a router.
It uses the .emv file.
It's given me the instructions.
What do you think?
What's your bet?
Is this going to work?
Is this going to work? Let's see.
We have to be in the web directory, which is where we are.
PWD, there we are.
We do npm run dev.
Well, it hasn't crashed.
Now let's bring up a browser.
Here's a browser tab. Hold on.
Make that a nice size for you. Sorry.
One second, one second.
I know it's exciting.
Okay, here we go.
So after faffing around with that,
we can go to Localhost 3000,
and here comes a website.
It scrawled straight down originally.
I wonder if it meant to do that,
to do digital twin chat with an AI version of Ed
to explore career milestones.
Looks, it's all got the same site.
It is a beautiful site, by the way, I have to say. Here we go.
We scroll down, and here is the digital twin section.
Very interesting.
It doesn't look like a traditional chat,
but it has these buttons and things.
All right, shall we try chatting with the digital twin?
Okay, let's give it a shot. Hi there.
So I said hi there.
It's slightly janky.
It like bounced around a bit, but I said hi there.
Look at how it's showing here.
Hello, I'm the digital twin of Ed Donner.
How can I assist you today?
Perhaps with insights on his work, blah, blah, blah, blah, blah.
What are you most proud of?
Let's see what we get.
What is this guy, Ed, most proud of? Let's see.
I'm most proud of turning a vision into a tangible impact,
building Nebula from the ground up as a fundraiser. Very nice.
What a nice answer.
Watching thousands of professionals
find roles that genuinely fit them.
The clearest proof that technology
can serve a deeper human-focused mission. Nicely put.
So here we have it.
We have a digital twin.
It's interesting the way it's showing it here.
It's actually quite nice. It's different.
I've seen many digital twins
and they don't tend to look this way.
So I do quite like it.
I have to say, even if it's not the traditional approach, but very nice.
It does seem to be working
and presumably it's calling open router.
Well, this is really showing you,
I'd say the good and the rough edges of vibe coding.
This looks pretty good, I have to say,
but there's definitely some weird stuff
like the way when it opens up,
it flips down straight to that section.
I do believe some of this navigation at the top here,
some of it works.
Career journey works nicely.
Does that portfolio work?
Oh, that works as well. Digital twin. Oh, okay.
At one point I think this wasn't working,
but it does seem to be working right now.
So that navigation is working.
But yeah, there's another thing that doesn't work.
These buttons here.
I tried pressing that button and nothing happened.
So there's definitely some things here
that are a bit broken.
And this is where you have to go back
and iterate, iterate, iterate and improve.
And see what can be done by going backwards and forwards.
And it is a good idea to keep backups.
You should really do it using Git,
but make sure you can always go back
if it ever does something that should be reversed.
And of course, the main thing to keep in mind here
is that by genuinely vibe coding with YOLO,
we've sort of broken all of the rules
that I said at the first half of today's session.
We didn't work on an agents.md.
We haven't really been checking as we go.
And that's fine for this kind of MVP
and for experimenting and exploring.
But if we wanted to take this further,
it would now be important to take a moment
and come back through.
First of all, test everything thoroughly
and fix up things that we're not satisfied with.
Iterate on things like the prompts
and look in at the code.
And for example, now let's take a look inside web
and find out what has this actually built
and do we understand it.
And so for example, I can come in into web,
into source SRC and come in here,
look inside app.
And here we could look inside API
and you'll see that there is something called root.ts under API chat.
And if I open this up,
this is where we will see the backend code
that's getting run,
which is where it is going to be able to call open router.
Now let's make this a little bit bigger
and push our agent over to the side
and take a look at what's happening here.
And you can see the code
that is going to make that request to the LLM.
And we can now look through this
and get a sense of what's going on.
And most importantly,
we can see the prompt that's being used
to tell it who I am.
And we may decide, look, this is quite simplistic.
This is just a very basic prompt.
We really wanted the whole LinkedIn profile
with all the information to be sent to the chat bot
so that it could give us the most robust answer.