1
00:00:00,080 --> 00:00:02,960
Well, would you believe this is the penultimate day?

2
00:00:03,000 --> 00:00:06,440
Welcome to the penultimate day of the program.

3
00:00:07,040 --> 00:00:07,800
It's now.

4
00:00:07,840 --> 00:00:10,160
We're in week eight, day four, today and tomorrow.

5
00:00:10,200 --> 00:00:10,800
Still to go.

6
00:00:10,800 --> 00:00:13,680
Today we go into a gigantic AI.

7
00:00:13,840 --> 00:00:19,080
We are going to be understanding how you use tools to orchestrate agents.

8
00:00:19,080 --> 00:00:24,480
And we're going to build a planning agent with an agent loop crucial expertise that you are building.

9
00:00:24,800 --> 00:00:31,280
For those of you that have actually done my agent course, you know all about Agentic AI.

10
00:00:31,440 --> 00:00:36,960
Sometimes it's valuable to approach it this way from first principles, building an agentic framework

11
00:00:36,960 --> 00:00:39,600
ourselves, doing the orchestration ourselves.

12
00:00:39,600 --> 00:00:44,720
This is really helpful and this helps you deeply understand what it means to have agentic AI.

13
00:00:45,040 --> 00:00:52,560
And as you know, it's pretty common to use off the shelf frameworks that do a lot of this for you,

14
00:00:52,600 --> 00:00:55,920
which makes it very quick to get agents up and talking to each other.

15
00:00:55,920 --> 00:00:59,160
But it's great to know how it actually works behind the scenes.

16
00:00:59,160 --> 00:01:00,520
That's what we'll do today.

17
00:01:00,630 --> 00:01:05,990
Now, at the beginning of the week, I defined a genetic AI and gave you some definitions that the modern

18
00:01:05,990 --> 00:01:13,510
one, the most recent one, which is that it's when you have llms equipped with tools, calling tools

19
00:01:13,510 --> 00:01:19,030
in a loop to achieve a goal, llms calling tools in a loop to achieve a goal.

20
00:01:19,190 --> 00:01:26,430
Uh, but when you when you have a AI that that follows these definitions, there are some hallmarks

21
00:01:26,430 --> 00:01:31,670
of what you produce which which you'll notice which which is what's in common between engineered solutions.

22
00:01:32,030 --> 00:01:33,510
And that's what you look out for.

23
00:01:33,670 --> 00:01:39,030
One of them is that typically an AI solution involves breaking a bigger problem into smaller steps,

24
00:01:39,030 --> 00:01:42,510
where those smaller steps are carried out by individual LLM calls.

25
00:01:42,670 --> 00:01:45,150
That's a very common, uh, feature of them.

26
00:01:45,310 --> 00:01:51,190
And this also has that trap I mentioned before, the agentic trap, when people are too quick to divide

27
00:01:51,190 --> 00:01:56,550
up their problem into steps, particularly when they give human like responsibilities to those steps

28
00:01:56,550 --> 00:02:01,060
with, with agent names and, and they haven't done it in order to break a problem down.

29
00:02:01,060 --> 00:02:02,580
They've done it because that's what.

30
00:02:02,620 --> 00:02:04,660
What human roles would be like.

31
00:02:04,700 --> 00:02:07,580
And and that might turn out that that's fine.

32
00:02:07,580 --> 00:02:11,020
But I just do suggest that you start by understanding the problem.

33
00:02:11,020 --> 00:02:14,220
You divide up into smaller LMS in order to solve the problem.

34
00:02:14,220 --> 00:02:17,740
Well, not just because it sounds like that would make a good agent.

35
00:02:18,020 --> 00:02:19,540
Okay, so that's one hallmark.

36
00:02:19,540 --> 00:02:21,460
Another one, of course, is using tools.

37
00:02:21,580 --> 00:02:25,660
Uh, tool calling is really where where I came from.

38
00:02:25,660 --> 00:02:31,700
The idea that you can equip an LM with a tool to carry out some, some extra functionality, and indeed,

39
00:02:31,700 --> 00:02:35,620
what that tool might do is involve calling another LM.

40
00:02:35,740 --> 00:02:37,340
And that's how you have LMS.

41
00:02:37,380 --> 00:02:42,980
Controlling the workflow and calling other LMS and structured outputs is another, another feature.

