1
00:00:05,599 --> 00:00:06,240
大家好，欢迎来到今天的课程。
Welcome everyone.

2
00:00:07,040 --> 00:00:08,960
谢谢大家参与今天的速成课程。
Thanks for joining today's lightning lesson.

3
00:00:09,279 --> 00:00:12,852
由于今天的议程非常紧凑，演示内容也很多，
Since we have a relatively packed agenda with quite a few demos,

4
00:00:12,852 --> 00:00:16,960
我们会在下午1点准时开始，其他人可以陆续加入。
we'll start sharp at 1pm while waiting for other people to join.

5
00:00:17,600 --> 00:00:18,879
我叫严。
And my name is Yan.

6
00:00:19,199 --> 00:00:21,754
今天我们将深入了解一些事情
Today we're going to dive deep into something

7
00:00:21,754 --> 00:00:25,487
在工程AI领域越来越重要且常常让人困惑
that's becoming increasingly central and often confusing

8
00:00:25,487 --> 00:00:28,631
在工程AI领域，模型上下文协议，
in the engineering AI world, the Model Context Protocol,

9
00:00:28,631 --> 00:00:29,809
简称mcp。
or mcp.

10
00:00:30,370 --> 00:00:31,570
在我们正式开始之前，
And before we get started,

11
00:00:31,570 --> 00:00:32,770
先处理一些后勤事项。
a few logistic things.

12
00:00:32,929 --> 00:00:34,450
会议正在进行录音。
The meeting is being recorded.

13
00:00:34,450 --> 00:00:36,602
如果大家有任何疑问，请随时提出来
If you have any questions, feel free to ask

14
00:00:36,602 --> 00:00:37,409
在聊天窗口。
them in the chat window.

15
00:00:37,409 --> 00:00:39,234
我会逐个总结并解答
I will summarize and address them one by one

16
00:00:39,234 --> 00:00:40,450
演讲结束后。
after the presentation.

17
00:00:40,689 --> 00:00:42,853
如果时间充裕，我们也会安排一个现场
If time permits, we'll also have a live

18
00:00:42,853 --> 00:00:43,490
问答环节。
Q and A session.

19
00:00:45,009 --> 00:00:46,609
那么，我们就先来一个简单的问题吧。
So let's start with a simple question.

20
00:00:47,170 --> 00:00:50,689
你是否曾经阅读过mcp的官方文档？
Have you ever read through the official docs

21
00:00:50,689 --> 00:00:50,689

on mcp?

22
00:00:50,770 --> 00:00:53,838
或许看过几个演示后，依然觉得
Maybe watched a few demos and still walked away thinking

23
00:00:53,838 --> 00:00:56,029
这很重要，但不太清楚
oh, this seems important, but I'm not sure

24
00:00:56,029 --> 00:00:58,659
它如何与我的工作相结合。
how it fits into my work.

25
00:00:59,460 --> 00:01:02,482
或者你可能见过有人在不合适的时机使用它，
Or maybe you've seen people use it too early,

26
00:01:02,482 --> 00:01:06,260
遭遇了一些奇怪的错误，结果离开时认为这个AI无效。
hit weird bugs and walk away thinking the AI doesn't work.

27
00:01:06,900 --> 00:01:08,634
关键不是协议本身，
Where the real issue wasn't the protocol itself,

28
00:01:08,634 --> 00:01:11,140
而是在不合适的时机使用它。
it was using it at the wrong time.

29
00:01:11,859 --> 00:01:14,539
如果您有这样的感受，您并不孤单，
You're not alone if either of this resonates,

30
00:01:14,539 --> 00:01:17,219
这种不确定性并不代表您落后于人。
that uncertainty doesn't mean you're behind.

31
00:01:17,540 --> 00:01:20,500
这实际上说明你提出了正确的问题。
It actually means you're asking the right questions.

32
00:01:20,980 --> 00:01:23,817
在不恰当的时机使用好工具，
Using a good tool at the wrong time

33
00:01:23,817 --> 00:01:26,000
可能会比不使用更糟。
can be worse than not using it at all,

34
00:01:26,000 --> 00:01:28,182
这个短期课程的目的是
and this lightning course is designed

35
00:01:28,182 --> 00:01:30,583
重新审视这种体验，重建
to reframe that experience and rebuild

36
00:01:30,583 --> 00:01:32,329
我们的战略信心。
strategic confidence.

37
00:01:34,010 --> 00:01:36,464
我们目前正处于一个协议
Right now we are living in a moment

38
00:01:36,464 --> 00:01:38,250
过于复杂的时代。
of protocol overload.

39
00:01:38,489 --> 00:01:42,302
这些工具名称包括 LangChain、OpenAI 插件、云工具、函数调用、
LangChain, OpenAI plugins, Cloud Tools, Function Calling,

40
00:01:42,302 --> 00:01:44,409
Autogen、开放 API 和 MCP。
Autogen, Open API, MCP.

41
00:01:44,730 --> 00:01:46,730
你有没有注意到这些工具的名称？
Have you seen all these tool names?

42
00:01:46,730 --> 00:01:50,170
可能只是随便点头，但对这些差异并没有真正的理解。
Maybe nodded along but never really understood the differences.

43
00:01:51,090 --> 00:01:53,477
似乎每个主要的LLM供应商
It feels like every major LLM provider

44
00:01:53,477 --> 00:01:56,415
或开源团队都在推动一种自家的标准
or open source group is pushing its own standard

45
00:01:56,415 --> 00:01:59,170
以规定模型如何与工具进行交互。
for how models should talk to tools.

46
00:01:59,569 --> 00:02:01,153
问题不仅在于选项不足，
The challenge isn't just a lack of options,

47
00:02:01,153 --> 00:02:03,170
而是在于可供选择的选项过多。
but too many.

48
00:02:03,650 --> 00:02:06,849
这些能力虽然相似，但它们的前提条件各不相同。
All with overlapping capabilities but different assumptions.

49
00:02:07,489 --> 00:02:10,984
如果您正在创建代理或将LLM融入应用中，
If you're building agents or integrating LLMs into applications,

50
00:02:10,984 --> 00:02:14,129
真正的问题是我是否能成功实现这一点？
the question isn't can I build this?

51
00:02:14,530 --> 00:02:16,676
我需要选择哪个工具链，
It's which tool chain shall I commit to

52
00:02:16,676 --> 00:02:20,189
以及下一个协议到来时会遇到什么情况。
and what happens when the next protocol comes along.

53
00:02:21,229 --> 00:02:24,933
今天我们不仅会解释MCP是什么，
So today we're not just going to explain what MCP is,

54
00:02:24,933 --> 00:02:27,711
还是会探讨它的适用场景、
we're going to explore when it's useful,

55
00:02:27,711 --> 00:02:29,795
所涉及的权衡，以及
what trade offs it introduces,

56
00:02:29,795 --> 00:02:32,110
如何做出明智的选择。
and how to make an informed decision.

57
00:02:32,509 --> 00:02:35,069
它不是一种反思的方式，而是一种反应的方式。
Not a reflective one, a reactive one.

58
00:02:36,349 --> 00:02:38,951
好的，理论固然重要，但我们需要把它
All right, theory is great, but let's make this

59
00:02:38,951 --> 00:02:39,870
变得更具体。
tangible.

60
00:02:40,030 --> 00:02:41,662
为了开始，我想向大家展示
To kick things off, I want to show you

61
00:02:41,662 --> 00:02:42,750
一些具体的内容。
something concrete.

62
00:02:43,509 --> 00:02:44,789
设想一个普遍的情境。
Imagine a common scenario.

63
00:02:44,789 --> 00:02:47,527
我们需要创建一个相对简单的代理，
We need to build a relatively simple agent,

64
00:02:47,527 --> 00:02:50,949
用于与本地的SQLITE数据库进行交互。
its job to interact with the local SQLITE database.

65
00:02:51,430 --> 00:02:53,710
我们并不是在讨论一个极其复杂的大型系统。
We're not talking about a massive Complex system.

66
00:02:53,710 --> 00:02:56,469
这里的主要任务非常简单。
Here the core tasks are straightforward.

67
00:02:56,550 --> 00:02:59,692
我们希望它能列出这个数据库中的表，
We want it to be able to list the tables

68
00:02:59,692 --> 00:03:02,094
并且允许我们或大型语言模型
within that database, allow us or allow the LLM

69
00:03:02,094 --> 00:03:04,127
检查这些表的结构，甚至
to inspect the schema of those tables and perhaps

70
00:03:04,127 --> 00:03:07,270
能够直接执行一个简单的SQL查询。
even execute a basic SQL query directly.

71
00:03:07,669 --> 00:03:10,189
那我们就直接开始演示吧。
So let's jump right into the demo here.

72
00:03:10,349 --> 00:03:11,629
我会利用这个工具。
I will use this tool.

73
00:03:11,710 --> 00:03:14,456
我也开发了这个功能，让它能够口述提示
I also developed it to dictate the prompts

74
00:03:14,456 --> 00:03:16,134
从而节省我们输入的时间
so that we can save the time typing

75
00:03:16,134 --> 00:03:18,269
对于可能很长的提示到光标上。
the potentially long prompts into cursor.

76
00:03:18,349 --> 00:03:21,195
我们也会利用光标来完成这一切，
We will also use cursor as the tool to build all of this

77
00:03:21,195 --> 00:03:24,229
接下来点击停止来看看这是否有效。
and let's click Stop to see whether that works or not.

78
00:03:24,229 --> 00:03:25,150
太棒了，它确实有效。
Great, it works.

79
00:03:25,389 --> 00:03:26,990
那么我们来输入这个提示。
Then let's dictate the prompt.

80
00:03:27,949 --> 00:03:30,552
我希望创建一个代理，使得
I wanted to build an agent to allow

81
00:03:30,552 --> 00:03:33,371
GPT-4o能够理解或探索
say GPT-4o to understand or explore

82
00:03:33,371 --> 00:03:36,189
本地的SQLite数据库。
a local SQLite database.

83
00:03:36,430 --> 00:03:38,193
我们已经准备好名为
We already have the database ready with the name

84
00:03:38,193 --> 00:03:44,856
ecommercedata DB的数据库文件，这个文件在当前文件夹中
of ecommercedata DB this file in the current folder

85
00:03:44,856 --> 00:03:47,599
我希望为GPT提供三个工具。
and I would like to provide three tools to GPT.

86
00:03:48,000 --> 00:03:50,400
第一个工具被称为列表表。
The first tool is called List Tables.

87
00:03:50,479 --> 00:03:54,008
它会列出这个SQLite数据库里的所有表，
It would list all the tables in that SQLite database

88
00:03:54,008 --> 00:03:55,520
并返回一个字符串。
and return a string.

89
00:03:55,840 --> 00:03:57,840
第二个工具被称为获取结构。
The second is called get Schema.

90
00:03:57,919 --> 00:04:02,279
它接受一个表名的字符串参数，
It accepts a string parameter of the table name

91
00:04:02,279 --> 00:04:07,261
并返回一个描述该表结构的字符串，
and then return another string describing the table schema

92
00:04:07,261 --> 00:04:11,309
其中可能包含列名和列类型。
which may contain the column name column type.

93
00:04:11,469 --> 00:04:13,686
最后，我们还可以添加
And in the end we could also include

94
00:04:13,686 --> 00:04:15,681
一行示例数据，使得
a example data row to it so that

95
00:04:15,681 --> 00:04:19,006
LLM能够获得更多上下文信息，
LLM has more context so the return

96
00:04:19,006 --> 00:04:22,110
这样返回值也将是一个字符串。
value is also a string.

97
00:04:22,509 --> 00:04:27,670
第三个工具的名称是执行 SQL。
And the third is the tool is called Execute SQL.

98
00:04:27,670 --> 00:04:30,968
它将一串SQL语句作为输入
It accepts a string of SQL statements as input

99
00:04:30,968 --> 00:04:34,521
并以CSV格式将执行结果输出
and outputs the execution result probably in a CSV format

100
00:04:34,521 --> 00:04:37,312
给LLM，我们希望利用
to the LLM and we would like to use

101
00:04:37,312 --> 00:04:41,879
OpenAI SDK来实现这些功能。
the list OpenAI SDK to do all of this.

102
00:04:41,879 --> 00:04:46,745
我们使用GPT4O作为大型语言模型，要求其任务是
Use GPT4O as the LLM and the task we ask

103
00:04:46,745 --> 00:04:48,974
探索数据库，并生成一个
LLM to do is explore this database and provide

104
00:04:48,974 --> 00:04:53,839
markdown格式的报告，概述表中的基本信息。
a markdown report describing the basic facts of

105
00:04:53,839 --> 00:04:53,839

the table.

106
00:04:53,839 --> 00:04:56,319
比如说每个表的数据库结构。
For example the data schemas of each table.

107
00:04:58,079 --> 00:05:00,987
好的，点击停止，这样我们就能
All right click stop here so we will

108
00:05:00,987 --> 00:05:03,480
完成所有语音识别的工作。
get all of it speech recognized.

109
00:05:03,800 --> 00:05:08,048
把这段文字复制到这里，检查是否有拼写错误
Copy it here, check for any potential misspelling

110
00:05:08,048 --> 00:05:09,959
或语音识别的错误。
or speech recognition error.

111
00:05:10,040 --> 00:05:13,240
好吧，我们就直接在这里提交。
Nope so we'll just submit it here.

112
00:05:13,240 --> 00:05:18,682
我正在使用光标和Gemini 2.5
I'm using cursor together with the Gemini 2.5

113
00:05:18,682 --> 00:05:23,519
我发现它在软件工程工作中非常有效
which I found pretty effective in doing software engineering work

114
00:05:23,519 --> 00:05:28,356
它能够理解任务，因此能够制定计划
and it understand the task so it come up with a plan

115
00:05:28,356 --> 00:05:33,798
甚至知道如何在特定计划中更新光标规则
and even knows to update the cursor rules on this specific plan

116
00:05:33,798 --> 00:05:36,520
它的目标非常明确。
will accept it here it has a pretty clear goal.

117
00:05:36,519 --> 00:05:39,780
创建一个代理，使GPT 4.0能够
Build an Agent to enable GPT 4.0

118
00:05:39,780 --> 00:05:42,466
访问本地SQLite数据库，
to explore a local SQLite database

119
00:05:42,466 --> 00:05:44,959
这个过程可以分为五个步骤。
and it divides into five steps.

120
00:05:45,839 --> 00:05:49,951
在进行设置和规划工具的实施时，
Setup and planning Tool implementation.

121
00:05:49,951 --> 00:05:53,240
似乎已经遇到了一些曲折。
It already looks like it goes a detour.

