WEBVTT

00:00.440 --> 00:05.520
And so with this, we now turn to the other category, the second category of agents.

00:05.720 --> 00:13.320
So by contrast with the workflow patterns with agents, the process is more open ended.

00:13.440 --> 00:15.200
It's something that can keep going.

00:15.680 --> 00:17.320
It has feedback loops.

00:17.360 --> 00:24.240
It's typically a design that allows for information to come back and be processed multiple times.

00:24.520 --> 00:29.720
And importantly, there's no fixed path through the design pattern.

00:29.760 --> 00:35.440
It's not like there's a series of steps as we had in those prior patterns, but rather it's something

00:35.440 --> 00:37.400
that's fluid and dynamic.

00:37.520 --> 00:41.160
And as as a result, it's something which can be much more powerful.

00:41.360 --> 00:42.480
There's many more.

00:42.680 --> 00:48.960
There's a much greater kind of problem that could be taken on by this sort of agent pattern, but it's

00:48.960 --> 00:50.280
less predictable.

00:50.320 --> 00:56.920
And so there are absolutely concerns about robustness, about guardrails, about how do you get the

00:56.920 --> 01:03.320
best out of this kind of flexibility, but still have a system that can run in production and be guaranteed

01:03.360 --> 01:05.800
to complete in a certain time and so on.

01:06.600 --> 01:12.730
And this is the diagram that I would bring up, which is fairly generic kind of diagram that's just

01:12.730 --> 01:17.010
meant to show that you have the inputs and outputs now shown as a human.

01:17.010 --> 01:18.410
But but we don't really have output anymore.

01:18.410 --> 01:24.490
We have environment that's meant to reflect some, some sort of outside world that can be interacted

01:24.490 --> 01:30.210
with, such as the lights that I wore around me, that the human can make a request that goes to an

01:30.210 --> 01:30.730
LM.

01:30.850 --> 01:37.050
The LM is able to take actions on the environment, as you can see, and the LM is able to get back

01:37.090 --> 01:39.690
information from the environment in some way.

01:39.890 --> 01:42.730
And then this is simply a repeating loop.

01:42.770 --> 01:50.170
The LM can continually make other actions and get back feedback, and at such time as it desires, it

01:50.170 --> 01:51.330
can choose to stop.

01:51.570 --> 01:54.130
And so this is the the the diagram.

01:54.290 --> 02:01.970
And there aren't more specific design patterns because it is in itself this sort of open ended design

02:01.970 --> 02:02.650
pattern.

02:02.650 --> 02:05.730
It's saying this is a it's almost a sort of meta design.

02:05.730 --> 02:12.330
It's saying the the LM gets to choose its own design for how it's going to solve the problem.

02:12.570 --> 02:17.460
And that's really it's it's quite hand-wavy, but that's the way to distinguish it.

02:17.500 --> 02:23.420
If we look back at this pattern, I mean, this pattern arguably also could keep going forever.

02:23.420 --> 02:28.940
It's not as if this has a fixed stop, but there's clearly more certainty about what's happening for

02:28.940 --> 02:35.300
what reason than with the agentic patterns, where it is more fluid by its nature.

02:35.620 --> 02:43.500
So that's really the core idea behind the agent patterns, that there is much more flexibility that

02:43.500 --> 02:51.140
allows us to to be able to solve much more complex problems where Llms can really plot their own paths.

02:51.140 --> 02:56.940
But it does introduce some new issues, such as not knowing how long it will take before it will will

02:56.980 --> 03:01.700
complete its task, not knowing whether it will complete its task at all, not knowing what kind of

03:01.700 --> 03:05.260
quality outputs we will get, and not knowing how much it will cost.

03:05.300 --> 03:11.740
These are all the kinds of challenges that agent developers like ourselves need to face, and they are

03:11.740 --> 03:15.020
the sorts of things that we will be tackling in the coming weeks.

03:15.740 --> 03:20.240
And so if this feels a bit unsatisfying that the design patterns for workflows are so clear.

03:20.240 --> 03:22.760
And now this looks just so loose.

03:23.000 --> 03:29.200
Then all I can say is, as we put this into practice, as we code different real agent environments,

03:29.200 --> 03:33.400
this is going to become more and more concrete, and you're going to be able to you'll see this as second

