WEBVTT

00:00.440 --> 00:03.640
Well, have I got a treat in store for you?

00:04.080 --> 00:12.400
Uh, so welcome to day five of week five, the wrap up project for Autogen week in the form of the agent

00:12.400 --> 00:13.320
creator.

00:13.760 --> 00:17.440
And, well, let me tell you about this project.

00:17.440 --> 00:20.120
It's going to be quite quick, but it's going to be fun.

00:20.560 --> 00:22.520
So look, it's this is the big idea.

00:22.520 --> 00:25.840
It's one of these things that has pluses and minuses.

00:25.840 --> 00:28.360
It's a it's a bit of an out there project.

00:28.400 --> 00:31.920
Look, first of all this is designed to be primarily educational.

00:31.920 --> 00:37.920
So this is here to teach some of the innards of what you can do with this kind of framework and use

00:37.920 --> 00:39.760
Autogen in a different way.

00:39.800 --> 00:42.960
So something that's different, unlike anything else that we've done.

00:43.320 --> 00:44.800
Secondly, it's entertaining.

00:44.800 --> 00:47.680
This is something that should be intellectually entertaining.

00:47.800 --> 00:50.160
This is quite, quite out there.

00:50.320 --> 00:55.320
And on that front it is it's an edgy idea and thing to try with.

00:55.360 --> 01:00.640
And it's very in vogue in terms of thinking about autonomy, agency and so on.

01:00.640 --> 01:02.810
One, but those are the three pluses.

01:02.810 --> 01:04.850
There are also three minuses.

01:05.130 --> 01:12.450
Uh, it's not particularly commercial, so I do like to focus this whole course on commercial benefits.

01:12.450 --> 01:17.450
There is a twist that there is something a bit commercial about it, as you'll see, but it's a bit

01:17.450 --> 01:20.330
of a of a side benefit of it.

01:20.570 --> 01:22.370
Um, it's unreliable.

01:22.370 --> 01:28.570
The project that we're about to do, by its very nature is something that may sometimes fail, and also

01:28.570 --> 01:29.690
it's unsafe.

01:29.810 --> 01:33.930
So we are going to be building something that's going to be creating and running Python code, and it's

01:33.930 --> 01:39.410
going to be doing so in a, in a, generally without guardrails on, which means you have to run this

01:39.410 --> 01:42.610
at your own risk, take whatever precautions you wish.

01:42.890 --> 01:47.330
Um, I may in time put this into a Docker container or something, but that would be quite a bore because

01:47.330 --> 01:51.130
you'd need to install all of, uh, autogen in the Docker container, so it wouldn't it wouldn't be

01:51.130 --> 01:51.530
easy.

01:51.730 --> 01:55.130
Um, but as it is, take it for what it is.

01:55.130 --> 01:56.410
You could just watch me run it.

01:56.410 --> 02:00.770
If you don't feel confident that you know what's going on and that you're comfortable taking the risk

02:00.770 --> 02:06.210
of letting an agent write Python code and then executing that Python code.

02:06.250 --> 02:10.290
Natively on your box, which is not for the faint of heart.

02:10.490 --> 02:12.050
So eyes wide open.

02:12.090 --> 02:14.530
You don't need to execute any code if you don't want to.

02:14.650 --> 02:16.210
And please do do.

02:16.250 --> 02:17.570
Take that to heart.

02:18.010 --> 02:20.930
Run the code yourself only if you're comfortable with it.

02:20.970 --> 02:22.650
Okay, well, hopefully I've intrigued you somewhat.

02:22.650 --> 02:24.290
Let me tell you what this idea is.

02:24.570 --> 02:30.410
So we're going to explore the flexible, dynamic aspect of Autogen.

02:30.610 --> 02:37.210
We are going to make a creator agent an agent, as I say that can write a Python module.

02:37.250 --> 02:41.250
It will it will use an existing Python module as its kind of template.

02:41.770 --> 02:45.530
And that Python module is going to be an agent.

02:45.530 --> 02:51.250
It's going to be an autogen agent chat agent that's running in Autogen core.

02:51.650 --> 02:57.250
So we're going to build an agent that can write a Python module of an agent.

02:57.250 --> 03:02.700
It's going to create an agent, and it's going to change it so that the Python module it makes is something

03:02.700 --> 03:10.860
new, a different agent that doesn't exist, and then the creator agent is actually going to register

03:10.900 --> 03:15.300
its creation with the distributed runtime with autogen core.

03:16.020 --> 03:21.020
In other words, dare I say it, it's going to kind of give, give, give.

03:21.060 --> 03:22.020
Do I say give birth?

03:22.020 --> 03:22.540
It's going to.

03:22.580 --> 03:24.420
It's going to instantiate this agent.

03:24.460 --> 03:25.060
It's going to.

03:25.100 --> 03:25.940
Let's get technical.

03:25.940 --> 03:31.060
It's going to instantiate the agent that's going to be a running agent that was created by the creator

03:31.060 --> 03:31.660
agent.

03:31.860 --> 03:37.340
And it's then it's also as part of writing this agent based on the template it will use.

03:37.740 --> 03:41.060
Its agents are going to be able to message each other.

03:41.060 --> 03:46.060
So it's going to be possible for agents to message each other and and interact.

03:46.060 --> 03:48.740
These agents that have been created by the agent.

03:50.500 --> 03:57.180
And overall, they're going to have an objective of coming up with business ideas, commercial ideas

03:57.180 --> 04:01.940
for putting agent I, agent I into practice to make money.

04:01.980 --> 04:09.060
So there is a commercial angle subtly, because the overall objective of our of our team of created

04:09.060 --> 04:12.260
agents is to be to try and make you money by coming up with ideas.

04:12.260 --> 04:14.580
And of course, you can shift the the overall objective.

04:14.620 --> 04:19.060
You can make it something different or, you know, maybe not money with a genetic eye, but how to

04:19.060 --> 04:21.340
make a quick buck in some other way.

04:21.380 --> 04:27.540
You can assign it some other task and let it think, but the idea is that you can spawn this army of

04:27.580 --> 04:34.100
agents that can think about something and interact with each other, and you can help put the plant

04:34.220 --> 04:37.020
the initial seed and then see what happens.

04:37.620 --> 04:43.380
And as part of the educational aspect of this, we're going to be heavily using asynchronous Python.

04:43.380 --> 04:48.780
It would be quite a drag if this thing had to happen in a serial way, with each agent being created

04:48.780 --> 04:51.180
and then messaging the others one by one.

04:51.180 --> 04:57.620
That would take quite a long time, but now we're going to use Asyncio async IO to make sure that things

04:57.620 --> 04:58.220
fly.

04:59.460 --> 05:02.980
And so with that introduction, let's get to the code.