42
00:02:42,980 --> 00:02:46,380
And you might think that tools and structured outputs are sound like very different things.

43
00:02:46,420 --> 00:02:52,620
Tools equipping LM to to take out actions, structured outputs constraining the output that it comes

44
00:02:52,620 --> 00:02:53,180
up with.

45
00:02:53,420 --> 00:02:55,180
In fact, they're very closely related.

46
00:02:55,380 --> 00:03:00,890
Uh, in for most providers structured outputs is actually implemented through tools.

47
00:03:00,890 --> 00:03:03,850
It's a tool call that generates the structured output.

48
00:03:03,850 --> 00:03:05,050
So that's interesting.

49
00:03:05,450 --> 00:03:11,330
Another way to think of it is that one as an alternative to calling tools, you could just generate

50
00:03:11,330 --> 00:03:12,450
a structured output.

51
00:03:12,450 --> 00:03:16,330
And in that structured output describe what you want to happen next.

52
00:03:16,530 --> 00:03:21,690
So in fact, even though tools and structured outputs sound like they're very different things, they're

53
00:03:21,690 --> 00:03:25,210
quite closely related and they're almost analogous kind of concepts.

54
00:03:25,330 --> 00:03:30,730
Um, but both of them together are hallmarks of an agentic AI solution.

55
00:03:30,730 --> 00:03:38,770
And then an agent environment, something which is sort of a construct around your agents that allows

56
00:03:38,770 --> 00:03:43,610
them to communicate with each other in some way, pass information, or have information in common between

57
00:03:43,610 --> 00:03:44,010
them.

58
00:03:44,130 --> 00:03:46,330
That is a hallmark of an agentic solution.

59
00:03:46,410 --> 00:03:52,050
It's very common, uh, and it's something that we will we will create ourselves homegrown.

60
00:03:52,050 --> 00:03:57,050
But if you use an agent framework, of course, it sort of comes with that, that kind of construct

61
00:03:57,610 --> 00:04:00,120
and then a planning Agent.

62
00:04:00,280 --> 00:04:06,360
Typically, it's another LM call that is able to decide what's going to happen when.

63
00:04:06,680 --> 00:04:10,120
In in simple agent solutions, this can just be a workflow.

64
00:04:10,120 --> 00:04:17,160
It could just be Python code that orchestrates what happens when, uh, and in more advanced agent solutions

65
00:04:17,160 --> 00:04:22,320
like the one we'll do, it can be something where it is an LM call that has tools, and those tools

66
00:04:22,320 --> 00:04:24,320
allow it to call other agents.

67
00:04:24,320 --> 00:04:27,440
Or it could be an LM call that generates structured outputs.

68
00:04:27,440 --> 00:04:31,720
And the structured outputs describe what should happen when either of those would work.

69
00:04:32,600 --> 00:04:36,160
And then finally, and this one is perhaps the gooiest of them.

70
00:04:36,200 --> 00:04:38,720
The one that is the most ill defined.

71
00:04:38,920 --> 00:04:46,120
Is this the sort of idea of autonomy, a sense that this solution is a solution that isn't just a chat

72
00:04:46,120 --> 00:04:48,960
with a user, it's not just an AI assistant.

73
00:04:48,960 --> 00:04:53,880
It's something that has some kind of persistence beyond that, that construct of just a chat with a

74
00:04:53,880 --> 00:04:54,320
user.

75
00:04:54,480 --> 00:05:01,070
Uh, and uh, yeah, it's got some sort of memory that transcends one interaction that gives you a sense

76
00:05:01,110 --> 00:05:03,910
you've got an authentic AI, uh, platform.

77
00:05:03,910 --> 00:05:09,550
It seems to persist, and you can imagine the thing we're about to build that's going to be able to

78
00:05:09,590 --> 00:05:15,590
to send push notifications every so often, whenever it feels like it, in a way that's going to have

79
00:05:15,590 --> 00:05:17,510
that sense of autonomy and memory.

80
00:05:17,510 --> 00:05:24,350
It's something which which which is able to carry out tasks in the background and then sort of proactively

81
00:05:24,350 --> 00:05:26,430
reach out to us with an answer.

82
00:05:26,430 --> 00:05:30,750
That kind of thing is like a hallmark, and it's probably the least well defined of them.

83
00:05:30,750 --> 00:05:33,630
So this gives you a sense of what it means to be agentic.