122
00:05:53,240 --> 00:05:56,141
实际上，你并不需要创建一个虚拟数据库
Create a dummy database which is not necessary

123
00:05:56,141 --> 00:05:58,882
所以我们会在这里进行修正，停止执行
so we will correct IT here, stop the execution

124
00:05:58,882 --> 00:05:59,850
并向它询问。
and ask it.

125
00:06:00,250 --> 00:06:02,209
其实你不必建立一个假数据库。
Actually you don't need to create a dummy database.

126
00:06:02,209 --> 00:06:05,689
我们已有一个名为 ecommercedata db 的数据库。
We already have an existing database called ecommercedata db.

127
00:06:07,610 --> 00:06:10,810
好了，进行复制、粘贴和输入。
All right, copy, paste, enter.

128
00:06:12,649 --> 00:06:17,467
希望这能修正该路由的接受，然后
Hopefully this will correct this route accept and then

129
00:06:17,467 --> 00:06:22,606
会实施工具并完成OpenAI集成
it will implement the tools and perform the OpenAI integration

130
00:06:22,606 --> 00:06:27,423
接着进行主要脚本和报告的生成，
and then do the main script and reporting generation,

131
00:06:27,423 --> 00:06:36,095
确保GPT4O，以及生产者markdown、报告、测试
ensure GPT4O, ensure producer markdown, report and testing

132
00:06:36,095 --> 00:06:37,379
和改进。
and refinement.

133
00:06:37,540 --> 00:06:38,740
显得十分专业。
Looks pretty professional.

134
00:06:39,459 --> 00:06:42,180
接下来我们要实现这个Python函数。
So move on to implementing the Python function.

135
00:06:42,339 --> 00:06:47,457
这是它所实现的Python函数的框架，
This is the framework of the Python function

136
00:06:47,457 --> 00:06:50,420
目前只包含这个列表表。
it implements has list tables only this one.

137
00:06:50,740 --> 00:06:54,420
现在，它可能会一个接一个地实现其它功能。
And now it probably will implement other functions

138
00:06:54,420 --> 00:06:54,420

one by one.

139
00:06:54,660 --> 00:06:58,165
这反映了双子座的一种趋势，
This is a tendency of Gemini,

140
00:06:58,165 --> 00:07:00,591
它能够将复杂的任务
which knows to decompose a complicated task

141
00:07:00,591 --> 00:07:05,445
分为两个阶段，从而在实施时提高成功率
in two stages so that it has better success rate

142
00:07:05,445 --> 00:07:07,871
同时也能够调用光标
in terms of implementation, as well as calling cursor

143
00:07:07,871 --> 00:07:09,220
进行编辑。
to do the editing.

144
00:07:09,939 --> 00:07:15,484
在此时，我们可以更深入了解最终执行 SQL 的工具
And the final tool of execute SQL at this time

145
00:07:15,484 --> 00:07:17,924
是如何实现这些功能的。
we can also take a closer look at how it

146
00:07:17,924 --> 00:07:19,920
列出表格实际上是在
implements all this List table is essentially just

147
00:07:19,920 --> 00:07:24,799
SQLite 的元数据库上执行 SQL 查询
run a SQL query on the metadatabase of the SQLite

148
00:07:24,799 --> 00:07:26,129
以获取架构。
the GET schema.

149
00:07:26,129 --> 00:07:33,255
另外，请注意，使用这个 pragma 语句
Also get this, use this pragma statement

150
00:07:33,255 --> 00:07:35,970
来执行 SQL。
and execute SQL.

151
00:07:38,370 --> 00:07:38,850
行了。
All right.

152
00:07:38,850 --> 00:07:41,943
它在开发过程中进行测试是明智的，
It knows to test it in the middle of development,

153
00:07:41,943 --> 00:07:45,423
这很有好处，这样我们就能发现任何错误
which is good, so that we could discover any bugs

154
00:07:45,423 --> 00:07:46,970
在进入生产之前。
before we go into production.

155
00:07:48,009 --> 00:07:50,649
随后它对示例进行了调整。
And then it adjusted the examples.

156
00:07:52,410 --> 00:07:58,172
仍然存在语法错误，不过它似乎按照预期在运行。
Still a syntax error and seems to be working

157
00:07:58,172 --> 00:08:02,101
这个语法错误显得很有意图，因为
as intended for this syntax error looks like

158
00:08:02,101 --> 00:08:06,030
系统意识到这是无效的，接着将会
it's intentional because it knows it is invalid

159
00:08:06,030 --> 00:08:08,650
安装OpenAI库。
and then it will install the OpenAI library.

160
00:08:09,220 --> 00:08:12,084
观看AI为我们完成这些工作的过程
It's super fun to watch AI doing all of

161
00:08:12,084 --> 00:08:12,980
非常有趣。
this work for us.

162
00:08:13,139 --> 00:08:17,962
就像它制定了一个非常全面的计划，
Like it get a pretty comprehensive plan,

163
00:08:17,962 --> 00:08:20,072
逐步更新进展，
update its progress stage by stage,

164
00:08:20,072 --> 00:08:23,387
高效地编写数百行代码，
write hundreds of lines of code in no time,

165
00:08:23,387 --> 00:08:26,402
智能地管理依赖关系，
manage the dependencies smartly,

166
00:08:26,402 --> 00:08:29,114
并决定将实现分开，
and it decides to split the implementation

167
00:08:29,114 --> 00:08:34,238
与通用数据库工具的SQLite代理
of the SQLite agent here with the general DB tool

168
00:08:34,238 --> 00:08:38,759
以便我们将来可以重用这些功能。
so that we could reuse the functions in the future.

169
00:08:38,840 --> 00:08:40,200
这真是个明智的选择。
That's also a smart move.

170
00:08:40,519 --> 00:08:41,559
这就是最重要的部分。
And here's the key.

171
00:08:42,039 --> 00:08:45,709
这就是我们向OpenAI API介绍
This is how we will Describe to the OpenAI API

172
00:08:45,709 --> 00:08:48,360
GPT4O可用工具的方式。
what tools are available to GPT4O.

173
00:08:48,679 --> 00:08:50,757
从本质上讲，它们以函数的形式存在。
Essentially they are in the form of functions,

174
00:08:50,757 --> 00:08:52,956
在更大的人类语境中，这些被称作工具，
which is called tools in anthropic world,

175
00:08:52,956 --> 00:08:55,399
而在OpenAI的环境中，则被称为函数。
but it's called functions in OpenAI world.

176
00:08:55,879 --> 00:08:58,300
这句话解释了函数的名称、
It describes the name of the function,

177
00:08:58,300 --> 00:09:00,519
输入参数以及返回结果。
the parameters and the return value.

178
00:09:00,919 --> 00:09:02,929
这个描述旨在告诉AI
The description is also provided to tell the AI

179
00:09:02,929 --> 00:09:06,950
你何时需要使用该功能以及它的目的是什么。
how, when you need to use that and what it is for.

180
00:09:07,350 --> 00:09:10,083
因此，基本上我们使用
So essentially you can see that we use

181
00:09:10,083 --> 00:09:14,456
特定的JSON结构来向我们的工具
a specific JSON schema to describe our provided tools

182
00:09:14,456 --> 00:09:18,283
描述GPT 4.0，以使AI
to the GPT 4.0 and then so that the AI

183
00:09:18,283 --> 00:09:23,750
能够知道何时调用哪个工具以及以何种格式。
knows when to invoke which tool and in which format.

184
00:09:25,429 --> 00:09:32,604
所以实际发生的情况是，它调用了这个Python脚本
So what happened is it calls this Python script

185
00:09:32,604 --> 00:09:40,639
而Python脚本或GPT4O首先接收了由光标编写的提示
the Python script or the GPT4O first receives this prompt

186
00:09:40,960 --> 00:09:46,059
总的来说，它请求对这个数据库进行初步探索。
Essentially it asks it to do some initial exploration

187
00:09:46,059 --> 00:09:47,759
利用这些工具。
using the tools against this database.

188
00:09:48,559 --> 00:09:55,249
接下来，GPT4O首次使用零个参数调用了列表表工具，
And the first turn the GPT4O decides let's invoke list tables tool

189
00:09:55,249 --> 00:09:58,336
预期的结果是获取到渠道、
with zero arguments which is expected and got the results of channels,

190
00:09:58,336 --> 00:10:02,710
客户类型、每日指标等信息，这些正是
customer types, daily metrics, et cetera, which is exactly

191
00:10:02,710 --> 00:10:06,570
该SQLite数据库中的表格。
the tables in this SQLite database.

192
00:10:07,129 --> 00:10:12,636
接着，它知道需要通过工具获取schema
And then it knows to invoke tools of get schema

193
00:10:12,636 --> 00:10:17,592
名为channels的表，得到结果后
with table name of channels and get this result

194
00:10:17,592 --> 00:10:21,446
再依次为其他表调用同样的工具
and invoke other for other tables using this same tool

195
00:10:21,446 --> 00:10:24,200
并收集所有相关信息。
tool one by one and collect all this information.

196
00:10:25,320 --> 00:10:28,220
获取所有信息后，它能够
After it gets all this information, it knows

197
00:10:28,220 --> 00:10:34,810
生成最终的响应，这个响应是markdown格式结果
to produce a final response which is a markdown result

198
00:10:34,810 --> 00:10:36,919
表格描述的表格。
of the table of description of the table.

199
00:10:37,558 --> 00:10:41,304
因此，这个任务到此结束，它可以
So that concludes this entire task it is able

200
00:10:41,304 --> 00:10:45,799
生成这样的 markdown 内容。
to generate such a markdown.

201
00:10:46,279 --> 00:10:50,764
我想说明，尽管这个markdown看似简单，
I want to point out that on although this markdown looks trivial,

202
00:10:50,764 --> 00:10:54,230
其实只是对表格进行了一些探索而已。
it's nothing more than just doing some exploration of the table.

203
00:10:54,629 --> 00:10:56,870
试想一下，如果能够将其自动化。
Imagine if you could automate it.

204
00:10:57,190 --> 00:11:03,233
如果你能让它生成对示例数据的深入分析，
If you could ask it to generate an insightful deep analysis

205
00:11:03,233 --> 00:11:05,778
这完全是可行的，
on the example data, which is totally possible,

206
00:11:05,778 --> 00:11:10,549
那么你的工作将会变得更加轻松。
then how much easier it will make your work

207
00:11:10,549 --> 00:11:10,549

like your work will be much easier.

208
00:11:12,070 --> 00:11:16,035
因此，这为我们打下了坚实的基础，
So then this actually gives us a pretty good foundation

209
00:11:16,035 --> 00:11:21,982
说明了如何构建一个能够查询本地数据库的智能代理，
that it shows how to build an agent capable of querying local database

210
00:11:21,982 --> 00:11:26,443
而这个代理在与数据库工具进行交互时，
and that agent in its interaction with the database tools

211
00:11:26,443 --> 00:11:31,399
严格遵循了我们在这里看到的核心调用流程。
followed exactly this core invocation flow we see here.

212
00:11:32,279 --> 00:11:37,986
在我们这个案例中，LLM指的是OpenAI的模型，它决定
The LLM in our case is OpenAI model decided

213
00:11:37,986 --> 00:11:42,062
使用类似于表格列出或获取架构的软件工具，
to use a tool like list tables or get schema

214
00:11:42,062 --> 00:11:45,731
然后制定并发送一个结构化的工具调用，
and it then formulated and sent a structured tool call

215
00:11:45,731 --> 00:11:50,622
以便我们的客户端能够在SQLite数据库上执行。
which our client could execute it against the SQLite database

216
00:11:50,622 --> 00:11:55,717
这个客户端的代码在我们的实现中用Python编写，
and this client code is implemented as a python code

217
00:11:55,717 --> 00:11:59,793
而查询结果也从SQLite数据库中获取，
in our implementation and that result it queries

218
00:11:59,793 --> 00:12:02,851
返回了表名和架构信息给LLM。
against the SQLite database and GetResult

219
00:12:02,851 --> 00:12:06,111
接下来，LLM将进行另一次决策，
that result like the table names, schema information

220
00:12:06,111 --> 00:12:09,372
判断我需要调用哪个工具，还是应该
were returned to the LLM and and then the LLM will

221
00:12:09,372 --> 00:12:12,430
在这里停止并开始生成最终报告？
do another round of decision making which tool I need to call

222
00:12:12,430 --> 00:12:12,430

or shall I stop here and begin generating the final report?

223
00:12:12,990 --> 00:12:16,350
这就是代理工具使用的核心循环。
And this is the fundamental cycle of agentic tool use.

224
00:12:17,389 --> 00:12:21,093
我们需要明白，对于这样一种简单的
It's important to recognize that for this kind

225
00:12:21,093 --> 00:12:25,955
单一工具交互或单一ILM交互，您不一定需要
of straightforward single tool interaction or single ILM interaction,

226
00:12:25,955 --> 00:12:27,575
建立一个全面的
you likely didn't need to implement a comprehensive

227
00:12:27,575 --> 00:12:28,269
框架。
or overarching framework.

228
00:12:28,590 --> 00:12:30,590
你可能根本不需要引入
You probably didn't even need to bring in something like

229
00:12:30,590 --> 00:12:34,590
我们接下来讨论的模型上下文粒子或MCP。
the model context particle or MCP that we'll be discussing more.

230
00:12:35,240 --> 00:12:40,855
在这个简单的场景下，您的LLM所提供的本地函数调用功能
For this basic scenario, the native function calling capabilities

231
00:12:40,855 --> 00:12:43,559
基本上可以有效地完成任务。
provided by your LLM were likely sufficient to get the job done effectively.

232
00:12:45,480 --> 00:12:48,559
但随之而来的必然是下一个步骤。
But then comes the inevitable next step.

233
00:12:48,559 --> 00:12:55,459
考虑之后，我决定静音。接下来，
After considering, I'll just mute all right,

234
00:12:55,459 --> 00:13:02,819
我想分享一个在简单单一模型情况下
and then here is a consider another perspective

235
00:13:02,819 --> 00:13:07,419
可能不可避免的观点。
that may be inevitable after considering the simple

236
00:13:07,419 --> 00:13:07,419

single model scenarios.

237
00:13:07,659 --> 00:13:09,577
也许你会想要试验一下其他模型
Perhaps you want to experiment with a different model

238
00:13:09,577 --> 00:13:12,179
比如Anthropic Claude。
like Anthropic Claude.

239
00:13:12,179 --> 00:13:17,179
或者客户对谷歌的Gemini有具体的需求。
Or maybe a client has a specific requirement

240
00:13:17,179 --> 00:13:17,179

on Google's Gemini.

