1
00:00:00,440 --> 00:00:05,520
And so with this, we now turn to the other category, the second category of agents.
因此，我们现在转向另一类，即第二类代理。

2
00:00:05,720 --> 00:00:13,320
So by contrast with the workflow patterns with agents, the process is more open ended.
因此，与代理的工作流模式相比，该过程更加开放。

3
00:00:13,440 --> 00:00:15,200
It's something that can keep going.
这是可以持续下去的事情。

4
00:00:15,680 --> 00:00:17,320
It has feedback loops.
它有反馈循环。

5
00:00:17,360 --> 00:00:24,240
It's typically a design that allows for information to come back and be processed multiple times.
它通常是一种允许信息返回并进行多次处理的设计。

6
00:00:24,520 --> 00:00:29,720
And importantly, there's no fixed path through the design pattern.
重要的是，设计模式没有固定的路径。

7
00:00:29,760 --> 00: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
这不像我们之前的模式那样有一系列步骤，而是有一些东西

8
00:00:35,440 --> 00:00:37,400
that's fluid and dynamic.
这是流动的和动态的。

9
00:00:37,520 --> 00:00:41,160
And as as a result, it's something which can be much more powerful.
因此，它的功能会变得更加强大。

10
00:00:41,360 --> 00:00:42,480
There's many more.
还有更多。

11
00:00:42,680 --> 00: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
这种代理模式可以解决更大的问题，但它是

12
00:00:48,960 --> 00:00:50,280
less predictable.
不太可预测。

13
00:00:50,320 --> 00:00:56,920
And so there are absolutely concerns about robustness, about guardrails, about how do you get the
因此，绝对会担心鲁棒性、护栏以及如何获得

14
00:00:56,920 --> 00:01:03,320
best out of this kind of flexibility, but still have a system that can run in production and be guaranteed
最好摆脱这种灵活性，但仍然有一个可以在生产中运行并得到保证的系统

15
00:01:03,360 --> 00:01:05,800
to complete in a certain time and so on.
在一定时间内完成等等。

16
00:01:06,600 --> 00:01:12,730
And this is the diagram that I would bring up, which is fairly generic kind of diagram that's just
这就是我要提出的图表，这是相当通用的图表，只是

17
00:01:12,730 --> 00:01:17,010
meant to show that you have the inputs and outputs now shown as a human.
旨在表明您现在已将输入和输出显示为人类。

18
00:01:17,010 --> 00:01:18,410
But but we don't really have output anymore.
但是我们真的没有输出了。

19
00:01:18,410 --> 00:01:24,490
We have environment that's meant to reflect some, some sort of outside world that can be interacted
我们的环境旨在反映某种可以互动的外部世界

20
00:01:24,490 --> 00:01:30,210
with, such as the lights that I wore around me, that the human can make a request that goes to an
诸如我周围佩戴的灯，人们可以向某个人提出请求

21
00:01:30,210 --> 00:01:30,730
LM.
LM。

22
00:01:30,850 --> 00: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
如您所见，LM 能够对环境采取操作，并且 LM 能够返回

23
00:01:37,090 --> 00:01:39,690
information from the environment in some way.
以某种方式从环境中获取信息。

24
00:01:39,890 --> 00:01:42,730
And then this is simply a repeating loop.
然后这只是一个重复循环。

25
00:01:42,770 --> 00:01:50,170
The LM can continually make other actions and get back feedback, and at such time as it desires, it
LM 可以不断地采取其他行动并获取反馈，并且在它需要的时候，它

26
00:01:50,170 --> 00:01:51,330
can choose to stop.
可以选择停止。

27
00:01:51,570 --> 00:01:54,130
And so this is the the the diagram.
这就是图表。

28
00:01:54,290 --> 00:02:01,970
And there aren't more specific design patterns because it is in itself this sort of open ended design
并且没有更具体的设计模式，因为它本身就是这种开放式设计

29
00:02:01,970 --> 00:02:02,650
pattern.
图案。

30
00:02:02,650 --> 00:02:05,730
It's saying this is a it's almost a sort of meta design.
据说这几乎是一种元设计。

31
00:02:05,730 --> 00:02:12,330
It's saying the the LM gets to choose its own design for how it's going to solve the problem.
据说LM可以选择自己的设计来解决问题。

32
00:02:12,570 --> 00:02:17,460
And that's really it's it's quite hand-wavy, but that's the way to distinguish it.
确实是这样，它的手是波浪形的，但这就是区分它的方法。

33
00:02:17,500 --> 00:02:23,420
If we look back at this pattern, I mean, this pattern arguably also could keep going forever.
如果我们回顾这种模式，我的意思是，这种模式可以说也可以永远持续下去。