03:33.400 --> 03:34.560
nature before too long.

03:34.880 --> 03:40.680
Now let's just quickly say a few more words about some of the drawbacks that I alluded to a second ago

03:40.720 --> 03:45.480
with using agent frameworks and agentic AI and design patterns.

03:45.800 --> 03:49.680
So obviously there is this sense that you have an unpredictable path.

03:49.720 --> 03:55.320
You don't actually know what order tasks will take place in or even what tasks will happen.

03:55.920 --> 03:58.120
You don't know what the output will be.

03:58.200 --> 04:00.840
There's no guarantees that you're going to get a great output.

04:01.000 --> 04:07.800
Now, this this whole Agentic architecture allows us to take on much bigger, harder problems than we've

04:07.800 --> 04:09.280
ever been able to take on before.

04:09.600 --> 04:16.200
But it does have this inherent uncertainty associated with giving Llms autonomy over how they tackle

04:16.200 --> 04:16.880
problems.

04:17.360 --> 04:19.160
There's also unpredictable costs.

04:19.160 --> 04:23.240
I alluded to that as well a moment ago, but because you don't know how long it's going to take, you

04:23.240 --> 04:29.810
don't know how much it's going to cost in terms of running the APIs and potentially building up a big

04:29.810 --> 04:30.330
bill.

04:31.370 --> 04:36.610
And so as a result, there's a couple of mitigations that are incredibly important, both of which we

04:36.610 --> 04:39.170
will spend plenty of time on in the coming weeks.

04:39.410 --> 04:45.290
One of them is, of course, monitoring, being sure that you have the kinds of visibility into what's

04:45.290 --> 04:51.650
going on behind the scenes so you can understand what's going on with your models, with their interactions,

04:51.650 --> 04:55.690
particularly when you have potentially many agents all interacting.

04:55.730 --> 04:57.930
And we're going to see that with open AI SDK.

04:57.970 --> 05:02.730
We're going to see that the trace, the ability to to watch different agents interacting.

05:02.730 --> 05:06.010
When we look at a graph, we're going to see Lang Smith their tooling.

05:06.010 --> 05:11.690
So we're going to see a lot of the ways that you can have this visibility into what is going on under

05:11.690 --> 05:13.370
the hood in your agent systems.

05:13.690 --> 05:15.410
And then guardrails.

05:15.450 --> 05:22.290
Guardrails is the name for the kinds of protections that you can write in software that makes sure that

05:22.290 --> 05:27.610
your models are doing what they should be doing, or that they're not sort of leaving some, some constraints,

05:27.650 --> 05:29.690
some, some rails that you put in place.

05:29.930 --> 05:35.860
And in fact, that quote that I put here comes straight from the OpenAI agents SDK, which has a ton

05:35.900 --> 05:42.300
of functionality dedicated to guardrails, and they say that it ensures they behave safely, consistently

05:42.300 --> 05:44.820
and within the boundaries that you wish.

05:45.060 --> 05:49.860
And so we will be building those guardrails ourselves in week two.

05:50.540 --> 05:54.300
And with that, that does actually conclude the day.

05:54.340 --> 05:58.580
Two lectures, as I promised you, it was shorter than day one.

05:58.620 --> 06:00.620
And I hope you didn't mind that we covered a lot of theory.

06:00.620 --> 06:03.500
It's really interesting stuff, these gigantic design patterns.

06:03.500 --> 06:09.420
I hope now you've got some clarity on what agents are and that there is ambiguity on this, but but

06:09.460 --> 06:14.580
ways that you can talk about it and think about what it means to be autonomous and what it means to

06:14.580 --> 06:16.980
be able to plot your own path.

06:17.140 --> 06:21.180
Let let an LLM decide the path that things will take.

06:21.540 --> 06:25.940
And so with that, congratulations on completing day two and day three.

06:25.940 --> 06:28.300
We're going to talk about orchestrating Llms.

06:28.300 --> 06:31.180
It's going to be more and more coding, more hands on, which will be fun.

06:31.180 --> 06:34.980
We're going to build with a lot of APIs and get ready for that.

06:34.980 --> 06:37.940
And after that we're going to move on to tools.

06:38.140 --> 06:39.700
So I will see you next time.
