文字稿 · CC BY 4.0

解答你关于浏览器 AI 智能体 WebMCP 的疑问 — Chrome

本页标题、字幕、摘要和阅读笔记为已保存的 AI 译文,可能有误。时间戳与来源一致,可展开查看原始字幕,并对照原视频核对。

Chrome 工程师解答开发者关于 WebMCP 的疑问,展示结构化 HTML 表单和确定性工具调用如何帮助浏览器 AI 智能体可靠地执行操作。

Chrome for Developers · 发布于 · 22 分钟 · 英语 · 许可:CC BY 4.0 · 来源:在 YouTube 上观看

文字稿来源:创作者上传至 YouTube 的字幕。AI 标点由 Vidleaf 添加;原始措辞和时间戳锚点均保留。原始文字稿见下方。

AI 生成的摘要

视频描述了向“智能体网络”的转变,用户依赖智能体来执行任务,演讲者称这一转变的规模与向移动网络的转变相当,甚至更大。开发者被敦促通过发现(robot.txt、站点地图和 llms.txt)、可读性(干净的 HTML、意识到许多智能体无法运行 JavaScript,以及指向使用更少 token 的 Markdown 版本的内容协商)和可用性,使产品能被智能体使用。由于大多数智能体目前使用驱动方式——通过视觉模型截图、DOM 和无障碍树——清晰的布局和良好的无障碍标记有帮助,对用户有益的东西对智能体也有益。由于大上下文使智能体更慢且更不可靠,团队致力于 WebMCP,让开发者注册智能体可以直接调用的工具;一个航班搜索演示展示了一个 searchFlights 工具和一个动态注册的 setFilters 工具,智能体在每次调用前请求许可,工具可以通过声明式方法为现有表单注册,或通过命令式 JavaScript API 注册。WebMCP 是一项网络标准提案,在 Chrome 中进行源试用,需选择加入且为实验性,由 Microsoft、Google 和其他社区成员作为联合努力发起。Chrome 中的 Gemini 一直在试验它,Cloudflare 的 Browser Run 支持它并已在其网站上投入生产,Brave 一直在其智能体 Leo 中试验它,OpenAI 最近将 WebMCP 支持引入其智能体。智能体可以构建为 Chrome 扩展,通过内容脚本权限获取或执行工具,扩展也可以注册工具。在安全方面,用户必须允许或拒绝工具运行,开发者被建议考虑工具是否只读却泄露敏感信息,以及工具具有多大的破坏性和可逆性。一个演示展示了在 LED 网格上选取一个表情符号,选择保存到 Firebase 实时数据库,转换为图像字节数组,并发送到显示器监听的 MQTT 服务器。演讲者相信网络将继续存在,人们仍会浏览它,智能体尤其擅长消除摩擦和自动化工作流,并指出功能请求,例如为长时间运行的工具指示进度。

根据文字稿生成。请对照原始视频核查所链接的段落。

带时间戳的章节摘要

智能体网络以及网络为何必须演进

从智能体辅助转向智能体执行

  • [0:10] 越来越多的用户现在转向智能体来询问关于世界的问题或完成他们需要完成的任务。
  • [0:17] 这一变化与向移动网络的转变规模相当,甚至更大。
  • [1:12] 最初用户向智能体提问、请求文本摘要,或让它们撰写电子邮件。
  • [1:24] 用户现在期望智能体不仅能协助完成这些任务,还能实际执行其中一些任务,例如代他们发送电子邮件。

面向智能体的开发者集成点

  • [1:40] 例如,拥有发送电子邮件产品的开发者需要确保智能体能够使用该产品来发送那封电子邮件。
  • [1:47] 产品需要面向智能体的集成点,因为智能体是用户使用的工具,而不是用户本身。
  • [1:58] 开发者应确保用户能够通过他们正在使用的任何界面来使用其产品。

定义智能体网络

  • [2:15] 智能体使用量的增长正被称为智能体网络。
  • [2:26] 对开发者而言,目标是确保其产品可被智能体使用,这可以拆分为三大支柱。

让产品可被 AI 智能体发现和使用

通过 robots.txt、站点地图和 llms.txt 实现发现

  • [2:33] 发现涉及智能体如何得知你的产品存在及其功能,类似于你为搜索引擎所做的优化。
  • [2:46] 你可以确保 robots.txt 存在并提供良好的站点地图,还可以使用 llms.txt 等较新的选项。
  • [2:54] llms.txt 是一种类似 robots.txt 的隐藏文件,位于标准位置,包含你网站的大部分内容。
  • [3:05] 智能体无需扫描你的整个网站,而是可以在一个地方找到所有内容。

通过整洁的 HTML 和 JavaScript 支持实现理解

  • [3:11] 在发现之后,智能体需要读取并理解内容,llms.txt 在这方面也发挥了一点作用。
  • [3:25] 如果智能体读取你网站的 HTML,该 HTML 应具有整洁、非常易用的结构。
  • [3:33] 如今许多智能体无法运行 JavaScript,因此没有内容的纯客户端页面可能对它们来说难以处理,而其他智能体则能够应对。
  • [3:43] 这类似于搜索引擎的演变,Google 搜索过去不会为网站运行 JavaScript,后来随着 JavaScript 密集型应用的增长而演变。

使用 Markdown 替代版本进行内容协商

  • [3:57] 通过内容协商,当你知道访问者是智能体时,可以添加标头或元标签,指向等效的 Markdown 版本。
  • [4:09] 智能体喜欢 Markdown,因为它通常比 HTML 使用更少的 token,因此智能体可以表现得更好。

超越发现与理解之外的可用性

  • [4:15] 可用性部分不仅在于智能体知道你的产品存在并理解其内容,还在于能够使用它。

让网站对智能体友好

通过截图和视觉模型进行操作

  • [4:25] 目前大多数智能体使用操作方式,模拟用户使用网站的方式。
  • [4:32] 智能体对页面截图,并通过视觉模型运行,以理解其功能。

清晰的布局和结构良好的 HTML

  • [4:40] 开发者应确保布局对智能体清晰,因为看起来像按钮的按钮更有可能被理解。
  • [4:55] HTML 应结构良好:将按钮放在其相关的表单标签内可使关系对智能体清晰,而表单外的按钮会让智能体难以处理。

无障碍标记和共享的用户收益

  • [5:18] 智能体可以读取无障碍树,因此良好的无障碍标记有助于智能体理解页面。
  • [5:29] 这些实践对用户有益,因此对用户有益的做法也有益于智能体理解网站。

WebMCP 与减少上下文

  • [5:39] 演讲者的团队一直在研究 WebMCP,因为截图、DOM 和无障碍树可能需要大量上下文。
  • [5:54] 上下文越大,智能体回答所需时间越长,可靠性越低,出错的可能性也越大。

面向 AI 智能体的 WebMCP 工具

