1
00:00:00,240 --> 00:00:03,440
Okay, so let's close the terminal.

2
00:00:03,680 --> 00:00:05,480
Come into financial researcher.

3
00:00:05,680 --> 00:00:06,600
You know the deal.

4
00:00:06,600 --> 00:00:08,760
Now there is a source folder.

5
00:00:08,760 --> 00:00:10,120
It has a config.

6
00:00:10,520 --> 00:00:12,040
And that is where we want to begin.

7
00:00:12,040 --> 00:00:15,600
We want to begin by looking at our agents.

8
00:00:15,800 --> 00:00:17,440
So this is the agents.

9
00:00:17,440 --> 00:00:21,440
And we are in fact also we're going to have a researcher agent.

10
00:00:21,640 --> 00:00:27,760
And we're going to make this a bit shorter and just have an analyst agent, a researcher agent and an

11
00:00:27,800 --> 00:00:28,840
analyst agent.

12
00:00:28,840 --> 00:00:30,160
So what are they going to do?

13
00:00:30,440 --> 00:00:37,880
So this time I'm going to to simply copy and paste a whole new section here and talk it through with

14
00:00:37,880 --> 00:00:38,360
you.

15
00:00:38,360 --> 00:00:43,760
So the role is going to be a senior financial researcher for a company that we will specify in the inputs

16
00:00:43,800 --> 00:00:49,640
like before, it's going to research that company news and potential for that company.

17
00:00:50,040 --> 00:00:50,840
The backstory.

18
00:00:50,880 --> 00:00:55,920
You're a seasoned financial researcher with a talent for finding the most relevant information about

19
00:00:55,920 --> 00:01:02,090
a company known for your ability to find the most relevant information, present it in a clear and concise

20
00:01:02,130 --> 00:01:02,850
manner.

21
00:01:02,850 --> 00:01:07,290
And that's where we specify the LLM, which we can we can mix this up if we wish.

22
00:01:07,730 --> 00:01:13,330
And we now choose to have our second second agent, the analyst.

23
00:01:13,330 --> 00:01:15,330
Let me put in what I've got here.

24
00:01:15,770 --> 00:01:19,730
Market analyst and report writer focused on a company.

25
00:01:20,010 --> 00:01:24,650
You analyze the company and you create a comprehensive, well structured report that represents insights

26
00:01:24,650 --> 00:01:26,290
in a clear and engaging way.

27
00:01:26,930 --> 00:01:32,810
Meticulous, skilled analyst with a background in financial analysis and company research, a talent,

28
00:01:32,850 --> 00:01:40,290
etc., etc. it's interesting that this construct of having us tell the back story, it really does encourage

29
00:01:40,290 --> 00:01:41,330
better prompting.

30
00:01:41,330 --> 00:01:46,730
If I were just writing a system prompt instructions as we did last week, I probably wouldn't think

31
00:01:46,730 --> 00:01:53,090
through expressing myself this way in terms of using a word like meticulous and meaningful insights

32
00:01:53,090 --> 00:01:53,850
and so on.

33
00:01:53,930 --> 00:01:55,290
So it is helpful.

34
00:01:55,330 --> 00:02:00,870
Putting us through the discipline of having to give a backstory, helps give more context, and helps

35
00:02:00,870 --> 00:02:06,670
make sure that we're going to get the best outputs, the best outcomes from running the LM.

36
00:02:07,470 --> 00:02:08,470
All right.

37
00:02:08,670 --> 00:02:13,310
So with this, let's now talk about our tasks.

38
00:02:14,470 --> 00:02:15,150
Okay.

39
00:02:15,270 --> 00:02:17,510
So we're moving over to tasks.

40
00:02:17,510 --> 00:02:23,190
And we are going to have a research task and an analysis task.

41
00:02:23,310 --> 00:02:26,190
So it's not too different to the the boilerplate one.

42
00:02:26,190 --> 00:02:28,630
But we are going to do a little bit more work here.

43
00:02:28,830 --> 00:02:33,830
So for the research task going to really spell out what it is that we want this task to involve.

44
00:02:34,110 --> 00:02:37,190
Conduct thorough research on this company.

45
00:02:37,230 --> 00:02:43,510
Focus on the current status and health, the historical performance challenges and opportunities, recent

46
00:02:43,550 --> 00:02:46,710
news, future outlook, potential development.

47
00:02:47,150 --> 00:02:52,590
Make sure to organize your findings in a structured format with clear sections, and then the expected

