TRANSCRIPT · CC BY 4.0

Answering Your Questions About WebMCP for Browser AI Agents — Chrome

Chrome engineers answer developer questions on WebMCP, showing how structured HTML forms and deterministic tool calls help browser AI agents act reliably.

Chrome for Developers · Published · 22 min · English · License: CC BY 4.0 · Source: watch on YouTube

Transcript source: creator-uploaded captions on YouTube, unedited. Paragraph breaks and timestamps added by Vidleaf.

Read available captions with timestamps, or transcribe podcasts, lectures and local audio/video. Free YouTube Transcript Extractor.

[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

Open in the Vidleaf workbench

Search the transcript, select lines, copy quotes with timestamps, translate.

Attribution

"Answering your questions about WebMCP" by Chrome for Developers (https://www.youtube.com/@chromedevs), licensed under CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Source video: https://www.youtube.com/watch?v=bG5Dwkz65Es. This page is a text transcript of the video with paragraph breaks and timestamps added; the creator is not affiliated with and does not endorse Vidleaf.

Are you the creator or a rights holder? Request a correction or removal: copyright@vidleaf.app (see About these pages).

Last updated