241
00:13:17,259 --> 00:13:20,139
或者你想尝试其他的开源替代方案。
Or you're interested in exploring another open source alternative.

242
00:13:20,779 --> 00:13:24,729
于是你突然发现，自己为一个模型开发的优秀工具
So suddenly you take that perfectly good tool you developed

243
00:13:24,729 --> 00:13:26,883
在尝试与另一个模型结合时
for one model and try to use it with another

244
00:13:26,883 --> 00:13:28,139
却遇到了困难。
and you hit a wall.

245
00:13:28,460 --> 00:13:30,059
这不仅仅是它无法直接
It's not just that it doesn't work out of

246
00:13:30,059 --> 00:13:30,539
使用。
the box.

247
00:13:30,779 --> 00:13:33,017
通常，工具的定义和
Often the entire way the tool is defined

248
00:13:33,017 --> 00:13:35,005
预期的交互方式与
and expected to interact simply doesn't fit

249
00:13:35,005 --> 00:13:37,740
新模型的范式并不兼容。
the new model's paradigm.

250
00:13:38,460 --> 00:13:40,879
因此，问题的核心在于，
So the core of the issue is that

251
00:13:40,879 --> 00:13:42,639
不同供应商的模型
the different models from different providers

252
00:13:42,639 --> 00:13:45,059
往往使用各自独特的方式
often employ their own unique schemas

253
00:13:45,059 --> 00:13:46,379
来定义工具。
for defining tools.

254
00:13:46,700 --> 00:13:51,100
它们对如何使用这些工具可能有不同的调用约定。
They can have varied calling conventions for how those tools are

255
00:13:51,100 --> 00:13:52,700
和如何传递参数。
invoked and how arguments are passed.

256
00:13:52,860 --> 00:13:56,947
另外，它们在处理错误的方式以及如何返回预期结果
Furthermore, their error handling patterns and the way expected results

257
00:13:56,947 --> 00:13:59,080
上也可能会有很大的不同。
to be returned can also differ significantly.

258
00:13:59,559 --> 00:14:03,115
在一个生态系统中，原本简单的调用功能，
What was once a straightforward call function

259
00:14:03,115 --> 00:14:05,174
可能很快就会变得繁琐，
in one ecosystem can quickly devolve into a tedious process

260
00:14:05,174 --> 00:14:07,794
需要我反复重写和封装这个工具
of rewriting and rewrapping this tool

261
00:14:07,794 --> 00:14:10,039
为每一个想要支持的平台。
for every single platform I want to support.

262
00:14:11,080 --> 00:14:14,478
这正是我们在开发代理AI时常常面临的
And that is the real friction point

263
00:14:14,478 --> 00:14:15,799
重要问题之一。
we often encounter in agentic AI development.

264
00:14:16,519 --> 00:14:21,033
我们在不同模型之间工具和能力的可移植性不足，
This frustrating lack of portability for our tools

265
00:14:21,033 --> 00:14:24,111
成为了构建真正灵活和长期有效的
and capabilities across different models is a significant hurdle

266
00:14:24,111 --> 00:14:28,419
AI应用程序的一个主要障碍，令人感到沮丧。
to building truly flexible and and future proof AI applications.

267
00:14:30,580 --> 00:14:33,060
实际上，当我们希望扩大代理的规模时，
Indeed, when we want to scale our agent

268
00:14:33,060 --> 00:14:35,264
或者切换到其他模型提供者，比如,
or switch to a different model provider,

269
00:14:35,264 --> 00:14:37,744
例如Claude或其他开源替代方案，
perhaps Claude or another open source alternative,

270
00:14:37,744 --> 00:14:40,500
我们所构建的简单代理往往会开始出现分歧。
that simple agent we built often starts to fork.

271
00:14:40,740 --> 00:14:43,667
双重重用的理想很快就消逝了，
The dream of dual reuse quickly fades,

272
00:14:43,667 --> 00:14:46,803
而我们的开发范围却在不断扩大，
and our development surface area multiplies,

273
00:14:46,803 --> 00:14:49,940
导致了复杂性和维护工作的增加。
increasing complexity and maintenance.

274
00:14:50,419 --> 00:14:51,860
这是普遍难题
This is the common pain point

275
00:14:51,860 --> 00:14:53,779
MCP旨在应对。
that MCP tries to address.

276
00:14:55,009 --> 00:14:57,827
模型上下文协议（mcp）是为了解决
The Model Context Protocol, or mcp, was designed

277
00:14:57,827 --> 00:14:59,649
这一复杂挑战而设计的。
to tackle this very challenge.

278
00:15:00,289 --> 00:15:03,361
协议的核心是在多个AI模型，
At its heart, the protocol was meticulously designed

279
00:15:03,361 --> 00:15:07,091
与其互动的客户端以及这些模型所需的
to establish consistent and standardized interface between AI models,

280
00:15:07,091 --> 00:15:12,356
各种工具和资源之间，建立一个一致且标准化的接口，
the clients that interact with them, and the various tools

281
00:15:12,356 --> 00:15:14,769
这一设计过程非常细致。
and resources these models might need to use.

282
00:15:15,570 --> 00:15:19,277
理解MCP并不是一个你需要掌握的复杂框架，
It's crucial to understand that MCP isn't another heavyweight framework

283
00:15:19,277 --> 00:15:20,690
这一点非常重要。
you need to learn.

284
00:15:20,929 --> 00:15:25,179
相对而言，可以将其视为一种轻量且更广泛的格式，
Instead, think of it as a lightweight, wider format,

285
00:15:25,179 --> 00:15:27,951
作为有效的抽象层，以及明确规范
an effective abstraction layer, and a clear contract

286
00:15:27,951 --> 00:15:29,429
这些交互的契约。
that governs those interactions.

287
00:15:30,230 --> 00:15:31,526
幻灯片上的图示
The diagram you see on the slide

288
00:15:31,526 --> 00:15:33,750
是一个很精彩的视觉比喻。
is a great visual metaphor.

289
00:15:33,830 --> 00:15:37,498
MCP作为一个中心枢纽和标准，可以让
MCP acts as a central hub, a standard that allows

290
00:15:37,498 --> 00:15:41,167
许多不同的工具和各种AI模型实现连接
many different tools and various AI models to connect

291
00:15:41,167 --> 00:15:42,390
与沟通无缝。
and communicate seamlessly.

292
00:15:43,429 --> 00:15:48,444
MCP的强大之处在于，它能够使您的工具定义
The real power of MCP lies in its ability

293
00:15:48,444 --> 00:15:52,742
精心设计的提示模板和对外部资源的引用
to make your tool definitions, your carefully crafted prompt templates

294
00:15:52,742 --> 00:15:55,129
都不依赖于特定模型。
and even your references to external resources truly model agnostic.

295
00:15:55,610 --> 00:15:57,529
这一理念虽然简单，却蕴含深刻的意义。
The philosophy is simple but profound.

296
00:15:57,850 --> 00:16:04,596
定义这些组件后，可以在不同的AI模型和平台上广泛复用，
Define these components once and then reuse them everywhere

297
00:16:04,596 --> 00:16:11,093
这直接支持了我们之前提到的核心目标，即促进一个丰富的
across different AI models and platforms, and this directly supports

298
00:16:11,093 --> 00:16:16,840
互操作生态系统，使工具能够独立开发并广泛应用。
the core goal we mentioned earlier to foster and enable

299
00:16:16,840 --> 00:16:16,840

a rich interoperable ecosystem where tools can be developed independently

300
00:16:16,840 --> 00:16:16,840

and used broadly.

301
00:16:18,509 --> 00:16:20,429
MCP正在获得越来越多的关注。
And MCP is gaining serious traction.

302
00:16:20,590 --> 00:16:22,909
云桌面可以直接使用这一功能。
Cloud Desktop supports it out of the box.

303
00:16:23,149 --> 00:16:24,990
光标已实现内置集成功能。
Cursor has built in integration.

304
00:16:25,389 --> 00:16:26,669
OpenAI 正在进行推广。
OpenAI is rolling out.

305
00:16:26,830 --> 00:16:31,070
谷歌已经表示了对这一技术的支持，而Anthropic则是其创始公司。
Google has signaled support and Anthropic is the originator.

306
00:16:31,070 --> 00:16:33,319
但当前的普及趋势已经渗透到整个
But the adoption curve now spans the entire

307
00:16:33,319 --> 00:16:34,669
LLM生态系统中。
LLM ecosystem.

308
00:16:35,309 --> 00:16:37,470
这不仅是某个公司的愿景。
This isn't just one company's vision.

309
00:16:37,549 --> 00:16:40,565
这正在被多个大型语言模型提供商广泛采用。
It's being adopted across multiple LLM providers

310
00:16:40,565 --> 00:16:41,470
和工具平台。
and tooling platforms.

311
00:16:41,870 --> 00:16:43,389
MCP 不是边缘化的存在。
MCP is not fringe.

312
00:16:44,440 --> 00:16:47,000
但请记住，仅因其被支持或
But remember, just because it's supported or

313
00:16:47,000 --> 00:16:50,840
流行，并不意味着您现在就必须使用它。
because it's popular doesn't mean you must use it now.

314
00:16:51,639 --> 00:16:55,016
所以你可能会好奇，MCP如此强大，
So you might be wondering, if MCP is so powerful,

315
00:16:55,016 --> 00:16:57,399
为什么它还会引发争议呢？
why is it still controversial?

316
00:16:58,759 --> 00:16:59,639
让我为您演示一下。
Let me show you.

317
00:16:59,960 --> 00:17:03,000
我们将采用之前讨论的SQLite代理，
We will take the same SQLite agent we discussed

318
00:17:03,000 --> 00:17:06,200
这次会通过FastMCP服务器将其公开。
and this time we'll expose it via a FastMCP server.

319
00:17:06,519 --> 00:17:09,853
FastMCP 是一个社区开发的 SDK，旨在实现
FastMCP is a community SDK that helps implement

320
00:17:09,853 --> 00:17:10,519
这一协议。
the protocol.

321
00:17:11,329 --> 00:17:12,886
接下来，我们会通过 Cursor 来调用
Then we'll call it from Cursor

322
00:17:12,886 --> 00:17:14,210
和 Claude Desktop。
and from Claude Desktop.

323
00:17:14,450 --> 00:17:16,690
相同的工具实现方式，但服务于不同的客户。
Same tool implementation, different clients.

324
00:17:17,329 --> 00:17:20,289
这将强调一次性写入可以在任何地方使用的概念。
This would highlight the write once use anywhere idea.

325
00:17:20,450 --> 00:17:22,049
这就是我们所说的真实场景。
And this is the real scenario.

326
00:17:22,289 --> 00:17:25,329
许多团队希望能开发出与模型无关的工具。
Many team want model agnostic tool development.

327
00:17:26,130 --> 00:17:28,490
因此，我会回到这里，从这一部分开始讲起。
So I'll come back here and begin from this.

328
00:17:28,490 --> 00:17:31,970
DBTools 可能是一个用于 SQLite 的代理工具。
DBTools probably the SQLite agent.

329
00:17:32,369 --> 00:17:34,660
我们现在会让AI再
We will just tell the AI now

330
00:17:34,660 --> 00:17:37,970
审视一下SQLite代理。
take another look at the SQLite agent.

331
00:17:38,319 --> 00:17:40,640
我们希望将其转变为MCP服务器。
We wanted to convert it into MCP server.

332
00:17:40,640 --> 00:17:44,480
我们打算将快速的 McP 作为 SDK，
We want to use the fast McP as the SDK

333
00:17:44,480 --> 00:17:46,208
可能需要在网上查找
and probably you need to search online

334
00:17:46,208 --> 00:17:48,319
如何在此过程中使用它。
on how to use that in this process.

335
00:17:48,640 --> 00:17:53,683
请确保文件里提到的所有路径
Let's make sure all of the paths mentioned

336
00:17:53,683 --> 00:17:57,951
都是绝对路径，然后把它
in the file is absolute path and then

337
00:17:57,951 --> 00:18:00,279
复制到这里。
paste it here.

338
00:18:00,279 --> 00:18:02,507
或许我们还需要将它
Probably we also need to give it

339
00:18:02,507 --> 00:18:04,240
我们的计数根。
our count root.

340
00:18:04,549 --> 00:18:10,884
我会将其复制并粘贴到这里，
I'll just copy and paste it here,

341
00:18:10,884 --> 00:18:15,269
然后开始进行生成。
then begin generating.

342
00:18:16,470 --> 00:18:18,029
我们来研究一下光标的规则吧。
Let's take a look at the cursor rules.

343
00:18:18,029 --> 00:18:19,670
它可能已经完成更新。
Probably it's already updated.

344
00:18:20,548 --> 00:18:31,810
接着，双子座会开始制定多个阶段的计划，
And then Gemini begins to plan several phases,

345
00:18:31,810 --> 00:18:38,330
更新目前的进展，并设定
update the current progress and the plan

346
00:18:38,330 --> 00:18:42,480
该项目的目标。
the goal of this project.

347
00:18:42,480 --> 00:18:44,902
我想这个项目就是这个项目
I guess the project is the project

348
00:18:44,902 --> 00:18:46,720
我们目前正在使用。
we're using here.

349
00:18:46,799 --> 00:18:49,965
该项目的主要目标是让AI能够
The overall goal of this project is to enable the AI

350
00:18:49,965 --> 00:18:53,357
自主探索一个SQLite数据库
to explore a database, a SQLite database specifically on its own

351
00:18:53,357 --> 00:18:57,880
这样我们就不需要向它说明，这就是数据表。
so that we don't need to tell it, hey, this is the table.

352
00:18:57,880 --> 00:19:02,612
这就是AI所需的结构，使其能够
That is the structure the AI would need to know

353
00:19:02,612 --> 00:19:06,082
使用不同的工具自主探索
to use different tools to actually autonomously discover

354
00:19:06,082 --> 00:19:07,660
所有细节。
all the details.

355
00:19:07,980 --> 00:19:08,859
这就是我们的目标。
This is the goal.

356
00:19:10,539 --> 00:19:11,059
没问题。
All right.

357
00:19:11,059 --> 00:19:16,526
接下来我们对 DB 工具进行了修订
And then we have the DB tools revised here

358
00:19:16,526 --> 00:19:19,420
并进行了删除操作。
and deleting.

359
00:19:19,579 --> 00:19:21,500
其实我不想删除它
Actually I don't really want to delete it

360
00:19:21,500 --> 00:19:22,700
也拒绝它。
as well reject it.

361
00:19:26,470 --> 00:19:31,670
我们的代码在哪儿呢？
And we have where is our code?

362
00:19:31,670 --> 00:19:34,069
MCP 服务器仍然尚未创建。
MCP server are still to be created.