WebMCP 工具注册与优势

  • [6:11] 网站开发者可以改为为一个名为 WebMCP 的 API 提供工具,智能体可以直接使用。
  • [6:22] 智能体无需阅读所有内容、尝试理解 DOM 或截图,只需调用这些工具,这花费更少时间和更少令牌,并且更可靠。
  • [6:33] 提供具有正确描述和参数的正确工具集,让开发者引导智能体如何使用其页面和产品。

航班搜索演示设置

  • [6:52] 该演示左侧是一个航班搜索产品,右侧是团队构建的示例扩展,模拟 Chrome 中的 Gemini 等智能体。
  • [7:23] 该站点已注册 WebMCP 工具,对于此页面,它有一个名为 searchFlights 的工具。

智能体航班搜索与权限流程

  • [7:31] 用户要求智能体搜索下周一从伦敦到纽约的航班,一周后返回,一名乘客。
  • [7:51] 智能体进行思考,调用 searchFlights 工具,并请求用户允许搜索航班,用户予以允许。
  • [8:02] 智能体按请求搜索下周一(即录制时的第 31 天)从伦敦到纽约的航班,一周后返回。
  • [8:16] 导航到此页面后,又注册了另一个工具。

WebMCP 工具注册与智能体驱动的航班筛选

声明式与命令式 WebMCP API

  • [8:27] 工具通过 JavaScript API 注册,并辅以一些 DOM 支持,用于以声明方式标记元素。
  • [8:34] WebMCP 的声明式工具允许你为现有 Web 表单添加特殊属性,使其成为智能体可使用的工具。
  • [8:44] WebMCP 还提供基于 JavaScript 的命令式 API,演示中使用的正是这一种。
  • [9:06] 演讲者表示,选择取决于产品:对于遗留产品或自己编写的代码,声明式方法构建起来可能快得多,尤其是当表单已经存在时。

工具的动​​态注册与注销

  • [9:25] WebMCP 允许动态注册和注销工具,在此例中,搜索发生后便注册了一个新工具。

智能体调用 setFilters 进行航班搜索

  • [9:38] 当被要求仅显示低于 $800 的直飞航班时,智能体稍作思考,并请求调用一个名为 setFilters 的工具来更改筛选配置。
  • [9:59] 用户选择允许后,结果显示低于 800 的航班,并且“直达”筛选器也已被点击。
  • [10:09] 在此例中,一个提示词触发了一次工具调用,第二个提示词又触发了另一次工具调用,不过想必所有这些都可以通过一次性提示词完成。

针对不同用户行为设计工具

  • [10:19] 在设计 WebMCP 工具时,用户行为可能有所不同:有些用户可能只说预订飞往纽约的航班,智能体就需要澄清出发地和日期,而另一些用户可能一次性给出完整请求。

演示:使用 WebMCP 智能体预订航班

航班搜索提示词与工具发现

  • [10:51] 演示会与智能体开启一段新对话,并要求预订一趟从伦敦飞往纽约的航班:下周一出发,一周后返回,一名乘客,仅限低于 $800 的直飞航班。
  • [11:19] 智能体进行思考,并在继续之前请求调用 searchFlights 工具的权限。
  • [11:24] 智能体自动表明自己有一个新工具并希望进行筛选,这表明即使在同一个提示词内,它也能发现新工具。

批准后应用筛选条件

  • [11:39] 如果用户回答是,智能体就会调用该工具,并像之前一样提供筛选条件。

当前 WebMCP 智能体支持情况

  • [11:46] 当被问及目前哪些智能体支持 WebMCP 时,演讲者指向了该扩展程序,并称其作为演示相当不错。

WebMCP 的采用与标准化

源试用可用性与开发者选择加入

  • [11:59] WebMCP 是一项 Web 标准提案,目前正在 Chrome 中进行源试用实验。
  • [12:07] 任何网站开发者都可以选择加入源试用,但在他们加入之前,该功能不可用。
  • [12:18] 开发者可以通过开启 Chrome 标志在自己的环境中试用,但要向用户提供该功能,则需要加入源试用。
  • [12:31] 当网站开发者加入源试用后,用户无需做任何操作即可使用该功能。

实验状态与反馈目标

  • [12:39] 该 API 仍处于早期阶段,源试用意味着它仍是实验性的。
  • [12:44] 团队目前正在寻找开发者进行试用并提供反馈,以便让该 API 符合实际需求并找到良好的市场契合点。

正在试验 WebMCP 的智能体与产品

  • [12:59] 正如在 I/O 上宣布的那样,Chrome 中的 Gemini 一直在试验 WebMCP。
  • [13:07] Cloudflare 的 Browser Run 支持 WebMCP,并且已在其网站上投入生产使用。
  • [13:16] Brave 一直在其名为 Leo 的智能体中试验 WebMCP。
  • [13:23] OpenAI 最近将 WebMCP 支持引入了其智能体。
  • [13:33] 该生态系统仍处于非常早期的阶段,但开发者已经表现出浓厚的兴趣,许多网站正在试验 WebMCP,智能体方面也有兴趣,双方都应继续发展。

标准化起源与社区参与

  • [14:03] 与任何 Web 标准一样,该标准得到了社区的广泛参与。
  • [14:09] 该标准由 Microsoft、Google 以及社区中的其他一些成员共同发起。
  • [14:18] 来自不同背景和不同企业的人们都在为该标准做出贡献。

Chrome 扩展与 WebMCP 集成

通过内容脚本使用 WebMCP

  • [14:32] 智能体可以构建为与页面交互的 Chrome 扩展。
  • [14:44] 扩展可以从页面获取工具或在页面上执行工具。
  • [14:51] 目前,扩展通过内容脚本权限来实现这一点,因为还没有专门面向扩展的 API。
  • [14:57] 内容脚本调用页面实际可用的 API。

从扩展注册工具

  • [15:03] 由于注册的工具对扩展可用,扩展可以像获取和执行工具一样注册工具。
  • [15:12] 扩展可以注册工具。

智能体工具权限与安全

工具执行的用户批准提示

  • [15:19] 当智能体请求运行工具时,用户必须允许或拒绝执行。
  • [15:24] 这个提示大概是构建智能体的人所做的用户体验决策。
  • [15:31] 在这种情况下,是否提示的决定来自扩展本身。
  • [15:35] 开发者可能希望认真考虑权限设计。

只读工具与敏感信息

  • [15:46] 有些工具是只读的,不会对其产品做任何更改。
  • [15:52] 有些只读工具可能会泄露敏感的用户信息,这比只读工具从网站获取信息感觉更危险。
  • [16:04] 由于智能体可能会访问多个页面和内容,开发者应始终考虑某个工具是否危险,或是否会泄露用户的敏感信息。
  • [16:17] 如果是这种情况,开发者可能需要向用户请求权限。

写入类工具权限的细微之处

  • [16:19] 你可能会觉得对写入类工具总是应该请求权限,但这里还有更多细微之处。
  • [16:29] 开发者应考虑某个工具的破坏性有多大,以及可逆性如何。
  • [16:34] 搜索航班的工具大概问题不大,影响也不会太大。
  • [16:41] 对于处理支付的工具,你可能需要确保在执行支付前向用户请求权限。

