And so with this, we now turn to the other category, the second category of agents.
So by contrast with the workflow patterns with agents, the process is more open ended.
It's something that can keep going.
It has feedback loops.
It's typically a design that allows for information to come back and be processed multiple times.
And importantly, there's no fixed path through the design pattern.
It's not like there's a series of steps as we had in those prior patterns, but rather it's something
that's fluid and dynamic.
And as as a result, it's something which can be much more powerful.
There's many more.
There's a much greater kind of problem that could be taken on by this sort of agent pattern, but it's
less predictable.
And so there are absolutely concerns about robustness, about guardrails, about how do you get the
best out of this kind of flexibility, but still have a system that can run in production and be guaranteed
to complete in a certain time and so on.
And this is the diagram that I would bring up, which is fairly generic kind of diagram that's just
meant to show that you have the inputs and outputs now shown as a human.
But but we don't really have output anymore.
We have environment that's meant to reflect some, some sort of outside world that can be interacted
with, such as the lights that I wore around me, that the human can make a request that goes to an
LM.
The LM is able to take actions on the environment, as you can see, and the LM is able to get back
information from the environment in some way.
And then this is simply a repeating loop.
The LM can continually make other actions and get back feedback, and at such time as it desires, it
can choose to stop.
And so this is the the the diagram.
And there aren't more specific design patterns because it is in itself this sort of open ended design
pattern.
It's saying this is a it's almost a sort of meta design.
It's saying the the LM gets to choose its own design for how it's going to solve the problem.
And that's really it's it's quite hand-wavy, but that's the way to distinguish it.
If we look back at this pattern, I mean, this pattern arguably also could keep going forever.
It's not as if this has a fixed stop, but there's clearly more certainty about what's happening for
what reason than with the agentic patterns, where it is more fluid by its nature.
So that's really the core idea behind the agent patterns, that there is much more flexibility that
allows us to to be able to solve much more complex problems where Llms can really plot their own paths.
But it does introduce some new issues, such as not knowing how long it will take before it will will
complete its task, not knowing whether it will complete its task at all, not knowing what kind of
quality outputs we will get, and not knowing how much it will cost.
These are all the kinds of challenges that agent developers like ourselves need to face, and they are
the sorts of things that we will be tackling in the coming weeks.
And so if this feels a bit unsatisfying that the design patterns for workflows are so clear.
And now this looks just so loose.
Then all I can say is, as we put this into practice, as we code different real agent environments,
this is going to become more and more concrete, and you're going to be able to you'll see this as second
nature before too long.
Now let's just quickly say a few more words about some of the drawbacks that I alluded to a second ago
with using agent frameworks and agentic AI and design patterns.
So obviously there is this sense that you have an unpredictable path.
You don't actually know what order tasks will take place in or even what tasks will happen.
You don't know what the output will be.
There's no guarantees that you're going to get a great output.
Now, this this whole Agentic architecture allows us to take on much bigger, harder problems than we've
ever been able to take on before.
But it does have this inherent uncertainty associated with giving Llms autonomy over how they tackle
problems.
There's also unpredictable costs.
I alluded to that as well a moment ago, but because you don't know how long it's going to take, you
don't know how much it's going to cost in terms of running the APIs and potentially building up a big
bill.
And so as a result, there's a couple of mitigations that are incredibly important, both of which we
will spend plenty of time on in the coming weeks.
One of them is, of course, monitoring, being sure that you have the kinds of visibility into what's
going on behind the scenes so you can understand what's going on with your models, with their interactions,
particularly when you have potentially many agents all interacting.
And we're going to see that with open AI SDK.
We're going to see that the trace, the ability to to watch different agents interacting.
When we look at a graph, we're going to see Lang Smith their tooling.
So we're going to see a lot of the ways that you can have this visibility into what is going on under
the hood in your agent systems.
And then guardrails.
Guardrails is the name for the kinds of protections that you can write in software that makes sure that
your models are doing what they should be doing, or that they're not sort of leaving some, some constraints,
some, some rails that you put in place.
And in fact, that quote that I put here comes straight from the OpenAI agents SDK, which has a ton
of functionality dedicated to guardrails, and they say that it ensures they behave safely, consistently
and within the boundaries that you wish.
And so we will be building those guardrails ourselves in week two.
And with that, that does actually conclude the day.
Two lectures, as I promised you, it was shorter than day one.
And I hope you didn't mind that we covered a lot of theory.
It's really interesting stuff, these gigantic design patterns.
I hope now you've got some clarity on what agents are and that there is ambiguity on this, but but
ways that you can talk about it and think about what it means to be autonomous and what it means to
be able to plot your own path.
Let let an LLM decide the path that things will take.
And so with that, congratulations on completing day two and day three.
We're going to talk about orchestrating Llms.
It's going to be more and more coding, more hands on, which will be fun.
We're going to build with a lot of APIs and get ready for that.
And after that we're going to move on to tools.
So I will see you next time.