363
00:19:34,549 --> 00:19:36,630
因此，我将会同意这里的修改。
So I'll accept the changes here.

364
00:19:37,269 --> 00:19:41,112
请查看光标规则，了解
Take a look at the cursor Rules to see

365
00:19:41,112 --> 00:19:48,029
我们在何处仍然直接实施MCP服务器。
where we are still implementing the MCP server directly.

366
00:19:48,029 --> 00:19:50,228
我们利用现有的数据库工具，
We use the existing database tools,

367
00:19:50,228 --> 00:19:51,750
因此这一点很明显。
which makes it pretty clear.

368
00:20:01,390 --> 00:20:04,402
请注意我们是如何让它在线搜索
And note that how we ask it to do online search

369
00:20:04,402 --> 00:20:07,630
以便理解快速MCP的使用方法。
to understand how to use fast mcp.

370
00:20:07,789 --> 00:20:10,801
实际上，如果我们不包含这部分内容，
Actually if we don't include that,

371
00:20:10,801 --> 00:20:12,572
它将会产生误解，因为
it will try to hallucinate because

372
00:20:12,572 --> 00:20:15,229
它对这个相对较新的库并不了解。
it has no knowledge about this pretty new library.

373
00:20:15,470 --> 00:20:18,970
不过，如果它在进行在线学习，
However, in the case that it learns online,

374
00:20:18,970 --> 00:20:21,720
它就知道如何编写代码，
it knows a how to write a code

375
00:20:21,720 --> 00:20:25,470
以及如何真正启动这个调试代理。
and B how to actually launch this debugging proxy.

376
00:20:25,630 --> 00:20:29,861
现在让我们查看一下这个端口，
So let's take a look at this port,

377
00:20:29,861 --> 00:20:33,789
点击这里的链接来进行连接。
follow the link here and click Connect.

378
00:20:34,190 --> 00:20:36,118
这将会连接到我们MCP服务器，
This will connect to our MCP server,

379
00:20:36,118 --> 00:20:37,789
我们新开发的MCP服务器。
our newly authored MCP server.

380
00:20:37,869 --> 00:20:41,683
我们简要概述一下这段代码，
And just to give an overview of what the code looks like,

381
00:20:41,683 --> 00:20:44,029
它其实非常简单。
it basically is pretty simple.

382
00:20:44,369 --> 00:20:45,089
有三个主要功能。
Three functions.

383
00:20:45,650 --> 00:20:48,069
这里的要点是，你只需要对它进行装饰。
The key here is you just decorate it

384
00:20:48,069 --> 00:20:49,009
用MCP工具。
with MCP tool.

385
00:20:49,170 --> 00:20:49,730
就这样结束了。
That's it.

386
00:20:50,049 --> 00:20:51,672
接下来我们可以去
After that we'll be able to go

387
00:20:51,672 --> 00:20:52,890
找检验员了。
to the inspector.

388
00:20:52,890 --> 00:20:54,609
这就是MCP检查工具。
This is called MCP Inspector.

389
00:20:54,690 --> 00:20:57,769
这个工具配备了MCP SDK
It's some tool coming with MCP SDK

390
00:20:57,769 --> 00:20:59,529
我们可以进入工具
and then we can go to tools,

391
00:20:59,529 --> 00:21:01,730
列表查看可用的工具。
list tools.

392
00:21:01,809 --> 00:21:04,977
接下来，我们将能够查看三种可用工具，
Then we'll be able to see the three tools available,

393
00:21:04,977 --> 00:21:08,673
以及可以与AI互动的工具。点击每个工具后，
the tools exposed to AI and if we click into each tool

394
00:21:08,673 --> 00:21:10,609
我们将获得更多的信息。
it will give us more information.

395
00:21:11,200 --> 00:21:12,755
这个工具的功能就像是列出所有表
Like this tool is to list all the tables

396
00:21:12,755 --> 00:21:14,000
在SQLite数据库中。
in SQLite database.

397
00:21:14,319 --> 00:21:16,880
在这种情况下，我们可以直接启动这个工具。
And in this case we can directly click Run tool.

398
00:21:17,119 --> 00:21:19,466
它将能够直接使用这个工具
It will be able to just run the tool

399
00:21:19,466 --> 00:21:20,640
并提供结果。
and give us the result.

400
00:21:21,200 --> 00:21:24,179
所以现在我们只有一个MCP服务器，
So now we just have an MCP server

401
00:21:24,179 --> 00:21:27,158
并且我们还会检查它是否真正能够使用
and we also inspect to see it really works

402
00:21:27,158 --> 00:21:28,559
常见的调试工具。
using the common debugging tool.

403
00:21:28,559 --> 00:21:29,759
就这么简单。
It's that easy.

404
00:21:30,160 --> 00:21:32,799
那么我们该如何与客户建立联系呢？
But how can we connect it with the clients?

405
00:21:33,200 --> 00:21:34,480
这里是我们的客户。
Here we have the clients.

406
00:21:34,559 --> 00:21:36,240
一个例子就是指针。
One example is cursor.

407
00:21:36,240 --> 00:21:38,079
我还会演示Claude的桌面界面。
I will also show Claude desktop.

408
00:21:38,319 --> 00:21:40,303
接下来我们将再次进行在线
So what we'll do here is ask to do

409
00:21:40,303 --> 00:21:40,799
搜索。
online search again.

410
00:21:41,940 --> 00:21:43,883
现在我想将这个MCP服务器
Now I'd like to connect this MCP server

411
00:21:43,883 --> 00:21:44,779
与光标相连。
with cursor.

412
00:21:44,779 --> 00:21:46,579
你可以帮我进行一些在线搜索吗？
Could you please do some online search?

413
00:21:47,940 --> 00:21:50,876
我们需要把AI应用于此，
We need to be applied to the AI

414
00:21:50,876 --> 00:21:55,525
接着可能生成一个游标MCP JSON，
and then potentially generate a cursor MCP JSON

415
00:21:55,525 --> 00:22:00,420
以使我能够在游标中使用这个MCP服务器。
to allow me to use this MCP server in cursor.

416
00:22:08,509 --> 00:22:10,269
我们应该保持礼貌。
We need to be polite.

417
00:22:11,069 --> 00:22:11,869
删掉这个。
Remove this.

418
00:22:11,950 --> 00:22:15,069
这不应该算作提示中的一部分。
This shouldn't be one part of the prompt.

419
00:22:15,309 --> 00:22:16,894
接下来我们来探讨如何将它
And let's see how to connect it

420
00:22:16,894 --> 00:22:17,950
与光标进行连接。
with cursor.

421
00:22:18,029 --> 00:22:20,677
在这里你可以观察到一个模式，
And you can see here one pattern is

422
00:22:20,677 --> 00:22:24,269
那就是我是如何将任务广泛委托给AI的。
how extensively I delegate the task to AI.

423
00:22:24,349 --> 00:22:25,710
实际上我并不需要了解。
Actually I don't need to know.

424
00:22:25,869 --> 00:22:28,109
我其实不需要记住怎么把它
I don't need to remember how to connect it

425
00:22:28,109 --> 00:22:29,230
连到光标上。
to cursor.

426
00:22:29,390 --> 00:22:31,390
AI可以帮我进行搜索。
AI could just do the search for me.

427
00:22:32,359 --> 00:22:35,936
这就像是一种心态，把任务交给AI
This is like the mindset of delegating the task

428
00:22:35,936 --> 00:22:39,960
从而让你的思维能力得到最大化的发挥。
to AI to maximize your brain power.

429
00:22:40,519 --> 00:22:43,991
这就像是你拥有一个团队帮你处理所有基础工作
It's like you have a team doing all the low level work for you

430
00:22:43,991 --> 00:22:47,960
让你能够更加专注于那些需要你专业技能的创造性事务
and you can really focus on the Real creative things

431
00:22:49,400 --> 00:22:52,480
好的，它完成了研究
All right, so it did its research

432
00:22:52,480 --> 00:22:55,559
开始生成这个文件。
and begin generating this file.

433
00:22:55,960 --> 00:22:56,480
好的，我们开始吧。
Okay.

434
00:22:56,480 --> 00:22:58,119
它创建了这个文件。
It generated this file.

435
00:22:58,450 --> 00:23:04,777
我会接受这个，然后我们可以点击这个图标，
I'll just accept it and then we can go to this icon,

436
00:23:04,777 --> 00:23:09,839
进入MCP，找到这个可用的工具，
go to MCP and we can find this tool,

437
00:23:09,839 --> 00:23:12,369
和MCP服务器。
this MCP server available.

438
00:23:13,250 --> 00:23:16,690
我们在这里也看到这个弹出窗口。
We also see this pop up window here.

439
00:23:16,690 --> 00:23:17,531
我们可以选择在这里启用
We can Enable here

440
00:23:17,531 --> 00:23:18,450
也可以选择在另一处启用。
or Enable here.

441
00:23:18,450 --> 00:23:19,130
两者都可以正常工作。
Both will work.

442
00:23:19,130 --> 00:23:21,554
我们只需启用它，结果显示
Let's just enable it and it says

443
00:23:21,554 --> 00:23:23,170
客户端已经关闭。
client closed.

444
00:23:25,420 --> 00:23:30,380
这表明在很多情况下我们需要进行调试。
Then that means we need to do some debugging

445
00:23:30,380 --> 00:23:30,380

in most of the cases.

446
00:23:30,700 --> 00:23:36,200
这意味着在Python执行中可能会出现一些问题
That just means we probably would have some issue

447
00:23:36,200 --> 00:23:38,113
因为我们已经确认
in the Python execution because we already checked

448
00:23:38,113 --> 00:23:41,940
这个MCP服务器的运行是正常的。
this MCP server worked.

449
00:23:41,940 --> 00:23:43,900
所以我会指示Cursor来执行这个操作。
So I'll tell Cursor to do that.

450
00:23:45,099 --> 00:23:52,777
请你直接使用Python的完整路径作为可执行文件，
Instead of first use the SH to activate

451
00:23:52,777 --> 00:23:57,690
而不是先使用SH来激活虚拟环境，
the virtual environment, could you please just

452
00:23:57,690 --> 00:24:01,990
我们看看是否能纠正这个问题。
use the full path of the Python as

453
00:24:01,990 --> 00:24:01,990

the executable and let's see whether we

454
00:24:01,990 --> 00:24:01,990

could correct it.

455
00:24:12,789 --> 00:24:13,349
好的，我们开始吧。
All right.

456
00:24:13,750 --> 00:24:17,587
我们将进行接受和刷新
We will accept and refresh

457
00:24:17,587 --> 00:24:19,890
和重新启用。
and re enable.

458
00:24:20,369 --> 00:24:21,890
现在问题已经解决了。
Now the error is gone.

459
00:24:22,289 --> 00:24:23,170
现在它可以正常工作了。
It works now.

460
00:24:23,809 --> 00:24:28,254
接下来我们将看看如何在 Cursor 中应用这一点
So then we'll see how can we use that in Cursor

461
00:24:28,254 --> 00:24:30,210
现在我们只需向它提问。
now we'll just ask it.

462
00:24:31,170 --> 00:24:36,087
请使用SQLite数据库浏览器的McP服务器
Use the McP server of SQLite Database Explorer

463
00:24:36,087 --> 00:24:38,769
来列出数据库里的所有表。
and list the tables in the database.

464
00:24:42,380 --> 00:24:42,740
没问题。
All right.

465
00:24:42,740 --> 00:24:44,460
请大家注意，我们现在正在使用Gemini。
And note that we're using Gemini.

466
00:24:47,099 --> 00:24:48,380
我们来看看这个是否奏效。
We'll see whether it works.

467
00:24:55,180 --> 00:24:55,900
它是有效的。
It works.

468
00:24:56,059 --> 00:24:59,725
它使用MCP工具来列出所有的表格
It calls the MCP tool of list all tables

469
00:24:59,725 --> 00:25:01,099
并获取结果。
and get the result.

470
00:25:01,579 --> 00:25:01,980
非常棒。
Great.

471
00:25:02,619 --> 00:25:04,919
我们可以做同样的操作，只需将其
How about we do the same thing but switch it

472
00:25:04,919 --> 00:25:06,299
切换到GPT即可。
to GPT.

473
00:25:10,470 --> 00:25:10,950
同样的做法。
Same thing.

474
00:25:11,589 --> 00:25:12,309
理解这一点。
Get this.

475
00:25:12,789 --> 00:25:15,109
那么克劳德和这里的情况如何？
What about Claude and here?

476
00:25:15,430 --> 00:25:17,069
我不想通过光标来展示这个。
I don't want to show it in cursor.

477
00:25:17,069 --> 00:25:19,990
在这里，我们将展示来自另一个客户的内容。
Here we will show it from even another client.

478
00:25:20,950 --> 00:25:24,710
Claude有一台Claude桌面计算机。
The Claude has a Claude desktop.

479
00:25:24,950 --> 00:25:27,190
我就会新建一个。
I'll just create a new one.

480
00:25:28,390 --> 00:25:32,577
这儿有个难点，就是Claude桌面也需要
The tricky part here is Claude desktop needs

481
00:25:32,577 --> 00:25:35,089
进行MCP服务器的配置。
to config the MCP server as well.

482
00:25:35,410 --> 00:25:38,076
我们需要配置它的方式
And how do we configure it

483
00:25:38,076 --> 00:25:39,410
是这样的。
is we need to.

484
00:25:40,289 --> 00:25:42,930
我会删除所有内容，重新开始。
I'll just remove everything and begin from scratch.

485
00:25:43,170 --> 00:25:45,490
我们需要对配置文件进行编辑。
We need to edit a configuration file.

486
00:25:45,809 --> 00:25:48,260
我们要访问那个，可以去设置中找到
How to access that is we go to Settings,

487
00:25:48,260 --> 00:25:50,251
开发者选项，在开发者选项里
there's a developer and in the developer

488
00:25:50,251 --> 00:25:51,170
有一个配置。
there's a config.

489
00:25:51,170 --> 00:25:53,369
我们可以打开新增的配置项。
We could click the added config.

490
00:25:53,369 --> 00:25:57,233
它会在查找器中展示文件夹里的配置文件
It will show the config file in the folder

491
00:25:57,233 --> 00:25:59,809
然后我们就在这里打开它。
in the finder and then we'll just open it here.

492
00:26:00,220 --> 00:26:03,685
请注意，由于我目前没有MCP服务器，
Notice that currently, because I don't have any MCP server,

493
00:26:03,685 --> 00:26:06,958
所以这个是空的。我接下来要做的就是
this is an empty and what I'll do is just

494
00:26:06,958 --> 00:26:11,579
将这个配置文件从Cursor复制到Claude。
copy paste this configuration file from Cursor to Claude.