API 提示与智能体判断

  • [16:49] 智能体是必须猜测某个工具的含义,还是网站能够标明这些含义,这属于 API 的一部分,其中有些部分已经存在,有些仍在演进。
  • [17:00] 智能体已经可以接收提示,例如只读提示,表明该工具不会更改或写入页面上的任何内容,只返回信息。
  • [17:16] 智能体可以利用这类提示来决定是否显示提示词。
  • [17:22] 智能体也可以利用意图或工具描述自行判断,这正是本案例中智能体所做的。

由 WebMCP 控制的 LED 表情显示

用于视频通话的表情显示

  • [17:53] 这位创客在办公室自己身后放置了一块 LED 显示屏用于输入输出,任何与他通话的人大概都会看到它。
  • [17:59] 一个网站允许访客挑选一个表情,随后该表情会显示在创客身后的 LED 点阵屏上。

显示应用中暴露的 WebMCP 工具

  • [18:18] 这位创客在显示应用中暴露了 WebMCP 工具,因此可以要求智能体更改 LED 点阵屏上正在渲染的内容。
  • [18:40] 访客让智能体挑选一个能让他们联想到阳光下野餐的表情。

智能体通过反复调用工具搜索表情

  • [18:56] 智能体搜索表情并多次调用该工具,在底层尝试不同的关键词。
  • [19:17] 请求获得允许后,智能体返回了一个野餐篮表情,创客说他们之前从未试过这个。

Firebase 与 MQTT 投递流水线

  • [19:37] Web 应用将所选内容保存到 Firebase 实时数据库中。
  • [19:47] 服务器从实时数据库中获取信息,将表情符号转换为图像字节数组,并将其发送到 MQTT 服务器。
  • [20:03] LED 显示屏监听 MQTT 服务器,演讲者将其描述为 WebSocket 类协议的物联网版本。

Web 与智能体生态的未来

网页浏览与智能体自动化

  • [20:37] 演讲者认为 Web 将继续存在,人们仍会浏览网页,因为它有趣且引人入胜。
  • [20:49] 智能体并不被期望总是取代浏览;它们尤其擅长消除用户流程中的摩擦并自动化工作流。

用技能与进度扩展 WebMCP

  • [21:04] 除了 WebMCP 暴露工具之外,演讲者建议可以为智能体提供组合工具的配方或技能,以执行更大的任务。
  • [21:24] 演讲者表示,我们才刚刚触及可能性的表面,并指出 WebMCP 有许多功能请求。
  • [21:31] 一项被请求的功能是为长时间运行的工具指示进度,例如需要几分钟的文件下载。
  • [21:41] 目前页面无法将下载进度回传给智能体,演讲者认为这潜在非常有趣。

结束语与提问邀请

  • [21:54] 主持人感谢 Andre 的参与,并邀请观众在评论中留下更多问题,可能会在未来的视频中解答。

阅读带时间戳的可用字幕,或转录播客、讲座和本地音频/视频。免费YouTube转录提取器。

需要提取其他公开视频的 SRT、TXT 或 Markdown 字幕?前往 YouTube 字幕提取工具。

前 3 段双语对照预览 · 免消耗额度

以下展示前 3 段已保存中文译文与英文原版字幕的逐段对照(零额度消耗):

[0:00]

欢迎回来。AI 正在改变我们周围的世界,尤其是对于 Web 而言,我认为这是一个非常有趣的变革时期。未来会是什么样子尚不完全清楚,但很明显,越来越多的用户在遇到关于世界的问题或需要完成的任务时转向智能体。可以说,我们正在看到的变革与用户开始访问移动 Web 时的变革处于同一量级,甚至更大。考虑到所有这些,今天我坐下来与 Chrome 团队的 Andre 交谈,向他提出了一些关于他认为我们将走向何方的问题。

Welcome back. AI is changing the world around us, and for the web in particular, I think this is a really interesting time of change. It's not entirely clear what the future will look like, but it's clear that more users are now turning to agents when they have a question about the world or a task they need to complete. It's fair to say that the change we're seeing is on the same scale as, if not greater than, the change when users started accessing the mobile web. With all of that in mind, today I sat down with Andre on the Chrome team and I asked him some questions about where he sees us heading.

[0:34]

开发者模式 欢迎,Andre。-非常感谢。-当然,很高兴你能来。我们在网上征集了一些问题。我想我们发在了 Reddit 上,也在其他地方询问了。我认为人们普遍的感受或未解答的问题是,为什么 Web 甚至需要演进?人们喜欢 Web。他们对现有的东西很满意。你能谈谈我们现在正在思考什么,以及我们认为未来可能需要将 Web 推向何方吗。当然,用户越来越多地使用智能体。

DEVELOPER MODE Welcome, Andre. -Thank you very much. -Of course, great to have you. We asked online for some questions. I think we posted on Reddit and asked elsewhere as well. I think a general sentiment or unanswered question that people had was, why does the web even need to evolve? People like the web. They're happy with what we have. Could you talk a little bit about what we're thinking about right now and where we think we might need to move the web in the future. Of course, so users have been using agents more and more.

[1:05]

-是的。-比如,有时候是 Gemini,或者更近期的,像 Chrome 里的 Gemini。一开始,用户更多是在“哦,我能问个问题吗?”或者“你能帮我总结一下这段文字吗?”或者“你能帮我写封邮件吗?”这种意义上使用它。然而,用户的期望正在改变。用户现在期望智能体不仅能帮他们完成这些任务,还能实际执行其中一些任务。不再只是让智能体写封邮件,而是还要让智能体替你发送邮件。

-Yeah. -Like, sometimes it's Gemini, or more recently, things like Gemini in Chrome. At the beginning, users were using it more in the sense of "Oh, can I ask a question?" or "Can you summarize the text?" or "Can you author an email for me?" However, the user expectation is changing. Users now expect agents not only to help them with those tasks but actually to executing some of them. It's not just about asking the agents to write an email anymore; it's about also asking the agent to send the email on your behalf.

[0:00] 欢迎回来。AI 正在改变我们周围的世界,尤其是对于 Web 而言,我认为这是一个非常有趣的变革时期。未来会是什么样子尚不完全清楚,但很明显,越来越多的用户在遇到关于世界的问题或需要完成的任务时转向智能体。可以说,我们正在看到的变革与用户开始访问移动 Web 时的变革处于同一量级,甚至更大。考虑到所有这些,今天我坐下来与 Chrome 团队的 Andre 交谈,向他提出了一些关于他认为我们将走向何方的问题。

[0:34] 开发者模式 欢迎,Andre。-非常感谢。-当然,很高兴你能来。我们在网上征集了一些问题。我想我们发在了 Reddit 上,也在其他地方询问了。我认为人们普遍的感受或未解答的问题是,为什么 Web 甚至需要演进?人们喜欢 Web。他们对现有的东西很满意。你能谈谈我们现在正在思考什么,以及我们认为未来可能需要将 Web 推向何方吗。当然,用户越来越多地使用智能体。