48
00:02:52,590 --> 00:02:57,920
output is a bit repetitive, but it says what we want the well-defined sections and we again mention

49
00:02:57,920 --> 00:02:59,120
the input the company.

50
00:02:59,680 --> 00:03:03,040
And that is going to be assigned to the researcher.

51
00:03:03,560 --> 00:03:04,120
Okay.

52
00:03:04,320 --> 00:03:06,120
And the analysis task.

53
00:03:06,160 --> 00:03:07,880
Now you'll notice there's no output file there.

54
00:03:07,880 --> 00:03:09,960
So you might be thinking what what's going on here.

55
00:03:10,080 --> 00:03:10,640
Well let's see.

56
00:03:10,680 --> 00:03:15,480
Now let's give this a description that is going to be quite detailed.

57
00:03:15,520 --> 00:03:21,600
Again analyze the research findings and create a comprehensive report.

58
00:03:22,040 --> 00:03:23,560
The report should.

59
00:03:23,600 --> 00:03:25,440
And then we have the different sections in the report.

60
00:03:25,480 --> 00:03:32,120
Executive summary information insights market outlook and be formatted in a professional style.

61
00:03:32,560 --> 00:03:36,400
And for the expected output will again be a bit repetitive here.

62
00:03:36,600 --> 00:03:39,280
There's never a harm in being repetitive.

63
00:03:39,840 --> 00:03:48,160
Polished professional report on the company representing the research findings and the agent that we

64
00:03:48,160 --> 00:03:49,720
want to mention here.

65
00:03:49,760 --> 00:03:52,320
Of course should be the research.

66
00:03:53,040 --> 00:03:55,400
This is the the sorry the agent is the analyst.

67
00:03:55,530 --> 00:03:57,810
That's the agent that we that we made for the analysis task.

68
00:03:57,850 --> 00:03:58,370
Of course.

69
00:03:59,170 --> 00:03:59,650
Okay.

70
00:03:59,690 --> 00:04:02,210
So there's a few more things that we want to add here.

71
00:04:02,570 --> 00:04:11,450
We want to make sure that the output from the research task is included as part of the analysis task.

72
00:04:11,650 --> 00:04:14,330
And crew gives us a super easy way to do that.

73
00:04:14,370 --> 00:04:16,330
You just type context.

74
00:04:16,610 --> 00:04:21,090
And yes, of course cursor tells us what to do by saying that context.

75
00:04:21,090 --> 00:04:23,210
Context can take a list like this.

76
00:04:23,210 --> 00:04:28,810
And we are giving the research task as part of the context that's needed for the analysis task.

77
00:04:28,890 --> 00:04:35,450
And just with that simple step, we ensure continuity and we ensure that the output is included in the

78
00:04:35,450 --> 00:04:36,530
research task.

79
00:04:36,890 --> 00:04:40,250
And then finally we are going to have an output file for this.

80
00:04:40,570 --> 00:04:46,330
And we're going to let's let's call that report.md in the output directory.

81
00:04:46,330 --> 00:04:48,050
That seems fine.

82
00:04:48,770 --> 00:04:49,290
Okay.

83
00:04:49,330 --> 00:04:52,330
And now to the all important crew dot I.

84
00:04:52,530 --> 00:04:55,510
And here we have as usual, some gunk.

85
00:04:55,670 --> 00:04:58,270
We have the financial researcher I am.

86
00:04:58,270 --> 00:04:59,430
I'm going to be bold here.

87
00:04:59,430 --> 00:05:01,790
I'm obviously I'm going to leave in oops.

88
00:05:02,190 --> 00:05:03,270
Say that and I delete it.

89
00:05:03,670 --> 00:05:07,950
I'm going to leave in the config file that we want.

90
00:05:08,190 --> 00:05:10,990
And I am just going to delete everything else.

91
00:05:10,990 --> 00:05:12,510
And then we're just going to rewrite it.

92
00:05:12,510 --> 00:05:13,470
You want me to rewrite.

93
00:05:13,470 --> 00:05:17,150
Well we're going to rewrite this entire file right now okay.

94
00:05:17,190 --> 00:05:18,350
So what do we want here.

95
00:05:18,350 --> 00:05:19,710
We want an agent.

96
00:05:19,910 --> 00:05:22,230
So we put in the decorator for agent.

97
00:05:22,550 --> 00:05:25,070
And uh let's see.

98
00:05:25,110 --> 00:05:26,950
Well let's just press tab and see what we get.

99
00:05:26,990 --> 00:05:29,150
We want an agent that is the researcher.