34
00:02:23,420 --> 00:02:28,940
It's not as if this has a fixed stop, but there's clearly more certainty about what's happening for
这似乎没有一个固定的止损点，但对于正在发生的事情显然更有确定性

35
00:02:28,940 --> 00:02:35,300
what reason than with the agentic patterns, where it is more fluid by its nature.
与代理模式相比，它的原因是什么，代理模式本质上更具流动性。

36
00:02:35,620 --> 00:02:43,500
So that's really the core idea behind the agent patterns, that there is much more flexibility that
这确实是代理模式背后的核心思想，即具有更多的灵活性

37
00:02:43,500 --> 00:02:51,140
allows us to to be able to solve much more complex problems where Llms can really plot their own paths.
使我们能够解决更复杂的问题，其中 LLM 可以真正规划自己的路径。

38
00:02:51,140 --> 00:02:56,940
But it does introduce some new issues, such as not knowing how long it will take before it will will
但它确实引入了一些新问题，例如不知道需要多长时间才能实现

39
00:02:56,980 --> 00:03:01,700
complete its task, not knowing whether it will complete its task at all, not knowing what kind of
完成它的任务，不知道它是否会完成它的任务，不知道什么样的任务

40
00:03:01,700 --> 00:03:05,260
quality outputs we will get, and not knowing how much it will cost.
我们将获得高质量的产出，但不知道它会花费多少。

41
00:03:05,300 --> 00:03:11,740
These are all the kinds of challenges that agent developers like ourselves need to face, and they are
这些都是像我们这样的代理开发人员需要面对的各种挑战，而且它们是

42
00:03:11,740 --> 00:03:15,020
the sorts of things that we will be tackling in the coming weeks.
我们将在未来几周内处理的各种事情。

43
00:03:15,740 --> 00:03:20,240
And so if this feels a bit unsatisfying that the design patterns for workflows are so clear.
因此，如果这感觉有点不满意，那么工作流程的设计模式是如此清晰。

44
00:03:20,240 --> 00:03:22,760
And now this looks just so loose.
现在这看起来太松了。

45
00:03:23,000 --> 00:03:29,200
Then all I can say is, as we put this into practice, as we code different real agent environments,
那么我只能说，当我们将其付诸实践时，当我们编写不同的真实代理环境时，

46
00:03:29,200 --> 00: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
这将变得越来越具体，你将能够将其视为第二个

47
00:03:33,400 --> 00:03:34,560
nature before too long.
不久之后的自然。

48
00:03:34,880 --> 00: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
现在让我们快速多说几句我刚才提到的一些缺点

49
00:03:40,720 --> 00:03:45,480
with using agent frameworks and agentic AI and design patterns.
使用代理框架、代理人工智能和设计模式。

50
00:03:45,800 --> 00:03:49,680
So obviously there is this sense that you have an unpredictable path.
显然，你有一种不可预测的道路的感觉。

51
00:03:49,720 --> 00:03:55,320
You don't actually know what order tasks will take place in or even what tasks will happen.
您实际上不知道任务将按什么顺序发生，甚至不知道将发生什么任务。

52
00:03:55,920 --> 00:03:58,120
You don't know what the output will be.
你不知道输出会是什么。

53
00:03:58,200 --> 00:04:00,840
There's no guarantees that you're going to get a great output.
无法保证您会获得出色的输出。

54
00:04:01,000 --> 00:04:07,800
Now, this this whole Agentic architecture allows us to take on much bigger, harder problems than we've
现在，整个 Agentic 架构让我们能够解决比以前更大、更难的问题

55
00:04:07,800 --> 00:04:09,280
ever been able to take on before.
以前曾经能够承担过。

56
00:04:09,600 --> 00:04:16,200
But it does have this inherent uncertainty associated with giving Llms autonomy over how they tackle
但它确实存在这种固有的不确定性，即赋予法学硕士关于如何解决问题的自主权。

57
00:04:16,200 --> 00:04:16,880
problems.
问题。

58
00:04:17,360 --> 00:04:19,160
There's also unpredictable costs.
还有不可预测的成本。

59
00:04:19,160 --> 00: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
我刚才也提到过这一点，但是因为你不知道要花多长时间，所以你

60
00:04:23,240 --> 00: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
不知道运行 API 和潜在构建一个大型应用程序需要花费多少成本

61
00:04:29,810 --> 00:04:30,330
bill.
账单。

62
00:04:31,370 --> 00:04:36,610
And so as a result, there's a couple of mitigations that are incredibly important, both of which we
因此，有一些非常重要的缓解措施，我们都采取了

63
00:04:36,610 --> 00:04:39,170
will spend plenty of time on in the coming weeks.
在接下来的几周内将花费大量时间。