[1:05] -是的。-比如,有时候是 Gemini,或者更近期的,像 Chrome 里的 Gemini。一开始,用户更多是在“哦,我能问个问题吗?”或者“你能帮我总结一下这段文字吗?”或者“你能帮我写封邮件吗?”这种意义上使用它。然而,用户的期望正在改变。用户现在期望智能体不仅能帮他们完成这些任务,还能实际执行其中一些任务。不再只是让智能体写封邮件,而是还要让智能体替你发送邮件。

[1:37] 所以这就是正在发生的变化。作为开发者,如果你有一个发送邮件的产品,比如,你要确保智能体能够使用你的产品来发送那封邮件。你需要一些与这些智能体的集成点,因为,再说一次,重点不是让智能体成为用户,而是让智能体成为用户用来使用你产品的工具。作为开发者,你要确保用户能够用他们正在使用的任何界面来使用你的产品。是的。在我们深入细节之前,你能解释一下你正在做什么,然后这如何融入 Google 以及整个行业目前正在做的更广泛的工作中吗?

[2:15] 我们所看到的,以及我们称呼这种智能体使用量增长的方式,我们称之为智能体网络,作为开发者,你可以这样理解:你要确保你的产品能被智能体使用,这可以分成三大支柱。其中之一是发现,发现是关于智能体如何知道你的产品存在,智能体如何知道你的产品是做什么的,这与你为搜索做的事情非常相似,比如。

[2:46] 你可以考虑确保 robot.txt 存在,确保你有好的站点地图,但也有一些更新的东西,比如 llms.txt。是的,这就像 robots.txt 类型的隐藏文件。它是一个位于标准位置的文件,包含你网站的很多内容。智能体不必为了所有东西而浏览你的整个网站,你可以在一个地方找到所有内容。好的。是的。然后还有理解的部分:当智能体访问你的网站时,它知道网站是做什么的,现在它需要阅读并理解内容。

[3:19] 是的。Llms.txt 在这方面也起到了一点作用,因为它包含了所有内容,但你现在也可以考虑,如果智能体正在读取你网站的 HTML,我们希望确保 HTML 是非常可用的结构,它是干净的,所以你可以做到这一点。例如,今天许多智能体无法运行 JavaScript。如果你有一个完全客户端渲染的随机页面,没有任何内容,它们可能会遇到困难。其他的则可以。这让我觉得与搜索的总体演变相似。据我了解,谷歌搜索过去不会为网站运行 JavaScript,然后随着我们开始看到更多 JavaScript 密集的应用,情况可能发生了变化和演变。

[3:57] 你也可以考虑内容协商之类的事情,即当智能体来到你的页面,你知道它是一个智能体,你可以添加一些标头或元标签,说:“嘿,这里有一个等效的 Markdown 供你阅读”,因为智能体喜欢使用 Markdown。它通常比 HTML 使用更少的令牌,所以智能体在这方面可以做得更好。-最后,还有可用性部分。-是的。这不仅仅是关于智能体知道你的产品存在、理解它的功能和内容,还在于能够使用它。目前,大多数智能体做的是我们称之为执行的操作,即尝试模拟用户如何使用你的网站。

[4:32] 这意味着智能体对页面截图,然后通过视觉模型运行,尝试理解它的功能。从这个意义上说,作为开发者,你要确保你的布局对智能体来说是清晰的。例如,如果一个按钮看起来像按钮,智能体会识别出它是按钮,但如果它看起来不像按钮,智能体就不太可能理解该做什么。你要确保你的布局清晰。你还要确保你的 HTML 结构良好。我的意思是,假设你有一个与表单相关的按钮。

[5:03] 如果你的按钮位于表单标签内,智能体就能清楚地知道这两者是相关的。这看起来像是显而易见应该做的事,但我觉得有很多网站没有这样做。没错。如果你的按钮位于表单之外,智能体就会遇到困难。最后,还有无障碍性。智能体可以读取无障碍树,所以如果你有良好的无障碍标记,实际上会帮助智能体理解你的页面。有趣的是,我们谈论的所有这些事情,它们对用户都是有益的,所以任何对用户有益的东西,对智能体理解你的网站也是有益的。

[5:38] 但还有更多内容。我们一直在研究一个叫 WebMCP 的东西。WebMCP 的挑战在于,截图、DOM、无障碍树,这些对智能体来说可能是大量的上下文。上下文越多,耗时就越长。上下文越大,智能体回答所需的时间就越长。这也会降低智能体的可靠性。它增加了智能体出错的可能性,比如点错按钮或产生误解。

[6:11] 取而代之的是,作为网站开发者,你可以为一个叫 WebMCP 的 API 提供工具。智能体可以直接使用这些工具。无需读取所有内容、尝试理解 DOM、截取屏幕截图,你只需调用这些工具即可。这样耗时更少、令牌更少,而且更可靠。是的。作为开发者,这给你带来了优势。你可以引导智能体如何使用你的页面。如果你提供了正确的工具集,配上正确的描述和正确的参数,就能引导智能体如何使用你的产品。

[6:44] 这很合理。你有没有一个演示可以展示 WebMCP 在实际中如何运作?-当然有。-好的,太棒了。我们去看演示吧。-这是一个航班搜索演示。-好的。我要在网站上打开这个。你可以想象你正在使用 Google Flights 或任何你可能用的航班预订网站。是的,左侧是我们的航班搜索产品。右侧是团队构建的一个示例扩展。-你对扩展很了解。-是的。所以这个扩展是在模拟一个智能体,它可以是 Chrome 中的 Gemini 或用户安装的任何智能体。

[7:19] 然后我猜这个网站已经通过 WebMCP 注册了一些工具。是的,这个网站注册了一些 WebMCP 工具。就这个页面而言,它有一个叫 searchFlights 的工具。好的。是的。比如说,如果我告诉智能体:“搜索下周一从伦敦到纽约的航班,一周后返回,一名乘客。”智能体现在正在思考,但它应该能够调用 searchFlights 工具,它在征求我的许可:“我可以搜索航班吗?”

[8:00] 我要说允许。现在你可以看到,智能体已经搜索了下周一从伦敦到纽约的航班,也就是我们录制时的 31 号,然后它会在一周后返回。这正是我们想要的。现在,一旦我们导航到这个页面,我们又注册了另一个工具——是的。这很有意思。这些工具是如何注册的?我想有一个 JavaScript API,然后我们还有一些 DOM 支持,用于声明式地标记一些元素。

[8:34] WebMCP 有一个声明式工具,允许你向现有 Web 表单添加标记,因此你为这些表单添加特殊属性,它们就会成为智能体可以使用的工具。它还有一个命令式 API,基于 JavaScript。在这个演示中,我使用的是命令式 API。好的,是的,我感觉命令式 API 总是最吸引我。从 Web 的角度来看,我喜欢我们有声明式工具。我认为支持这一点很好,但是,是的,我感觉我总是倾向于 JavaScript。