100
00:05:29,150 --> 00:05:29,950
That's correct.

101
00:05:29,950 --> 00:05:32,510
We probably want to say verbose is true.

102
00:05:32,830 --> 00:05:33,630
There we go.

103
00:05:33,950 --> 00:05:38,070
And then we also want an agent that's called the analyst.

104
00:05:38,510 --> 00:05:45,910
And that is going to be an agent that is going to what's happening all over the place.

105
00:05:45,910 --> 00:05:46,190
Sorry.

106
00:05:46,190 --> 00:05:50,830
This is an agent and this should be an analyst.

107
00:05:51,630 --> 00:05:54,080
And now we're getting help from cursor.

108
00:05:54,080 --> 00:05:55,360
That all looks great.

109
00:05:55,560 --> 00:05:58,480
Okay, so now we want to have a couple of tasks.

110
00:05:58,480 --> 00:06:02,200
So we want to have a task that is called the research task.

111
00:06:02,200 --> 00:06:03,120
That sounds right.

112
00:06:03,120 --> 00:06:07,920
It's going to be a task that is going to the research task.

113
00:06:07,920 --> 00:06:08,920
That's perfect.

114
00:06:09,680 --> 00:06:13,560
And the analysis task that looks good to me as well.

115
00:06:13,920 --> 00:06:15,960
So all is well.

116
00:06:16,280 --> 00:06:19,920
And now we want the crew and yes thank you.

117
00:06:19,960 --> 00:06:21,320
Very nice cursor.

118
00:06:21,320 --> 00:06:22,960
It's filling it all in for us.

119
00:06:22,960 --> 00:06:31,240
We want the process to be the process sequential and verbose to be true.

120
00:06:31,440 --> 00:06:33,480
Crew cursor is faster than me.

121
00:06:33,520 --> 00:06:35,520
I'm playing catch up here but that is perfect.

122
00:06:35,520 --> 00:06:38,520
So remember self dot agent is populated.

123
00:06:38,560 --> 00:06:38,720
Sorry.

124
00:06:38,760 --> 00:06:46,600
Self dot agents is populated because we have agent decorators around our agent functions methods and

125
00:06:46,640 --> 00:06:50,200
then tasks is also decorated here.

126
00:06:50,200 --> 00:06:53,260
So everything looks great to me.

127
00:06:54,140 --> 00:07:01,900
Okay, now we go to Maine, and I think, again, we're going to want to, uh, delete all of this and

128
00:07:01,900 --> 00:07:02,500
start again.

129
00:07:02,500 --> 00:07:04,620
And I will type it for you manually.

130
00:07:05,300 --> 00:07:05,940
Okay.

131
00:07:05,940 --> 00:07:06,820
Here we go.

132
00:07:07,020 --> 00:07:09,540
So we're going to delete the gunk.

133
00:07:09,900 --> 00:07:14,020
We are going to delete everything but just only leave in run.

134
00:07:14,020 --> 00:07:15,300
That's going to be it.

135
00:07:15,340 --> 00:07:15,860
Okay.

136
00:07:15,900 --> 00:07:19,460
So run the researcher crew.

137
00:07:19,820 --> 00:07:26,660
Isn't it amazing that cursor realized knows that our input is a company that that inputs.

138
00:07:26,700 --> 00:07:31,420
We did indeed just have company as the templated curly braces thing.

139
00:07:31,460 --> 00:07:32,620
Just in case you don't know what I mean.

140
00:07:32,620 --> 00:07:34,300
I mean, we have this right here.

141
00:07:34,340 --> 00:07:38,660
Company is the one input that needs to go in to our YAML.

142
00:07:38,940 --> 00:07:46,260
And if we go back to main, then automatically cursor realized that we needed to set company and populated

143
00:07:46,260 --> 00:07:46,780
it there.

144
00:07:47,140 --> 00:07:47,660
All right.

145
00:07:47,660 --> 00:07:53,190
Then we're going to say yeah Result is the financial researcher.

146
00:07:55,790 --> 00:07:57,910
And that all looks great to me.

147
00:07:57,910 --> 00:07:59,830
And then we're going to print the results.

148
00:08:00,310 --> 00:08:00,790
Thank you.

149
00:08:00,830 --> 00:08:01,430
Cursor.

150
00:08:01,630 --> 00:08:03,550
And that's really it.

151
00:08:04,070 --> 00:08:05,670
I think that's all we need.

152
00:08:05,910 --> 00:08:08,310
Now you might be thinking hey, didn't we set up Serpa?

