1
00:00:00,080 --> 00:00:02,960
Would you believe it's already day five of week four?

2
00:00:03,000 --> 00:00:06,760
Here we are completing our sidekick project.

3
00:00:06,760 --> 00:00:07,800
I'm so happy!

4
00:00:07,800 --> 00:00:11,440
I love this project and I'm now such a fan of Landgraf.

5
00:00:11,480 --> 00:00:16,400
Over the course of the week, uh, we're going to be talking today about tools, tools and more tools

6
00:00:16,400 --> 00:00:21,240
we're going to be building in, uh, the same tool that we know and love already about searching the

7
00:00:21,240 --> 00:00:27,600
web, not navigating a browser, but doing the web search, uh, using the Serp API that we've used

8
00:00:27,600 --> 00:00:28,080
before.

9
00:00:28,200 --> 00:00:30,400
We're going to send push notifications because why not?

10
00:00:30,440 --> 00:00:31,400
We know how to do that.

11
00:00:31,400 --> 00:00:36,640
We're also going to add a tool to use the file system to be able to write files, so that we can have

12
00:00:36,800 --> 00:00:43,040
our operator agent that we're building our, our coworker that we have with our sidekick be able to

13
00:00:43,080 --> 00:00:45,720
read and write files from the file system.

14
00:00:45,720 --> 00:00:49,840
We're going to have it have access to Wikipedia so that it can look things up.

15
00:00:50,040 --> 00:00:54,000
And we're even going to give it the ability to run Python code itself.

16
00:00:54,000 --> 00:00:56,320
Not not in a Docker container like we did before.

17
00:00:56,360 --> 00:00:59,480
This time it's just going to have the ability to execute some Python.

18
00:00:59,640 --> 00:01:06,840
And so we're really giving it unfettered access to do things on our machine while we watch and while

19
00:01:06,840 --> 00:01:07,790
we monitor.

20
00:01:08,350 --> 00:01:09,990
And that leads me to a big point.

21
00:01:10,190 --> 00:01:14,870
Uh, the sidekick app that we're about to build is an experimental app.

22
00:01:14,910 --> 00:01:21,310
It's something for you to work with and to monitor and watch and use it for your own purposes.

23
00:01:21,310 --> 00:01:27,390
This is this is an app for commercial purposes for you, for you to be able to get more and do more

24
00:01:27,430 --> 00:01:29,670
with an AI agent at your side.

25
00:01:29,830 --> 00:01:32,670
But in doing so, it doesn't have guardrails.

26
00:01:32,670 --> 00:01:36,310
It's something which is, uh, open to the wild.

27
00:01:36,310 --> 00:01:39,630
And as such, it needs to be treated with some caution.

28
00:01:39,630 --> 00:01:41,390
And that's the first thing I want to say.

29
00:01:41,590 --> 00:01:44,230
Use sidekick at your own risk.

30
00:01:44,230 --> 00:01:49,270
If you're not comfortable with this, if you're not sure about the technologies behind it and so on,

31
00:01:49,310 --> 00:01:53,310
then please do remove the Python Repl tool that we'll we'll add.

32
00:01:53,310 --> 00:01:59,910
You should remove it and even remove the online navigation tools until you're, you're comfortable with

33
00:01:59,910 --> 00:02:00,390
what's going on.

34
00:02:00,390 --> 00:02:01,470
And you can watch it.

35
00:02:01,470 --> 00:02:05,230
This is an agent that we are allowing to roam free.

36
00:02:05,270 --> 00:02:10,510
Now of course when it's using the browser it's using it's using chromium, the open source version of

37
00:02:10,510 --> 00:02:10,870
Chrome.

38
00:02:10,870 --> 00:02:16,970
And it doesn't have access to any of our cookies or any of our passwords in a password manager or something

39
00:02:16,970 --> 00:02:17,450
like that.

40
00:02:17,450 --> 00:02:22,970
So it's not able to do anything like log in or it doesn't have access to credit cards and so on.

41
00:02:22,970 --> 00:02:27,770
And the file manager is is within a certain directory, so it can't roam free on your computer.

42
00:02:27,810 --> 00:02:30,170
The Python wrapper is that's pretty open.

43
00:02:30,170 --> 00:02:34,770
It can run any Python it wants, which would allow it potentially to write something that could that

44
00:02:34,770 --> 00:02:36,810
could do uh, do some damage.

45
00:02:36,970 --> 00:02:39,210
Uh, so you could remove that if you're, if you're concerned.

46
00:02:39,210 --> 00:02:41,450
But it does seem extremely unlikely.

47
00:02:41,450 --> 00:02:43,450
But nonetheless you need to be comfortable with it.

48
00:02:43,450 --> 00:02:46,330
You need to do it at your own risk please.