[9:06] 是的,我认为这真的取决于产品。有时你更多的是一个遗留产品,或者你自己编写代码,构建起来可能会快得多。如果你已经有一个表单,那就很容易了。没错。你是说因为我们在新页面上,所以现在注册了一个新工具吗?是的,这就是 WebMCP 的一个有趣之处:你可以动态地注册然后注销工具。在这种情况下,一旦搜索发生,就注册了一个新工具。如果我告诉我的智能体“只给我看低于,比如说,800 美元的直接航班”,如果我说这样的话,它会思考一下。

[9:54] 它要求我调用一个名为 setFilters 的工具,这会更改我的筛选配置。如果我说允许,它现在会显示低于 800 的航班,而且还点击了直飞筛选。太棒了。就像在这种情况下,你写了一个提示词,然后它调用了一个工具,然后你又写了另一个提示词,它又调用了一个工具。想必你可以把所有这些都作为一个一次性提示词来完成。设计 WebMCP 工具时一个值得思考的有趣事情是,用户行为可能会改变,有些用户可能会说,“哦,我想订一张去纽约的航班”,然后智能体就必须向他们澄清并说,“好的,你从哪里出发,哪几天?”对吧?

[10:35] 有些用户可以像你说的那样,一次性给出全部信息。作为演示,我们可以尝试回到搜索页面,也许我们可以和智能体开始一个新对话,然后说:“我想订一张从伦敦到纽约的航班,下周一出发,一周后返回,一名乘客。

[11:08] 只给我看低于 800 美元的直接航班。”这是告诉它开始行动。同样,它在思考,问我是否可以调用 searchFlights 工具。-是的。-它调用了。现在,它自动说,“好的,我有一个新工具,我想筛选……”我想,在这种情况下,这意味着即使在同一个提示词中,它也能发现新工具。-是的。-是的。

[11:39] 然后,如果你说“是”,它就会调用,并且像之前一样已经提供了筛选条件。太棒了。那么目前有哪些智能体支持 WebMCP?显然,我们有这个扩展,作为演示很不错,但用户可能会用到的真实智能体中,有支持 WebMCP 的吗?这是个好问题。WebMCP 是一项 Web 标准提案。是的。目前它是在 Chrome 中的一项源试用实验。所以任何网站开发者都可以选择加入源试用并使用它,但除非你已加入源试用,否则它不可用。

[12:15] 是的,除非你选择加入,否则它不可用。如果你想在自己的开发环境中试用,只需打开 Chrome,启用一个标志,然后就可以用了。如果你想让使用你网站的用户也能用上它,你就必须加入源试用。但作为网站开发者,你加入源试用后,你的用户不需要做任何事。它就会对你的用户可用。是的,就是这样。值得记住的是,这个 API 还处于早期阶段。源试用意味着它是实验性的,这意味着我们现在真正想要的是开发者试用它并给我们反馈,以便我们确保这个 API 适合其用途,也就是努力为这个 API 找到真正契合市场的定位。

[12:56] 有道理。是的。现在,在智能体方面,Chrome 中的 Gemini 一直在试验 WebMCP。—我们在 I/O 上宣布过。—是的。我们还有……Cloudflare 有一个叫 Browser Run 的产品,—它也支持 WebMCP。—是的。它实际上已经在他们的网站上投入生产使用。Brave 一直在他们自己的智能体 Leo 中试验 WebMCP。好的。最近,OpenAI 已将 WebMCP 支持落地到他们的智能体中。

[13:28] 是的,我本周早些时候看到了这段录像。这是非常近期的消息。是的,对于生态系统来说这还非常早期,但我们已经看到开发者有大量兴趣,很多网站已经在试验 WebMCP。我们也看到智能体方面有大量兴趣,这很重要。我们希望双方都能发展。是的,有道理,你刚才简要提到这是一个正在制定中的标准,但还处于早期。你能谈谈标准化的情况以及哪些浏览器参与了这项工作吗?

[14:03] 是的,标准本身当然和任何 Web 标准一样,社区有大量参与。这个标准最初由 Microsoft、Google 以及社区的其他一些成员发起,算是一种联合努力。现在有来自各种背景、不同企业的人参与进来,为这个标准做贡献。太好了。Chrome 扩展能用这个吗?我是说,我想从演示里能看出来,Chrome 扩展是可以用的。你可以把智能体构建成 Chrome 扩展,然后它就能和页面交互。

[14:37] Chrome 扩展还有别的方式使用 WebMCP 吗?是的,你说得对。你看到的是扩展使用它的一种方式。你可以从页面获取工具,也可以在页面上执行工具。但在扩展里目前的做法是使用内容脚本权限。目前还没有扩展专用的 API。做法是用内容脚本调用页面实际可用的 API。有道理。是的。也就是说,注册的工具对扩展也是可用的。

[15:07] 就像你可以获取工具和执行工具一样,你也可以注册工具。扩展可以注册一个工具,让另一个智能体来调用。是的,我还看到屏幕上在要求我们运行工具时,我们必须允许或不允许执行该工具。这大概只是构建智能体的人在提示用户时做出的用户体验决定。是的,所以在这个例子里,这是这个扩展做出的决定。我认为作为开发者,我们可能应该好好考虑一下。

[15:40] 是的。关于权限,大概有两种场景需要考虑。第一种是有些工具是只读的,它们其实不会改变产品上的任何东西。然而,有些工具可能会泄露用户的敏感信息,比如也许——那感觉比从网站拉取信息的只读工具更危险。如果你认为智能体可以访问多个页面和多种内容,作为开发者你大概应该始终考虑:这危险吗?

[16:11] 这会泄露关于我的用户或某些东西的危险信息吗?如果是这样,你可能需要考虑征求用户的许可。然后另一件需要考虑的事情是,对于写入类工具,你可能会觉得总是需要为写入工具请求许可,但实际上这里有更多细微之处。你应该考虑该工具的破坏性有多大,以及它的可逆性如何。比如,一个搜索航班的工具,可能问题不大,不会产生太大影响。但是,如果是一个处理支付的工具,比如—— -是的。 -对吧?

[16:45] 你可能需要确保在处理支付前征求用户许可。智能体是否必须猜测运行某个工具的含义?还是我们有办法让网站表明这一点?这是 API 的一部分:有些部分已经存在,有些仍在演进。你其实已经可以向智能体提供提示。例如,有一个只读提示。我不知道我们已经有这样的东西了。这基本上会告诉智能体,这个工具不会改变任何东西,没有变更影响,不会在页面上写入任何内容,-只是返回信息。 -是的。

[17:16] 这样智能体就可以利用其中一些提示来决定是否显示提示词。智能体通常也可以利用意图或工具描述来做出自己的判断。在这种情况下,它就是这么做的。智能体实际上会查看工具描述并做出判断:“我应该请求许可吗?”是的,有道理。我注意到在整个视频中,我们一直把这件事放在桌面上。我知道你显然是个创客,喜欢捣鼓硬件。