153
00:08:08,310 --> 00:08:09,630
Are we not going to use that for something?

154
00:08:09,670 --> 00:08:11,150
We are going to use it for something.

155
00:08:11,150 --> 00:08:12,550
But all in good time.

156
00:08:12,590 --> 00:08:18,310
Let's first just try running this without making any any proper Google lookup and see what happens.

157
00:08:19,190 --> 00:08:22,790
Okay, well, just before we run it, let's let's change the models.

158
00:08:22,790 --> 00:08:27,710
Let's give ourselves some more interesting models to experiment with for our researcher.

159
00:08:27,750 --> 00:08:29,590
Let's go with deep seek.

160
00:08:30,150 --> 00:08:32,870
Now of course you could do whatever models you would like here.

161
00:08:32,870 --> 00:08:33,590
This should be deep.

162
00:08:33,630 --> 00:08:34,230
Seek chat.

163
00:08:34,230 --> 00:08:35,910
That'll be the right one for us to use.

164
00:08:36,230 --> 00:08:38,350
And you could stick with OpenAI.

165
00:08:38,390 --> 00:08:42,310
Or you could use a different model, or use a llama and run it locally if you wish.

166
00:08:42,630 --> 00:08:46,550
I will try a grok model for this one.

167
00:08:46,990 --> 00:08:50,400
Let's use this this here llama three 370 billion.

168
00:08:50,440 --> 00:08:51,160
Versatile.

169
00:08:51,160 --> 00:08:55,440
That's one of the most powerful open source models from from meta.

170
00:08:55,640 --> 00:08:58,840
And we'll use that via grok the high performance inference.

171
00:08:58,840 --> 00:09:05,720
You can also run something locally like use a llama to to run llama 3.21 million or 3 billion version

172
00:09:05,720 --> 00:09:06,320
of it.

173
00:09:06,760 --> 00:09:09,920
So that's just a mix up the models to try something a bit different.

174
00:09:09,920 --> 00:09:15,440
And now let's go and open up a new one of these guys a new terminal.

175
00:09:15,440 --> 00:09:16,960
Let's make it nice and big.

176
00:09:17,440 --> 00:09:22,680
And we will go into project or folder number three for crew.

177
00:09:22,840 --> 00:09:25,920
We will go into our financial researcher.

178
00:09:25,920 --> 00:09:31,920
And you remember we type crew I run to kick this off and we'll see what happens.

179
00:09:32,600 --> 00:09:38,720
It's thinking now I will tell you that uh, you'll see, by the way, that the agent has been assigned

180
00:09:38,720 --> 00:09:40,920
the task financial researcher for Tesla.

181
00:09:40,960 --> 00:09:48,140
That shows how that those inputs, those parameters automatically got set as the, the, uh, the agents,

182
00:09:48,180 --> 00:09:48,980
uh, roll.

183
00:09:49,300 --> 00:09:53,020
Now, I'll tell you that the deep sea takes takes its time over this.

184
00:09:53,060 --> 00:09:58,740
It takes a good 30s, I guess, because it's producing quite comprehensive research as part of this.

185
00:09:58,740 --> 00:10:00,620
So we will allow it to do its thing.

186
00:10:00,620 --> 00:10:03,900
Maybe next time we should have them both be grok so that it's nice and fast.

187
00:10:04,180 --> 00:10:05,540
But it's going through.

188
00:10:05,660 --> 00:10:10,740
It's, uh, we've gone off to deep sea guys servers where it is.

189
00:10:10,940 --> 00:10:19,220
The 671 billion parameter model is busy at work, and once it's finished, we're then going to flip

190
00:10:19,260 --> 00:10:26,620
across to our other agent, and our other agent will use grok running in the cloud a 70 billion meta

191
00:10:26,620 --> 00:10:27,180
model.

192
00:10:27,340 --> 00:10:31,340
And then we should get our financial report on Tesla at the end of it.

193
00:10:31,340 --> 00:10:31,980
Here it is.

194
00:10:32,020 --> 00:10:33,980
Grok was so quick we didn't even see it.

195
00:10:34,420 --> 00:10:38,100
There's uh the grok taking the task and completing it.

196
00:10:38,140 --> 00:10:40,100
Here is the result.

197
00:10:40,140 --> 00:10:42,900
Our financial report on Tesla.

198
00:10:42,940 --> 00:10:44,620
It all looks great.

199
00:10:44,660 --> 00:10:46,100
Wasn't that easy?