495
00:26:11,579 --> 00:26:12,220
就这样吧。
That's it.

496
00:26:12,859 --> 00:26:18,948
接下来，我们只需重启Claude桌面应用
Then we just restart the Claude desktop app

497
00:26:18,948 --> 00:26:23,819
以便它能在这里重新加载所有内容。
so it could reload this all right here.

498
00:26:24,059 --> 00:26:26,601
点击搜索和工具后，我们将能看到
If we click Search and Tools, we'll be able to

499
00:26:26,601 --> 00:26:29,990
一个已经可用的SQLite数据库浏览器。
see There is a SQLite DB explorer already available.

500
00:26:30,869 --> 00:26:31,509
这真不错。
This is good.

501
00:26:31,509 --> 00:26:34,646
这表示它已连接到我们的MCP服务器，
That means it's connected with our MCP server,

502
00:26:34,646 --> 00:26:36,911
因此我们可以进一步询问它，
then we can further ask it,

503
00:26:36,911 --> 00:26:40,048
重复这个问题，询问使用MCP服务器，
just copy this again, ask it,

504
00:26:40,048 --> 00:26:42,487
或SQLite数据库浏览器，
use MCP Server or SQLite Database Explorer,

505
00:26:42,487 --> 00:26:44,230
来列出数据库中的表。
list the tables in database.

506
00:26:44,789 --> 00:26:47,109
在这里，我想对它提出一些挑战。
And here I want to challenge it a little bit.

507
00:26:48,549 --> 00:26:53,450
你能对数据进行更深入的探讨
Can you do some more comprehensive exploration on the data

508
00:26:53,450 --> 00:26:57,974
并提供一些深度的数据分析
and come up with some deep data analysis

509
00:26:57,974 --> 00:27:00,990
和可视化展示吗？
with even visualizations?

510
00:27:01,950 --> 00:27:03,630
我在这里就让它通过吧。
And I'll just allow it here.

511
00:27:03,630 --> 00:27:06,172
这个提示是为了说明云端需要
This warning is to say that the cloud needs

512
00:27:06,172 --> 00:27:10,670
访问一些外部资源，而这些资源就是MCP服务器。
to call some external resources, which is the MCP server here.

513
00:27:10,829 --> 00:27:15,015
为了避免一些安全风险，
And to prevent some security risk,

514
00:27:15,015 --> 00:27:18,440
用户需要确认操作。
it will need the user to confirm.

515
00:27:19,240 --> 00:27:20,639
在这里，我将让它
And here I will just ask it

516
00:27:20,639 --> 00:27:22,039
进行更多的探索。
to do more exploration.

517
00:27:22,119 --> 00:27:28,311
因此，它会努力处理我们数据库中的多个请求，
So it diligently spans quite a few different requests

518
00:27:28,311 --> 00:27:30,375
进行数值计算并
to our database and try to crunch numbers

519
00:27:30,375 --> 00:27:32,440
得出一些结果。
and come up with something.

520
00:27:32,759 --> 00:27:35,677
我们就让它在这里继续运行
So we'll leave it running here

521
00:27:35,677 --> 00:27:38,839
然后再回到我们之前的演示。
and come back to our original presentation.

522
00:27:40,759 --> 00:27:43,650
我将在这里结束这个部分。
I'll close in close this here.

523
00:27:48,529 --> 00:27:52,478
因此，基于我们的演示，现在让我们假设
So following on our demo, let's assume we can see

524
00:27:52,478 --> 00:27:55,329
一切最初都运行得非常顺利。
that actually everything initially works beautifully.

525
00:27:55,329 --> 00:27:57,890
我们出现了一些小错误，不过很快就解决了。
We had some small bug but quickly fix that.

526
00:27:58,128 --> 00:27:59,576
不过，我还想给大家展示一下
But I also want to show you the other side

527
00:27:59,576 --> 00:28:00,690
mcp的另一种情况。
of mcp.

528
00:28:01,730 --> 00:28:04,329
总的来说，我们的工具实现了，
So essentially what happened was we have the tool implementation

529
00:28:04,329 --> 00:28:06,743
并通过快速MCP使其可用，
and we make it accessible through fast MCP

530
00:28:06,743 --> 00:28:09,899
之后成功地展示了不同客户的调用情况
and then we showed it successfully called by different clients

531
00:28:09,899 --> 00:28:14,170
如Cursor和Claude Desktop。
like Cursor and Claude Desktop.

532
00:28:14,490 --> 00:28:17,646
它很好地体现了MCP的核心承诺
It perfectly illustrates the core promise on MCP

533
00:28:17,646 --> 00:28:21,223
即真正的互操作性以及编写一次工具后
genuinely interoperability and the ability to write tools once

534
00:28:21,223 --> 00:28:24,170
能够在多个平台上使用的能力。
and use them across various platforms.

535
00:28:24,490 --> 00:28:26,730
这确实是一个强大的概念得以实现。
That's a powerful concept realized.

536
00:28:27,849 --> 00:28:29,954
不过在开发过程中，
But then as is often the case in development,

537
00:28:29,954 --> 00:28:33,930
我们通常会故意引入一些细微的错误。
we will intentionally introduce a subtle bug.

538
00:28:34,329 --> 00:28:36,811
这不一定是严重的架构问题，
It doesn't have to be a major architecture flaw,

539
00:28:36,811 --> 00:28:38,720
可能只是一个小错误。
it's just probably a small oversight.

540
00:28:38,880 --> 00:28:41,196
举个例子，我们可能会提供一个
For instance, we probably will give it a

541
00:28:41,196 --> 00:28:43,843
错误的SQLite数据库文件路径
incorrect file path for the SQLite database

542
00:28:43,843 --> 00:28:46,160
或者只是一个微小的拼写错误。
or a tiny typo.

543
00:28:46,240 --> 00:28:47,119
那么我们来看看这个。
So let's see that.

544
00:28:49,519 --> 00:28:55,562
听起来云现在还在忙于生成报告，
So it sounds like the cloud is still busy proposing

545
00:28:55,562 --> 00:29:00,799
所以我现在就结束这个环节。
the report and at this time I'll just close.

546
00:29:02,640 --> 00:29:04,480
这就是FastMCP服务器。
This is the FastMCP server.

547
00:29:04,480 --> 00:29:07,269
我们先关闭这个调试功能
Let's terminate that because it's for debugging only

548
00:29:07,269 --> 00:29:10,819
然后去查看MCP JSON。
and go to the MCP JSON.

549
00:29:10,819 --> 00:29:13,259
在这之前，让我们先给它一些拼写错误。
Let's give it some typo before that.

550
00:29:13,259 --> 00:29:16,180
看来云端的工作已经完成了。
It seems that the cloud already finished its job.

551
00:29:16,660 --> 00:29:19,923
它生成了许多SQL查询，
It wrote quite a few SQL queries,

552
00:29:19,923 --> 00:29:23,731
并在数据库中执行，最终得到了
run it against the database and come up

553
00:29:23,731 --> 00:29:27,539
一个漂亮的分析仪表板，展示了
with this nice analytics dashboard showing

554
00:29:27,539 --> 00:29:30,259
该数据库的核心指标，
the core metrics from this database,

555
00:29:30,259 --> 00:29:31,619
非常不错。
which is very nice.

556
00:29:31,859 --> 00:29:33,299
试着想象一下在你的工作中使用这个。
And imagine that in your work.

557
00:29:33,670 --> 00:29:37,262
假如你能直接利用这个草稿来进行每周的业务评审，
What if you could just do your weekly business review

558
00:29:37,262 --> 00:29:40,230
而不必从零开始，这将会有怎样的效果呢？
based on this draft rather than having everything from scratch.

559
00:29:40,789 --> 00:29:42,789
这能帮你节省多少个小时呢？
How many hours this could save you.

560
00:29:43,509 --> 00:29:46,581
好的，关于这个调试问题，
All right, coming back to this debugging issue,

561
00:29:46,581 --> 00:29:49,397
让我们故意让它不工作，
let's intentionally make it not work,

562
00:29:49,397 --> 00:29:51,701
例如不使用绝对路径
say instead of using absolute path

563
00:29:51,701 --> 00:29:54,518
因为我知道肯定会失败。
because I know it will fail

564
00:29:54,518 --> 00:29:56,309
如果不这样做，
if we don't use that.

565
00:29:56,390 --> 00:30:00,309
我们来使用这个论点，创建一个相对路径吧。
Let's Use this argument, make it relative path.

566
00:30:00,680 --> 00:30:03,920
如果我们去mcp，光标将会出现
What will happen in cursor if we go

567
00:30:03,920 --> 00:30:05,000
什么情况？
to mcp?

568
00:30:05,160 --> 00:30:07,890
可能需要关闭、刷新或重启，
Probably turn off, refresh, turn on,

569
00:30:07,890 --> 00:30:10,200
提示显示客户端已关闭。
it says client closed.

570
00:30:10,599 --> 00:30:12,480
好的，客户端已经关闭。
Okay, client closed.

571
00:30:12,480 --> 00:30:13,240
这是什么意思呢？
What does that mean?

572
00:30:13,880 --> 00:30:17,079
我该如何进行调试，获取错误信息
How would I debug and get error messages

573
00:30:17,079 --> 00:30:19,000
并修复我的代码呢？
and fix my code because of that?

574
00:30:19,319 --> 00:30:21,346
点击这里后，它会知道
If we click here, it knows it will show

575
00:30:21,346 --> 00:30:24,183
我们需要查看输出和光标MCP
we need to go to output and cursor MCP

576
00:30:24,183 --> 00:30:25,400
的错误日志。
for error logs.

577
00:30:25,400 --> 00:30:27,630
好了，我们到这里，输出，
Okay, we go to here, output,

578
00:30:27,630 --> 00:30:29,490
接下来去光标mcp。
go to cursor mcp.

579
00:30:30,529 --> 00:30:32,930
这表示客户端出现了关闭错误。
It says error client closed.

580
00:30:33,170 --> 00:30:34,369
那么，这到底是什么意思呢？
Okay, what does that mean?

581
00:30:34,690 --> 00:30:35,410
我不清楚。
I don't know.

582
00:30:35,890 --> 00:30:37,490
这一切是有其原因的。
And there's a reason for that.

583
00:30:37,970 --> 00:30:41,194
这并不是由于MCP的实现不佳，
It's not because MCP is badly implemented

584
00:30:41,194 --> 00:30:44,849
而是因为它暴露了一些调试用的信息。
that it exposed a little information for debugging.

585
00:30:44,849 --> 00:30:49,690
这只是因为MCP采用了客户端-服务器架构。
It's just because MCP is a client server architecture.

586
00:30:49,690 --> 00:30:52,699
这就导致他们无法了解
And this architecture means that they don't know

587
00:30:52,699 --> 00:30:56,009
这个边界上的详细信息。
the details across this boundary.

588
00:30:56,089 --> 00:30:59,049
因此，这个调试过程变得非常难以处理。
And this makes this debugging extremely hard.

589
00:30:59,690 --> 00:31:03,943
如果我们恢复这个并继续使用绝对路径，
And if we just recover this, still use the absolute path,

590
00:31:03,943 --> 00:31:09,849
回到原来的状态，刷新后再开启，它就会再次正常工作。
come back, refresh, turn on, it works again.

591
00:31:10,250 --> 00:31:14,009
不过如果我们去MCP服务器
But what if we go to the MCP server

592
00:31:14,009 --> 00:31:17,769
并将这个绝对路径修改一下。
and change this absolute.

593
00:31:18,890 --> 00:31:21,680
我们来看看，这应该是dbtools，
Let's see, it should be dbtools,

594
00:31:21,680 --> 00:31:23,849
把这个绝对路径改成相对路径。
change this absolute path to relative path.

595
00:31:24,410 --> 00:31:26,756
例如，我们将数据库的名称
So for example, we just put the DB name

596
00:31:26,756 --> 00:31:27,930
设定为这个。
is this.

597
00:31:29,529 --> 00:31:31,529
因此，这部分比较复杂。
So here is the tricky part.

598
00:31:32,329 --> 00:31:38,240
如果我们在这里继续进行MCP刷新，
If we go to here still MCP refresh,

599
00:31:38,240 --> 00:31:41,369
那么这仍然会成功。
this will still be successful.

600
00:31:41,609 --> 00:31:44,567
但是如果我们重新执行这个查询，
However, if we redo this query,

601
00:31:44,567 --> 00:31:47,130
就让我们来看看会发生什么。
let's see what will happen.

602
00:31:48,579 --> 00:31:51,940
系统提示出现循环错误，无法访问数据库文件。
It says circularized error, unable to open database file.

603
00:31:52,339 --> 00:31:54,765
不过如果你检查这个路径，
But in the case that you check this path,

604
00:31:54,765 --> 00:31:56,180
它还是正确的。
it's still correct.

605
00:31:56,819 --> 00:31:57,940
它在这里，依然是正确的。
It's here, it's still correct.

606
00:31:57,940 --> 00:31:59,700
电商数据数据库是没问题的。
Ecommerce data DB is correct.

607
00:31:59,779 --> 00:32:05,244
即便您想利用快速MCP进行调试，
And even in the case that you want to use fast MCP to debug it,

608
00:32:05,244 --> 00:32:10,367
但由于您是从当前文件夹启动的，
because you're launching this from the current folder,

609
00:32:10,367 --> 00:32:13,099
它仍会给您反馈。
it will still tell you this.

610
00:32:13,099 --> 00:32:15,539
工具清单，列出所有表格。
Tools list, Tools list all tables.

611
00:32:15,539 --> 00:32:16,180
使用的工具不正确。
Wrong tool.

612
00:32:16,609 --> 00:32:18,210
它依然会给你提供正确的结果。
It will still tell you the correct result.

613
00:32:18,690 --> 00:32:22,245
所以现在我们进入了一个非常棘手的环节，
So now we enter a really tricky part,

614
00:32:22,245 --> 00:32:25,239
尽管我们的调试工具显示一切正常，
that our debugging tool says nothing's wrong,

615
00:32:25,239 --> 00:32:27,671
运行得也很顺利，但客户却说
it runs beautifully, and our client says,

616
00:32:27,671 --> 00:32:29,730
他无法打开数据库文件。
no, I can't open the database file.

617
00:32:30,450 --> 00:32:33,756
因此，我想强调的是，即使是
So I just want to show that even

618
00:32:33,756 --> 00:32:38,079
极其微小的错误，甚至不复杂的错误，
some really small errors, even not complicated mistakes,

619
00:32:38,079 --> 00:32:42,148
调试起来也非常困难，特别是当你对
is very hard to debug unless you know a lot,