[17:47] 你拥有所有这些。你能谈谈这是做什么的吗?当然可以。我在办公室为 I/O 做了这个。任何和我一起加入通话的人可能都会看到这个。我身后有这个 LED,我有一个网站,如果你去那里,可以选一个表情符号,它就会显示在我身后。如果我把这个换成外星人,你实际上会看到表情符号里的外星人。但这和 WebMCP 有什么关系呢?相关之处在于——让我们回到我们的扩展——我实际上在这里暴露了 WebMCP 工具。

[18:22] 哦,不错。这意味着现在你可以让你的智能体更改我 LED 网格上渲染的任何内容。你有没有什么想法,想请智能体显示什么?有,最近天气一直很晴朗,也许可以选一些让我想到夏天或在阳光下野餐的东西:选一个让我想起阳光下野餐的表情符号。

[18:55] 好,我们就这么做。它正在思考,正在搜索表情符号。这里还有一个表情符号搜索功能。它实际上多次调用了这个工具,因为它在底层做的是尝试不同的关键词来搜索表情符号。好,这有点像,也许我会搜索一朵云或野餐篮之类的。是的,它找到了一个。我们允许它执行,看看它会给出什么结果。是的,是一个野餐篮。嘿,我们之前确实没试过这个。

[19:25] 我猜我运气不错,猜到了它可能会搜索什么。你之前告诉我,这是通过互联网进行的,然后发送一些 MQTT 命令,这一切是怎么运作的?是的,这里使用的是 Firebase 实时数据库。好。Web 应用会把数据保存到 Firebase 实时数据库中。然后我有一个服务器,它会从那个实时数据库中获取信息,把表情符号转换成实际的字节数组,作为图像,再发送到 MQTT 服务器。

[20:03] 然后,这个在监听 MQTT 服务器。不错,非常酷。如果你不熟悉 MQTT,它就像是 WebSocket 类协议的物联网版本。——是的。——太棒了。我们已经谈了很多关于 WebMCP 的内容。正如你一开始所说,这是一个非常广泛的领域。现在有很多人正在思考,我们要把 Web 的未来带向何方。我很好奇,关于我们还需要研究什么,才能为未来的 Web 构建一个完整的生态系统,并在所有这些变化中保持 Web 的健康,你还有其他想法吗?

[20:37] 是的,首先,我认为 Web 会继续存在。好,很高兴听到这一点。——我觉得甚至浏览网页也是如此,对吧?——是的。在很多情况下,我们浏览网页是因为它有趣,因为它有意思。我不认为智能体会总是取代这一点。我认为,当涉及消除某些用户流程中的摩擦或自动化工作流时,智能体会非常出色。这正是它们目前真正大放异彩的地方。我觉得这是一点。另一点是,比如即使考虑 WebMCP 这样的东西,WebMCP 会暴露工具,但你也可以考虑技能之类的东西。

[21:12] 比如说,我能不能以某种方式给我的智能体一份配方,告诉它如何组合我的工具来执行更大的任务。这是你可以考虑的一种方式。还有很多事情可能发生,所以我认为我们真的只是触及了可能性的表面。即使在 WebMCP 内部,我知道我见过很多功能请求,比如能够指示进度,例如,如果你有一个长时间运行的工具。没错,假设你有一个下载文件的工具,它会花几分钟。目前,智能体无法通信,比如页面无法向智能体反馈下载的进度情况。

[21:51] 这也可能非常有趣。这次交流很棒。Andre,非常感谢你加入我们。-非常感谢。-能请到你真是太好了。如果你还有更多问题,请在评论中留言。也许我们可以在未来的视频中回答其中一些问题。否则,非常感谢你的观看,我们下次再见。再见。一个强大的网络。更轻松。观看更多

查看英文原始字幕

[0:00] Welcome back. AI is changing the world around us, and for the web in particular, I think this is a really interesting time of change. It's not entirely clear what the future will look like, but it's clear that more users are now turning to agents when they have a question about the world or a task they need to complete. It's fair to say that the change we're seeing is on the same scale as, if not greater than, the change when users started accessing the mobile web. With all of that in mind, today I sat down with Andre on the Chrome team and I asked him some questions about where he sees us heading.

[0:34] DEVELOPER MODE Welcome, Andre. -Thank you very much. -Of course, great to have you. We asked online for some questions. I think we posted on Reddit and asked elsewhere as well. I think a general sentiment or unanswered question that people had was, why does the web even need to evolve? People like the web. They're happy with what we have. Could you talk a little bit about what we're thinking about right now and where we think we might need to move the web in the future. Of course, so users have been using agents more and more.

[1:05] -Yeah. -Like, sometimes it's Gemini, or more recently, things like Gemini in Chrome. At the beginning, users were using it more in the sense of "Oh, can I ask a question?" or "Can you summarize the text?" or "Can you author an email for me?" However, the user expectation is changing. Users now expect agents not only to help them with those tasks but actually to executing some of them. It's not just about asking the agents to write an email anymore; it's about also asking the agent to send the email on your behalf.

[1:37] So that's what's changing. As developers, if you have a product that sends emails, for instance, you want to make sure that the agent can use your product to send that email. You need some integration points to those agents because, again, it's not about the agent being the user, it's about the agent being a tool that the user is using to use your product. As a developer, you want to make sure that a user is able to use your product with whatever interface they're using. Yeah. Before we get into more detail, could you explain what you're working on and then how that fits into the broader space of all of the work that Google and the broader industry is doing right now?

[2:15] What we're seeing, and the way we're calling this new increased usage of agents, we're calling that the agentic web, and as a developer, the way you can think about it is you want to make sure that your product is usable by agents, and you can break this into three pillars. One of them is discovery, and discovery is about how does an agent know your product exists, how does an agent know what your product does, and it's quite similar to what you would do for Search, for instance.

[2:46] You can think about making sure that robot.txt exists, make sure you have good sitemaps, but there's also newer things like lllms.txt. Yeah, this is like a robots.txt-type hidden file. It is a file that sits in a standard location, that has a lot of the content of your website. Instead of the agent looking at your entire site for everything, you can find everything in one place. Okay. Yeah. And then you have the understanding part of it: When an agent goes to your site, it knows what it does, now it needs to read and understand the content.

[3:19] Yeah. Llms.txt also plays a little bit into that because it has all the content, but you can also think about now, if the agents reading your site's HTML, we want to make sure the HTML is a very usable structure, it's clean, so you can do that. Many agents today, for instance, cannot run JavaScripts. If you have a fully client-side random page that doesn't have any content, they may struggle with that. Others can. This strikes me as similar to the evolution of Search in general. My understanding is Google Search didn't used to run JavaScript for sites, and then as we started seeing more JavaScript-heavy applications that maybe changed and evolved.

[3:57] You can also think about things like content negotiation, which is when the agent comes to your page and you know it's an agent, you can add some headers or a metatag that would say, "Hey, here's an equivalent Markdown for you to read," because agents like using Markdown. It generally uses less tokens than HTML so the agent can do better there. -Finally, there's the usability part. -Yeah. It's not just about the agents knowing your product exists and understanding what it does and the content, but it's also being able to use that. Right now, what most agents do is something we call actuation, which is trying to emulate how a user uses your website.

