Welcome back to VS Code.
We're going to be spending a lot of time in here this week.
Bring up your favorite terminal with Control backtick.
It's the only terminal and it won't be
your favorite terminal, but whatever.
Your terminal, bring it up and then go into
your home directory and into your projects directory,
and you're going to do a git clone of
just a basic scaffolding I've got in place for you.
Here it is. The project is called Finally.
Finally, because it's our final week.
It's when we're going multi-agent.
Then it's also Finally because that stands for Finance Ally.
We're going to build a live trader workstation
with cool market data and stuff happening,
and it's going to feel like a high-end application,
and we're going to do it with an army of agents.
We're going to do it all this week.
It's in this repo.
Finally, clone it and then open it up as a new project,
and I will see you there.
Okay, so you open it up as a project by going,
a project and then going into projects finally,
and it's showing you now,
and it should look something like this.
There might be more files in here
because I'm sort of figuring out
how much I want to give you as a starting point,
and we're going to work on some of this together.
We're going to set up a whole foundation
that we can then give to a bunch of agents
to build the whole project for us
in as much of a one-shot experience as we can do.
But let me just talk you through it, close everything down.
Let me show you what we've got here.
So in finally, your starting point
should look something like this.
There is the usual, there's an empty-ish readme.
There's a Claude.md that we'll go through in a second.
There's a bunch of directories that are empty
that may not even show up for you because they're empty,
like a backend, db, frontend,
these are all completely empty,
and there's one called planning,
which has a single document, plan.md,
and then there's also an empty test.
All right, there's a useful gitignore,
and then there's, of course, the Claude.md
that we will look at now.
And there's also a .env file
where I put my open router key in there,
just copied it from before.
Okay, into the Claude.md, it's very short.
Finally project, the finance ally, finally.
I'm probably not the first person to think of that,
but still, it works nicely for this project.
And it just says all project documentation
is in the planning directory.
This is that point I made
about one of the stabilizing forces
is to get all of your different coding agents
to be converging on shared documentation,
which is where they can leave information for each other
to keep them all communicating closely.
The key document is in plan.md, included in full here,
and then I'm using that at notation
as a way of ensuring that this entire document
is brought into context every time it has no choice.
So it all sort of revolves around this plan.md,
and this is going to be our tool
for how we control the build of the whole application.
And so this document, which I'll open in preview mode
so we see it nice and formatted,
this is going to be our business requirements.
That is what I want us to build.
And the first stage is us building this out
so that it feels like it's robust.
So the vision is that we're building
a stunning AI-powered trading workstation.
It doesn't matter if you don't know about financial services,
this is still going to make sense to you.
If you know what stocks and shares are,
then that's all you need.
It's going to stream live market data.
It's going to let users trade in a simulated portfolio,
and it's going to integrate an LLM assistant
that can analyze portfolios
and execute trades on your behalf.
It looks and feels like a modern Bloomberg terminal
with an AI co-pilot,
which could be a whole product in its own.
This could be a real, for reals product.
And I say in this vision
that it's the capstone project for the course,
built entirely by coding agents,
demonstrating how orchestrated agents
can produce a production-quality, full-stack application.
Agents interact through files in the planning directory.
That lays the scene out there for you
and also for the AI agents.
Okay, and I should confess
that I started with a paragraph like that,
and I just put it in, actually, in Claude,
in claude.ai, the chatbot,
and iterated a bit for most of the rest of this.
So most of the rest of this is just based on generated,
but from some question and answering with me,
which is a good way to do it.
You could also do it in Claude Code,
but I chose just to use the chat product.
So the user experience explains
that it's all gonna run in Docker,
that a browser will open to local host,
and that you'll be able to then do things
like watch prices stream, monitor the portfolio,
chat with an AI assistant.
There's a bit about the visual design
and the usual color scheme that I like,
but you should put in your own color scheme.
This architecture thing here was generated,
of course, by Claude,
and it's very clear
that there are some roots explained here.
We're gonna, very consistent
with how we've done some of the prior projects, use SQLite.
We're gonna have like a background task for market data.
Okay, and then there's some explanation as to why.
The directory structure is laid out there,
and it's consistent with what's already been set up.
And there's some stuff about the boundaries between areas,
because as you can imagine,
we're gonna be looking into having multiple coding agents
working on different parts.
So focusing on the boundaries is really important,
because agents need to know what they're responsible for
and how they have to interact with each other.
Next section explains about the environment variables,
that there's going to be an open-route API key,
which you already have.
And then optionally,
an API key to something called Massive,
formerly known as Polygon,
that I cover in some of my other courses.
It's optional because the idea is
you don't need to have real market data,
because this product will include a simulated market data.
So it can be just as cool without having to pay a cent.
You can see everything going on as if it's a live market.
And that can be a great way to build out trading agents,
like equity traders,
because you want to see how they respond to simulated data
as well as the real thing.
But you'll be able,
should you wish to pay for proper equity market data,
or even crypto or options or whatever you like,
you should be able to switch that in with an API key change.
Okay, and then that's all explained
in this next section on market data,
explaining that there's two different options
and explaining how we will use SSE approach,
the same way that information is streamed back
when you're working with an AI,
as a way of streaming back market data live
onto the user interface.
And then we're going simple with the database.
We're going to use SQLite as before,
lazily set up the first time you launch the app.
A little bit more sophisticated than last week
that it's going to persist between sessions,
as you can see if you read through it,
but still quite simplistic.
But it should be an easy task to upgrade this,
to use like a database like Superbase,
so it's an API based Postgres database on the cloud,
if you wish to, but we'll keep it simple for this,
because we're trying to build the app,
not necessarily worry about sort of third party integrations.
Bit more on the API endpoints,
and then more about the LLM integration.
We're going to use the same Cerebras approach
or open router approach,
because I love the way it's so fast.
You don't need to use Cerebras if you don't want to.
And we're going to use structured outputs
just as we did in week two.
So we can have an interactive conversation with an LLM
and allow it to do things like make trading decisions
and change the way that the user interface looks.
So that's all parts of how this is explained.
And you can see that I've included a dot Claude,
and I've just copied in the Cerebras skill
that we made in week two.
So we're just taking that same skill again.
So we've got the skill, it can use it right away.
We know how that works.
We know that just by putting that folder in there,
it's just going to have this new skill.
That's the crazy thing about skills
and stuff about how it will execute automatically.
This reads a little bit LLM generated,
but it doesn't matter, it's fine.
And then front-end design, how the screens will be laid out.
I chatted with Claude a while about this
to make sure that I was happy with it.
And then the way that it's all going to be deployed
super simply in one Docker container,
just as we did last week.
It's a really easy pattern.
LLMs love to try and put things
into multiple Docker containers
and make it more complicated than it needs to be.
This is where it did that to start with.
And I came in and said, no, that's not necessary.
We don't need it.
That's the kind of place
where human involvement is so important.
And it can be hard for people that aren't familiar
with these kinds of architectures.
And you just have to really challenge yourself
to ask the pointed questions of, could this be simpler?
Make sure that it is as simple as possible.
All right, and then how we will be able to start and stop.
And one of the great benefits
of having it all be in one Docker container like this
is also means that should you wish,
we can easily deploy it to the cloud.
We could easily just take this
and put it up there on a hugging face space perhaps,
or even deployed to AWS AppRunner or something like that.
Ways that we cover on my production course,
if you wish to go live with this afterwards.
And then finally, stuff about how we will test it
with unit tests and end-to-end tests.
That is the documentation.
That is the business requirements docs
slightly fleshed out with Claude.
And it is our starting point for the finally project,
a juicy, great big project,
which is gonna feel immensely satisfying
and which as much as possible,
we're gonna try and run it using multiple agents
in controlled chaos.