WEBVTT

00:00.160 --> 00:06.000
One of the things that's really nice about Cru is that it has a very flexible, lightweight approach

00:06.000 --> 00:08.680
to interacting with underlying LMS.

00:09.000 --> 00:16.640
It uses a framework called Lite LM under the hood, which it uses to interact with with the actual providers

00:16.640 --> 00:18.200
and with the LMS themselves.

00:18.240 --> 00:21.320
And I love Lite LM because it's so simple.

00:21.320 --> 00:22.560
It's so vanilla.

00:22.840 --> 00:27.200
You may know I have a somewhat love hate relationship with Lang Chain, which comes with with a fair

00:27.200 --> 00:30.000
amount of, of, uh, of structure to it.

00:30.040 --> 00:33.040
Lite LM is almost the other extreme where there's almost nothing there.

00:33.040 --> 00:37.040
You can just immediately connect with any LM you can imagine.

00:37.240 --> 00:40.640
And that really is reflected in the way it's used in Cru.

00:40.680 --> 00:46.520
Within Cru, you can just create an LM, you pass in a model name, and the structure is that it should

00:46.520 --> 00:49.520
have the provider's name followed by a slash followed by the model.

00:49.640 --> 00:55.520
And you can just use that to to be working with GPT four or mini with Claude through anthropic you can

00:55.520 --> 01:00.240
use three, five, three, seven, whatever you want Gemini flash, grok with a Q.

01:00.400 --> 01:03.000
And you could also use grok with a K in the same way.

01:03.280 --> 01:07.960
Olama if you're running the model locally, that's how you'd set it up and supply a base URL.

01:08.440 --> 01:16.100
And if you wanted to use Open Router, which itself is a kind of abstraction onto other LMS, but it's

01:16.100 --> 01:17.540
an actual service running.

01:17.540 --> 01:21.500
Then this is how you would configure Open Router as an example.

01:21.660 --> 01:28.780
But really the idea is very lightweight, very flexible, allows you to to really connect and switch

01:28.820 --> 01:33.060
around whichever models are running underneath your crew.

01:33.300 --> 01:39.380
And I would argue that in this way, crew really has an edge over open AI agents SDK, that this is

01:39.380 --> 01:41.540
really flexible and simple and I love it.

01:42.180 --> 01:49.740
And so the final topic before we get to do some coding and some crew making is to talk about crew AI

01:49.980 --> 01:50.940
projects.

01:51.340 --> 01:58.340
So in previous weeks we have just been coding within Python notebooks within cursor.

01:58.380 --> 02:01.180
And then occasionally we've gone to to real Python modules.

02:01.340 --> 02:03.820
Crew AI doesn't work that way with QR.

02:03.860 --> 02:11.980
You do need to work with Python code, and in fact cry builds an entire project and directory structure

02:11.980 --> 02:13.660
for each of your crews.

02:13.820 --> 02:18.380
So it comes with a bit more scaffolding than than we're used to.

02:18.580 --> 02:21.940
And there's a particular way that you need to use it.

02:21.980 --> 02:27.400
Now, the crew AI framework itself is already actually installed because I typed this command here you've

02:27.440 --> 02:28.760
tool install crew I.

02:28.880 --> 02:34.200
And that means that when you've cloned the repo you've already got the crew AI framework right there.

02:34.360 --> 02:38.280
But when you want to create a new project, you actually want a crew of your own.

02:38.320 --> 02:46.800
You type this command crew, I create crew, my crew or my project or whatever to create that project.

02:47.400 --> 02:53.760
And by the way, as a side note, you could say crew, I create flow, my project if you wanted to use

02:53.760 --> 02:58.640
the flow idea, the workflows, the more fixed workflows rather than a crew.

02:58.760 --> 03:00.480
But we're going to be sticking with crews.

03:00.520 --> 03:03.440
So crew I create crew my crew.

03:03.800 --> 03:10.400
And what that does is it's going to create a whole directory structure that's going to appear immediately.

03:10.560 --> 03:14.640
There's there's going to be at the top, my crew or my project, whatever you call it.

03:15.000 --> 03:21.880
And then a subdirectory source src and within that subdirectory will be the name of your project again,

03:21.920 --> 03:23.160
my crew or whatever.

03:23.680 --> 03:26.120
And then under that it's a bit nested.

03:26.160 --> 03:31.640
Under that will be a directory called config which is where you put your YAML files.

03:31.640 --> 03:32.240
And we'll see.

03:32.240 --> 03:38.420
In particular by default there'll be an agent's YAML and a task's YAML, which is where we can put our

03:38.420 --> 03:40.780
configuration for our agents and tasks.

03:41.260 --> 03:43.700
And then there's a module crew.py.

03:44.100 --> 03:49.180
And that module is the one I just showed you, which is where it all comes together with the decorators

03:49.340 --> 03:52.340
and the way the place we actually create our crew.

03:52.780 --> 03:55.100
And then there's a module called main.

03:55.260 --> 03:57.860
And that module is where we actually kick off.

03:57.860 --> 03:59.500
We initiate the run.

03:59.780 --> 04:03.860
And when we actually want to run it we just type create run.

04:03.980 --> 04:05.300
And that will actually do that.

04:05.300 --> 04:09.540
It will execute main I think behind the scenes it just simply does.

04:09.580 --> 04:16.300
You've run Main.py and that does bring up a good point that this whole thing, when you do this, when

04:16.300 --> 04:22.260
you when you type create, create crew, my crew, it sets up a you've project crew uses you've which

04:22.260 --> 04:25.420
which makes which is great for us since we're using UV as well.

04:25.580 --> 04:26.780
But it makes a project.

04:26.780 --> 04:32.660
So you'll also see in this micro directory you'll see some of the the UV project configuration files

04:32.660 --> 04:33.340
as well.

04:33.340 --> 04:39.220
So we're going to be having these UV projects within our bigger UV project for the whole course.

04:39.300 --> 04:41.940
And that will make more sense when you see it in action.

04:42.220 --> 04:44.820
And what better time to see it in action than right now.

04:44.860 --> 04:46.100
Let's go and give this a try.