[4:32] That means that the agent takes a screenshot of the page, then run that through a vision model, try to understand what it does. In that sense, as a developer, you want to make sure that your layout is clear to the agents. For instance, if a button looks like a button, the agent will figure out it's a button, but if it doesn't look like a button, it's less likely the agent will understand what to do. You want to make sure that your layout's clear. You also want to make sure that your HTML is well structured. By that what I mean is let's say you have a button that's related to a form.

[5:03] If your button sits within the form tag, it'll be clear to the agents those two things are related. Which seems like it's obvious you should do that, but I feel like there are lots of websites that don't do that. Exactly. If your button sits outside the form, the agent will struggle. Finally, there is accessibility. The agent can read the accessibility tree, so if you have good accessibility markup, it's actually going to help the agents understand your page as well. Interestingly, all of those things that we're talking about, they're good for users, so whatever is good for your users is also good for the agents to understand your website.

[5:38] But there's more to that. There's one thing we've been working on called WebMCP. WebMCP, the challenge with that is that screenshots, DOM, accessibility tree, it can be a lot of context that the agent needs. And the more context, the longer it takes. The bigger the context, the longer it takes for the agent to answer. It also makes the agent less reliable. It increases the likelihood the agent gets something wrong, clicks on the wrong button or just makes a misunderstanding.

[6:11] What you can do instead is that you, as a site's developer, you can provide tools for an API called WebMCP. Those tools, the agent can use those tools directly. Instead of reading all the content, trying to understand the DOM, taking screenshots, you can just call up on those tools. And so that will take less time, less tokens, and become more reliable. Yeah. As a developer, that gives you the advantage that you can guide the agent on how to use your page. If you provide the right set of tools with the right descriptions, the right parameters, then it guides the agents on how to use your product.

[6:44] That makes sense. Do you have a demo where you can show how WebMCP works in practice? -Yes, of course. -Okay, amazing. Let's go to the demo. -This is a Flight Search demo. -Yeah. I'm going to open this on the site. You can imagine you're on Google Flights or any flight booking site you might use. Yeah, on the on the left side, we have this Flight Search product. On the right side, we have an example extension that the team has built. -You know all about extensions. -Yeah. So this extension is mimicking an agent, so this could be Gemini in Chrome or any agent that user has installed.

[7:19] And then I assume this site has somehow registered some tools through WebMCP. Yes, this site has registered some WebMCPs tools. In the case of this page, it has one tool called searchFlights. Okay. Yeah. Let's say, if I say tell the agents, "Search flights from London to New York for next Monday returning after a week for one passenger." The agent's thinking now, but it should be able to call upon the searchFlights tool, and it's asking me for permission, "Can I search flights?"

[8:00] I'm going to say Allow. Now, you can see that the agent has searched for flights from London to New York for next Monday, which is the 31st, from when we're recording, and then it's going to return a week later. That's exactly what we look for. Now, once we navigated to this page, we got another tool registered-- Yes. Which is interesting. How are these tools being registered? I think there's a JavaScript API and then also some DOM support we have for declaratively marking up some elements.

[8:34] WebMCP has a Declarative tool which allows you to add markup to existing web forms, so you add special attributes to those forms and they become tools that the agent can use. It also has an Imperative API, which is JavaScript-based. In the case of this demo, I'm using the Imperative APIs. Okay, yeah, I feel like the Imperative ones are the ones that always seem most appealing to me. I like, from a web perspective, that we have the Declarative ones. I think it's nice to support that, but, yeah, I feel like I always lean towards the JavaScript.

[9:06] Yeah, I think it really depends on the products. Sometimes you're more of a legacy product or you're writing the code yourself, it can be much faster to build. If you already have a form, then it's easy. Exactly. Are you saying we have a new tool registered now because we're on this new page? Yes, so that's one interesting thing about WebMCP is that you can register and then unregister tools dynamically. In this case, once the search happened, there was a new tool registered. If I tell my agents "Show me only direct flights below, let's say, $800," if I say something like that, it's going to think a little bit.

[9:54] It's asking me to call a tool called setFilters which changes my filter configuration. If I say Allow, it's now showing flights below 800 but also it clicked the Nonstop filter. Amazing. Like, in this case, you wrote one prompt and then it called a tool, and then you wrote another prompt and it called a tool. Presumably, you could do all of that as like a one-shot prompt. An interesting thing to think about is, when designing WebMCP tools is that user behavior can change, some users could go and say, "Oh, I want to book a flight to New York," and then the agent would have to clarify with them and say, "Okay, where are you coming from and which dates?" right?

[10:35] Some users could do as you're saying and give the entire thing at the same time. What we can do as a demo is let's try going back to the search page and maybe we can start a new conversation with our agents and say, "I want to book a flight from London to New York, leaving next Monday and returning after a week for one passenger.

[11:08] Show me only direct flights below $800." That's to tell it to go. Again, it's thinking, asking me if it can call the searchFlights tool. -Yeah. -It did. Now, it's automatically saying, "Okay, I have a new tool and I want to filter..." I guess, in this case, this means, even within the same prompt, it can discover the new tools. -Yes. -Yeah.

[11:39] And then, if you say yes, then it's going to call, and then it now has supplied the filters just like before. Amazing. And which agents support WebMCP right now? Obviously, we have this extension, which is nice as a demo, but are there real agents that a user might use that support WebMCP? That's a great question. WebMCP is a web standards proposal. Yeah. And currently in an origin trial experiment in Chrome. Okay, so any website developer can opt into the origin trial and use this, but it's not available until you've opted in to the origin trial.

[12:15] Yes, it's not available until you opt in. If you want to try yourself in your own development environment, you can just go to Chrome, turn on a flag, and then that works. If you want to have that available to your users using your website, you have to join the origin trial. But then, as a website developer, you join the origin trial. Your users don't need to do anything. It'll be available to your users. Yeah, that's it. It's good to keep in mind that it's early days for the API. Origin trial means it's experimental, which means what we're looking for really right now is for developers to try it out and give us feedback so we can make sure that the API is fit for purpose, like try to find a really good market fit for the API.

[12:56] Makes sense. Yeah. Now, in terms of agents, Gemini in Chrome has been experimenting with WebMCP. -That we announced back at I/O. -Yes. We also have... Cloudflare has a product called Browser Run -which also supports WebMCP. -Yeah. It's already actually in production on their site. Brave has been experimenting with WebMCP in their own agent called Leo. Okay. Recently, OpenAI has landed WebMCP support into their agents.

[13:28] Yeah, I saw this recording earlier this week. It was very recent news. Yeah, it's very early days for the ecosystem, but we're already seeing that there's loads of interest from developers, like loads of websites are already experimenting with WebMCP. We also see a lot of interest on the agent side, which is important. We want both sides to grow. Yeah, makes sense, and you touched very briefly on this being a standard that's being worked on but early days. Could you talk about the standardization story and which browsers are involved in that work?