84
00:05:33,630 --> 00:05:39,390
We, of course, are going to tick all of these boxes in our Agentic platform, uh, and, uh, and,

85
00:05:39,430 --> 00:05:44,190
but you'll, you'll generally see that platforms are described as agentic if they tick any of these

86
00:05:44,190 --> 00:05:44,910
boxes.

87
00:05:44,910 --> 00:05:48,070
The term is a very, uh, broad term that can apply.

88
00:05:48,070 --> 00:05:52,590
It's an umbrella term that can apply to any of these kinds of solutions, but for sure, you'll find

89
00:05:52,590 --> 00:05:57,790
people that will be more have a stricter definition and will say that it's only agentic if there is

90
00:05:57,990 --> 00:06:01,620
a clearly an agent loop that could keep going forever.

91
00:06:01,620 --> 00:06:04,620
Something that's more of a Claud code kind of experience.

92
00:06:04,940 --> 00:06:07,340
And we get pretty close to that with what we're building as well.

93
00:06:07,580 --> 00:06:07,980
All right.

94
00:06:07,980 --> 00:06:10,820
And to remind you, what is the thing that we're building?

95
00:06:10,980 --> 00:06:16,300
Well, you'll remember, there's a scanner agent that we built yesterday that is able to identify promising

96
00:06:16,300 --> 00:06:17,020
deals.

97
00:06:17,020 --> 00:06:23,380
And of course, our scanner agent uses structured outputs to turn, uh, the unstructured data scraped

98
00:06:23,380 --> 00:06:28,820
from the internet and from RSS feeds into something that is a pedantic object that's populated with

99
00:06:28,820 --> 00:06:30,300
deal information and a price.

100
00:06:30,740 --> 00:06:36,660
There's the ensemble agent that estimates the true value of something based only on its description.

101
00:06:36,660 --> 00:06:37,140
It does.

102
00:06:37,180 --> 00:06:43,060
It does a pre-process to rewrite it in a format that is, that is more ready for models.

103
00:06:43,180 --> 00:06:46,060
And then, of course, it's going to call a bunch of other models.

104
00:06:46,060 --> 00:06:50,820
And we have a messaging agent that will write a hype message using Claude for sonnet.

105
00:06:50,820 --> 00:06:53,580
And then we'll send a push notification using pushover.

106
00:06:53,860 --> 00:06:57,900
And behind that ensemble agent, we have, of course, the specialist agent.

107
00:06:57,900 --> 00:06:58,900
And where's that running?

108
00:06:58,970 --> 00:06:59,610
It's running on.

109
00:07:00,770 --> 00:07:05,890
And we've got a frontier agent that is using the Rag processor.

110
00:07:05,930 --> 00:07:10,210
It's encoding the text of the the thing we're trying to price.

111
00:07:10,370 --> 00:07:12,650
It looks up similar products in chroma.

112
00:07:12,650 --> 00:07:16,530
And it's then making a call to GPT five one with all that information.

113
00:07:16,530 --> 00:07:18,010
And it does really well at it.

114
00:07:18,290 --> 00:07:22,930
And then we've got a neural network agent that is estimating prices using a deep neural network from

115
00:07:22,930 --> 00:07:23,690
week six.

116
00:07:24,250 --> 00:07:28,330
Today we're going to be building the planning agent that coordinates activities across these.

117
00:07:28,370 --> 00:07:32,890
And it's going to do it because we're going to give it three tools, a tool that will allow it to call

118
00:07:32,890 --> 00:07:37,490
each of those three steps, three agents to the right as far as it's concerned.

119
00:07:37,530 --> 00:07:38,290
They're just tools.

120
00:07:38,290 --> 00:07:39,930
It doesn't know that it's an LLM.

121
00:07:39,970 --> 00:07:42,610
It just thinks of it as three different tools it can call.

122
00:07:42,650 --> 00:07:44,730
Much like the tools we built in week two.

123
00:07:45,010 --> 00:07:48,770
And then tomorrow we're going to finish off with the agent framework and the UI.

124
00:07:49,130 --> 00:07:52,090
And it's going to be uh, it's going to be terrific.

125
00:07:52,090 --> 00:07:54,770
That's going to be the epic finale.

126
00:07:55,170 --> 00:07:57,330
Uh, but for now let's go to cursor.

127
00:07:57,370 --> 00:07:59,610
Let's build ourselves a planning agent.