620
00:32:42,148 --> 00:32:45,200
mcp的细节了解不多时。
especially details about mcp.

621
00:32:46,079 --> 00:32:49,083
因此，我将删除这些内容并进行覆盖
So I'll just remove all this and cover

622
00:32:49,083 --> 00:32:50,960
以确保不会导致问题。
so it won't break things.

623
00:32:52,799 --> 00:32:53,359
可以吗？
All right?

624
00:32:55,839 --> 00:32:58,099
所以我想表达的原因是
So I want to say that the reason behind is

625
00:32:58,099 --> 00:33:01,262
你不再仅仅调试Python，
because you're no longer debugging Python,

626
00:33:01,262 --> 00:33:06,459
而是在处理JSON RPC over HTTP
you're debugging the JSON RPC over HTTP

627
00:33:06,459 --> 00:33:10,752
在分布式组件之间，同时日志也比较模糊，
between distributed components and with unclear logs,

628
00:33:10,752 --> 00:33:12,559
正如这个图所示。
as this diagram shows.

629
00:33:12,880 --> 00:33:16,045
客户端与服务器模型架构的边界
And those client server model schema boundaries

630
00:33:16,045 --> 00:33:18,079
变得愈加难以追踪。
becomes harder to trace.

631
00:33:18,640 --> 00:33:21,694
MCP调试的第一个隐性成本就是
And this is the first hidden cost of MCP

632
00:33:21,694 --> 00:33:23,119
变得更加困难。
debugging gets harder.

633
00:33:23,200 --> 00:33:25,180
提供可移植性的抽象
The abstraction that gives you portability

634
00:33:25,180 --> 00:33:27,599
使得即时反馈变得缺失。
also removes immediate feedback.

635
00:33:27,759 --> 00:33:29,440
你再也看不到电线了。
You don't see the wiring anymore.

636
00:33:29,599 --> 00:33:32,799
你看到各个端点，希望连接能够正常工作。
You see the endpoints and hope the wiring works.

637
00:33:32,880 --> 00:33:34,463
你关注的不是函数的调试，
You're not debugging functions,

638
00:33:34,463 --> 00:33:35,519
而是语义的界限。
but semantic boundaries.

639
00:33:35,799 --> 00:33:38,440
这并非设计上的缺陷，而是一个权衡选择。
This isn't a design flaw, but a trade off.

640
00:33:38,599 --> 00:33:42,347
抽象协议会降低可见性，MCP的目标
Abstract protocols reduce visibility and MCP's purpose

641
00:33:42,347 --> 00:33:45,433
是实现扩展和标准化，并不一定
is to scale and standardize, not necessarily

642
00:33:45,433 --> 00:33:48,519
是为了在早期实验中简化操作。
to make things easier during early experimentation.

643
00:33:49,079 --> 00:33:50,279
那么你有什么选择呢？
So what are your options?

644
00:33:51,240 --> 00:33:52,759
那么，我们不妨试试第三种方案。
Well, let's take a third approach.

645
00:33:52,759 --> 00:33:56,111
我们来用简单的提示重建这个SQLite代理吧。
Let's rebuild that SQLite agent using just a prompt

646
00:33:56,111 --> 00:33:56,839
和命令行。
and a command line.

647
00:33:56,839 --> 00:33:59,133
不需要服务器和协议，只需一个工具
No server, no protocol, just a tool

648
00:33:59,133 --> 00:34:00,279
和自然语言描述。
and a natural language description.

649
00:34:00,440 --> 00:34:02,599
这就是链接方法的引入。
And this introduces the linked approach.

650
00:34:03,369 --> 00:34:04,650
在这里，我只是想提问。
Here I'll just ask.

651
00:34:06,490 --> 00:34:07,889
请查看数据库、
Take a look at the DB,

652
00:34:07,889 --> 00:34:12,489
MCP服务器以及SQLiteAgent Py。
the MCP server and SQLiteAgent Py.

653
00:34:12,969 --> 00:34:15,369
我们希望将其开发为一个命令行实用工具。
We want to make it a command line utility.

654
00:34:15,369 --> 00:34:19,116
比如，它可以接受一个切换，以决定
For example, it would accept a switch about

655
00:34:19,116 --> 00:34:21,457
执行哪个模式或命令，
which mode or which command to execute

656
00:34:21,457 --> 00:34:24,969
并且还可以包含一些可选的命令。
with some optional commands.

657
00:34:25,449 --> 00:34:29,992
我们先编写一个新的Python脚本
And let's first write a new Python script

658
00:34:29,992 --> 00:34:32,130
用于命令行解析。
of doing the command line parsing.

659
00:34:32,289 --> 00:34:35,728
另外，我们需要用markdown格式撰写一份文档
And also write a document in markdown

660
00:34:35,728 --> 00:34:38,449
以帮助未来的AI了解如何使用这个工具。
so that future AI would know how to use this tool.

661
00:34:41,809 --> 00:34:48,760
在这里，我要使用MCP维度服务器PY，
Right here I'll use the dimension MCP server PY

662
00:34:48,760 --> 00:34:54,978
数据库应该是collite py。
and DB should be collite py.

663
00:34:55,298 --> 00:34:55,858
没问题。
All right.

664
00:35:01,298 --> 00:35:04,179
这个目标是光标本身
And the goal of this is cursor itself

665
00:35:04,179 --> 00:35:06,418
充当一个代理。
is an agent.

666
00:35:06,498 --> 00:35:08,099
它了解如何使用书籍相关的工具。
It knows holding book tools.

667
00:35:08,099 --> 00:35:14,639
因为它能够执行类似于 shell 命令的命令行工具
And because it knows how to execute a command line utility

668
00:35:14,639 --> 00:35:18,302
所以我们可以为其创建一个命令
like a shell command, we could just build a command

669
00:35:18,302 --> 00:35:21,180
或命令行工具以供调用。
or command line utility for it to invoke.

670
00:35:21,179 --> 00:35:21,820
就这样了。
That's it.

671
00:35:21,900 --> 00:35:27,056
这是一种直接而快速的方式，
And this is the real direct and quick way to

672
00:35:27,056 --> 00:35:31,420
帮助我们进行代理探索。
just do some agentic exploration.

673
00:35:32,460 --> 00:35:36,556
在这里，使用GPT 4.1的速度
And here as we're using GPT 4.1,

674
00:35:36,556 --> 00:35:39,371
比Gemini快得多，
it's much faster than the Gemini

675
00:35:39,371 --> 00:35:43,980
并且它还提供了一份readme文件。
and it also gives us a readme.

676
00:35:44,219 --> 00:35:49,650
因此，我们的做法是准备一个readme文件
So then what we'll do is we'll just have this readme file

677
00:35:49,650 --> 00:35:53,529
并根据其中的指示发送一个光标。
and send a cursor following instructions in this readme.

678
00:35:54,090 --> 00:35:56,344
通过命令行工具来查看
Use the command line tool to explore

679
00:35:56,344 --> 00:35:59,050
SQLite数据库内容。
the SQLite database.

680
00:35:59,530 --> 00:36:05,155
我们特别可以先讨论如何列出表名
Especially let's start from how like the table names

681
00:36:05,155 --> 00:36:05,530
。
listing the table names.

682
00:36:08,809 --> 00:36:09,210
是这样吗？
Right?

683
00:36:10,090 --> 00:36:11,929
我们在这里使用的是GPT 4.1。
And we're using GPT 4.1 here.

684
00:36:12,989 --> 00:36:13,550
好的，真不错。
Okay, great.

685
00:36:13,630 --> 00:36:17,078
它能够通过列表表作为命令行
It knows to invoke this with list tables as the command line

686
00:36:17,078 --> 00:36:18,670
来获取表名。
and get the table names.

687
00:36:18,829 --> 00:36:19,469
就这么简单。
That's it.

688
00:36:20,030 --> 00:36:21,070
就是这么简单。
It's that simple.

689
00:36:21,309 --> 00:36:24,823
请注意，它相比于mcp的确更加强大
And notice how more robust and quick it compare

690
00:36:24,823 --> 00:36:26,269
且反应更迅速。
with mcp.

691
00:36:26,269 --> 00:36:27,789
因此，我们确实有其他的选择。
So we do have some other options here.

692
00:36:28,349 --> 00:36:29,325
因为时间有限，
Due to the limit of time,

693
00:36:29,325 --> 00:36:32,670
我们将不再进行关于Open Web ui的演示。
we'll skip another demo on Open Web ui.

694
00:36:33,070 --> 00:36:35,710
但我们也会简单提及这个内容。
But we will also mention that briefly.

695
00:36:37,230 --> 00:36:38,595
因此我也想强调它
So I also want to emphasize it

696
00:36:38,595 --> 00:36:39,960
是有一定成本的。
has cost as well.

697
00:36:41,239 --> 00:36:44,440
这很简单，不过它没有明确的结构。
It's pretty straightforward, but it lacks structures.

698
00:36:45,079 --> 00:36:47,880
既没有框架，也没有接口协议。
There's no schema and no interface contract.

699
00:36:48,599 --> 00:36:53,295
提示中的错误会导致模型的误解，你可能会遇到一些不明显的失败
Prompt errors becomes model misinterpretations, you will hit soft failures

700
00:36:53,295 --> 00:36:55,400
并且需要猜测问题出在哪里。
and have to guess what went wrong.

701
00:36:55,639 --> 00:36:59,088
这些依赖于提示的工具的速度
The speed of those prompt based tools is

702
00:36:59,088 --> 00:37:00,679
具有两面性。
a double edged sword.

703
00:37:02,679 --> 00:37:05,883
好的，我们已经研究了几种不同的方法
All right, we have explored a few different approaches

704
00:37:05,883 --> 00:37:08,709
以便让我们的AI模型能够与工具
to enable our AI models to interact with tools

705
00:37:08,709 --> 00:37:09,840
和外部系统。
and external systems.

706
00:37:10,000 --> 00:37:12,690
为便于整合内容，我们来看看这个总结表
To bring it all together, let's look at this summary table

707
00:37:12,690 --> 00:37:15,679
它对我们讨论过的三种不同路径进行了比较。
which compares three distinct paths we've touched upon.

708
00:37:15,920 --> 00:37:19,481
在为您具体项目做出决策前，理解每个方面的
It's important to understand the nuances of each

709
00:37:19,481 --> 00:37:21,440
细微差异是非常重要的。
before making a decision for your own specific project.

710
00:37:22,159 --> 00:37:24,244
首先，我们拥有称为
And first, we have what we call

711
00:37:24,244 --> 00:37:26,559
函数调用能力的功能。
the function calling capabilities.

712
00:37:27,599 --> 00:37:29,917
这通常是指利用本地功能调用
It typically refers to using the native function calling

713
00:37:29,917 --> 00:37:33,840
由特定alm供应商（例如OpenAI）提供。
provided by specific alm vendors like OpenAI's offering.

714
00:37:34,389 --> 00:37:37,849
正如我们所见，这种方法实施起来一般很简单
As we saw, this approach is generally simple to implement

715
00:37:37,849 --> 00:37:40,789
对于一些直接的使用场景也相当有效。
and can be quite effective for straightforward use cases.

716
00:37:41,190 --> 00:37:44,152
不过，它的主要缺点是，通常会将你
However, its main limitation is that it often ties you

717
00:37:44,152 --> 00:37:47,670
限制在特定供应商的API和生态系统内。
to that vendor specific API and ecosystem.

718
00:37:48,389 --> 00:37:51,167
第二，这里提到的MCP实现是
And second, there's the MCP based implementation

719
00:37:51,167 --> 00:37:53,349
基于模型上下文协议的。
leveraging the model context protocol.

720
00:37:53,510 --> 00:37:56,435
这条路径不仅具有强大的功能，还能
This path offers significant power and crucially portability

721
00:37:56,435 --> 00:37:59,909
在不同的模型和平台之间灵活地进行移植。
across different models and platforms.

722
00:38:00,630 --> 00:38:04,285
这种标准化的MCP提供了极大的优势
This standardization MCP brings a huge advantage

723
00:38:04,285 --> 00:38:07,510
在长期灵活性和工具可用性方面。
for long term flexibility and tool usability.

724
00:38:08,070 --> 00:38:11,974
然而，正如我们所探讨的，这种权衡可能会
But the trade off, as we have discussed, can be

725
00:38:11,974 --> 00:38:14,851
导致复杂性增加，特别是在处理
an increase in complexity, particularly when it comes to

726
00:38:14,851 --> 00:38:18,550
交互调试时，因为额外增加了一层抽象。
debugging interactions as there is an added layer of abstraction.

727
00:38:19,510 --> 00:38:23,796
第三，我们探讨一种将提示与CLI相结合的方法，
And third, we consider a prompt plus CLI hybrid,

728
00:38:23,796 --> 00:38:25,846
这种方法允许你指示模型
this method where you might instruct a model

729
00:38:25,846 --> 00:38:27,710
生成一个命令行界面。
to generate a command line interface.

730
00:38:27,710 --> 00:38:30,871
命令在初次互动时效率极高。
Commands can be very fast for initial interaction

731
00:38:30,871 --> 00:38:32,329
和原型开发。
and prototyping.

732
00:38:32,730 --> 00:38:36,908
虽然你可以迅速启动并运行某些项目，
You can get something up and run it quickly,

733
00:38:36,908 --> 00:38:40,350
但面临的挑战在于如何实现同步
but the challenges here however, lies in the synchronization

734
00:38:40,350 --> 00:38:42,808
并确保交互的稳健性，
and ensuring robust error proof interactions,

735
00:38:42,808 --> 00:38:46,250
尤其是当任务变得愈加复杂时。
especially as the complexity of the tasks grow.

736
00:38:47,610 --> 00:38:52,208
重要的是要明白，这些方法各有其合理性，
It's critical to recognize that each of these approaches

737
00:38:52,208 --> 00:38:57,050
并且在不同的情境下发挥着各自的特定作用。
is valid and has a specific role to play

738
00:38:57,050 --> 00:38:57,050

during depending on the context.

739
00:38:57,760 --> 00:39:00,142
这个比较，并不是为了选出
This comparison, as the table you see, isn't about

740
00:39:00,142 --> 00:39:03,121
一个绝对的赢家或输家，而是为了
crowning a single winner or loser, it's about

741
00:39:03,121 --> 00:39:06,894
帮助我们理解它们的相对优缺点、市场定位
understanding their relative strengths, weaknesses, positioning

742
00:39:06,894 --> 00:39:08,880
以及内在的权衡关系。
and the inherent trade offs.

743
00:39:09,360 --> 00:39:12,562
例如，像 Open Web UI 这样的项目
For example, a project like Open Web UI

744
00:39:12,562 --> 00:39:14,599
广泛利用 Open API。
makes extensive use of Open API.

