Well, would you believe this is the penultimate day?
Welcome to the penultimate day of the program.
It's now.
We're in week eight, day four, today and tomorrow.
Still to go.
Today we go into a gigantic AI.
We are going to be understanding how you use tools to orchestrate agents.
And we're going to build a planning agent with an agent loop crucial expertise that you are building.
For those of you that have actually done my agent course, you know all about Agentic AI.
Sometimes it's valuable to approach it this way from first principles, building an agentic framework
ourselves, doing the orchestration ourselves.
This is really helpful and this helps you deeply understand what it means to have agentic AI.
And as you know, it's pretty common to use off the shelf frameworks that do a lot of this for you,
which makes it very quick to get agents up and talking to each other.
But it's great to know how it actually works behind the scenes.
That's what we'll do today.
Now, at the beginning of the week, I defined a genetic AI and gave you some definitions that the modern
one, the most recent one, which is that it's when you have llms equipped with tools, calling tools
in a loop to achieve a goal, llms calling tools in a loop to achieve a goal.
Uh, but when you when you have a AI that that follows these definitions, there are some hallmarks
of what you produce which which you'll notice which which is what's in common between engineered solutions.
And that's what you look out for.
One of them is that typically an AI solution involves breaking a bigger problem into smaller steps,
where those smaller steps are carried out by individual LLM calls.
That's a very common, uh, feature of them.
And this also has that trap I mentioned before, the agentic trap, when people are too quick to divide
up their problem into steps, particularly when they give human like responsibilities to those steps
with, with agent names and, and they haven't done it in order to break a problem down.
They've done it because that's what.
What human roles would be like.
And and that might turn out that that's fine.
But I just do suggest that you start by understanding the problem.
You divide up into smaller LMS in order to solve the problem.
Well, not just because it sounds like that would make a good agent.
Okay, so that's one hallmark.
Another one, of course, is using tools.
Uh, tool calling is really where where I came from.
The idea that you can equip an LM with a tool to carry out some, some extra functionality, and indeed,
what that tool might do is involve calling another LM.
And that's how you have LMS.
Controlling the workflow and calling other LMS and structured outputs is another, another feature.
And you might think that tools and structured outputs are sound like very different things.
Tools equipping LM to to take out actions, structured outputs constraining the output that it comes
up with.
In fact, they're very closely related.
Uh, in for most providers structured outputs is actually implemented through tools.
It's a tool call that generates the structured output.
So that's interesting.
Another way to think of it is that one as an alternative to calling tools, you could just generate
a structured output.
And in that structured output describe what you want to happen next.
So in fact, even though tools and structured outputs sound like they're very different things, they're
quite closely related and they're almost analogous kind of concepts.
Um, but both of them together are hallmarks of an agentic AI solution.
And then an agent environment, something which is sort of a construct around your agents that allows
them to communicate with each other in some way, pass information, or have information in common between
them.
That is a hallmark of an agentic solution.
It's very common, uh, and it's something that we will we will create ourselves homegrown.
But if you use an agent framework, of course, it sort of comes with that, that kind of construct
and then a planning Agent.
Typically, it's another LM call that is able to decide what's going to happen when.
In in simple agent solutions, this can just be a workflow.
It could just be Python code that orchestrates what happens when, uh, and in more advanced agent solutions
like the one we'll do, it can be something where it is an LM call that has tools, and those tools
allow it to call other agents.
Or it could be an LM call that generates structured outputs.
And the structured outputs describe what should happen when either of those would work.
And then finally, and this one is perhaps the gooiest of them.
The one that is the most ill defined.
Is this the sort of idea of autonomy, a sense that this solution is a solution that isn't just a chat
with a user, it's not just an AI assistant.
It's something that has some kind of persistence beyond that, that construct of just a chat with a
user.
Uh, and uh, yeah, it's got some sort of memory that transcends one interaction that gives you a sense
you've got an authentic AI, uh, platform.
It seems to persist, and you can imagine the thing we're about to build that's going to be able to
to send push notifications every so often, whenever it feels like it, in a way that's going to have
that sense of autonomy and memory.
It's something which which which is able to carry out tasks in the background and then sort of proactively
reach out to us with an answer.
That kind of thing is like a hallmark, and it's probably the least well defined of them.
So this gives you a sense of what it means to be agentic.
We, of course, are going to tick all of these boxes in our Agentic platform, uh, and, uh, and,
but you'll, you'll generally see that platforms are described as agentic if they tick any of these
boxes.
The term is a very, uh, broad term that can apply.
It's an umbrella term that can apply to any of these kinds of solutions, but for sure, you'll find
people that will be more have a stricter definition and will say that it's only agentic if there is
a clearly an agent loop that could keep going forever.
Something that's more of a Claud code kind of experience.
And we get pretty close to that with what we're building as well.
All right.
And to remind you, what is the thing that we're building?
Well, you'll remember, there's a scanner agent that we built yesterday that is able to identify promising
deals.
And of course, our scanner agent uses structured outputs to turn, uh, the unstructured data scraped
from the internet and from RSS feeds into something that is a pedantic object that's populated with
deal information and a price.
There's the ensemble agent that estimates the true value of something based only on its description.
It does.
It does a pre-process to rewrite it in a format that is, that is more ready for models.
And then, of course, it's going to call a bunch of other models.
And we have a messaging agent that will write a hype message using Claude for sonnet.
And then we'll send a push notification using pushover.
And behind that ensemble agent, we have, of course, the specialist agent.
And where's that running?
It's running on.
And we've got a frontier agent that is using the Rag processor.
It's encoding the text of the the thing we're trying to price.
It looks up similar products in chroma.
And it's then making a call to GPT five one with all that information.
And it does really well at it.
And then we've got a neural network agent that is estimating prices using a deep neural network from
week six.
Today we're going to be building the planning agent that coordinates activities across these.
And it's going to do it because we're going to give it three tools, a tool that will allow it to call
each of those three steps, three agents to the right as far as it's concerned.
They're just tools.
It doesn't know that it's an LLM.
It just thinks of it as three different tools it can call.
Much like the tools we built in week two.
And then tomorrow we're going to finish off with the agent framework and the UI.
And it's going to be uh, it's going to be terrific.
That's going to be the epic finale.
Uh, but for now let's go to cursor.
Let's build ourselves a planning agent.