[14:03] Yeah, the standard itself, of course, like any web standard, there's a lot of involvement from the community. The standard itself was started by Microsoft, Google, and some other members of the community. It was a kind of a joint effort. Now, there is people from loads of backgrounds, different businesses, coming in and contributing to this pack. Great. Can Chrome Extensions use this? I mean, I guess we can see from the demo that Chrome Extensions can use this. You can build an agent as a Chrome Extension and then it can interact with the page.

[14:37] Are there other ways Chrome Extensions can use WebMCP? Yes, you're right. What you're seeing is one way that an extension can use it. You can get tools from a page or you can execute tools on a page. But the way you do that in an extension is to use the content script permission for now. There isn't an Extension-dedicated API yet. The way you do it is that you use content scripts to call the APIs, actually available to the page. Makes sense. Yeah. Which means that registered tools is also available to extensions.

[15:07] In the same way you can get tools and execute tools, you can also register tools. It's possible for an extension to register a tool that another agent could call. Yeah, and I see also, on the screen, when it's asking us to run a tool, we have to allow or not allow that tool to be executed. This is presumably just a UX decision for whoever's building the agent to decide when they prompt the user. Yeah, so in this case, it's a decision that this extension has made. I think that, as developers, we probably want to give it some thoughts.

[15:40] Yeah. There's maybe two scenarios where you want to think about permissions. First one is some tools are read-only, so they don't really change anything on their products. However, some of them might be really revealing sensitive information from the user, like maybe-- That feels more dangerous than a read-only tool that's pulling info from a site. If you think that the agent has access to multiple pages and multiple things, you probably want to consider as a developer always: Is this dangerous?

[16:11] Is this revealing dangerous information about my user or about something? If that's the case, you may want to consider asking the user for permission. And then the other thing to think about is, with write tools, you may feel that you always want to ask permission for write tools, but there's actually more nuance to that. You should think about how destructive that tool is and how reversible that is. Like, for instance, a tool that searches for a flight, it's probably not too bad. It's probably not going to have a huge impact. But, if it's a tool that's taking payments, for instance-- -Yeah. -Right?

[16:45] You might want to make sure you ask the user for permission before taking payments. Does the agent have to guess what the implication of running a tool would be or do we have a way of the website indicating that? That's a part of the API: some bits already exist; some are still evolving. You can already provide hints to the agents. For instance, there's a read-only hint. I didn't know we had something for that already. That will basically tell the agent that this tool doesn't change, doesn't have any changing impact, doesn't write anything on the page, -just returns information. -Yeah.

[17:16] So then the agents can use some of those hints to make a decision of showing the prompt or not. Agents can generally also use up what the intent is or the tool description is and make their own call. In this case, that's what it's doing. The agents actually looking at the tool description and making a call of, "Should I ask for permission or not?" Yeah, makes sense. I noticed throughout the whole video, we've had this on the table. I know you're clearly a maker; you like dabbling in hardware.

[17:47] You have all of this. Could you talk a little bit about what this does? Yeah, of course. I had it for I/O in my office. Anyone who joins a call with me, they'll probably see this. I have this LED behind me, and I have this website where, if you go, you can pick an emoji and that gets displayed behind me. If I change this to an alien, you're actually going to see an alien in an emoji. But how's this relevant to WebMCP? The way it's relevant is-- let's go back to our extension-- is that I have actually exposed WebMCP tools in this.

[18:22] Oh, nice. Which means now you can ask your agents to change whatever is rendering in my LED grids. Do you have an idea of anything you want to ask the agent to display? Yeah, I mean, it's been quite sunny recently, maybe something that makes me think of the summer or having a picnic in the sunshine: Pick an emoji that reminds me of a picnic In the sunshine.

[18:55] Alright, let's do that. It's thinking; it's searching for emojis. There's an emoji search too. It's actually calling the tool multiple times because what it's doing under the hood is that it's trying different keywords to search for emojis. Okay, it's kind of like some, maybe I'll search for a cloud or picnic basket or whatever. Yeah, and it found one. Let's allow it and see what it's coming up with. Yeah, it's a picnic basket. Hey, we honestly haven't tried that before.

[19:25] I guess I got lucky guessing what it might search for. You were telling me earlier that this is going via the internet and then sending some MQTT commands, how is this all working? Yeah, this is using Firebase Realtime Database. Okay. The web application saves into a Firebase Realtime Database. Then I have a server that will actually pick information from that Realtime Database. transform the emoji into an actual array of bytes, as an image, and send that to an MQTT server.

[20:03] Then, this is listening to the MQTT server. Nice, super cool. If you're not familiar with MQTT, it's like a IoT version of a WebSocket-type protocol. -Yeah. -Amazing. We've spoken a lot about WebMCP. As you said at the start, this is a very broad area. There's a lot of people right now that are thinking about where we take the future of the web. I'm curious, do you have any other thoughts on what else might we need to look into to have a complete ecosystem for the web going forward and to keep the web healthy with all of the changes happening?

[20:37] Yeah, first of all, I think the web's going to stay around. Okay, that's good to hear. -I think even browsing the web, right? -Yeah. In many cases, we browse the web because it's fun, because it's interesting. I don't think agents will always replace that. I think agents will be really good when it's about removing friction from some user flows or automating workflows. That's where they really shine right now. I think that's one. The other is like, even when thinking about something like WebMCP, for instance, WebMCP exposes tools, but you can think about things like skills.

[21:12] Like, for instance, can I somehow give my agents a recipe of how to combine my tools to execute a bigger task. That's one way you can think about it. There are many things that could happen still, so I think we're literally scratching the surface of what is possible. Even within WebMCP, I know I've seen lots of feature requests around being able to indicate progress, for example, if you have a long-running tool. Exactly, let's say you have a tool that downloads a file, and it'll take a few minutes. Right now, there's no way for the agents to communicate, like for the page to communicate back to the agent what the progress of the download looks like.

[21:51] That's something that could be very interesting as well. This has been great. Andre, thank you so much for joining us. -Thank you very much. -It's been really great to have you. If you do have more questions, then please leave them in the comments. Maybe we can answer some of them in a future video. Otherwise, thank you so much for watching, and we'll see you next time. Bye. A POWERFUL WEB. MADE EASIER. WATCH MORE

在 Vidleaf 工作台中打开

搜索转录文本、选择行、复制带时间戳的引文、翻译。

署名

《回答你关于 WebMCP 的问题》,作者 Chrome for Developers(https://www.youtube.com/@chromedevs),依据 CC BY 4.0 许可(https://creativecommons.org/licenses/by/4.0/)。源视频:https://www.youtube.com/watch?v=bG5Dwkz65Es。本页是视频的文本转录,添加了段落分隔和时间戳;创作者与 Vidleaf 无关联,也不为其背书。Vidleaf 添加了 AI 标点和 AI 生成的摘要;原始措辞仍可在本页查看。

您是创作者或权利持有人吗?请求更正或移除:copyright@vidleaf.app(参见关于这些页面)。

最后更新于