745
00:39:14,599 --> 00:39:16,932
请注意，它并不是OpenAI的API，
Note that it's not OpenAI's API,

746
00:39:16,932 --> 00:39:18,159
而是称为开放API。
it's called Open API.

747
00:39:18,159 --> 00:39:20,559
这是一项现有的API标准。
It's an existing standard for APIs.

748
00:39:21,440 --> 00:39:25,057
鉴于广泛网络服务和集成的需求，这个选择
That's a perfectly sensible choice given the requirements

749
00:39:25,057 --> 00:39:26,010
非常合适。
for broad web service and integration.

750
00:39:26,409 --> 00:39:28,929
而且并不存在一种适合所有情况的
And there simply isn't a one size fits all

751
00:39:28,929 --> 00:39:29,769
最佳协议。
best protocol.

752
00:39:30,730 --> 00:39:33,940
因此，考虑到这些选项及其利弊，
So this naturally leads to the critical question, given these options

753
00:39:33,940 --> 00:39:36,509
关键的问题是您该如何选择
and their trade offs, how do you actually choose

754
00:39:36,509 --> 00:39:38,650
最适合您需求的路径？
the right path for your needs?

755
00:39:39,849 --> 00:39:42,233
这是Guhao所采用的有效框架，
Here's the framework Guhao used and found effective

756
00:39:42,233 --> 00:39:44,170
鼓励大家提问自己三个问题。
ask yourself three questions.

757
00:39:44,570 --> 00:39:48,090
你是针对多个大型语言模型还是不同的部署环境进行选择？
Are you targeting multiple LLMs or deployment environments?

758
00:39:48,489 --> 00:39:50,857
您是否需要对团队上的工具进行统一标准化？
Do you need to standardize tools across team

759
00:39:50,857 --> 00:39:51,449
还是平台？
or platforms?

760
00:39:52,210 --> 00:39:54,760
你的产品目前是在稳定或扩展的阶段，
Is your product already in a stable or scaling phase,

761
00:39:54,760 --> 00:39:57,010
而不是处于快速原型开发期间吗？
not in a rapid prototyping mode.

762
00:39:58,130 --> 00:39:59,987
这个问题把早期的开发者
This questions separate early stage builders

763
00:39:59,987 --> 00:40:02,690
与处于生产阶段的设计师区分开来。
from production stage architects.

764
00:40:03,010 --> 00:40:04,314
如果这三者都符合条件，
If all three are yes,

765
00:40:04,314 --> 00:40:06,449
那么MCP可能是一个不错的投资选择。
MCP is probably a smart bet.

766
00:40:06,769 --> 00:40:10,565
如果有任何一个答案是‘否’，那么你可能更适合
If even one is no, you might be better off

767
00:40:10,565 --> 00:40:12,289
选择一些轻松的选项。
sticking to something lighter for now.

768
00:40:12,929 --> 00:40:16,196
请记住，错误地使用MCP的代价往往不是
Remember, the cost of misusing MCP often isn't

769
00:40:16,196 --> 00:40:19,119
将来的代码重写，而是如今失去信心。
rewriting code later, it's is wasting confidence now.

770
00:40:20,320 --> 00:40:21,519
这正是最重要的要点。
And that's the key point.

771
00:40:21,760 --> 00:40:23,626
MCP 并不是一项差的技术，
MCP isn't a bad tech,

772
00:40:23,626 --> 00:40:24,960
只是人们常常误用它。
it's just often misused.

773
00:40:25,679 --> 00:40:28,944
从这个典型的产品生命周期探索概念来看，
Looking at this typical product lifecycle exploration concept,

774
00:40:28,944 --> 00:40:33,410
原型、最小可行产品（MVP）和生产阶段，像简单的提示
prototyping, MVP and production, things like simple prompt

775
00:40:33,410 --> 00:40:39,079
加命令行接口（CLI）这样的工具非常适合早期阶段，可以实现快速迭代
plus CLI are great for early stages, fast iteration,

776
00:40:39,079 --> 00:40:43,717
和低负担。而随着我们向MVP和生产阶段迈进，MCP因其
low overload and MCP designed for robustness and reuse

777
00:40:43,717 --> 00:40:46,638
丰富的鲁棒性和重用性变得更加合适，
fits better as you move towards MVP and production

778
00:40:46,638 --> 00:40:50,074
因为此时标准化和跨平台支持变得日益重要。
when standardization and cross platform support become more critical

779
00:40:50,074 --> 00:40:53,510
因此，MCP并不是一个适合初学者的工具。
MCP isn't a beginner's tool.

780
00:40:55,190 --> 00:40:56,869
这是一种部署的抽象概念。
It's a deployment abstraction.

781
00:40:57,110 --> 00:40:59,747
这适用于那些已经准备好进行扩展的系统，
It's for systems that are ready to scale,

782
00:40:59,747 --> 00:41:01,829
而不适用于仍在寻找用例的项目。
not for projects still exploring use cases.

783
00:41:03,269 --> 00:41:06,001
这实际上让我们聚焦于核心技能，
That really brings us to the core skill,

784
00:41:06,001 --> 00:41:08,005
这是我想特别强调的要点
the crucial takeaway I want to spotlight

785
00:41:08,005 --> 00:41:10,008
在讨论这些不同的方法时
as we discuss these different approaches

786
00:41:10,008 --> 00:41:11,830
构建和部署AI代理。
to building and deploying AI agents.

787
00:41:12,340 --> 00:41:14,630
这个观点虽然细微，但对任何在这个
It's a nuanced point, but an incredibly important one

788
00:41:14,630 --> 00:41:17,780
迅速发展的领域工作的人来说，却是极其重要的。
for anyone working in this rapidly evolving field.

789
00:41:18,579 --> 00:41:22,255
在这里，关键技能并不仅仅是技术能力
The critical skill here isn't necessarily about the technical ability

790
00:41:22,255 --> 00:41:25,498
从零开始编写MTP服务器或实现
to write an MTP server from scratch or implement

791
00:41:25,498 --> 00:41:26,580
复杂协议。
the most complex protocol.

792
00:41:27,139 --> 00:41:31,543
随着基础模型的不断增强以及工具的改进
As foundational models become more powerful and tooling improves

793
00:41:31,543 --> 00:41:36,190
使得构建代理的基本机制，执行任务的过程
the basic mechanics of building agents, getting them to perform tasks

794
00:41:36,190 --> 00:41:39,860
在许多方面变得愈加简单和可行。
is in many ways becoming more accessible and easier over time.

795
00:41:40,900 --> 00:41:44,420
与其说技术能力是关键，不如说经验丰富的建设者
Instead, the real expertise, the true mark of an experienced builder

796
00:41:44,420 --> 00:41:47,300
或建筑师的真正价值在于他们的判断力。
or architect, lies in the judgment.

797
00:41:47,619 --> 00:41:52,126
能够判断在特定项目中，何时选择像MCP这样的抽象形式
The ability to discern when a particular abstraction like MCP

798
00:41:52,126 --> 00:41:55,246
是至关重要的选择，适合特定项目、团队
is the right choice for a specific project, your team

799
00:41:55,246 --> 00:41:56,980
以及当前的开发阶段。
and your current stage of development.

800
00:41:57,860 --> 00:41:59,508
掌握何时引入抽象层、
Knowing when to introduce layers of abstraction,

801
00:41:59,508 --> 00:42:02,312
何时为更广泛的应用标准化接口，以及
when to standardize interfaces for broader use,

802
00:42:02,312 --> 00:42:05,940
何时为了快速迭代而保持简单，这是非常重要的。
and when to maintain simplicity for rapid iteration.

803
00:42:06,400 --> 00:42:07,519
这就是我们面临的挑战。
That's the difficult part.

804
00:42:08,000 --> 00:42:10,719
这正是我们需要发展的战略思维。
That's the strategic judgment we need to cultivate.

805
00:42:11,440 --> 00:42:15,440
唐纳德·克努斯的名言常在幻灯片中被引述，
And the famous saying by Donald Knuth,

806
00:42:15,440 --> 00:42:18,039
它提醒我们，过早进行优化是
often paraphrased on the slide, reminds us

807
00:42:18,039 --> 00:42:20,239
编程中诸多问题的根源。
premature optimization is the root of much evil

808
00:42:20,239 --> 00:42:20,239

in programming.

809
00:42:20,639 --> 00:42:25,086
过早选择像MCP这种既强大又复杂的协议，
Choosing a powerful but complex protocol like MCP too early

810
00:42:25,086 --> 00:42:28,199
实际上是一种过早优化的表现，
can indeed be a form of premature optimization,

811
00:42:28,199 --> 00:42:33,980
这在需要灵活性时可能导致不必要的资源浪费和进展受阻。
leading to unnecessary overhead and slowed progress

812
00:42:35,340 --> 00:42:37,659
这就是构建者的心态。
And that's the builder's mindset.

813
00:42:38,300 --> 00:42:40,539
这有三个层级，如此展示。
It has three layers, as shown here.

814
00:42:41,099 --> 00:42:43,659
首先，你需要理解事物存在的原因。
First, you understand why things exist.

815
00:42:43,820 --> 00:42:46,460
整个生态系统、其激励机制以及历史背景。
The ecosystem, the incentives, the history.

816
00:42:46,940 --> 00:42:49,500
你分析趋势并提出更深入的问题。
You decode trends and ask deeper questions.

817
00:42:50,300 --> 00:42:54,031
其次，重要的是要动手实践，不单单是看看博客，
Second, you build hands on, not just reading blogs,

818
00:42:54,031 --> 00:42:57,423
而是要开发工具、调试流程，处理不确定性，
but shipping tools, debugging pipelines, working through ambiguity,

819
00:42:57,423 --> 00:42:58,780
并快速制作原型。
prototyping rapidly.

820
00:42:59,590 --> 00:43:02,590
第三，你要建立自己的观点，分辨
Third, you develop an opinion, your own filter

821
00:43:02,590 --> 00:43:04,389
噱头和真正的洞察。
for hype versus Insight.

822
00:43:04,710 --> 00:43:06,107
你要形成自己的看法
You develop a point of view

823
00:43:06,107 --> 00:43:07,349
并保持独立思考。
and stay independent.

824
00:43:08,469 --> 00:43:11,590
这是我们在完整的AI Builders课程中所教授的知识。
This is what we teach in our full AI Builders course.

825
00:43:11,829 --> 00:43:13,159
你不仅在学习工具，
You're not just learning tools,

826
00:43:13,159 --> 00:43:15,670
更是在学习如何从大局出发进行判断。
you're learning how to build judgment at scale.

827
00:43:16,309 --> 00:43:18,047
你将通过实践来理解权衡的过程，
You will get practice making trade offs,

828
00:43:18,047 --> 00:43:19,670
而不仅仅是停留在理论学习上。
not just reading about them.

829
00:43:21,190 --> 00:43:24,473
在结构化项目中，你将面对不确定性并使用
You will work with real tools under uncertainty

830
00:43:24,473 --> 00:43:25,510
真实的工具。
in structured projects.

831
00:43:25,849 --> 00:43:27,913
你将离开时，不仅仅是知识的增加
You will leave just not knowing more

832
00:43:27,913 --> 00:43:29,289
更是思维方式的提升。
but thinking better.

833
00:43:30,090 --> 00:43:30,969
而且它是有效的。
And it works.

834
00:43:31,210 --> 00:43:35,933
我们的学生背景各异，来自Meta、Google、OpenAI、
Our students have come from Meta, Google, OpenAI,

835
00:43:35,933 --> 00:43:37,610
摩根大通和学术实验室。
JPMorgan and Academia Labs.

836
00:43:37,849 --> 00:43:40,272
其中有些是工程师，另一些则是产品经理、
Some are engineers, others are product managers,

837
00:43:40,272 --> 00:43:41,929
数据科学家，甚至包括教授。
data scientists, even professors.

838
00:43:42,329 --> 00:43:44,650
请关注这些学习者的多样化背景。
Note the diverse backgrounds of those learners.

839
00:43:44,730 --> 00:43:46,250
他们各自开辟了属于自己的道路。
They all found their own path.

840
00:43:46,969 --> 00:43:49,533
很多人都有类似的感受，这在Max的
Many say the same thing, echoed in this testimonial

841
00:43:49,533 --> 00:43:50,889
感言中得到了体现。
from Max.

842
00:43:51,369 --> 00:43:53,417
这让我对这一信号的看法有了新的变化
This changed how I think this is great

843
00:43:53,417 --> 00:43:54,260
是非常积极的。
to signal.

844
00:43:54,260 --> 00:43:56,500
这个课程不仅涉及技术技巧。
The course is not just about technical tips.

845
00:43:56,500 --> 00:43:58,996
在人工智能时代，要实现持久发展，
It's about longevity in the AI era by learning

846
00:43:58,996 --> 00:44:01,179
就需要掌握学习与遗忘的技巧。
how to learn and how to unlearn.

847
00:44:01,739 --> 00:44:04,263
在接下来的几张幻灯片中，我们还会分享一些
In the last few slides, we'll share a few more

848
00:44:04,263 --> 00:44:05,019
相关的词语。
of those words.

849
00:44:05,019 --> 00:44:06,780
不是要给人留下深刻印象，而是要主动邀请。
Not impress, but invite.

850
00:44:06,940 --> 00:44:09,259
您可以在课程页面上查看更多评价。
You can read more reviews on the course page.

851
00:44:10,539 --> 00:44:12,940
让我们从另一个视角来思考这个转变。
Let's look at another perspective on this transformation.

852
00:44:13,659 --> 00:44:16,908
这段话源自微软的TT和应用科学家，
This comes from TT and Applied Scientists at Microsoft

853
00:44:16,908 --> 00:44:19,774
强调了培养建设者心态的重要性，
and really underscores how developing a builder's mindset

854
00:44:19,774 --> 00:44:23,022
这种心态能够将AI从偶尔使用的工具
can shift AI from being just an occasional tool

855
00:44:23,022 --> 00:44:26,079
转变为一种日常的习惯，并根本改变
to an ingrained daily habit fundamentally changing

856
00:44:26,079 --> 00:44:27,990
个人解决问题的方式。
how one approaches and solves problems.

857
00:44:28,710 --> 00:44:31,770
TD 分享中，我认为最重要的收获
TD shares and I quote the greatest takeaway

858
00:44:31,770 --> 00:44:33,110
是心态的转变。
for me was the mindset shift.

859
00:44:33,269 --> 00:44:36,230
我曾经认为很多任务是AI无法完成的。
I used to think many tasks were beyond AI's reach.

860
00:44:36,869 --> 00:44:38,362
如今，思考如何利用AI
Now thinking about how to use AI