49
00:02:46,890 --> 00:02:50,890
The the other thing I want to say is that the sidekick app is a starting point.

50
00:02:50,930 --> 00:02:52,370
See it as a canvas.

51
00:02:52,490 --> 00:02:57,810
I've built something up with some prompts and some tools, and I've discovered that I can make it do

52
00:02:57,810 --> 00:02:58,650
great things for me.

53
00:02:58,690 --> 00:03:04,810
It actually did some work for me, some real work, some commercial work that I needed to do, and it

54
00:03:04,810 --> 00:03:08,730
did it for me and produced a report and it was something that I used.

55
00:03:08,730 --> 00:03:09,170
So.

56
00:03:09,170 --> 00:03:10,250
So it works.

57
00:03:10,530 --> 00:03:11,490
It really works.

58
00:03:11,490 --> 00:03:17,770
And it can deliver commercial benefit for you and be your own sidekick, let alone building it for other

59
00:03:17,770 --> 00:03:18,290
people.

60
00:03:18,610 --> 00:03:20,330
Uh, so see it that way.

61
00:03:20,440 --> 00:03:22,600
But you need to see it as this canvas.

62
00:03:22,600 --> 00:03:26,320
It's something which you need to to make suitable for yourself.

63
00:03:26,320 --> 00:03:30,240
You need to put in the sorts of tools and give it the kind of prompting you need.

64
00:03:30,280 --> 00:03:35,120
When I use it, I find that it sometimes goes awry, and I need to improve my prompts and make various

65
00:03:35,120 --> 00:03:36,960
changes to it to keep it on track.

66
00:03:36,960 --> 00:03:37,960
And that's what you have to do.

67
00:03:38,000 --> 00:03:42,320
It will require experimentation, and if you do so, it will pay dividends.

68
00:03:42,320 --> 00:03:43,720
And that's my final point.

69
00:03:43,720 --> 00:03:45,560
There's so much opportunity with this.

70
00:03:45,560 --> 00:03:47,840
This really unleashes a gigantic eye.

71
00:03:48,120 --> 00:03:51,400
But this is like it's like you're building your own madness.

72
00:03:51,400 --> 00:03:55,880
If you find if you find agents like, like madness from the Chinese startup that that was able to do

73
00:03:55,880 --> 00:04:02,040
things like hunt for good, rent in apartments and build websites and things, this is like your very

74
00:04:02,040 --> 00:04:07,520
own one that you are building and you are controlling and so you can make it do great things.

75
00:04:07,680 --> 00:04:13,200
Um, but it requires effort put into it to and it will, it will take some investment of your time and

76
00:04:13,200 --> 00:04:14,400
experimentation.

77
00:04:14,400 --> 00:04:17,680
And so I see that see it that way, the good and the bad.

78
00:04:17,720 --> 00:04:19,160
It's a it's a canvas.

79
00:04:19,160 --> 00:04:22,240
It's not a completed product, but there's so much potential.

80
00:04:22,560 --> 00:04:23,560
Well let's get to it.

81
00:04:23,560 --> 00:04:31,100
Here we are in uh, in Cursa, we're looking at, week four, of course, and now we're going to Python

82
00:04:31,100 --> 00:04:35,260
modules, which I know will please some people, but I'm not going to be typing code, but it's going

83
00:04:35,260 --> 00:04:37,660
to be looking at it but going through it carefully.

84
00:04:38,180 --> 00:04:43,060
So sidekick, the application is divided into three Python modules.

85
00:04:43,540 --> 00:04:44,740
There are they are here.

86
00:04:44,740 --> 00:04:47,420
And I'll first give you like a drive by of them.

87
00:04:47,420 --> 00:04:49,540
There is sidekick tools.

88
00:04:49,540 --> 00:04:54,700
And this is the module where we define the different tools that we will use.

89
00:04:54,700 --> 00:05:02,020
So it's nicely packaged up in one place that is going to get us access to a ton of tools, or it's going

90
00:05:02,020 --> 00:05:05,300
to give our agent access to a ton of tools, then sidekick.

91
00:05:05,780 --> 00:05:11,460
Now this is a bit of a long, a long, uh, module here, and maybe this should be broken up a bit.

92
00:05:11,700 --> 00:05:19,620
Um, but it contains a class sidekick, and that has the code that includes our worker, our evaluator,

93
00:05:19,620 --> 00:05:21,140
and the building of the graph.

94
00:05:21,140 --> 00:05:22,580
And we'll come and look through this.

95
00:05:22,660 --> 00:05:30,180
And then thirdly, there is App.py, and that is our Gradio app that manages the user interface side

96
00:05:30,180 --> 00:05:30,620
of it.

97
00:05:31,020 --> 00:05:31,380
Okay.

98
00:05:31,420 --> 00:05:34,260
So with that, let's just spend a couple of minutes on each on each piece.