64
00:04:39,410 --> 00:04:45,290
One of them is, of course, monitoring, being sure that you have the kinds of visibility into what's
当然，其中之一就是监控，确保您对正在发生的事情有一定的了解。

65
00:04:45,290 --> 00:04:51,650
going on behind the scenes so you can understand what's going on with your models, with their interactions,
在幕后进行，以便您可以了解模型及其交互的情况，

66
00:04:51,650 --> 00:04:55,690
particularly when you have potentially many agents all interacting.
特别是当您可能有许多代理都在交互时。

67
00:04:55,730 --> 00:04:57,930
And we're going to see that with open AI SDK.
我们将通过开放的 AI SDK 看到这一点。

68
00:04:57,970 --> 00:05:02,730
We're going to see that the trace, the ability to to watch different agents interacting.
我们将看到痕迹，观察不同代理交互的能力。

69
00:05:02,730 --> 00:05:06,010
When we look at a graph, we're going to see Lang Smith their tooling.
当我们查看图表时，我们将看到 Lang Smith 他们的工具。

70
00:05:06,010 --> 00: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
因此，我们将看到很多方法，让您可以了解下面发生的情况

71
00:05:11,690 --> 00:05:13,370
the hood in your agent systems.
代理系统中的引擎盖。

72
00:05:13,690 --> 00:05:15,410
And then guardrails.
然后是护栏。

73
00:05:15,450 --> 00:05:22,290
Guardrails is the name for the kinds of protections that you can write in software that makes sure that
Guardrails 是您可以在软件中编写的保护类型的名称，以确保

74
00:05:22,290 --> 00:05:27,610
your models are doing what they should be doing, or that they're not sort of leaving some, some constraints,
你的模型正在做他们应该做的事情，或者他们没有留下一些限制，

75
00:05:27,650 --> 00:05:29,690
some, some rails that you put in place.
一些，一些你放置的导轨。

76
00:05:29,930 --> 00:05:35,860
And in fact, that quote that I put here comes straight from the OpenAI agents SDK, which has a ton
事实上，我在这里引用的这句话直接来自 OpenAI 代理 SDK，其中包含大量内容

77
00:05:35,900 --> 00:05:42,300
of functionality dedicated to guardrails, and they say that it ensures they behave safely, consistently
专用于护栏的功能，他们说这可以确保他们的行为安全、一致

78
00:05:42,300 --> 00:05:44,820
and within the boundaries that you wish.
并在您希望的范围内。

79
00:05:45,060 --> 00:05:49,860
And so we will be building those guardrails ourselves in week two.
因此，我们将在第二周内自己建造这些护栏。

80
00:05:50,540 --> 00:05:54,300
And with that, that does actually conclude the day.
至此，这一天就真正结束了。

81
00:05:54,340 --> 00:05:58,580
Two lectures, as I promised you, it was shorter than day one.
正如我向你保证的，两堂课比第一天要短。

82
00:05:58,620 --> 00:06:00,620
And I hope you didn't mind that we covered a lot of theory.
我希望您不介意我们涵盖了很多理论。

83
00:06:00,620 --> 00:06:03,500
It's really interesting stuff, these gigantic design patterns.
这些巨大的设计模式真的很有趣。

84
00:06:03,500 --> 00:06:09,420
I hope now you've got some clarity on what agents are and that there is ambiguity on this, but but
我希望现在您已经对什么是代理有了一定的了解，并且对此存在模糊性，但是但是

85
00:06:09,460 --> 00:06:14,580
ways that you can talk about it and think about what it means to be autonomous and what it means to
你可以谈论它并思考自主意味着什么以及

86
00:06:14,580 --> 00:06:16,980
be able to plot your own path.
能够规划自己的道路。

87
00:06:17,140 --> 00:06:21,180
Let let an LLM decide the path that things will take.
让法学硕士来决定事情的发展方向。

88
00:06:21,540 --> 00:06:25,940
And so with that, congratulations on completing day two and day three.
就这样，恭喜您完成了第二天和第三天的工作。

89
00:06:25,940 --> 00:06:28,300
We're going to talk about orchestrating Llms.
我们将讨论编排法学硕士。

90
00:06:28,300 --> 00:06:31,180
It's going to be more and more coding, more hands on, which will be fun.
将会有越来越多的编码、更多的实践，这会很有趣。

91
00:06:31,180 --> 00:06:34,980
We're going to build with a lot of APIs and get ready for that.
我们将使用大量 API 进行构建并为此做好准备。

92
00:06:34,980 --> 00:06:37,940
And after that we're going to move on to tools.
之后我们将继续讨论工具。

93
00:06:38,140 --> 00:06:39,700
So I will see you next time.
那么我们下次再见。