861
00:44:38,362 --> 00:44:39,989
已成为我的一种日常习惯。
has become a habit.

862
00:44:40,309 --> 00:44:42,549
这让我在工作中变得更加高效。
It's boosted my productivity both at work

863
00:44:42,549 --> 00:44:43,349
和生活中。
and in life.

864
00:44:43,829 --> 00:44:47,136
这种思维的改变不仅让我更深入地理解了AI，
This mindset shift didn't just help me understand AI better,

865
00:44:47,136 --> 00:44:49,969
也让我对解决问题的方式有了新的看法。
it changed the way I think about solving problems.

866
00:44:50,690 --> 00:44:52,449
我认为，这充分说明了
And I would say this is a powerful illustration

867
00:44:52,449 --> 00:44:54,913
我们需要超越对AI的单纯理解
of moving beyond just understanding AI

868
00:44:54,913 --> 00:44:57,729
将其真正融入到问题解决的核心中。
to truly integrating it into a problem solving DNA.

869
00:44:58,210 --> 00:45:02,027
我们分享这些经历的目的，不只是想让你
Our goal in sharing these experiences is not simply to impress you

870
00:45:02,027 --> 00:45:06,056
对过去的成功感到印象深刻，更希望邀请你
with past success, but rather to extend an invitation for you

871
00:45:06,056 --> 00:45:08,601
思考并可能在自己的工作和
to consider and potentially experience a similar impactful shift

872
00:45:08,601 --> 00:45:11,570
思维中感受到类似的深远变化。
in your own work and thinking.

873
00:45:13,179 --> 00:45:15,152
接下来我们要讨论的例子来自于
Continuing with the theme of tangible impact,

874
00:45:15,152 --> 00:45:17,265
摩根大通的量化研究员克里斯廷，
the next example comes from Christine,

875
00:45:17,265 --> 00:45:19,659
展示了如何在切实影响方面进行探索。
a quant researcher at JPMorgan Chase.

876
00:45:19,980 --> 00:45:22,860
生动地展示了将这些AI构建原则内化后
Beautifully illustrates a very practical outcome

877
00:45:22,860 --> 00:45:24,619
所获得的一个切实成果。
of internalizing these AI building principles.

878
00:45:25,099 --> 00:45:31,196
这体现了一个强大的转变过程，意味着我们从仅仅在概念上理解AI，
It's about that powerful transition from merely understanding AI conceptually

879
00:45:31,196 --> 00:45:36,506
走向积极构建能够融入并真正提升个人日常工作流程的工具，
to actively building tools that integrate into and genuinely enhance one's daily workflow,

880
00:45:36,506 --> 00:45:39,260
从而最终重新定义工作的方式。
ultimately redefining how work itself gets done.

881
00:45:40,610 --> 00:45:43,064
克里斯汀分享了她的经历，我借此引用
Christine shares and I'll quote her experience

882
00:45:43,064 --> 00:45:46,530
她认为这门课程激发了她对生成式AI应用的想象力。
this course opened my imagination about what I could use Genai for.

883
00:45:46,610 --> 00:45:49,298
我创造了一个现在每天都会使用的应用，
I built an application that I now use daily,

884
00:45:49,298 --> 00:45:53,329
这让我感到惊讶，因为我从未想过自己能如此轻松地完成它。
something that I never thought I could have created easily.

885
00:45:53,730 --> 00:45:56,205
这让我更深刻地思考应该专注于哪些事情，
It helped me think more deeply about what to focus on

886
00:45:56,205 --> 00:45:58,289
以及哪些任务可以交给AI来处理。
and what I can delegate to AI.

887
00:45:58,690 --> 00:46:00,273
这不仅关乎提升生产力，
It's not just about productivity,

888
00:46:00,273 --> 00:46:02,289
更在于重新思考我的工作方式。
it's about redefining how I work.

889
00:46:02,690 --> 00:46:06,516
这展示了从可能性转向实际应用的过程，
This highlights the journey from possibility to practical application,

890
00:46:06,516 --> 00:46:10,130
旨在开发解决个人和职业问题的工具。
creating tools that solve real personal or professional problems.

891
00:46:10,630 --> 00:46:14,225
我们分享这个故事的目的是希望
And again, our intention in sharing this story

892
00:46:14,225 --> 00:46:16,023
激发你思考如何
is to inspire you to consider how you might

893
00:46:16,023 --> 00:46:18,592
创造能解决你独特挑战
build tools that address your own unique challenges

894
00:46:18,592 --> 00:46:20,389
和机遇的工具。
and opportunities.

895
00:46:21,750 --> 00:46:24,254
同样，强调这些概念和工具的可用性
It's also crucial to highlight accessibility

896
00:46:24,254 --> 00:46:25,349
是非常重要的。
of those concepts and tools.

897
00:46:26,148 --> 00:46:31,642
接下来Thermo Fisher Scientific的高级产品专家Ken所做的评论
And the next review from Ken, a senior product specialist

898
00:46:31,642 --> 00:46:32,949
恰好陈述了这一观点。
from Thermo Fisher Scientific really speaks to this point.

899
00:46:33,269 --> 00:46:37,011
这表明，即使你只有基本的Python技能，
It underscores that you don't need to be a seasoned software engineer

900
00:46:37,011 --> 00:46:41,287
或者你在一个并不专注于软件开发的职位或公司工作，
with years of coding experience to start leveraging AI effectively,

901
00:46:41,287 --> 00:46:45,920
也并不需要成为一名拥有多年编码经验的资深软件工程师，
even with what might be considered basic Python skills,

902
00:46:45,920 --> 00:46:47,880
就能够有效地运用AI。
or you're working a role or company not traditionally focused on software development.

903
00:46:48,360 --> 00:46:51,360
建设者的心态以及我们所探讨的实用工具
The builder's mindset and the practical tools we explore

904
00:46:51,360 --> 00:46:54,360
可以极大地适用并赋予我们更多的能力。
can be incredibly applicable and empowering.

905
00:46:56,119 --> 00:47:00,056
假如今天的课让你对协议选择有了新的
If today's lesson gave you even one new way

906
00:47:00,056 --> 00:47:03,067
思考方式，想象一下我们可以
to think about protocol choice, imagine what we could

907
00:47:03,067 --> 00:47:04,919
共同创造出什么。
build together over a few weeks.

908
00:47:05,559 --> 00:47:10,743
如果你想加入一个学习如何在应用AI的真实环境中运作的建设者团队，
Here's our next step if you want to join cohort of builders

909
00:47:10,743 --> 00:47:14,469
不仅仅是掌握工具，还有我们之前讨论的各种取舍，
learning to navigate the real terrain of applied AI, not just tools,

910
00:47:14,469 --> 00:47:19,004
这是我们接下来的步骤。如果你看过相关文档却仍然感到困惑，
but trade offs as we have discussed, if you have read the docs

911
00:47:19,004 --> 00:47:22,082
或者正在进行构建却不确定方向是否正确，
and still feel stuck or you are building but unsure if you're on the right track,

912
00:47:22,082 --> 00:47:25,322
想要学习如何深思熟虑，而不仅仅是复制代码
if you want to learn how to think, not just copy code

913
00:47:25,322 --> 00:47:28,562
或讨论架构和设计，甚至只停留在语法层面，
and discuss architecture and design, not just a syntax,

914
00:47:28,562 --> 00:47:30,020
那么欢迎加入我们。
then come join us.

915
00:47:31,619 --> 00:47:33,860
非常感谢大家今天的到来。
Thank you all for joining today's session.

916
00:47:34,099 --> 00:47:37,139
我希望这能够让你清楚地理解MCP的定义
I hope this gives you a clear understanding of what MCP is

917
00:47:37,139 --> 00:47:38,099
及其局限性。
and what it isn't.

918
00:47:38,579 --> 00:47:42,291
你们已经了解了mcp的基本能力和存在的问题，
You've seen the core capabilities of mcp,

919
00:47:42,291 --> 00:47:43,473
但更重要的是，
you've seen the pain points,

920
00:47:43,473 --> 00:47:45,160
你们也看到了强大工具
but more importantly, you've seen what happens

921
00:47:45,160 --> 00:47:47,859
在不恰当阶段使用时所带来的后果。
when a powerful tool is used at a wrong stage.

922
00:47:48,420 --> 00:47:49,860
这就是事情的真相。
That's the real story here.

923
00:47:50,340 --> 00:47:54,019
很多团队在 MCP 还不够完善的时候就急于尝试。
Many teams try MCP too early when it doesn't work smoothly.

924
00:47:54,019 --> 00:47:56,052
他们不仅对mcp放弃了信心，
They don't just give up on mcp,

925
00:47:56,052 --> 00:47:57,940
还完全丧失了对AI的信任。
they give up on AI altogether.

926
00:47:58,179 --> 00:48:00,615
他们离开时觉得技术还不成熟，
They walk away thinking the tech isn't ready,

927
00:48:00,615 --> 00:48:03,400
实际上，他们只是需要更合适的时机
when really they just needed better timing

928
00:48:03,400 --> 00:48:05,140
或更真实的思维框架。
or a more honest framework for thinking.

929
00:48:06,179 --> 00:48:07,699
这就是我们制作全面课程的原因。
That's why we created the full course.

930
00:48:07,860 --> 00:48:09,406
我们的目标不仅是展示工具，
Not just to show you tools,

931
00:48:09,406 --> 00:48:11,310
更在于培养你的时机感、判断能力，
but to train your timing, your judgment,

932
00:48:11,310 --> 00:48:12,500
和创造者的思维方式。
your builder's mindset.

933
00:48:13,219 --> 00:48:14,739
如果这句话对你有共鸣的话。
If that resonates with you.

934
00:48:14,739 --> 00:48:17,516
如果你希望以更独特和果断的方式进行构建，
If you want to build differently and more decisively,

935
00:48:17,516 --> 00:48:19,460
我期待在完整课程中与你相见。
I'd love to see you in the full course.

936
00:48:20,179 --> 00:48:22,364
您可以右侧扫描二维码，
You can scan the QR code on the right

937
00:48:22,364 --> 00:48:24,152
使用代码MCP享受
and use the code MCP for a discount

938
00:48:24,152 --> 00:48:25,940
150美元的优惠。
of $150.

939
00:48:27,539 --> 00:48:29,539
我想以这个最后的思考来和大家告别。
I will leave you with this final thought.

940
00:48:30,099 --> 00:48:32,684
不当使用正确的工具，尤其是在不合适的时机
Misusing the right tool at the wrong time

941
00:48:32,684 --> 00:48:35,010
可能会带来比完全不使用它更大的损失。
can cost more than not using it at all.

942
00:48:36,530 --> 00:48:39,570
好的，会议结束后我会将录音数据库文件、
All right, I will distribute the recording database file,

943
00:48:39,570 --> 00:48:42,130
幻灯片以及其他相关资源发给大家。
slide deck and other relevant resources after this meeting.

944
00:48:42,369 --> 00:48:45,010
下载链接将通过电子邮件发送给大家。
Download links will also be sent through email.

945
00:48:45,570 --> 00:48:49,009
感谢大家，我现在可以回答问题。
Thank you and I will take questions here.

946
00:48:49,889 --> 00:48:52,353
一旦数据签署完毕，这条记录
Data sign this once the record

947
00:48:52,353 --> 00:48:53,489
将会被发布。
will be posted.

948
00:48:53,570 --> 00:48:56,980
我会通过我们在这里发出的邮件
I'll post the link through the email

949
00:48:56,980 --> 00:48:58,929
把链接发送出去。
we publish here.

950
00:49:00,260 --> 00:49:01,512
你能谈谈关于
And could you share a thought about

951
00:49:01,512 --> 00:49:05,059
谷歌刚刚宣布的代理间协议的看法吗？
the newly announced agent to agent protocol by Google?

952
00:49:09,539 --> 00:49:13,059
我现在对此并没有太多看法。
I don't really have too much comment on that currently.

953
00:49:13,860 --> 00:49:20,938
我对多代理的方向进行了一些尝试，
I had some exploration on the multi agent route

954
00:49:20,938 --> 00:49:27,132
但尚未达到需要特定协议的复杂
but haven't really reached that complexity stage

955
00:49:27,132 --> 00:49:28,460
程度。
of needing a specific protocol for that.

956
00:49:28,780 --> 00:49:32,158
我觉得整体来说这个还不错，不过具体
I think overall it's good, but the timing

957
00:49:32,158 --> 00:49:34,940
发布的时间仍然存在不确定性。
for that release is still uncertain.

958
00:49:35,420 --> 00:49:38,228
我对它的价值还不是很确定
I'm not super sure how valuable it is yet

959
00:49:38,228 --> 00:49:42,206
因为我个人采用了一种略有不同的方法
because personally I adopt a slightly different approach

960
00:49:42,206 --> 00:49:44,780
这种方法基于共享文档。
that is based on shared documentation.

961
00:49:45,099 --> 00:49:49,578
正如你所看到的，我们在光标规则中要求，
As you can also see here, we ask in our cursor rules,

962
00:49:49,578 --> 00:49:53,349
我们特别要求AI在这里撰写文档，
we specifically ask the AI to write documents here

963
00:49:53,349 --> 00:49:57,356
这样能够让它们在不同的代理间复用，
and this will make them reusable across different agents

964
00:49:57,356 --> 00:50:00,420
同时也能够剔除过多的细节。
while filtering out the too much details.

965
00:50:02,659 --> 00:50:08,579
好的，目前似乎没有其他问题了。
All right, looks like there are no further questions.

966
00:50:10,579 --> 00:50:14,019
我将在这里再停留大约 30 秒钟。
I'll stay here for like 30 more seconds.

967
00:50:15,219 --> 00:50:21,240
如果大家还有其他问题，
In the case that someone has any more questions,

968
00:50:21,240 --> 00:50:25,071
请在聊天中提出
feel free to post it in chat

969
00:50:25,071 --> 00:50:29,997
或者直接发言讨论，
or unmute directly to discuss

970
00:50:29,997 --> 00:50:35,470
感谢大家的积极反馈。
and thank you for all the nice comments.

971
00:50:38,750 --> 00:50:42,204
好的，如果没有其他问题
All right, if there are no further questions

972
00:50:42,204 --> 00:50:50,369
我们就到此为止，预计今天稍晚或明天会发送最终的资源。
we will just end here and send out the final resources

973
00:50:50,849 --> 00:50:54,210
非常感谢各位参加这个速成课程
And thank you so much for attending this lightning course

974
00:50:54,210 --> 00:50:56,369
并提出精彩的问题。
and asking great questions.

975
00:50:57,250 --> 00:50:58,530
我们会再次见面。
We will see you again.

