[{"data":1,"prerenderedAt":5074},["ShallowReactive",2],{"/blog/what-is-webmcp-the-practical-guide-to-the-web-model-context-protocol":3,"related-/blog/what-is-webmcp-the-practical-guide-to-the-web-model-context-protocol":2752},{"id":4,"title":5,"authorId":6,"body":7,"category":2697,"created":2698,"description":2699,"extension":2700,"faqs":2701,"featurePriority":2729,"head":2730,"landingPath":2730,"meta":2731,"navigation":1146,"ogImage":2730,"path":2741,"robots":2730,"schemaOrg":2730,"seo":2742,"sitemap":2743,"stem":2744,"tags":2745,"__hash__":2751},"blog/blog/1039.what-is-webmcp-the-practical-guide-to-the-web-model-context-protocol.md","What Is WebMCP? How It Works and How It Differs From MCP","salome-koshadze",{"type":8,"value":9,"toc":2656},"minimark",[10,14,17,24,27,50,53,87,90,93,98,107,110,113,117,120,136,141,144,147,162,165,169,173,176,179,223,227,233,384,387,390,394,407,416,504,507,511,514,517,531,535,538,541,555,562,566,569,580,584,587,590,610,614,625,629,633,643,650,662,668,675,934,938,941,945,962,965,968,1004,1007,1324,1327,1614,1618,1625,1837,1840,1844,1851,1855,1861,1869,1977,1980,1984,2004,2010,2014,2018,2021,2024,2028,2141,2145,2165,2168,2172,2175,2179,2182,2188,2192,2195,2198,2212,2216,2219,2230,2233,2236,2267,2270,2274,2277,2281,2284,2293,2296,2310,2314,2317,2339,2343,2347,2354,2357,2383,2387,2393,2401,2404,2426,2540,2549,2553,2556,2583,2598,2602,2605,2608,2611,2615,2652],[11,12,13],"p",{},"WebMCP is an experimental browser API proposal that lets websites expose structured tools directly to AI agents.",[11,15,16],{},"Instead of making an agent guess what buttons, forms, and page elements do, WebMCP gives the page a machine-readable way to expose actions and accept structured inputs.",[11,18,19,20],{},"The simplest way to think about it is this: ",[21,22,23],"strong",{},"WebMCP is for live browser interactions on a webpage, while MCP is for tools and services beyond the page.",[11,25,26],{},"As of 2026, WebMCP is still experimental and mainly available through Chrome early preview tooling.",[11,28,29,30,37,38,43,44,49],{},"That framing matches current public materials from Chrome's ",[31,32,36],"a",{"href":33,"rel":34},"https://developer.chrome.com/blog/webmcp-epp",[35],"nofollow","early preview announcement",", the ",[31,39,42],{"href":40,"rel":41},"https://chromestatus.com/feature/5117755740913664",[35],"Chrome Platform Status entry",", and the evolving ",[31,45,48],{"href":46,"rel":47},"https://webmachinelearning.github.io/webmcp",[35],"WebMCP community-group draft",".",[11,51,52],{},"If you only need the quick answer, here it is:",[54,55,56,63,69,75,81],"ul",{},[57,58,59,62],"li",{},[21,60,61],{},"What WebMCP is:"," a browser-side way for a live webpage to expose structured tools to an AI agent.",[57,64,65,68],{},[21,66,67],{},"What WebMCP is not:"," a replacement for all MCP servers, backend APIs, or headless automation.",[57,70,71,74],{},[21,72,73],{},"Best fit:"," user-visible, human-in-the-loop tasks on a live webpage.",[57,76,77,80],{},[21,78,79],{},"Current status:"," experimental, early preview, and not yet a broadly supported web standard.",[57,82,83,86],{},[21,84,85],{},"Key benefit:"," agents can call defined tools with structured inputs instead of guessing from the DOM.",[88,89],"article-cheatsheet-card",{},[11,91,92],{},"Websites are primarily built for human interaction, with visual layouts, buttons, and forms designed for manual input. As AI agents become more capable of performing tasks on our behalf, they face a major challenge: they must interpret these human-centric interfaces, often leading to slow and unreliable performance. WebMCP is designed to solve this problem by creating a direct, structured communication channel between websites and AI agents.",[94,95,97],"h2",{"id":96},"what-is-webmcp-and-how-does-it-work","What Is WebMCP and How Does It Work?",[99,100],"nuxt-picture",{":width":101,"alt":102,"loading":103,"provider":104,"src":105,"format":106},"900","Illustration of WebMCP enabling a more programmable and intelligent web","lazy","none","/blog/what-is-webmcp-the-practical-guide-to-the-web-model-context-protocol/6.svg","webp",[11,108,109],{},"At a high level, WebMCP gives a live webpage a structured way to expose actions to an AI agent. Instead of forcing the agent to infer meaning from the DOM and visual layout, the page can expose machine-readable tools, inputs, and current state.",[11,111,112],{},"You can think of WebMCP as a contract between the webpage and the agent: the page explicitly tells the agent what actions exist, what inputs those actions need, and when those actions are available.",[94,114,116],{"id":115},"the-bridge-between-websites-and-ai-agents","The Bridge Between Websites and AI Agents",[11,118,119],{},"At its core, WebMCP provides a standardized \"contract\" that allows a website to explicitly declare its functionality to a browser's AI agent. Instead of forcing an agent to guess the purpose of a form field or the action of a button by analyzing the page's visual structure, a website can publish a set of defined \"tools\" that the agent can use directly.",[11,121,122,123,126,127,131,132,49],{},"This approach marks a major shift away from the current common practice of ",[21,124,125],{},"screen-scraping",", where an agent programmatically \"looks\" at a webpage to simulate human actions. That problem is closely related to the challenges discussed in ",[31,128,130],{"href":129},"/blog/how-voice-agents-see-and-act-a-guide-to-dom-tools","How Voice Agents See and Act: A Guide to DOM Tools"," and ",[31,133,135],{"href":134},"/blog/dom-downsampling-for-llm-based-web-agents","DOM Downsampling for LLM-Based Web Agents",[137,138,140],"h3",{"id":139},"life-without-webmcp-the-limits-of-screen-scraping","Life Without WebMCP: The Limits of Screen-Scraping",[11,142,143],{},"Today, an AI agent trying to complete a task on a website operates with limited information. It must analyze the Document Object Model (DOM) and visual layout to infer meaning.",[11,145,146],{},"Consider an agent tasked with booking a flight. It would have to:",[148,149,150,153,156,159],"ol",{},[57,151,152],{},"Identify input fields for \"Origin\" and \"Destination\" based on nearby text labels.",[57,154,155],{},"Locate a calendar widget and programmatically click through months and days to select dates.",[57,157,158],{},"Find a dropdown or stepper for the number of passengers.",[57,160,161],{},"Locate and trigger the \"Search Flights\" button.",[11,163,164],{},"This process is not only inefficient but also highly fragile. A small change in the website's design, like renaming a button or restructuring a form, could easily break the agent's workflow, requiring a complete reprogramming of its logic for that specific site.",[99,166],{":width":101,"alt":167,"loading":103,"provider":104,"src":168,"format":106},"Diagram showing the fragility of screen-scraping for AI agents on websites","/blog/what-is-webmcp-the-practical-guide-to-the-web-model-context-protocol/1.svg",[137,170,172],{"id":171},"the-webmcp-solution-a-contract-for-interaction","The WebMCP Solution: A Contract for Interaction",[11,174,175],{},"WebMCP replaces this guesswork with a clear, machine-readable interface. A website can use JavaScript to register tools and their specific parameters, providing a stable API for agents. This contract defines three main areas for interaction.",[11,177,178],{},"It establishes a shared understanding through these key components:",[54,180,181,195,213],{},[57,182,183,186,187,191,192,49],{},[21,184,185],{},"Discovery:"," A standard way for an agent to query a webpage and ask, \"What can you do?\" The site responds with a list of available tools, such as ",[188,189,190],"code",{},"searchFlights"," or ",[188,193,194],{},"submitApplication",[57,196,197,200,201,204,205,208,209,212],{},[21,198,199],{},"JSON Schemas:"," Each tool comes with an explicit definition of its required inputs and expected outputs. For a flight search, the schema would clearly state it needs parameters like ",[188,202,203],{},"origin",", ",[188,206,207],{},"destination",", and ",[188,210,211],{},"outboundDate",", preventing the agent from providing incorrect or incomplete data.",[57,214,215,218,219,222],{},[21,216,217],{},"State:"," The protocol creates a shared context, allowing the agent to know which tools are available in real-time as the user navigates the application. For example, a ",[188,220,221],{},"checkout"," tool would only become available after items have been added to a shopping cart.",[99,224],{":width":101,"alt":225,"loading":103,"provider":104,"src":226,"format":106},"Diagram showing WebMCP shared context and real-time tool availability for AI agents","/blog/what-is-webmcp-the-practical-guide-to-the-web-model-context-protocol/2.svg",[11,228,229,230,232],{},"With WebMCP, the same flight booking task becomes a single, direct action. The website exposes a ",[188,231,190],{}," tool. The agent can then call this tool with a structured data object, like the one below, to execute the search instantly and reliably.",[234,235,240],"pre",{"className":236,"code":237,"language":238,"meta":239,"style":239},"language-json shiki shiki-themes catppuccin-latte night-owl","{\n  \"origin\": \"LON\",\n  \"destination\": \"NYC\",\n  \"tripType\": \"round-trip\",\n  \"outboundDate\": \"2026-06-10\",\n  \"inboundDate\": \"2026-06-17\",\n  \"passengers\": 2\n}\n","json","",[188,241,242,251,280,300,321,341,362,378],{"__ignoreMap":239},[243,244,247],"span",{"class":245,"line":246},"line",1,[243,248,250],{"class":249},"scGhl","{\n",[243,252,254,258,261,264,267,271,275,277],{"class":245,"line":253},2,[243,255,257],{"class":256},"srFR9","  \"",[243,259,203],{"class":260},"s30W1",[243,262,263],{"class":256},"\"",[243,265,266],{"class":249},":",[243,268,270],{"class":269},"sbuKk"," \"",[243,272,274],{"class":273},"sCC8C","LON",[243,276,263],{"class":269},[243,278,279],{"class":249},",\n",[243,281,283,285,287,289,291,293,296,298],{"class":245,"line":282},3,[243,284,257],{"class":256},[243,286,207],{"class":260},[243,288,263],{"class":256},[243,290,266],{"class":249},[243,292,270],{"class":269},[243,294,295],{"class":273},"NYC",[243,297,263],{"class":269},[243,299,279],{"class":249},[243,301,303,305,308,310,312,314,317,319],{"class":245,"line":302},4,[243,304,257],{"class":256},[243,306,307],{"class":260},"tripType",[243,309,263],{"class":256},[243,311,266],{"class":249},[243,313,270],{"class":269},[243,315,316],{"class":273},"round-trip",[243,318,263],{"class":269},[243,320,279],{"class":249},[243,322,324,326,328,330,332,334,337,339],{"class":245,"line":323},5,[243,325,257],{"class":256},[243,327,211],{"class":260},[243,329,263],{"class":256},[243,331,266],{"class":249},[243,333,270],{"class":269},[243,335,336],{"class":273},"2026-06-10",[243,338,263],{"class":269},[243,340,279],{"class":249},[243,342,344,346,349,351,353,355,358,360],{"class":245,"line":343},6,[243,345,257],{"class":256},[243,347,348],{"class":260},"inboundDate",[243,350,263],{"class":256},[243,352,266],{"class":249},[243,354,270],{"class":269},[243,356,357],{"class":273},"2026-06-17",[243,359,263],{"class":269},[243,361,279],{"class":249},[243,363,365,367,370,372,374],{"class":245,"line":364},7,[243,366,257],{"class":256},[243,368,369],{"class":260},"passengers",[243,371,263],{"class":256},[243,373,266],{"class":249},[243,375,377],{"class":376},"sZ_Zo"," 2\n",[243,379,381],{"class":245,"line":380},8,[243,382,383],{"class":249},"}\n",[11,385,386],{},"This method is faster, more resilient to UI changes, and opens the door for more complex, collaborative workflows between humans and AI agents on the web.",[11,388,389],{},"With that foundation in place, the next question is where WebMCP fits relative to other approaches developers already know.",[94,391,393],{"id":392},"webmcp-vs-mcp-vs-openapi","WebMCP vs. MCP vs. OpenAPI",[11,395,396,397,400,401,131,404,49],{},"One reason WebMCP can be confusing is that it sits next to other AI integration approaches rather than replacing them. The shortest explanation is this: ",[21,398,399],{},"WebMCP is for live, in-browser interaction with a webpage",", while ",[21,402,403],{},"MCP is for connecting AI systems to external tools and services",[21,405,406],{},"OpenAPI is for describing HTTP APIs",[11,408,409,410,415],{},"If you want the official browser-vs-backend framing, Chrome's ",[31,411,414],{"href":412,"rel":413},"https://developer.chrome.com/blog/webmcp-mcp-usage",[35],"When to use WebMCP and MCP"," article is the clearest source.",[417,418,419,438],"table",{},[420,421,422],"thead",{},[423,424,425,429,432,435],"tr",{},[426,427,428],"th",{},"Approach",[426,430,431],{},"Where it runs",[426,433,434],{},"Browser required?",[426,436,437],{},"Best for",[439,440,441,458,474,489],"tbody",{},[423,442,443,449,452,455],{},[444,445,446],"td",{},[21,447,448],{},"WebMCP",[444,450,451],{},"In the user's browser on a live webpage",[444,453,454],{},"Yes",[444,456,457],{},"User-in-the-loop tasks on websites",[423,459,460,465,468,471],{},[444,461,462],{},[21,463,464],{},"MCP",[444,466,467],{},"Between an AI system and external tools/services",[444,469,470],{},"No",[444,472,473],{},"Structured tool access across backend systems",[423,475,476,481,484,486],{},[444,477,478],{},[21,479,480],{},"OpenAPI",[444,482,483],{},"Between clients and HTTP APIs",[444,485,470],{},[444,487,488],{},"Stable API integrations and service endpoints",[423,490,491,496,499,501],{},[444,492,493],{},[21,494,495],{},"Screen-scraping",[444,497,498],{},"Through the DOM and rendered UI",[444,500,454],{},[444,502,503],{},"Sites with no structured interface",[11,505,506],{},"In practice, many products may eventually use more than one approach. A company might offer an MCP server or OpenAPI endpoint for backend automation while also using WebMCP to help an AI agent assist a user on the live website.",[137,508,510],{"id":509},"when-to-use-webmcp","When to use WebMCP",[11,512,513],{},"Choose WebMCP when the task happens inside a page the user is actively viewing and the website wants to expose structured browser-side actions. Typical examples include live flight search, guided checkout, editing tools, and other workflows where the user stays in control while the agent helps.",[11,515,516],{},"WebMCP is strongest when:",[54,518,519,522,525,528],{},[57,520,521],{},"the website already has meaningful client-side actions",[57,523,524],{},"the user should see the UI update as the agent works",[57,526,527],{},"the workflow depends on current page state",[57,529,530],{},"screen-scraping would be brittle or slow",[137,532,534],{"id":533},"when-to-use-mcp","When to use MCP",[11,536,537],{},"Choose MCP when you want an AI system to access tools, services, or data sources outside the browser. MCP is a better fit for server-side integrations, internal systems, databases, SaaS tools, and workflows that do not depend on a live webpage being open.",[11,539,540],{},"MCP is usually stronger when:",[54,542,543,546,549,552],{},[57,544,545],{},"the task belongs in backend systems rather than the browser",[57,547,548],{},"the workflow should work without a visible tab",[57,550,551],{},"one agent needs access to many tools across different services",[57,553,554],{},"you want a general tool interface beyond a single site",[11,556,557,558,49],{},"If you want a broader server-side comparison, see ",[31,559,561],{"href":560},"/blog/the-top-5-best-mcp-servers-for-ai-agent-browser-automation","Top 5 Best MCP Servers for AI Agent Browser Automation",[137,563,565],{"id":564},"where-openapi-fits","Where OpenAPI fits",[11,567,568],{},"OpenAPI is not a browser-agent protocol. It is a specification for describing HTTP APIs. That makes it useful for stable service integrations, API client generation, and backend workflows where a normal web API is the right interface.",[11,570,571,572,575,576,579],{},"In other words, OpenAPI helps define ",[21,573,574],{},"what an API offers",", while MCP and WebMCP help define ",[21,577,578],{},"how an AI system can use tools"," in different environments.",[137,581,583],{"id":582},"can-one-product-use-both-webmcp-and-mcp","Can one product use both WebMCP and MCP?",[11,585,586],{},"Yes. In many cases, that is the most realistic architecture. A product might use MCP or OpenAPI for backend automation and integrations, while using WebMCP for user-visible assistance on the live website.",[11,588,589],{},"That split is useful because the two models solve different problems:",[54,591,592,598,604],{},[57,593,594,597],{},[21,595,596],{},"WebMCP:"," interactive browser workflows with the user in the loop",[57,599,600,603],{},[21,601,602],{},"MCP:"," cross-system tool access outside the webpage",[57,605,606,609],{},[21,607,608],{},"OpenAPI:"," conventional API contracts for services and applications",[94,611,613],{"id":612},"how-webmcp-works-the-imperative-and-declarative-apis","How WebMCP Works: The Imperative and Declarative APIs",[11,615,616,617,620,621,624],{},"WebMCP currently shows up in two main forms: an ",[21,618,619],{},"Imperative API"," that uses JavaScript and a more exploratory ",[21,622,623],{},"Declarative API"," direction for annotating forms. The imperative approach is the clearer reference point today. The declarative approach is promising, but public drafts and explainers are still evolving.",[99,626],{":width":101,"alt":627,"loading":103,"provider":104,"src":628,"format":106},"Diagram comparing the WebMCP Imperative API and Declarative API approaches","/blog/what-is-webmcp-the-practical-guide-to-the-web-model-context-protocol/3.svg",[94,630,632],{"id":631},"the-imperative-api-defining-tools-with-javascript","The Imperative API: Defining Tools with JavaScript",[11,634,635,636,191,639,642],{},"The Imperative API allows developers to programmatically expose tools available to an agent. It works best in dynamic applications where available actions change with the current page state. In a document editor, for example, tools like ",[188,637,638],{},"formatText",[188,640,641],{},"insertImage"," could be registered or removed as the user changes selection.",[11,644,645,646,649],{},"In current public materials, the most concrete API surface is centered on ",[188,647,648],{},"navigator.modelContext.registerTool(...)",". Some older examples and preview discussions also describe broader lifecycle helpers, but those details should be treated as preview-specific rather than stable standards text.",[11,651,652,653,656,657,49],{},"For the most current API wording, see the ",[31,654,48],{"href":46,"rel":655},[35]," and the broader ",[31,658,661],{"href":659,"rel":660},"https://webmachinelearning.github.io/webmcp/docs/proposal.html",[35],"proposal explainer",[137,663,665],{"id":664},"registertool",[188,666,667],{},"registerTool",[11,669,670,671,674],{},"This function adds a single tool to the current set of available tools without affecting others. It is useful for incrementally adding functionality as new UI components are loaded or become active. In current public examples, a tool definition includes a name, a natural language description for the agent, a JSON schema for its inputs, and an ",[188,672,673],{},"execute"," function that contains the logic to be run.",[234,676,680],{"className":677,"code":678,"language":679,"meta":239,"style":239},"language-javascript shiki shiki-themes catppuccin-latte night-owl","window.navigator.modelContext.registerTool({\n  name: \"addTodo\",\n  description: \"Add a new item to the todo list\",\n  inputSchema: {\n    type: \"object\",\n    properties: {\n      text: { type: \"string\" },\n    },\n  },\n  execute: ({ text }) => {\n    // Application logic to add the todo item\n    return { content: [{ type: \"text\", text: `Added todo: ${text}` }] };\n  },\n});\n","javascript",[188,681,682,711,729,745,755,771,780,805,810,816,847,854,919,924],{"__ignoreMap":239},[243,683,684,688,691,695,697,700,702,705,709],{"class":245,"line":246},[243,685,687],{"class":686},"sP4PM","window",[243,689,49],{"class":690},"s5FwJ",[243,692,694],{"class":693},"sHY1S","navigator",[243,696,49],{"class":690},[243,698,699],{"class":693},"modelContext",[243,701,49],{"class":690},[243,703,667],{"class":704},"sNstc",[243,706,708],{"class":707},"s2kId","(",[243,710,250],{"class":249},[243,712,713,716,719,721,725,727],{"class":245,"line":253},[243,714,715],{"class":707},"  name",[243,717,266],{"class":718},"sVS64",[243,720,270],{"class":269},[243,722,724],{"class":723},"sfrMT","addTodo",[243,726,263],{"class":269},[243,728,279],{"class":249},[243,730,731,734,736,738,741,743],{"class":245,"line":282},[243,732,733],{"class":707},"  description",[243,735,266],{"class":718},[243,737,270],{"class":269},[243,739,740],{"class":723},"Add a new item to the todo list",[243,742,263],{"class":269},[243,744,279],{"class":249},[243,746,747,750,752],{"class":245,"line":302},[243,748,749],{"class":707},"  inputSchema",[243,751,266],{"class":718},[243,753,754],{"class":249}," {\n",[243,756,757,760,762,764,767,769],{"class":245,"line":323},[243,758,759],{"class":707},"    type",[243,761,266],{"class":718},[243,763,270],{"class":269},[243,765,766],{"class":723},"object",[243,768,263],{"class":269},[243,770,279],{"class":249},[243,772,773,776,778],{"class":245,"line":343},[243,774,775],{"class":707},"    properties",[243,777,266],{"class":718},[243,779,754],{"class":249},[243,781,782,785,787,790,793,795,797,800,802],{"class":245,"line":364},[243,783,784],{"class":707},"      text",[243,786,266],{"class":718},[243,788,789],{"class":249}," {",[243,791,792],{"class":707}," type",[243,794,266],{"class":718},[243,796,270],{"class":269},[243,798,799],{"class":723},"string",[243,801,263],{"class":269},[243,803,804],{"class":249}," },\n",[243,806,807],{"class":245,"line":380},[243,808,809],{"class":249},"    },\n",[243,811,813],{"class":245,"line":812},9,[243,814,815],{"class":249},"  },\n",[243,817,819,822,824,828,831,835,838,841,845],{"class":245,"line":818},10,[243,820,821],{"class":704},"  execute",[243,823,266],{"class":718},[243,825,827],{"class":826},"sMtgK"," (",[243,829,830],{"class":249},"{",[243,832,834],{"class":833},"sIhCM"," text",[243,836,837],{"class":249}," }",[243,839,840],{"class":826},")",[243,842,844],{"class":843},"s76yb"," =>",[243,846,754],{"class":249},[243,848,850],{"class":245,"line":849},11,[243,851,853],{"class":852},"sDmS1","    // Application logic to add the todo item\n",[243,855,857,861,863,866,868,871,873,875,877,879,882,884,887,889,891,895,898,902,905,908,911,913,916],{"class":245,"line":856},12,[243,858,860],{"class":859},"srhcd","    return",[243,862,789],{"class":249},[243,864,865],{"class":707}," content",[243,867,266],{"class":718},[243,869,870],{"class":707}," [",[243,872,830],{"class":249},[243,874,792],{"class":707},[243,876,266],{"class":718},[243,878,270],{"class":269},[243,880,881],{"class":723},"text",[243,883,263],{"class":269},[243,885,886],{"class":249},",",[243,888,834],{"class":707},[243,890,266],{"class":718},[243,892,894],{"class":893},"sizNf"," `",[243,896,897],{"class":723},"Added todo: ",[243,899,901],{"class":900},"sDF9U","${",[243,903,881],{"class":904},"soAP-",[243,906,907],{"class":900},"}",[243,909,910],{"class":893},"`",[243,912,837],{"class":249},[243,914,915],{"class":707},"] ",[243,917,918],{"class":249},"};\n",[243,920,922],{"class":245,"line":921},13,[243,923,815],{"class":249},[243,925,927,929,931],{"class":245,"line":926},14,[243,928,907],{"class":249},[243,930,840],{"class":707},[243,932,933],{"class":249},";\n",[137,935,937],{"id":936},"managing-tool-lifecycle-in-preview-implementations","Managing tool lifecycle in preview implementations",[11,939,940],{},"One area to treat carefully is lifecycle management. Public discussions around WebMCP have included examples of adding and removing tools as page state changes, but the exact helper methods have shifted across previews and drafts. The durable takeaway is the pattern, not every method name: expose only the tools that make sense for the current page state, and clean them up when they no longer apply.",[94,942,944],{"id":943},"the-declarative-api-enhancing-standard-html-forms","The Declarative API: Enhancing Standard HTML Forms",[11,946,947,948,951,952,956,957,961],{},"The Declarative API aims to make existing websites agent-friendly with less custom JavaScript. Instead of writing imperative code, developers would annotate standard ",[188,949,950],{},"\u003Cform>"," elements with special HTML attributes. This part of WebMCP is still less settled in public drafts, so it is best understood as an evolving direction rather than a finalized browser contract. Chrome's ",[31,953,955],{"href":33,"rel":954},[35],"early preview overview"," and the ",[31,958,960],{"href":46,"rel":959},[35],"community-group draft"," are better references for the current state of the platform.",[11,963,964],{},"This approach is especially appealing for common interactions like search forms, login pages, or data submission forms. In preview explainers, the browser derives a structured tool definition from a form's input fields, labels, and attributes.",[11,966,967],{},"Preview explainers have used attributes such as:",[54,969,970,980,986,992,998],{},[57,971,972,975,976,979],{},[188,973,974],{},"toolname",": Defines the name of the tool (e.g., ",[188,977,978],{},"search_products",").",[57,981,982,985],{},[188,983,984],{},"tooldescription",": Provides a natural language description for the agent.",[57,987,988,991],{},[188,989,990],{},"toolautosubmit",": An optional attribute that allows the form to be submitted automatically by the agent without requiring manual user confirmation.",[57,993,994,997],{},[188,995,996],{},"toolparamtitle",": Overrides the default title for a form field in the JSON schema.",[57,999,1000,1003],{},[188,1001,1002],{},"toolparamdescription",": Overrides the default description for a form field.",[11,1005,1006],{},"Here is an example of an HTML form enhanced with declarative WebMCP-style attributes from preview materials.",[234,1008,1012],{"className":1009,"code":1010,"language":1011,"meta":239,"style":239},"language-html shiki shiki-themes catppuccin-latte night-owl","\u003Cform\n  toolname=\"my_tool\"\n  tooldescription=\"A simple declarative tool\"\n  toolautosubmit\n  action=\"/submit\"\n>\n  \u003Clabel for=\"text\">text label\u003C/label>\n  \u003Cinput type=\"text\" name=\"text\" />\n\n  \u003Cselect\n    name=\"select\"\n    required\n    toolparamtitle=\"Possible Options\"\n    toolparamdescription=\"A nice description\"\n  >\n    \u003Coption value=\"Option 1\">This is option 1\u003C/option>\n    \u003Coption value=\"Option 2\">This is option 2\u003C/option>\n  \u003C/select>\n\n  \u003Cbutton type=\"submit\">Submit\u003C/button>\n\u003C/form>\n","html",[188,1013,1014,1024,1041,1055,1060,1074,1079,1111,1142,1148,1155,1169,1174,1188,1202,1208,1240,1269,1279,1284,1314],{"__ignoreMap":239},[243,1015,1016,1020],{"class":245,"line":246},[243,1017,1019],{"class":1018},"s9rnR","\u003C",[243,1021,1023],{"class":1022},"sY2RG","form\n",[243,1025,1026,1030,1033,1035,1038],{"class":245,"line":253},[243,1027,1029],{"class":1028},"swkLt","  toolname",[243,1031,1032],{"class":1018},"=",[243,1034,263],{"class":269},[243,1036,1037],{"class":723},"my_tool",[243,1039,1040],{"class":269},"\"\n",[243,1042,1043,1046,1048,1050,1053],{"class":245,"line":282},[243,1044,1045],{"class":1028},"  tooldescription",[243,1047,1032],{"class":1018},[243,1049,263],{"class":269},[243,1051,1052],{"class":723},"A simple declarative tool",[243,1054,1040],{"class":269},[243,1056,1057],{"class":245,"line":302},[243,1058,1059],{"class":1028},"  toolautosubmit\n",[243,1061,1062,1065,1067,1069,1072],{"class":245,"line":323},[243,1063,1064],{"class":1028},"  action",[243,1066,1032],{"class":1018},[243,1068,263],{"class":269},[243,1070,1071],{"class":723},"/submit",[243,1073,1040],{"class":269},[243,1075,1076],{"class":245,"line":343},[243,1077,1078],{"class":1018},">\n",[243,1080,1081,1084,1087,1090,1092,1094,1096,1098,1101,1104,1107,1109],{"class":245,"line":364},[243,1082,1083],{"class":1018},"  \u003C",[243,1085,1086],{"class":1022},"label",[243,1088,1089],{"class":1028}," for",[243,1091,1032],{"class":1018},[243,1093,263],{"class":269},[243,1095,881],{"class":723},[243,1097,263],{"class":269},[243,1099,1100],{"class":1018},">",[243,1102,1103],{"class":707},"text label",[243,1105,1106],{"class":1018},"\u003C/",[243,1108,1086],{"class":1022},[243,1110,1078],{"class":1018},[243,1112,1113,1115,1118,1120,1122,1124,1126,1128,1131,1133,1135,1137,1139],{"class":245,"line":380},[243,1114,1083],{"class":1018},[243,1116,1117],{"class":1022},"input",[243,1119,792],{"class":1028},[243,1121,1032],{"class":1018},[243,1123,263],{"class":269},[243,1125,881],{"class":723},[243,1127,263],{"class":269},[243,1129,1130],{"class":1028}," name",[243,1132,1032],{"class":1018},[243,1134,263],{"class":269},[243,1136,881],{"class":723},[243,1138,263],{"class":269},[243,1140,1141],{"class":1018}," />\n",[243,1143,1144],{"class":245,"line":812},[243,1145,1147],{"emptyLinePlaceholder":1146},true,"\n",[243,1149,1150,1152],{"class":245,"line":818},[243,1151,1083],{"class":1018},[243,1153,1154],{"class":1022},"select\n",[243,1156,1157,1160,1162,1164,1167],{"class":245,"line":849},[243,1158,1159],{"class":1028},"    name",[243,1161,1032],{"class":1018},[243,1163,263],{"class":269},[243,1165,1166],{"class":723},"select",[243,1168,1040],{"class":269},[243,1170,1171],{"class":245,"line":856},[243,1172,1173],{"class":1028},"    required\n",[243,1175,1176,1179,1181,1183,1186],{"class":245,"line":921},[243,1177,1178],{"class":1028},"    toolparamtitle",[243,1180,1032],{"class":1018},[243,1182,263],{"class":269},[243,1184,1185],{"class":723},"Possible Options",[243,1187,1040],{"class":269},[243,1189,1190,1193,1195,1197,1200],{"class":245,"line":926},[243,1191,1192],{"class":1028},"    toolparamdescription",[243,1194,1032],{"class":1018},[243,1196,263],{"class":269},[243,1198,1199],{"class":723},"A nice description",[243,1201,1040],{"class":269},[243,1203,1205],{"class":245,"line":1204},15,[243,1206,1207],{"class":1018},"  >\n",[243,1209,1211,1214,1217,1220,1222,1224,1227,1229,1231,1234,1236,1238],{"class":245,"line":1210},16,[243,1212,1213],{"class":1018},"    \u003C",[243,1215,1216],{"class":1022},"option",[243,1218,1219],{"class":1028}," value",[243,1221,1032],{"class":1018},[243,1223,263],{"class":269},[243,1225,1226],{"class":723},"Option 1",[243,1228,263],{"class":269},[243,1230,1100],{"class":1018},[243,1232,1233],{"class":707},"This is option 1",[243,1235,1106],{"class":1018},[243,1237,1216],{"class":1022},[243,1239,1078],{"class":1018},[243,1241,1243,1245,1247,1249,1251,1253,1256,1258,1260,1263,1265,1267],{"class":245,"line":1242},17,[243,1244,1213],{"class":1018},[243,1246,1216],{"class":1022},[243,1248,1219],{"class":1028},[243,1250,1032],{"class":1018},[243,1252,263],{"class":269},[243,1254,1255],{"class":723},"Option 2",[243,1257,263],{"class":269},[243,1259,1100],{"class":1018},[243,1261,1262],{"class":707},"This is option 2",[243,1264,1106],{"class":1018},[243,1266,1216],{"class":1022},[243,1268,1078],{"class":1018},[243,1270,1272,1275,1277],{"class":245,"line":1271},18,[243,1273,1274],{"class":1018},"  \u003C/",[243,1276,1166],{"class":1022},[243,1278,1078],{"class":1018},[243,1280,1282],{"class":245,"line":1281},19,[243,1283,1147],{"emptyLinePlaceholder":1146},[243,1285,1287,1289,1292,1294,1296,1298,1301,1303,1305,1308,1310,1312],{"class":245,"line":1286},20,[243,1288,1083],{"class":1018},[243,1290,1291],{"class":1022},"button",[243,1293,792],{"class":1028},[243,1295,1032],{"class":1018},[243,1297,263],{"class":269},[243,1299,1300],{"class":723},"submit",[243,1302,263],{"class":269},[243,1304,1100],{"class":1018},[243,1306,1307],{"class":707},"Submit",[243,1309,1106],{"class":1018},[243,1311,1291],{"class":1022},[243,1313,1078],{"class":1018},[243,1315,1317,1319,1322],{"class":245,"line":1316},21,[243,1318,1106],{"class":1018},[243,1320,1321],{"class":1022},"form",[243,1323,1078],{"class":1018},[11,1325,1326],{},"In preview examples, the browser generates a tool definition like the following from this HTML and makes it available to an AI agent.",[234,1328,1330],{"className":236,"code":1329,"language":238,"meta":239,"style":239},"[\n  {\n    \"name\": \"my_tool\",\n    \"description\": \"A simple declarative tool\",\n    \"inputSchema\": {\n      \"type\": \"object\",\n      \"properties\": {\n        \"text\": { \"type\": \"string\", \"description\": \"text label\" },\n        \"select\": {\n          \"type\": \"string\",\n          \"enum\": [\"Option 1\", \"Option 2\"],\n          \"title\": \"Possible Options\",\n          \"description\": \"A nice description\"\n        }\n      },\n      \"required\": [\"select\"]\n    }\n  }\n]\n",[188,1331,1332,1337,1342,1362,1381,1394,1414,1427,1472,1484,1503,1533,1552,1568,1573,1578,1600,1605,1610],{"__ignoreMap":239},[243,1333,1334],{"class":245,"line":246},[243,1335,1336],{"class":249},"[\n",[243,1338,1339],{"class":245,"line":253},[243,1340,1341],{"class":249},"  {\n",[243,1343,1344,1347,1350,1352,1354,1356,1358,1360],{"class":245,"line":282},[243,1345,1346],{"class":256},"    \"",[243,1348,1349],{"class":260},"name",[243,1351,263],{"class":256},[243,1353,266],{"class":249},[243,1355,270],{"class":269},[243,1357,1037],{"class":273},[243,1359,263],{"class":269},[243,1361,279],{"class":249},[243,1363,1364,1366,1369,1371,1373,1375,1377,1379],{"class":245,"line":302},[243,1365,1346],{"class":256},[243,1367,1368],{"class":260},"description",[243,1370,263],{"class":256},[243,1372,266],{"class":249},[243,1374,270],{"class":269},[243,1376,1052],{"class":273},[243,1378,263],{"class":269},[243,1380,279],{"class":249},[243,1382,1383,1385,1388,1390,1392],{"class":245,"line":323},[243,1384,1346],{"class":256},[243,1386,1387],{"class":260},"inputSchema",[243,1389,263],{"class":256},[243,1391,266],{"class":249},[243,1393,754],{"class":249},[243,1395,1396,1399,1402,1404,1406,1408,1410,1412],{"class":245,"line":343},[243,1397,1398],{"class":256},"      \"",[243,1400,1401],{"class":260},"type",[243,1403,263],{"class":256},[243,1405,266],{"class":249},[243,1407,270],{"class":269},[243,1409,766],{"class":273},[243,1411,263],{"class":269},[243,1413,279],{"class":249},[243,1415,1416,1418,1421,1423,1425],{"class":245,"line":364},[243,1417,1398],{"class":256},[243,1419,1420],{"class":260},"properties",[243,1422,263],{"class":256},[243,1424,266],{"class":249},[243,1426,754],{"class":249},[243,1428,1429,1432,1434,1436,1438,1440,1442,1444,1446,1448,1450,1452,1454,1456,1458,1460,1462,1464,1466,1468,1470],{"class":245,"line":380},[243,1430,1431],{"class":256},"        \"",[243,1433,881],{"class":260},[243,1435,263],{"class":256},[243,1437,266],{"class":249},[243,1439,789],{"class":249},[243,1441,270],{"class":256},[243,1443,1401],{"class":260},[243,1445,263],{"class":256},[243,1447,266],{"class":249},[243,1449,270],{"class":269},[243,1451,799],{"class":273},[243,1453,263],{"class":269},[243,1455,886],{"class":249},[243,1457,270],{"class":256},[243,1459,1368],{"class":260},[243,1461,263],{"class":256},[243,1463,266],{"class":249},[243,1465,270],{"class":269},[243,1467,1103],{"class":273},[243,1469,263],{"class":269},[243,1471,804],{"class":249},[243,1473,1474,1476,1478,1480,1482],{"class":245,"line":812},[243,1475,1431],{"class":256},[243,1477,1166],{"class":260},[243,1479,263],{"class":256},[243,1481,266],{"class":249},[243,1483,754],{"class":249},[243,1485,1486,1489,1491,1493,1495,1497,1499,1501],{"class":245,"line":818},[243,1487,1488],{"class":256},"          \"",[243,1490,1401],{"class":260},[243,1492,263],{"class":256},[243,1494,266],{"class":249},[243,1496,270],{"class":269},[243,1498,799],{"class":273},[243,1500,263],{"class":269},[243,1502,279],{"class":249},[243,1504,1505,1507,1510,1512,1514,1516,1518,1520,1522,1524,1526,1528,1530],{"class":245,"line":849},[243,1506,1488],{"class":256},[243,1508,1509],{"class":260},"enum",[243,1511,263],{"class":256},[243,1513,266],{"class":249},[243,1515,870],{"class":249},[243,1517,263],{"class":269},[243,1519,1226],{"class":273},[243,1521,263],{"class":269},[243,1523,886],{"class":249},[243,1525,270],{"class":269},[243,1527,1255],{"class":273},[243,1529,263],{"class":269},[243,1531,1532],{"class":249},"],\n",[243,1534,1535,1537,1540,1542,1544,1546,1548,1550],{"class":245,"line":856},[243,1536,1488],{"class":256},[243,1538,1539],{"class":260},"title",[243,1541,263],{"class":256},[243,1543,266],{"class":249},[243,1545,270],{"class":269},[243,1547,1185],{"class":273},[243,1549,263],{"class":269},[243,1551,279],{"class":249},[243,1553,1554,1556,1558,1560,1562,1564,1566],{"class":245,"line":921},[243,1555,1488],{"class":256},[243,1557,1368],{"class":260},[243,1559,263],{"class":256},[243,1561,266],{"class":249},[243,1563,270],{"class":269},[243,1565,1199],{"class":273},[243,1567,1040],{"class":269},[243,1569,1570],{"class":245,"line":926},[243,1571,1572],{"class":249},"        }\n",[243,1574,1575],{"class":245,"line":1204},[243,1576,1577],{"class":249},"      },\n",[243,1579,1580,1582,1585,1587,1589,1591,1593,1595,1597],{"class":245,"line":1210},[243,1581,1398],{"class":256},[243,1583,1584],{"class":260},"required",[243,1586,263],{"class":256},[243,1588,266],{"class":249},[243,1590,870],{"class":249},[243,1592,263],{"class":269},[243,1594,1166],{"class":273},[243,1596,263],{"class":269},[243,1598,1599],{"class":249},"]\n",[243,1601,1602],{"class":245,"line":1242},[243,1603,1604],{"class":249},"    }\n",[243,1606,1607],{"class":245,"line":1271},[243,1608,1609],{"class":249},"  }\n",[243,1611,1612],{"class":245,"line":1281},[243,1613,1599],{"class":249},[137,1615,1617],{"id":1616},"handling-agent-initiated-submissions","Handling Agent-Initiated Submissions",[11,1619,1620,1621,1624],{},"In some preview documentation and examples, developer control over agent-initiated actions is shown through an extended ",[188,1622,1623],{},"SubmitEvent"," flow. Because this area is still evolving, it is better to treat the pattern below as illustrative preview behavior rather than guaranteed stable API surface.",[234,1626,1628],{"className":677,"code":1627,"language":679,"meta":239,"style":239},"document.querySelector(\"form\").addEventListener(\"submit\", (e) => {\n  if (e.agentInvoked) {\n    e.preventDefault();\n    const formData = new FormData(e.target);\n    const query = formData.get(\"query\");\n\n    // Custom logic to handle the search\n    const searchResultPromise = myCustomSearchFunction(query);\n\n    e.respondWith(searchResultPromise);\n  }\n});\n",[188,1629,1630,1676,1696,1711,1745,1774,1778,1783,1803,1807,1825,1829],{"__ignoreMap":239},[243,1631,1632,1635,1637,1640,1642,1644,1646,1648,1650,1652,1655,1657,1659,1661,1663,1665,1667,1670,1672,1674],{"class":245,"line":246},[243,1633,1634],{"class":686},"document",[243,1636,49],{"class":690},[243,1638,1639],{"class":704},"querySelector",[243,1641,708],{"class":707},[243,1643,263],{"class":269},[243,1645,1321],{"class":723},[243,1647,263],{"class":269},[243,1649,840],{"class":707},[243,1651,49],{"class":690},[243,1653,1654],{"class":704},"addEventListener",[243,1656,708],{"class":707},[243,1658,263],{"class":269},[243,1660,1300],{"class":723},[243,1662,263],{"class":269},[243,1664,886],{"class":249},[243,1666,827],{"class":826},[243,1668,1669],{"class":833},"e",[243,1671,840],{"class":826},[243,1673,844],{"class":843},[243,1675,754],{"class":249},[243,1677,1678,1681,1683,1685,1687,1691,1694],{"class":245,"line":253},[243,1679,1680],{"class":843},"  if",[243,1682,827],{"class":707},[243,1684,1669],{"class":686},[243,1686,49],{"class":690},[243,1688,1690],{"class":1689},"sL4Ga","agentInvoked",[243,1692,1693],{"class":707},") ",[243,1695,250],{"class":249},[243,1697,1698,1701,1703,1706,1709],{"class":245,"line":282},[243,1699,1700],{"class":686},"    e",[243,1702,49],{"class":690},[243,1704,1705],{"class":704},"preventDefault",[243,1707,1708],{"class":707},"()",[243,1710,933],{"class":249},[243,1712,1713,1716,1720,1724,1728,1731,1733,1735,1737,1741,1743],{"class":245,"line":302},[243,1714,1715],{"class":843},"    const",[243,1717,1719],{"class":1718},"scsc5"," formData",[243,1721,1723],{"class":1722},"s-_ek"," =",[243,1725,1727],{"class":1726},"szhwX"," new",[243,1729,1730],{"class":704}," FormData",[243,1732,708],{"class":707},[243,1734,1669],{"class":686},[243,1736,49],{"class":690},[243,1738,1740],{"class":1739},"s8apv","target",[243,1742,840],{"class":707},[243,1744,933],{"class":249},[243,1746,1747,1749,1752,1754,1756,1758,1761,1763,1765,1768,1770,1772],{"class":245,"line":323},[243,1748,1715],{"class":843},[243,1750,1751],{"class":1718}," query",[243,1753,1723],{"class":1722},[243,1755,1719],{"class":686},[243,1757,49],{"class":690},[243,1759,1760],{"class":704},"get",[243,1762,708],{"class":707},[243,1764,263],{"class":269},[243,1766,1767],{"class":723},"query",[243,1769,263],{"class":269},[243,1771,840],{"class":707},[243,1773,933],{"class":249},[243,1775,1776],{"class":245,"line":343},[243,1777,1147],{"emptyLinePlaceholder":1146},[243,1779,1780],{"class":245,"line":364},[243,1781,1782],{"class":852},"    // Custom logic to handle the search\n",[243,1784,1785,1787,1790,1792,1795,1797,1799,1801],{"class":245,"line":380},[243,1786,1715],{"class":843},[243,1788,1789],{"class":1718}," searchResultPromise",[243,1791,1723],{"class":1722},[243,1793,1794],{"class":704}," myCustomSearchFunction",[243,1796,708],{"class":707},[243,1798,1767],{"class":904},[243,1800,840],{"class":707},[243,1802,933],{"class":249},[243,1804,1805],{"class":245,"line":812},[243,1806,1147],{"emptyLinePlaceholder":1146},[243,1808,1809,1811,1813,1816,1818,1821,1823],{"class":245,"line":818},[243,1810,1700],{"class":686},[243,1812,49],{"class":690},[243,1814,1815],{"class":704},"respondWith",[243,1817,708],{"class":707},[243,1819,1820],{"class":904},"searchResultPromise",[243,1822,840],{"class":707},[243,1824,933],{"class":249},[243,1826,1827],{"class":245,"line":849},[243,1828,1609],{"class":249},[243,1830,1831,1833,1835],{"class":245,"line":856},[243,1832,907],{"class":249},[243,1834,840],{"class":707},[243,1836,933],{"class":249},[11,1838,1839],{},"Preview materials also describe visual feedback and events around agent interaction, including CSS states and page events that developers can use to react to agent-filled forms.",[94,1841,1843],{"id":1842},"practical-use-cases-of-webmcp","Practical Use Cases of WebMCP",[11,1845,1846,1847,1850],{},"The clearest use case for WebMCP is ",[21,1848,1849],{},"user-visible assistance inside a live webpage",". That is also how the current Chrome early-preview materials position it: as a way for websites to expose structured browser-side capabilities to an agent without forcing the agent to reverse-engineer the interface.",[137,1852,1854],{"id":1853},"a-concrete-example-flight-search-on-a-live-webpage","A concrete example: flight search on a live webpage",[11,1856,1857,1858,1860],{},"The most grounded public example today is the Chrome Labs flight-search demo. A page exposes a ",[188,1859,190],{}," capability, and the agent passes structured inputs instead of clicking through form fields one by one.",[11,1862,1863,1864,49],{},"You can inspect the demo and related tooling in the ",[31,1865,1868],{"href":1866,"rel":1867},"https://github.com/GoogleChromeLabs/webmcp-tools",[35],"Google Chrome Labs WebMCP tools repository",[234,1870,1872],{"className":677,"code":1871,"language":679,"meta":239,"style":239},"searchFlights({\n  origin: \"LON\",\n  destination: \"NYC\",\n  tripType: \"round-trip\",\n  outboundDate: \"2026-06-10\",\n  inboundDate: \"2026-06-17\",\n  passengers: 2,\n});\n",[188,1873,1874,1882,1897,1912,1927,1942,1957,1969],{"__ignoreMap":239},[243,1875,1876,1878,1880],{"class":245,"line":246},[243,1877,190],{"class":704},[243,1879,708],{"class":707},[243,1881,250],{"class":249},[243,1883,1884,1887,1889,1891,1893,1895],{"class":245,"line":253},[243,1885,1886],{"class":707},"  origin",[243,1888,266],{"class":718},[243,1890,270],{"class":269},[243,1892,274],{"class":723},[243,1894,263],{"class":269},[243,1896,279],{"class":249},[243,1898,1899,1902,1904,1906,1908,1910],{"class":245,"line":282},[243,1900,1901],{"class":707},"  destination",[243,1903,266],{"class":718},[243,1905,270],{"class":269},[243,1907,295],{"class":723},[243,1909,263],{"class":269},[243,1911,279],{"class":249},[243,1913,1914,1917,1919,1921,1923,1925],{"class":245,"line":302},[243,1915,1916],{"class":707},"  tripType",[243,1918,266],{"class":718},[243,1920,270],{"class":269},[243,1922,316],{"class":723},[243,1924,263],{"class":269},[243,1926,279],{"class":249},[243,1928,1929,1932,1934,1936,1938,1940],{"class":245,"line":323},[243,1930,1931],{"class":707},"  outboundDate",[243,1933,266],{"class":718},[243,1935,270],{"class":269},[243,1937,336],{"class":723},[243,1939,263],{"class":269},[243,1941,279],{"class":249},[243,1943,1944,1947,1949,1951,1953,1955],{"class":245,"line":343},[243,1945,1946],{"class":707},"  inboundDate",[243,1948,266],{"class":718},[243,1950,270],{"class":269},[243,1952,357],{"class":723},[243,1954,263],{"class":269},[243,1956,279],{"class":249},[243,1958,1959,1962,1964,1967],{"class":245,"line":364},[243,1960,1961],{"class":707},"  passengers",[243,1963,266],{"class":718},[243,1965,1966],{"class":376}," 2",[243,1968,279],{"class":249},[243,1970,1971,1973,1975],{"class":245,"line":380},[243,1972,907],{"class":249},[243,1974,840],{"class":707},[243,1976,933],{"class":249},[11,1978,1979],{},"That is a good illustration of where WebMCP fits best: the user stays on the page, the UI updates visibly, and the agent works through a structured contract instead of brittle DOM guessing.",[137,1981,1983],{"id":1982},"other-strong-fits-for-webmcp","Other strong fits for WebMCP",[54,1985,1986,1992,1998],{},[57,1987,1988,1991],{},[21,1989,1990],{},"Design and editing tools:"," expose actions such as filtering templates, applying edits, or inserting structured content while the user watches the page update.",[57,1993,1994,1997],{},[21,1995,1996],{},"Commerce and search experiences:"," expose structured product retrieval or filtering tools so an agent can narrow results without scraping listings.",[57,1999,2000,2003],{},[21,2001,2002],{},"Developer and power-user apps:"," expose page-local actions such as log inspection, search, or suggested edits in tools that are hard to discover from the UI alone.",[11,2005,2006,2007],{},"The key pattern across all of these is the same: ",[21,2008,2009],{},"WebMCP is most useful when the website already has meaningful client-side actions and wants to make them easier for an agent to call safely and predictably.",[99,2011],{":width":101,"alt":2012,"loading":103,"provider":104,"src":2013,"format":106},"Diagram showing a WebMCP cross-application workflow between a design tool and email service","/blog/what-is-webmcp-the-practical-guide-to-the-web-model-context-protocol/4.svg",[94,2015,2017],{"id":2016},"webmcp-tool-design-checklist","WebMCP Tool Design Checklist",[11,2019,2020],{},"Once you know where WebMCP fits, the next practical question is how to design browser-exposed tools that an agent can use reliably.",[11,2022,2023],{},"The exact API surface may evolve while WebMCP remains experimental, but the design principles behind good browser-exposed tools are already clear. If you want an AI agent to use your website reliably, optimize for clarity, predictable state changes, and easy recovery when something goes wrong.",[137,2025,2027],{"id":2026},"what-good-webmcp-tools-should-do","What good WebMCP tools should do",[417,2029,2030,2043],{},[420,2031,2032],{},[423,2033,2034,2037,2040],{},[426,2035,2036],{},"Area",[426,2038,2039],{},"What to do",[426,2041,2042],{},"Why it matters",[439,2044,2045,2063,2076,2089,2102,2115,2128],{},[423,2046,2047,2052,2060],{},[444,2048,2049],{},[21,2050,2051],{},"Name clearly",[444,2053,2054,2055,204,2057],{},"Describe the real outcome - ",[188,2056,190],{},[188,2058,2059],{},"addSuggestedEdit",[444,2061,2062],{},"Agent picks the right tool first try",[423,2064,2065,2070,2073],{},[444,2066,2067],{},[21,2068,2069],{},"Describe when to use it",[444,2071,2072],{},"Explain purpose in plain language",[444,2074,2075],{},"Reduces wrong tool selection",[423,2077,2078,2083,2086],{},[444,2079,2080],{},[21,2081,2082],{},"Accept natural inputs",[444,2084,2085],{},"Use dates, times, and labels as users would enter them",[444,2087,2088],{},"Less reasoning overhead for the model",[423,2090,2091,2096,2099],{},[444,2092,2093],{},[21,2094,2095],{},"Validate in code",[444,2097,2098],{},"Validate arguments even with a schema defined",[444,2100,2101],{},"Prevents silent failures from bad inputs",[423,2103,2104,2109,2112],{},[444,2105,2106],{},[21,2107,2108],{},"Return useful errors",[444,2110,2111],{},"State what was invalid and how to fix it",[444,2113,2114],{},"Makes retries more likely to succeed",[423,2116,2117,2122,2125],{},[444,2118,2119],{},[21,2120,2121],{},"Update the UI before resolving",[444,2123,2124],{},"Only resolve after visible state matches the result",[444,2126,2127],{},"Keeps agent and user in sync",[423,2129,2130,2135,2138],{},[444,2131,2132],{},[21,2133,2134],{},"Keep tools atomic",[444,2136,2137],{},"One clear action per tool, no overlapping variants",[444,2139,2140],{},"Easier to compose",[137,2142,2144],{"id":2143},"three-practical-rules-for-developers","Three practical rules for developers",[148,2146,2147,2153,2159],{},[57,2148,2149,2152],{},[21,2150,2151],{},"Separate page logic from presentation."," WebMCP works best when your core business logic already exists outside click handlers and UI-only code.",[57,2154,2155,2158],{},[21,2156,2157],{},"Expose only the actions that make sense in the current page state."," Tools should match what the user can actually do on the page right now.",[57,2160,2161,2164],{},[21,2162,2163],{},"Design for user-visible collaboration, not hidden automation."," WebMCP is strongest when the agent helps inside a live webpage that the user can still inspect and control.",[11,2166,2167],{},"In other words, the best WebMCP implementations do not just expose functionality. They expose it in a way that is understandable to both the model and the human watching the interaction.",[94,2169,2171],{"id":2170},"current-status-and-limitations","Current Status and Limitations",[11,2173,2174],{},"Yes, but only in a limited experimental form. The most accurate framing today is that WebMCP is an early-preview browser capability rather than a mature cross-browser standard.",[137,2176,2178],{"id":2177},"current-browser-support","Current browser support",[11,2180,2181],{},"As of 2026, public WebMCP experimentation is mainly tied to Chrome early preview materials, demo environments, and tooling. That means you should not assume broad support across major browsers or stable long-term API behavior.",[11,2183,2184,2185,49],{},"For the latest public implementation status, check the ",[31,2186,42],{"href":40,"rel":2187},[35],[137,2189,2191],{"id":2190},"is-webmcp-production-ready","Is WebMCP production-ready?",[11,2193,2194],{},"Not as a general web platform baseline. Teams can explore it, prototype around it, and use it to understand what browser-native agent tooling might look like, but they should be careful about relying on it as a durable production dependency.",[11,2196,2197],{},"The main reasons are straightforward:",[54,2199,2200,2203,2206,2209],{},[57,2201,2202],{},"browser support is still narrow",[57,2204,2205],{},"parts of the API surface are still evolving",[57,2207,2208],{},"developer tooling is still preview-oriented",[57,2210,2211],{},"product teams may need fallback paths for users on unsupported browsers",[137,2213,2215],{"id":2214},"what-this-means-for-developers","What this means for developers",[11,2217,2218],{},"If you are building today, WebMCP is best treated as:",[54,2220,2221,2224,2227],{},[57,2222,2223],{},"a technology to monitor closely",[57,2225,2226],{},"an experimental feature to prototype with",[57,2228,2229],{},"a useful model for designing cleaner browser-side tools",[11,2231,2232],{},"If you need broad compatibility right now, conventional web APIs, server-side MCP integrations, and standard automation approaches remain more dependable choices.",[11,2234,2235],{},"That early status also explains the current limitations. WebMCP is still a proposal, so developers should expect open questions and rough edges.",[54,2237,2238,2244,2255,2261],{},[57,2239,2240,2243],{},[21,2241,2242],{},"Browsing Context is Required:"," WebMCP tools are executed in JavaScript within a webpage. This means a browser tab or webview must generally be open for an agent to interact with the site. It is not positioned today as a pure headless replacement for backend integrations.",[57,2245,2246,2249,2250,2254],{},[21,2247,2248],{},"Developer Responsibility for UI Synchronization:"," The protocol facilitates the ",[2251,2252,2253],"em",{},"execution"," of actions, but it is up to the web developer to ensure the user interface accurately reflects any state changes made by an agent. For example, if an agent adds an item to a shopping cart via a tool, the site's JavaScript must update the cart icon and item list accordingly.",[57,2256,2257,2260],{},[21,2258,2259],{},"Potential for Refactoring:"," On websites with highly complex or tightly-coupled user interfaces, simply adding tool definitions may not be enough. Developers may need to refactor existing JavaScript to separate business logic from its presentation, making it easier to expose clean, reusable functions as tools.",[57,2262,2263,2266],{},[21,2264,2265],{},"Tool Discoverability:"," There is no built-in, centralized mechanism for an AI agent to discover which websites support WebMCP without first navigating to them. Search engines or dedicated directories may eventually fill this gap, but for now, tool discovery is limited to the context of a visited page.",[11,2268,2269],{},"As of 2026, WebMCP should be treated as an experimental Chrome early-preview capability rather than a broadly supported browser standard. The longer-term goal is wider standardization, but cross-browser support is still part of the future roadmap.",[99,2271],{":width":101,"alt":2272,"loading":103,"provider":104,"src":2273,"format":106},"Comparison diagram of WebMCP client-side approach versus server-side MCP and OpenAPI integrations","/blog/what-is-webmcp-the-practical-guide-to-the-web-model-context-protocol/5.svg",[11,2275,2276],{},"WebMCP is not intended to replace backend integrations. Instead, it complements them by providing a solution specifically designed for the interactive, UI-driven nature of the web. A business might offer a server-side MCP API for autonomous booking while also implementing a client-side WebMCP layer to assist users who are actively browsing and refining their travel plans on the website.",[94,2278,2280],{"id":2279},"getting-started-trying-webmcp-today","Getting Started: Trying WebMCP Today",[11,2282,2283],{},"If you want to experiment with WebMCP now, approach it as an early preview workflow rather than a stable production feature. At the time of writing, testing centers on compatible Chrome early-preview builds, the relevant flag, and Chrome's demo/debugging tooling.",[11,2285,2286,2287,956,2290,49],{},"The best public starting points are Chrome's ",[31,2288,36],{"href":33,"rel":2289},[35],[31,2291,1868],{"href":1866,"rel":2292},[35],[11,2294,2295],{},"To begin, you will need two prerequisites:",[54,2297,2298,2304],{},[57,2299,2300,2303],{},[21,2301,2302],{},"Chrome Version:"," Use a recent compatible Chrome early-preview build that supports WebMCP testing.",[57,2305,2306,2309],{},[21,2307,2308],{},"Feature Flag:"," The \"WebMCP for testing\" flag must be enabled.",[137,2311,2313],{"id":2312},"enabling-the-webmcp-flag","Enabling the WebMCP Flag",[11,2315,2316],{},"First, you need to activate the feature within Chrome. This process exposes the WebMCP APIs to websites.",[148,2318,2319,2326,2332],{},[57,2320,2321,2322,2325],{},"Open a new tab in Chrome and navigate to the flags page by typing ",[188,2323,2324],{},"chrome://flags/#enable-webmcp-testing"," into the address bar.",[57,2327,2328,2329,49],{},"Locate the \"WebMCP for testing\" flag and change its setting from \"Default\" to ",[21,2330,2331],{},"Enabled",[57,2333,2334,2335,2338],{},"A prompt will appear at the bottom of the screen to relaunch the browser. Click ",[21,2336,2337],{},"Relaunch"," to apply the changes.",[99,2340],{":width":101,"alt":2341,"loading":103,"provider":104,"src":2342},"Chrome flags page showing the WebMCP for testing flag enabled at chrome://flags/#enable-webmcp-testing","/blog/what-is-webmcp-the-practical-guide-to-the-web-model-context-protocol/chrome-flag-enable.png",[137,2344,2346],{"id":2345},"using-the-model-context-tool-inspector-extension","Using the Model Context Tool Inspector Extension",[11,2348,2349,2350,2353],{},"To help developers debug and test their WebMCP implementations, the Chrome team has released a browser extension. The ",[21,2351,2352],{},"Model Context Tool Inspector"," lets you inspect registered tools, execute them manually, and test them with an AI agent.",[11,2355,2356],{},"Its three most useful capabilities are:",[54,2358,2359,2368,2377],{},[57,2360,2361,2364,2365,2367],{},[21,2362,2363],{},"List Registered Tools:"," The extension automatically detects and lists all tools registered on the active tab, whether through the Imperative API (",[188,2366,667],{},") or the Declarative API (HTML form annotations). For each tool, it displays its name, description, and the complete JSON input schema, which is useful for debugging.",[57,2369,2370,2373,2374,2376],{},[21,2371,2372],{},"Call Tools Manually:"," This feature allows you to bypass the non-deterministic nature of an AI model for initial testing. You can select a tool from the list, fill in its parameters using a JSON editor directly in the extension's UI, and execute it. The extension shows the returned result or any error messages, helping to quickly identify schema mismatches or runtime bugs in your ",[188,2375,673],{}," function.",[57,2378,2379,2382],{},[21,2380,2381],{},"Test with an Agent:"," The extension includes support for the Gemini API. By providing your own API key, you can enter natural language prompts and observe if the agent correctly identifies and calls the appropriate tool with the right parameters. This is a major help for optimizing tool descriptions and schemas for better model comprehension.",[137,2384,2386],{"id":2385},"hands-on-with-the-live-demo","Hands-On with the Live Demo",[11,2388,2389,2390,2392],{},"The best way to see WebMCP in action is with a hosted travel demo that exposes a ",[188,2391,190],{}," tool triggerable through the inspector extension.",[2394,2395,2397,2398,2400],"h4",{"id":2396},"manually-executing-the-searchflights-tool","Manually Executing the ",[188,2399,190],{}," Tool",[11,2402,2403],{},"This exercise demonstrates how to call a tool directly with structured data, without needing an AI model.",[148,2405,2406,2414,2420,2423],{},[57,2407,2408,2409,49],{},"With the extension installed and the flag enabled, navigate to the ",[31,2410,2413],{"href":2411,"rel":2412},"https://googlechromelabs.github.io/webmcp-tools/demos/react-flightsearch/",[35],"React Flight Search demo",[57,2415,2416,2417,2419],{},"Click the Model Context Tool Inspector extension icon in your toolbar to open its panel. You should see the ",[188,2418,190],{}," tool listed.",[57,2421,2422],{},"In the panel, ensure the \"Tool\" dropdown is set to \"searchFlights\".",[57,2424,2425],{},"In the \"Input Arguments\" field, paste the following JSON object:",[234,2427,2428],{"className":236,"code":237,"language":238,"meta":239,"style":239},[188,2429,2430,2434,2452,2470,2488,2506,2524,2536],{"__ignoreMap":239},[243,2431,2432],{"class":245,"line":246},[243,2433,250],{"class":249},[243,2435,2436,2438,2440,2442,2444,2446,2448,2450],{"class":245,"line":253},[243,2437,257],{"class":256},[243,2439,203],{"class":260},[243,2441,263],{"class":256},[243,2443,266],{"class":249},[243,2445,270],{"class":269},[243,2447,274],{"class":273},[243,2449,263],{"class":269},[243,2451,279],{"class":249},[243,2453,2454,2456,2458,2460,2462,2464,2466,2468],{"class":245,"line":282},[243,2455,257],{"class":256},[243,2457,207],{"class":260},[243,2459,263],{"class":256},[243,2461,266],{"class":249},[243,2463,270],{"class":269},[243,2465,295],{"class":273},[243,2467,263],{"class":269},[243,2469,279],{"class":249},[243,2471,2472,2474,2476,2478,2480,2482,2484,2486],{"class":245,"line":302},[243,2473,257],{"class":256},[243,2475,307],{"class":260},[243,2477,263],{"class":256},[243,2479,266],{"class":249},[243,2481,270],{"class":269},[243,2483,316],{"class":273},[243,2485,263],{"class":269},[243,2487,279],{"class":249},[243,2489,2490,2492,2494,2496,2498,2500,2502,2504],{"class":245,"line":323},[243,2491,257],{"class":256},[243,2493,211],{"class":260},[243,2495,263],{"class":256},[243,2497,266],{"class":249},[243,2499,270],{"class":269},[243,2501,336],{"class":273},[243,2503,263],{"class":269},[243,2505,279],{"class":249},[243,2507,2508,2510,2512,2514,2516,2518,2520,2522],{"class":245,"line":343},[243,2509,257],{"class":256},[243,2511,348],{"class":260},[243,2513,263],{"class":256},[243,2515,266],{"class":249},[243,2517,270],{"class":269},[243,2519,357],{"class":273},[243,2521,263],{"class":269},[243,2523,279],{"class":249},[243,2525,2526,2528,2530,2532,2534],{"class":245,"line":364},[243,2527,257],{"class":256},[243,2529,369],{"class":260},[243,2531,263],{"class":256},[243,2533,266],{"class":249},[243,2535,377],{"class":376},[243,2537,2538],{"class":245,"line":380},[243,2539,383],{"class":249},[148,2541,2542],{"start":323},[57,2543,2544,2545,2548],{},"Click the ",[21,2546,2547],{},"Execute Tool"," button. The page will update to show the flight search results.",[2394,2550,2552],{"id":2551},"invoking-the-tool-with-natural-language","Invoking the Tool with Natural Language",[11,2554,2555],{},"This next step simulates a real user interaction by translating a natural language request into a tool call. Note that this requires a Gemini API key.",[148,2557,2558,2561,2568,2574],{},[57,2559,2560],{},"Open the extension on the same demo page.",[57,2562,2563,2564,2567],{},"Click ",[21,2565,2566],{},"Set a Gemini API key"," and enter your key.",[57,2569,2570,2571],{},"In the \"User Prompt\" field, type: ",[188,2572,2573],{},"Search flights from LON to NYC leaving next Monday and returning after a week for 2 passengers.",[57,2575,2563,2576,2579,2580,2582],{},[21,2577,2578],{},"Send",". The extension will send your prompt and the tool's definition to the Gemini model. The model will determine that the ",[188,2581,190],{}," tool should be called and generate the necessary JSON arguments. The extension will then execute the tool with these arguments, and the page will update with the results.",[11,2584,2585,2586,2590,2591,2593,2594,49],{},"The demos and source code are open source and available for review on the ",[31,2587,2589],{"href":1866,"rel":2588},[35],"Google Chrome Labs GitHub repository",". If you want more context on server-side alternatives, see ",[31,2592,561],{"href":560},". If you are comparing browser-native structured tooling with existing automation approaches, see ",[31,2595,2597],{"href":2596},"/blog/agent-browser-vs-puppeteer-and-playwright","Agent Browser vs. Puppeteer & Playwright",[94,2599,2601],{"id":2600},"conclusion","Conclusion",[11,2603,2604],{},"WebMCP matters because it gives websites a cleaner way to expose structured actions to AI agents without forcing those agents to guess from the DOM alone. For live, user-visible workflows, that can make browser interaction faster, more reliable, and easier to maintain than brittle screen-scraping.",[11,2606,2607],{},"At the same time, WebMCP is not a finished cross-browser standard and it does not replace MCP or OpenAPI. Today, the most accurate way to think about it is as an experimental browser-side approach for human-in-the-loop interactions on a live webpage, while MCP and conventional APIs remain stronger choices for many backend and automation scenarios.",[11,2609,2610],{},"If you are evaluating WebMCP now, the right mindset is to treat it as an early but important direction: worth testing, worth understanding, and worth tracking closely as browser tooling for AI agents continues to evolve.",[94,2612,2614],{"id":2613},"official-sources-and-further-reading","Official Sources and Further Reading",[54,2616,2617,2623,2629,2635,2640,2646],{},[57,2618,2619],{},[31,2620,2622],{"href":33,"rel":2621},[35],"Chrome: WebMCP early preview announcement",[57,2624,2625],{},[31,2626,2628],{"href":412,"rel":2627},[35],"Chrome: When to use WebMCP and MCP",[57,2630,2631],{},[31,2632,2634],{"href":40,"rel":2633},[35],"Chrome Platform Status: WebMCP",[57,2636,2637],{},[31,2638,48],{"href":46,"rel":2639},[35],[57,2641,2642],{},[31,2643,2645],{"href":659,"rel":2644},[35],"WebMCP API proposal explainer",[57,2647,2648],{},[31,2649,2651],{"href":1866,"rel":2650},[35],"Google Chrome Labs WebMCP tools",[2653,2654,2655],"style",{},"html pre.shiki code .scGhl, html code.shiki .scGhl{--shiki-default:#7C7F93;--shiki-dark:#D6DEEB}html pre.shiki code .srFR9, html code.shiki .srFR9{--shiki-default:#7C7F93;--shiki-dark:#7FDBCA}html pre.shiki code .s30W1, html code.shiki .s30W1{--shiki-default:#1E66F5;--shiki-dark:#7FDBCA}html pre.shiki code .sbuKk, html code.shiki .sbuKk{--shiki-default:#40A02B;--shiki-dark:#D9F5DD}html pre.shiki code .sCC8C, html code.shiki .sCC8C{--shiki-default:#40A02B;--shiki-dark:#C789D6}html pre.shiki code .sZ_Zo, html code.shiki .sZ_Zo{--shiki-default:#FE640B;--shiki-dark:#F78C6C}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sP4PM, html code.shiki .sP4PM{--shiki-default:#4C4F69;--shiki-default-font-style:inherit;--shiki-dark:#7FDBCA;--shiki-dark-font-style:italic}html pre.shiki code .s5FwJ, html code.shiki .s5FwJ{--shiki-default:#179299;--shiki-default-font-style:inherit;--shiki-dark:#C792EA;--shiki-dark-font-style:italic}html pre.shiki code .sHY1S, html code.shiki .sHY1S{--shiki-default:#4C4F69;--shiki-default-font-style:inherit;--shiki-dark:#FAF39F;--shiki-dark-font-style:italic}html pre.shiki code .sNstc, html code.shiki .sNstc{--shiki-default:#1E66F5;--shiki-default-font-style:italic;--shiki-dark:#82AAFF;--shiki-dark-font-style:italic}html pre.shiki code .s2kId, html code.shiki .s2kId{--shiki-default:#4C4F69;--shiki-dark:#D6DEEB}html pre.shiki code .sVS64, html code.shiki .sVS64{--shiki-default:#179299;--shiki-dark:#D6DEEB}html pre.shiki code .sfrMT, html code.shiki .sfrMT{--shiki-default:#40A02B;--shiki-dark:#ECC48D}html pre.shiki code .sMtgK, html code.shiki .sMtgK{--shiki-default:#7C7F93;--shiki-dark:#D9F5DD}html pre.shiki code .sIhCM, html code.shiki .sIhCM{--shiki-default:#E64553;--shiki-default-font-style:italic;--shiki-dark:#D7DBE0;--shiki-dark-font-style:inherit}html pre.shiki code .s76yb, html code.shiki .s76yb{--shiki-default:#8839EF;--shiki-dark:#C792EA}html pre.shiki code .sDmS1, html code.shiki .sDmS1{--shiki-default:#7C7F93;--shiki-default-font-style:italic;--shiki-dark:#637777;--shiki-dark-font-style:italic}html pre.shiki code .srhcd, html code.shiki .srhcd{--shiki-default:#8839EF;--shiki-default-font-style:inherit;--shiki-dark:#C792EA;--shiki-dark-font-style:italic}html pre.shiki code .sizNf, html code.shiki .sizNf{--shiki-default:#40A02B;--shiki-dark:#D6DEEB}html pre.shiki code .sDF9U, html code.shiki .sDF9U{--shiki-default:#7C7F93;--shiki-dark:#D3423E}html pre.shiki code .soAP-, html code.shiki .soAP-{--shiki-default:#4C4F69;--shiki-dark:#D7DBE0}html pre.shiki code .s9rnR, html code.shiki .s9rnR{--shiki-default:#179299;--shiki-dark:#7FDBCA}html pre.shiki code .sY2RG, html code.shiki .sY2RG{--shiki-default:#1E66F5;--shiki-dark:#CAECE6}html pre.shiki code .swkLt, html code.shiki .swkLt{--shiki-default:#DF8E1D;--shiki-default-font-style:inherit;--shiki-dark:#C5E478;--shiki-dark-font-style:italic}html pre.shiki code .sL4Ga, html code.shiki .sL4Ga{--shiki-default:#4C4F69;--shiki-dark:#BAEBE2}html pre.shiki code .scsc5, html code.shiki .scsc5{--shiki-default:#4C4F69;--shiki-default-font-style:inherit;--shiki-dark:#82AAFF;--shiki-dark-font-style:italic}html pre.shiki code .s-_ek, html code.shiki .s-_ek{--shiki-default:#179299;--shiki-dark:#C792EA}html pre.shiki code .szhwX, html code.shiki .szhwX{--shiki-default:#8839EF;--shiki-default-font-weight:bold;--shiki-dark:#7FDBCA;--shiki-dark-font-weight:inherit}html pre.shiki code .s8apv, html code.shiki .s8apv{--shiki-default:#4C4F69;--shiki-default-font-style:inherit;--shiki-dark:#BAEBE2;--shiki-dark-font-style:italic}",{"title":239,"searchDepth":253,"depth":253,"links":2657},[2658,2659,2663,2669,2670,2674,2677,2681,2685,2690,2695,2696],{"id":96,"depth":253,"text":97},{"id":115,"depth":253,"text":116,"children":2660},[2661,2662],{"id":139,"depth":282,"text":140},{"id":171,"depth":282,"text":172},{"id":392,"depth":253,"text":393,"children":2664},[2665,2666,2667,2668],{"id":509,"depth":282,"text":510},{"id":533,"depth":282,"text":534},{"id":564,"depth":282,"text":565},{"id":582,"depth":282,"text":583},{"id":612,"depth":253,"text":613},{"id":631,"depth":253,"text":632,"children":2671},[2672,2673],{"id":664,"depth":282,"text":667},{"id":936,"depth":282,"text":937},{"id":943,"depth":253,"text":944,"children":2675},[2676],{"id":1616,"depth":282,"text":1617},{"id":1842,"depth":253,"text":1843,"children":2678},[2679,2680],{"id":1853,"depth":282,"text":1854},{"id":1982,"depth":282,"text":1983},{"id":2016,"depth":253,"text":2017,"children":2682},[2683,2684],{"id":2026,"depth":282,"text":2027},{"id":2143,"depth":282,"text":2144},{"id":2170,"depth":253,"text":2171,"children":2686},[2687,2688,2689],{"id":2177,"depth":282,"text":2178},{"id":2190,"depth":282,"text":2191},{"id":2214,"depth":282,"text":2215},{"id":2279,"depth":253,"text":2280,"children":2691},[2692,2693,2694],{"id":2312,"depth":282,"text":2313},{"id":2345,"depth":282,"text":2346},{"id":2385,"depth":282,"text":2386},{"id":2600,"depth":253,"text":2601},{"id":2613,"depth":253,"text":2614},"ai-agents","2026-04-10","What is WebMCP? Learn how the experimental browser API proposal lets websites expose tools to AI agents, how WebMCP vs MCP differs, and how to test it in Chrome early preview.","md",[2702,2705,2708,2711,2714,2717,2720,2723,2726],{"question":2703,"answer":2704},"What is WebMCP?","WebMCP (Web Model Context Protocol) is an experimental browser API proposal that lets websites expose structured tools to AI agents running in the browser. Instead of relying only on brittle screen-scraping, agents can discover and call clearly defined tools with structured inputs. This can make web interactions faster, more reliable, and easier for developers to maintain.",{"question":2706,"answer":2707},"What is the difference between the WebMCP Imperative and Declarative APIs?","In current WebMCP materials, the Imperative API is the more concrete browser-side JavaScript approach, centered on registering tools through navigator.modelContext. Declarative WebMCP is still less settled in public drafts and explainers, but the general idea is to let developers annotate standard forms so the browser can expose them as structured tools with less custom JavaScript.",{"question":2709,"answer":2710},"How does WebMCP differ from MCP and OpenAPI?","MCP (Model Context Protocol) is a protocol for connecting AI systems to tools and services, while OpenAPI is a specification for describing HTTP APIs. WebMCP is different because it focuses on exposing tools from a live webpage inside the user's browser. That browser-side model makes it a strong fit for human-in-the-loop workflows where users stay on a familiar page while an agent helps with specific tasks.",{"question":2712,"answer":2713},"What are the current limitations of WebMCP?","WebMCP currently depends on a live browsing context rather than a purely headless workflow. Developers are responsible for ensuring the UI reflects any state changes the agent makes. Complex applications may need refactoring to separate business logic from presentation. There is also no centralized discovery mechanism for finding WebMCP-enabled sites. As of 2026, public testing is mainly associated with Chrome early preview tooling rather than broad cross-browser support.",{"question":2715,"answer":2716},"How do I try WebMCP today?","WebMCP is currently something developers can explore through Chrome early preview materials and tooling. In practice, that may involve a recent compatible Chrome preview build, the 'WebMCP for testing' flag at chrome://flags/#enable-webmcp-testing, and the Model Context Tool Inspector extension to inspect and test tools on supported demo pages such as the Google Chrome Labs React flight-search demo.",{"question":2718,"answer":2719},"Is WebMCP available today?","Yes, but only as an experimental Chrome early preview. It is not yet a widely supported cross-browser web standard, so developers should treat it as an emerging proposal for testing and feedback rather than a production baseline.",{"question":2721,"answer":2722},"Is WebMCP a standard yet?","Not yet. WebMCP is still best understood as an experimental proposal and early-preview browser capability rather than a finalized, broadly adopted web standard.",{"question":2724,"answer":2725},"Which browsers support WebMCP?","As of 2026, public experimentation is mainly associated with Chrome early preview materials, flags, demos, and tooling. Developers should not assume broad support across major browsers yet.",{"question":2727,"answer":2728},"Does WebMCP replace MCP or OpenAPI?","No. WebMCP is designed for browser-based, user-in-the-loop interactions on a live webpage. MCP and OpenAPI remain better fits for server-side integrations and fully automated backend workflows. In practice, many products may eventually use both: server-side protocols for backend automation and WebMCP for interactive browser experiences.",0,null,{"shortTitle":2703,"relatedLinks":2732},[2733,2735,2737],{"text":561,"href":560,"description":2734},"Compare the five best MCP servers for connecting AI agents to live browsers.",{"text":2597,"href":2596,"description":2736},"Compare Vercel agent-browser, Puppeteer, and Playwright for web automation and AI agents in 2026.",{"text":2738,"href":2739,"description":2740},"A Gentle Introduction to AI Agents for the Web","/blog/a-gentle-introduction-to-ai-agents-for-the-web","A beginner-friendly overview of how AI agents interact with and control websites.","/blog/what-is-webmcp-the-practical-guide-to-the-web-model-context-protocol",{"title":5,"description":2699},{"loc":2741},"blog/1039.what-is-webmcp-the-practical-guide-to-the-web-model-context-protocol",[2746,2747,2697,2748,2749,2750],"webmcp","mcp","browser-automation","web-agents","web-standard","y4akx800U8qi36YVph_JTYi9HM0duHaqsCqFzNaI314",[2753,4342],{"id":2754,"title":135,"authorId":2755,"body":2756,"category":2697,"created":4319,"description":4320,"extension":2700,"faqs":2730,"featurePriority":2730,"head":2730,"landingPath":2730,"meta":4321,"navigation":1146,"ogImage":2730,"path":134,"robots":2730,"schemaOrg":2730,"seo":4333,"sitemap":4334,"stem":4335,"tags":4336,"__hash__":4341},"blog/blog/1012.dom-downsampling-for-llm-based-web-agents.md","thassilo-schiepanski",{"type":8,"value":2757,"toc":4304},[2758,2762,2784,2788,2795,2799,2814,2818,2824,2828,2846,2870,2873,2877,2880,2891,2897,2928,2932,2950,2962,2966,2981,2995,2998,3002,3022,3026,3034,3046,3050,3053,3404,3410,3417,3581,3588,3679,3686,3758,3767,3773,3782,3786,3792,3801,3813,4031,4049,4071,4077,4119,4123,4135,4144,4149,4154,4157,4161,4167,4172,4210,4214,4220,4224,4234,4238,4241,4301],[99,2759],{":width":101,"alt":2760,"format":106,"loading":103,"src":2761},"Downsampling visualised for digital images and HTML","/blog/dom-downsampling-for-web-agents/1.png",[11,2763,2764,204,2769,204,2774,2779,2780,2783],{},[31,2765,2768],{"href":2766,"rel":2767},"https://operator.chatgpt.com",[35],"Operator (OpenAI)",[31,2770,2773],{"href":2771,"rel":2772},"https://www.director.ai",[35],"Director (Browserbase)",[31,2775,2778],{"href":2776,"rel":2777},"https://browser-use.com",[35],"Browser Use"," – we are currently witnessing the rise of ",[21,2781,2782],{},"web AI agents",". The first iteration of serviceable web agents was enabled by frontier LLMs, which act as instantaneous domain model backends. The domain, hereby, corresponds to the landscape of web application UIs.",[94,2785,2787],{"id":2786},"what-is-a-snapshot","What is a Snapshot?",[11,2789,2790,2791,2794],{},"Web agents provide an LLM with a task, and serialised runtime state of a currently browsed web application (e.g., a screenshot). The LLM is ought to suggest relevant actions to perform in the web application. Serialisation of such runtime state is referred to as a ",[21,2792,2793],{},"snapshot",". And the snapshot technique primarily decides the quality of LLM interaction suggestions.",[137,2796,2798],{"id":2797},"gui-snapshots","GUI Snapshots",[11,2800,2801,2802,2805,2806,2809,2810,2813],{},"Screenshots – for consistency reasons referred to as ",[21,2803,2804],{},"GUI snapshots"," – resemble how humans visually perceive web application UIs. LLM APIs subsidise the use of image input through upstream compression. Compresssion, however, irreversibly affects image dimensions, which takes away pixel precision; no way to suggest interactions like ",[2251,2807,2808],{},"“click at 100, 735”",". As a workaround, early web agents used ",[2251,2811,2812],{},"grounded"," GUI snapshots. Grounding describes adding visual cues to the GUI, such as bounding boxes with numerical identifiers. Grounding lets the LLM refer to specific parts of the page by identifier, so the agent can trace back interaction targets.",[99,2815],{":width":101,"alt":2816,"format":106,"loading":103,"src":2817},"Grounded GUI snapshot as implemented by Browser Use","/blog/dom-downsampling-for-web-agents/2.png",[11,2819,2820],{},[2821,2822,2823],"small",{},"Grounded GUI snapshot as implemented by Browser Use.",[137,2825,2827],{"id":2826},"dom-snapshots","DOM Snapshots",[11,2829,2830,2831,2841,2842,2845],{},"LLMs arguably are much better at understanding code than images. Research supports they excel at describing and classifying HTML, and also navigating an inherent UI",[2832,2833,2834],"sup",{},[31,2835,2840],{"href":2836,"ariaDescribedBy":2837,"dataFootnoteRef":239,"id":2839},"#user-content-fn-1",[2838],"footnote-label","user-content-fnref-1","1",". The DOM (document object model) – a web browser's runtime state model of a web application – translates back to HTML. For this reason, ",[21,2843,2844],{},"DOM snapshots"," offer a compelling alternative to GUI snapshots. DOM snapshots offer a handful of key advantages:",[148,2847,2848,2851,2854,2857,2860],{},[57,2849,2850],{},"DOM snapshots connect with LLM code (HTML) interpretation abilities.",[57,2852,2853],{},"DOM snapshots can be compiled from deep clones, hidden from supervision (unlike GUI grounding).",[57,2855,2856],{},"DOM snapshots render text input that on average consume less bandwidth than screnshots.",[57,2858,2859],{},"DOM snapshots allow for exact programmatic targeting of elements (e.g., via CSS selectors).",[57,2861,2862,2863,2866,2867,979],{},"DOM snapshots are available with the ",[188,2864,2865],{},"DOMContentLoaded"," event (whereas the GUI completes initial rendering with ",[188,2868,2869],{},"load",[11,2871,2872],{},"Yet, DOM snapshots have a major problem: potentially exhaustive model context. Whereas GUI snapshot commonly cost four figures of tokens, a raw DOM snapshot can cost into hundreds of thousands of tokens. To connect with LLM code interpretation abilities, however, developers have used element extraction techniques – picking only (likely) important elements from the DOM. Element extraction flattens the DOM tree, which disregards hierarchy as a potential UI feature (how do elements relate to each other?).",[94,2874,2876],{"id":2875},"dom-downsampling-a-novel-approach","DOM Downsampling: A Novel Approach",[11,2878,2879],{},"To enable DOM snapshots for use with web agents, it requires client-side pre-processing – similar to how LLM vision APIs process image input. Downsampling is a fundamental signal processing technique that reduces data that scales out of time or space constraints under the assumption that the majority of relevant features is retained. Picture JPEG compression as an example: put simply, a JPEG image stores only an average colour for patches of pixels. The bigger the patches, the smaller the file. Although some detail is lost, key image features – colours, edges, objects – keep being recognisable – up to a large patch size.",[11,2881,2882,2883,2886,2887,2890],{},"We transfer the concept of ",[21,2884,2885],{},"downsampling"," to ",[21,2888,2889],{},"DOMs",". Particularly, since such an approach retains HTML characteristics that might be valuable for an LLM backend. We define UI features as concepts that, to a substantial degree, facilitate LLM suggestions on how to act in the UI in order to solve related web-based tasks.",[94,2892,2894],{"id":2893},"d2snap",[2251,2895,2896],{},"D2Snap",[11,2898,2899,2900,2908,2916,2924,2925,2927],{},"We recently proposed ",[31,2901,2904],{"href":2902,"rel":2903},"https://arxiv.org/abs/2508.04412",[35],[21,2905,2906],{},[2251,2907,2896],{},[2832,2909,2910],{},[31,2911,2915],{"href":2912,"ariaDescribedBy":2913,"dataFootnoteRef":239,"id":2914},"#user-content-fn-2",[2838],"user-content-fnref-2","2",[2832,2917,2918],{},[31,2919,2923],{"href":2920,"ariaDescribedBy":2921,"dataFootnoteRef":239,"id":2922},"#user-content-fn-3",[2838],"user-content-fnref-3","3"," – a first-of-its-kind downsampling algorithm for DOMs. Herein, we'll briefly explain how the ",[2251,2926,2896],{}," algorithm works, and how it can be utilised to build efficient and performant web agents.",[137,2929,2931],{"id":2930},"how-it-works","How it works",[11,2933,2934,2935,2937,2938,204,2941,208,2944,827,2947,979],{},"There are basically three redundant types of DOM nodes, and HTML concepts: elements, text, and attributes. We defined and empirically adjusted three node-specific procedures. ",[2251,2936,2896],{}," downsamples at a variable ratio, configured through procedure-specific parameters  ",[188,2939,2940],{},"k",[188,2942,2943],{},"l",[188,2945,2946],{},"m",[188,2948,2949],{},"∈ [0, 1]",[2951,2952,2953],"blockquote",{},[11,2954,2955,2956,2961],{},"We used ",[31,2957,2960],{"href":2958,"rel":2959},"https://openai.com/index/hello-gpt-4o/",[35],"GPT-4o"," to create a downsampling ground truth dataset by having it classify HTML elements and scoring semantics regarding relevance for understanding the inherent UI – a UI feature degree.",[2394,2963,2965],{"id":2964},"procedure-elements","Procedure: Elements",[11,2967,2968,2970,2971,131,2974,2977,2978,2980],{},[2251,2969,2896],{}," downsamples (simplifies) elements by merging container elements like ",[188,2972,2973],{},"section",[188,2975,2976],{},"div"," together. A parameter ",[188,2979,2940],{}," controls the merge ratio depending on the total DOM tree height. For competing concepts, such as element name, the ground truth determines which element's characterisitics to keep – comparing UI feature scores.",[11,2982,2983,2984,204,2986,2988,2989,2994],{},"Elements in content elements (",[188,2985,11],{},[188,2987,2951],{},", ...) are translated to a more comprehensive ",[31,2990,2993],{"href":2991,"rel":2992},"https://www.markdownguide.org/basic-syntax/",[35],"Markdown"," representation.",[11,2996,2997],{},"Interactive elements, definite interaction target candidates, are kept as is.",[2394,2999,3001],{"id":3000},"procedure-text","Procedure: Text",[11,3003,3004,3006,3007,3010,3018,3019,3021],{},[2251,3005,2896],{}," downsamples text by dropping a fraction. Natural units of text are space-separated words, or punctuation-separated sentences. We reuse the ",[2251,3008,3009],{},"TextRank",[2832,3011,3012],{},[31,3013,3017],{"href":3014,"ariaDescribedBy":3015,"dataFootnoteRef":239,"id":3016},"#user-content-fn-4",[2838],"user-content-fnref-4","4"," algorithm to rank sentences in text nodes. The lowest-ranking fraction of sentences, denoted by parameter ",[188,3020,2943],{},", is dropped.",[2394,3023,3025],{"id":3024},"procedure-attributes","Procedure: Attributes",[11,3027,3028,3030,3031,3033],{},[2251,3029,2896],{}," downsamples attributes by dropping those with a name that, according to ground truth, holds a UI feature degree below a threshold. Parameter ",[188,3032,2946],{}," denotes this threshold.",[2951,3035,3036],{},[11,3037,3038,3039,3045],{},"Check out the ",[31,3040,3042,3044],{"href":2902,"rel":3041},[35],[2251,3043,2896],{}," paper"," to learn about the algorithm in-depth.",[137,3047,3049],{"id":3048},"example-of-a-downsampled-dom","Example of a Downsampled DOM",[11,3051,3052],{},"Consider a partial DOM state, serialised as HTML:",[234,3054,3056],{"className":1009,"code":3055,"language":1011,"meta":239,"style":239},"\u003Csection class=\"container\" tabindex=\"3\" required=\"true\" type=\"example\">\n  \u003Cdiv class=\"mx-auto\" data-topic=\"products\" required=\"false\">\n    \u003Ch1>Our Pizza\u003C/h1>\n    \u003Cdiv>\n      \u003Cdiv class=\"shadow-lg\">\n        \u003Ch2>Margherita\u003C/h2>\n        \u003Cp>\n          A simple classic: mozzarela, tomatoes and basil.\n          An everyday choice!\n        \u003C/p>\n        \u003Cbutton type=\"button\">Add\u003C/button>\n      \u003C/div>\n      \u003Cdiv class=\"shadow-lg\">\n        \u003Ch2>Capricciosa\u003C/h2>\n        \u003Cp>\n          A rich taste: mozzarella, ham, mushrooms, artichokes, and olives.\n          A true favourite!\n          \u003C/p>\n        \u003Cbutton type=\"button\">Add\u003C/button>\n      \u003C/div>\n    \u003C/div>\n  \u003C/div>\n\u003C/section>\n",[188,3057,3058,3112,3154,3172,3180,3200,3218,3226,3231,3236,3245,3272,3281,3299,3316,3324,3329,3334,3343,3369,3377,3386,3395],{"__ignoreMap":239},[243,3059,3060,3062,3064,3067,3069,3071,3074,3076,3079,3081,3083,3085,3087,3090,3092,3094,3097,3099,3101,3103,3105,3108,3110],{"class":245,"line":246},[243,3061,1019],{"class":1018},[243,3063,2973],{"class":1022},[243,3065,3066],{"class":1028}," class",[243,3068,1032],{"class":1018},[243,3070,263],{"class":269},[243,3072,3073],{"class":723},"container",[243,3075,263],{"class":269},[243,3077,3078],{"class":1028}," tabindex",[243,3080,1032],{"class":1018},[243,3082,263],{"class":269},[243,3084,2923],{"class":723},[243,3086,263],{"class":269},[243,3088,3089],{"class":1028}," required",[243,3091,1032],{"class":1018},[243,3093,263],{"class":269},[243,3095,3096],{"class":723},"true",[243,3098,263],{"class":269},[243,3100,792],{"class":1028},[243,3102,1032],{"class":1018},[243,3104,263],{"class":269},[243,3106,3107],{"class":723},"example",[243,3109,263],{"class":269},[243,3111,1078],{"class":1018},[243,3113,3114,3116,3118,3120,3122,3124,3127,3129,3132,3134,3136,3139,3141,3143,3145,3147,3150,3152],{"class":245,"line":253},[243,3115,1083],{"class":1018},[243,3117,2976],{"class":1022},[243,3119,3066],{"class":1028},[243,3121,1032],{"class":1018},[243,3123,263],{"class":269},[243,3125,3126],{"class":723},"mx-auto",[243,3128,263],{"class":269},[243,3130,3131],{"class":1028}," data-topic",[243,3133,1032],{"class":1018},[243,3135,263],{"class":269},[243,3137,3138],{"class":723},"products",[243,3140,263],{"class":269},[243,3142,3089],{"class":1028},[243,3144,1032],{"class":1018},[243,3146,263],{"class":269},[243,3148,3149],{"class":723},"false",[243,3151,263],{"class":269},[243,3153,1078],{"class":1018},[243,3155,3156,3158,3161,3163,3166,3168,3170],{"class":245,"line":282},[243,3157,1213],{"class":1018},[243,3159,3160],{"class":1022},"h1",[243,3162,1100],{"class":1018},[243,3164,3165],{"class":707},"Our Pizza",[243,3167,1106],{"class":1018},[243,3169,3160],{"class":1022},[243,3171,1078],{"class":1018},[243,3173,3174,3176,3178],{"class":245,"line":302},[243,3175,1213],{"class":1018},[243,3177,2976],{"class":1022},[243,3179,1078],{"class":1018},[243,3181,3182,3185,3187,3189,3191,3193,3196,3198],{"class":245,"line":323},[243,3183,3184],{"class":1018},"      \u003C",[243,3186,2976],{"class":1022},[243,3188,3066],{"class":1028},[243,3190,1032],{"class":1018},[243,3192,263],{"class":269},[243,3194,3195],{"class":723},"shadow-lg",[243,3197,263],{"class":269},[243,3199,1078],{"class":1018},[243,3201,3202,3205,3207,3209,3212,3214,3216],{"class":245,"line":343},[243,3203,3204],{"class":1018},"        \u003C",[243,3206,94],{"class":1022},[243,3208,1100],{"class":1018},[243,3210,3211],{"class":707},"Margherita",[243,3213,1106],{"class":1018},[243,3215,94],{"class":1022},[243,3217,1078],{"class":1018},[243,3219,3220,3222,3224],{"class":245,"line":364},[243,3221,3204],{"class":1018},[243,3223,11],{"class":1022},[243,3225,1078],{"class":1018},[243,3227,3228],{"class":245,"line":380},[243,3229,3230],{"class":707},"          A simple classic: mozzarela, tomatoes and basil.\n",[243,3232,3233],{"class":245,"line":812},[243,3234,3235],{"class":707},"          An everyday choice!\n",[243,3237,3238,3241,3243],{"class":245,"line":818},[243,3239,3240],{"class":1018},"        \u003C/",[243,3242,11],{"class":1022},[243,3244,1078],{"class":1018},[243,3246,3247,3249,3251,3253,3255,3257,3259,3261,3263,3266,3268,3270],{"class":245,"line":849},[243,3248,3204],{"class":1018},[243,3250,1291],{"class":1022},[243,3252,792],{"class":1028},[243,3254,1032],{"class":1018},[243,3256,263],{"class":269},[243,3258,1291],{"class":723},[243,3260,263],{"class":269},[243,3262,1100],{"class":1018},[243,3264,3265],{"class":707},"Add",[243,3267,1106],{"class":1018},[243,3269,1291],{"class":1022},[243,3271,1078],{"class":1018},[243,3273,3274,3277,3279],{"class":245,"line":856},[243,3275,3276],{"class":1018},"      \u003C/",[243,3278,2976],{"class":1022},[243,3280,1078],{"class":1018},[243,3282,3283,3285,3287,3289,3291,3293,3295,3297],{"class":245,"line":921},[243,3284,3184],{"class":1018},[243,3286,2976],{"class":1022},[243,3288,3066],{"class":1028},[243,3290,1032],{"class":1018},[243,3292,263],{"class":269},[243,3294,3195],{"class":723},[243,3296,263],{"class":269},[243,3298,1078],{"class":1018},[243,3300,3301,3303,3305,3307,3310,3312,3314],{"class":245,"line":926},[243,3302,3204],{"class":1018},[243,3304,94],{"class":1022},[243,3306,1100],{"class":1018},[243,3308,3309],{"class":707},"Capricciosa",[243,3311,1106],{"class":1018},[243,3313,94],{"class":1022},[243,3315,1078],{"class":1018},[243,3317,3318,3320,3322],{"class":245,"line":1204},[243,3319,3204],{"class":1018},[243,3321,11],{"class":1022},[243,3323,1078],{"class":1018},[243,3325,3326],{"class":245,"line":1210},[243,3327,3328],{"class":707},"          A rich taste: mozzarella, ham, mushrooms, artichokes, and olives.\n",[243,3330,3331],{"class":245,"line":1242},[243,3332,3333],{"class":707},"          A true favourite!\n",[243,3335,3336,3339,3341],{"class":245,"line":1271},[243,3337,3338],{"class":1018},"          \u003C/",[243,3340,11],{"class":1022},[243,3342,1078],{"class":1018},[243,3344,3345,3347,3349,3351,3353,3355,3357,3359,3361,3363,3365,3367],{"class":245,"line":1281},[243,3346,3204],{"class":1018},[243,3348,1291],{"class":1022},[243,3350,792],{"class":1028},[243,3352,1032],{"class":1018},[243,3354,263],{"class":269},[243,3356,1291],{"class":723},[243,3358,263],{"class":269},[243,3360,1100],{"class":1018},[243,3362,3265],{"class":707},[243,3364,1106],{"class":1018},[243,3366,1291],{"class":1022},[243,3368,1078],{"class":1018},[243,3370,3371,3373,3375],{"class":245,"line":1286},[243,3372,3276],{"class":1018},[243,3374,2976],{"class":1022},[243,3376,1078],{"class":1018},[243,3378,3379,3382,3384],{"class":245,"line":1316},[243,3380,3381],{"class":1018},"    \u003C/",[243,3383,2976],{"class":1022},[243,3385,1078],{"class":1018},[243,3387,3389,3391,3393],{"class":245,"line":3388},22,[243,3390,1274],{"class":1018},[243,3392,2976],{"class":1022},[243,3394,1078],{"class":1018},[243,3396,3398,3400,3402],{"class":245,"line":3397},23,[243,3399,1106],{"class":1018},[243,3401,2973],{"class":1022},[243,3403,1078],{"class":1018},[11,3405,3406,3407,3409],{},"Here are some ",[2251,3408,2896],{}," downsampling results, which are based on different parametric configurations. A percentage denotes the reduced size.",[2394,3411,3413,3416],{"id":3412},"k3-l3-m3-55",[188,3414,3415],{},"k=.3, l=.3, m=.3"," (55%)",[234,3418,3420],{"className":1009,"code":3419,"language":1011,"meta":239,"style":239},"\u003Csection tabindex=\"3\" type=\"example\" class=\"container\" required=\"true\">\n  # Our Pizza\n  \u003Cdiv class=\"shadow-lg\">\n    ## Margherita\n    A simple classic: mozzarela, tomatoes, and basil.\n    \u003Cbutton type=\"button\">Add\u003C/button>\n    ## Capricciosa\n    A rich taste: mozzarella, ham, mushrooms, artichokes, and olives.\n    \u003Cbutton type=\"button\">Add\u003C/button>\n  \u003C/div>\n\u003C/section>\n",[188,3421,3422,3470,3475,3493,3498,3503,3529,3534,3539,3565,3573],{"__ignoreMap":239},[243,3423,3424,3426,3428,3430,3432,3434,3436,3438,3440,3442,3444,3446,3448,3450,3452,3454,3456,3458,3460,3462,3464,3466,3468],{"class":245,"line":246},[243,3425,1019],{"class":1018},[243,3427,2973],{"class":1022},[243,3429,3078],{"class":1028},[243,3431,1032],{"class":1018},[243,3433,263],{"class":269},[243,3435,2923],{"class":723},[243,3437,263],{"class":269},[243,3439,792],{"class":1028},[243,3441,1032],{"class":1018},[243,3443,263],{"class":269},[243,3445,3107],{"class":723},[243,3447,263],{"class":269},[243,3449,3066],{"class":1028},[243,3451,1032],{"class":1018},[243,3453,263],{"class":269},[243,3455,3073],{"class":723},[243,3457,263],{"class":269},[243,3459,3089],{"class":1028},[243,3461,1032],{"class":1018},[243,3463,263],{"class":269},[243,3465,3096],{"class":723},[243,3467,263],{"class":269},[243,3469,1078],{"class":1018},[243,3471,3472],{"class":245,"line":253},[243,3473,3474],{"class":707},"  # Our Pizza\n",[243,3476,3477,3479,3481,3483,3485,3487,3489,3491],{"class":245,"line":282},[243,3478,1083],{"class":1018},[243,3480,2976],{"class":1022},[243,3482,3066],{"class":1028},[243,3484,1032],{"class":1018},[243,3486,263],{"class":269},[243,3488,3195],{"class":723},[243,3490,263],{"class":269},[243,3492,1078],{"class":1018},[243,3494,3495],{"class":245,"line":302},[243,3496,3497],{"class":707},"    ## Margherita\n",[243,3499,3500],{"class":245,"line":323},[243,3501,3502],{"class":707},"    A simple classic: mozzarela, tomatoes, and basil.\n",[243,3504,3505,3507,3509,3511,3513,3515,3517,3519,3521,3523,3525,3527],{"class":245,"line":343},[243,3506,1213],{"class":1018},[243,3508,1291],{"class":1022},[243,3510,792],{"class":1028},[243,3512,1032],{"class":1018},[243,3514,263],{"class":269},[243,3516,1291],{"class":723},[243,3518,263],{"class":269},[243,3520,1100],{"class":1018},[243,3522,3265],{"class":707},[243,3524,1106],{"class":1018},[243,3526,1291],{"class":1022},[243,3528,1078],{"class":1018},[243,3530,3531],{"class":245,"line":364},[243,3532,3533],{"class":707},"    ## Capricciosa\n",[243,3535,3536],{"class":245,"line":380},[243,3537,3538],{"class":707},"    A rich taste: mozzarella, ham, mushrooms, artichokes, and olives.\n",[243,3540,3541,3543,3545,3547,3549,3551,3553,3555,3557,3559,3561,3563],{"class":245,"line":812},[243,3542,1213],{"class":1018},[243,3544,1291],{"class":1022},[243,3546,792],{"class":1028},[243,3548,1032],{"class":1018},[243,3550,263],{"class":269},[243,3552,1291],{"class":723},[243,3554,263],{"class":269},[243,3556,1100],{"class":1018},[243,3558,3265],{"class":707},[243,3560,1106],{"class":1018},[243,3562,1291],{"class":1022},[243,3564,1078],{"class":1018},[243,3566,3567,3569,3571],{"class":245,"line":818},[243,3568,1274],{"class":1018},[243,3570,2976],{"class":1022},[243,3572,1078],{"class":1018},[243,3574,3575,3577,3579],{"class":245,"line":849},[243,3576,1106],{"class":1018},[243,3578,2973],{"class":1022},[243,3580,1078],{"class":1018},[2394,3582,3584,3587],{"id":3583},"k4-l6-m8-27",[188,3585,3586],{},"k=.4, l=.6, m=.8"," (27%)",[234,3589,3591],{"className":1009,"code":3590,"language":1011,"meta":239,"style":239},"\u003Csection>\n  # Our Pizza\n  \u003Cdiv>\n    ## Margherita\n    A simple classic:\n    \u003Cbutton>Add\u003C/button>\n    ## Capricciosa\n    A rich taste:\n    \u003Cbutton>Add\u003C/button>\n  \u003C/div>\n\u003C/section>\n",[188,3592,3593,3601,3605,3613,3617,3622,3638,3642,3647,3663,3671],{"__ignoreMap":239},[243,3594,3595,3597,3599],{"class":245,"line":246},[243,3596,1019],{"class":1018},[243,3598,2973],{"class":1022},[243,3600,1078],{"class":1018},[243,3602,3603],{"class":245,"line":253},[243,3604,3474],{"class":707},[243,3606,3607,3609,3611],{"class":245,"line":282},[243,3608,1083],{"class":1018},[243,3610,2976],{"class":1022},[243,3612,1078],{"class":1018},[243,3614,3615],{"class":245,"line":302},[243,3616,3497],{"class":707},[243,3618,3619],{"class":245,"line":323},[243,3620,3621],{"class":707},"    A simple classic:\n",[243,3623,3624,3626,3628,3630,3632,3634,3636],{"class":245,"line":343},[243,3625,1213],{"class":1018},[243,3627,1291],{"class":1022},[243,3629,1100],{"class":1018},[243,3631,3265],{"class":707},[243,3633,1106],{"class":1018},[243,3635,1291],{"class":1022},[243,3637,1078],{"class":1018},[243,3639,3640],{"class":245,"line":364},[243,3641,3533],{"class":707},[243,3643,3644],{"class":245,"line":380},[243,3645,3646],{"class":707},"    A rich taste:\n",[243,3648,3649,3651,3653,3655,3657,3659,3661],{"class":245,"line":812},[243,3650,1213],{"class":1018},[243,3652,1291],{"class":1022},[243,3654,1100],{"class":1018},[243,3656,3265],{"class":707},[243,3658,1106],{"class":1018},[243,3660,1291],{"class":1022},[243,3662,1078],{"class":1018},[243,3664,3665,3667,3669],{"class":245,"line":818},[243,3666,1274],{"class":1018},[243,3668,2976],{"class":1022},[243,3670,1078],{"class":1018},[243,3672,3673,3675,3677],{"class":245,"line":849},[243,3674,1106],{"class":1018},[243,3676,2973],{"class":1022},[243,3678,1078],{"class":1018},[2394,3680,3682,3685],{"id":3681},"k-l0-m-35",[188,3683,3684],{},"k→∞, l=0, ∀m"," (35%)",[234,3687,3689],{"className":1009,"code":3688,"language":1011,"meta":239,"style":239},"# Our Pizza\n## Margherita\nA simple classic: mozzarela, tomatoes, and basil.\nAn everyday choice!\n\u003Cbutton>Add\u003C/button>\n## Capricciosa\nA rich taste: mozzarella, ham, mushrooms, artichokes, and olives.\nA true favourite!\n\u003Cbutton>Add\u003C/button>\n",[188,3690,3691,3696,3701,3706,3711,3727,3732,3737,3742],{"__ignoreMap":239},[243,3692,3693],{"class":245,"line":246},[243,3694,3695],{"class":707},"# Our Pizza\n",[243,3697,3698],{"class":245,"line":253},[243,3699,3700],{"class":707},"## Margherita\n",[243,3702,3703],{"class":245,"line":282},[243,3704,3705],{"class":707},"A simple classic: mozzarela, tomatoes, and basil.\n",[243,3707,3708],{"class":245,"line":302},[243,3709,3710],{"class":707},"An everyday choice!\n",[243,3712,3713,3715,3717,3719,3721,3723,3725],{"class":245,"line":323},[243,3714,1019],{"class":1018},[243,3716,1291],{"class":1022},[243,3718,1100],{"class":1018},[243,3720,3265],{"class":707},[243,3722,1106],{"class":1018},[243,3724,1291],{"class":1022},[243,3726,1078],{"class":1018},[243,3728,3729],{"class":245,"line":343},[243,3730,3731],{"class":707},"## Capricciosa\n",[243,3733,3734],{"class":245,"line":364},[243,3735,3736],{"class":707},"A rich taste: mozzarella, ham, mushrooms, artichokes, and olives.\n",[243,3738,3739],{"class":245,"line":380},[243,3740,3741],{"class":707},"A true favourite!\n",[243,3743,3744,3746,3748,3750,3752,3754,3756],{"class":245,"line":812},[243,3745,1019],{"class":1018},[243,3747,1291],{"class":1022},[243,3749,1100],{"class":1018},[243,3751,3265],{"class":707},[243,3753,1106],{"class":1018},[243,3755,1291],{"class":1022},[243,3757,1078],{"class":1018},[11,3759,3760,3761,3763,3764,3766],{},"Asymptotic ",[188,3762,2940],{}," (kind of 'infinite' ",[188,3765,2940],{},") completely flattens the DOM, that is, leads to a full content linearisation similar to reader views as present in most browsers. Notably, it preserves all interactive elements like buttons – which are essential for a web agent.",[137,3768,3770],{"id":3769},"adaptived2snap",[2251,3771,3772],{},"AdaptiveD2Snap",[11,3774,3775,3776,3778,3779,3781],{},"Fixed parameters might not be ideal for arbitrary DOMs – sourced from a landscape of web applications. We created ",[2251,3777,3772],{}," – a wrapper for ",[2251,3780,2896],{}," that infers suitable parameters from a given DOM in order to hit a certain token budget.",[137,3783,3785],{"id":3784},"implementation-integration","Implementation & Integration",[11,3787,3788,3789,3791],{},"Picture an LLM-based weg agent that is premised on DOM snapshots. Implementing ",[2251,3790,2896],{}," is simple: Deep clone the DOM, and feed it to the algorithm. Now, take the snapshot; this is, serialise the resulting DOM. Done.",[2951,3793,3794],{},[11,3795,3796,3797,3800],{},"Read our ",[31,3798,3799],{"href":2739},"gentle introduction to AI agents for the web"," to get started with high-level web agent concepts.",[11,3802,3803,3804,3806,3807,3812],{},"The open source ",[2251,3805,2896],{}," API, provided as a ",[31,3808,3811],{"href":3809,"rel":3810},"https://github.com/webfuse-com/D2Snap",[35],"package on GitHub"," provides the following signature:",[234,3814,3818],{"className":3815,"code":3816,"language":3817,"meta":239,"style":239},"language-ts shiki shiki-themes catppuccin-latte night-owl","type DOM = Document | Element | string;\ntype Options = {\n  assignUniqueIDs?: boolean; // false\n  debug?: boolean;           // true\n};\n\nD2Snap.d2Snap(\n  dom: DOM,\n  k: number, l: number, m: number,\n  options?: Options\n): Promise\u003Cstring>\n\nD2Snap.adaptiveD2Snap(\n  dom: DOM,\n  maxTokens: number = 4096,\n  maxIterations: number = 5,\n  options?: Options\n): Promise\u003Cstring>\n\n","ts",[188,3819,3820,3848,3859,3877,3891,3895,3899,3911,3922,3939,3949,3964,3968,3979,3987,3999,4011,4019],{"__ignoreMap":239},[243,3821,3822,3824,3828,3830,3834,3837,3840,3842,3846],{"class":245,"line":246},[243,3823,1401],{"class":843},[243,3825,3827],{"class":3826},"sXbZB"," DOM ",[243,3829,1032],{"class":1722},[243,3831,3833],{"class":3832},"s-DR7"," Document",[243,3835,3836],{"class":1018}," |",[243,3838,3839],{"class":3832}," Element",[243,3841,3836],{"class":1018},[243,3843,3845],{"class":3844},"scrte"," string",[243,3847,933],{"class":249},[243,3849,3850,3852,3855,3857],{"class":245,"line":253},[243,3851,1401],{"class":843},[243,3853,3854],{"class":3826}," Options ",[243,3856,1032],{"class":1722},[243,3858,754],{"class":249},[243,3860,3861,3865,3868,3871,3874],{"class":245,"line":282},[243,3862,3864],{"class":3863},"swl0y","  assignUniqueIDs",[243,3866,3867],{"class":1018},"?:",[243,3869,3870],{"class":3844}," boolean",[243,3872,3873],{"class":249},";",[243,3875,3876],{"class":852}," // false\n",[243,3878,3879,3882,3884,3886,3888],{"class":245,"line":302},[243,3880,3881],{"class":3863},"  debug",[243,3883,3867],{"class":1018},[243,3885,3870],{"class":3844},[243,3887,3873],{"class":249},[243,3889,3890],{"class":852},"           // true\n",[243,3892,3893],{"class":245,"line":323},[243,3894,918],{"class":249},[243,3896,3897],{"class":245,"line":343},[243,3898,1147],{"emptyLinePlaceholder":1146},[243,3900,3901,3903,3905,3908],{"class":245,"line":364},[243,3902,2896],{"class":707},[243,3904,49],{"class":690},[243,3906,3907],{"class":704},"d2Snap",[243,3909,3910],{"class":707},"(\n",[243,3912,3913,3916,3920],{"class":245,"line":380},[243,3914,3915],{"class":707},"  dom: ",[243,3917,3919],{"class":3918},"sqxXB","DOM",[243,3921,279],{"class":249},[243,3923,3924,3927,3929,3932,3934,3937],{"class":245,"line":812},[243,3925,3926],{"class":707},"  k: number",[243,3928,886],{"class":249},[243,3930,3931],{"class":707}," l: number",[243,3933,886],{"class":249},[243,3935,3936],{"class":707}," m: number",[243,3938,279],{"class":249},[243,3940,3941,3944,3946],{"class":245,"line":818},[243,3942,3943],{"class":707},"  options",[243,3945,3867],{"class":1722},[243,3947,3948],{"class":707}," Options\n",[243,3950,3951,3954,3958,3960,3962],{"class":245,"line":849},[243,3952,3953],{"class":707},"): ",[243,3955,3957],{"class":3956},"s8Irk","Promise",[243,3959,1019],{"class":1722},[243,3961,799],{"class":707},[243,3963,1078],{"class":1722},[243,3965,3966],{"class":245,"line":856},[243,3967,1147],{"emptyLinePlaceholder":1146},[243,3969,3970,3972,3974,3977],{"class":245,"line":921},[243,3971,2896],{"class":707},[243,3973,49],{"class":690},[243,3975,3976],{"class":704},"adaptiveD2Snap",[243,3978,3910],{"class":707},[243,3980,3981,3983,3985],{"class":245,"line":926},[243,3982,3915],{"class":707},[243,3984,3919],{"class":3918},[243,3986,279],{"class":249},[243,3988,3989,3992,3994,3997],{"class":245,"line":1204},[243,3990,3991],{"class":707},"  maxTokens: number ",[243,3993,1032],{"class":1722},[243,3995,3996],{"class":376}," 4096",[243,3998,279],{"class":249},[243,4000,4001,4004,4006,4009],{"class":245,"line":1210},[243,4002,4003],{"class":707},"  maxIterations: number ",[243,4005,1032],{"class":1722},[243,4007,4008],{"class":376}," 5",[243,4010,279],{"class":249},[243,4012,4013,4015,4017],{"class":245,"line":1242},[243,4014,3943],{"class":707},[243,4016,3867],{"class":1722},[243,4018,3948],{"class":707},[243,4020,4021,4023,4025,4027,4029],{"class":245,"line":1271},[243,4022,3953],{"class":707},[243,4024,3957],{"class":3956},[243,4026,1019],{"class":1722},[243,4028,799],{"class":707},[243,4030,1078],{"class":1722},[11,4032,4033,4034,4036,4037,4042,4043,4048],{},"Moreover, ",[2251,4035,2896],{}," it is available on the ",[31,4038,4041],{"href":4039,"rel":4040},"https://dev.webfuse.com/automation-api",[35],"Webfuse Automation API",". ",[31,4044,4047],{"href":4045,"rel":4046},"https://www.webfuse.com",[35],"Webfuse"," essentially is a proxy to seamlessly serve any existing web application with custom augmentations, such as a web agent widget.",[234,4050,4054],{"className":4051,"code":4052,"language":4053,"meta":239,"style":239},"language-js shiki shiki-themes catppuccin-latte night-owl","const domSnapshot = await browser.webfuseSession\n    .automation\n    .take_dom_snapshot({ modifier: 'downsample' })\n","js",[188,4055,4056,4061,4066],{"__ignoreMap":239},[243,4057,4058],{"class":245,"line":246},[243,4059,4060],{},"const domSnapshot = await browser.webfuseSession\n",[243,4062,4063],{"class":245,"line":253},[243,4064,4065],{},"    .automation\n",[243,4067,4068],{"class":245,"line":282},[243,4069,4070],{},"    .take_dom_snapshot({ modifier: 'downsample' })\n",[11,4072,4073,4074,4076],{},"Need precise control over the underlying ",[2251,4075,2896],{}," invocation? Configure it exactly how you want:",[234,4078,4080],{"className":4051,"code":4079,"language":4053,"meta":239,"style":239},"const domSnapshot = await browser.webfuseSession\n    .automation\n    .take_dom_snapshot({\n        modifier: {\n            name: 'D2Snap',\n            params: { hierarchyRatio: 0.6, textRatio: 0.2, attributeRatio: 0.8 }\n        }\n    })\n",[188,4081,4082,4086,4090,4095,4100,4105,4110,4114],{"__ignoreMap":239},[243,4083,4084],{"class":245,"line":246},[243,4085,4060],{},[243,4087,4088],{"class":245,"line":253},[243,4089,4065],{},[243,4091,4092],{"class":245,"line":282},[243,4093,4094],{},"    .take_dom_snapshot({\n",[243,4096,4097],{"class":245,"line":302},[243,4098,4099],{},"        modifier: {\n",[243,4101,4102],{"class":245,"line":323},[243,4103,4104],{},"            name: 'D2Snap',\n",[243,4106,4107],{"class":245,"line":343},[243,4108,4109],{},"            params: { hierarchyRatio: 0.6, textRatio: 0.2, attributeRatio: 0.8 }\n",[243,4111,4112],{"class":245,"line":364},[243,4113,1572],{},[243,4115,4116],{"class":245,"line":380},[243,4117,4118],{},"    })\n",[137,4120,4122],{"id":4121},"performance-evaluation","Performance Evaluation",[11,4124,4125,4126,4128,4129,4131,4132,4134],{},"Now for the moment of truth: How does ",[2251,4127,2896],{}," stack up against the industry standard? We evaluated ",[2251,4130,2896],{}," in comparison to a grounded GUI snapshot baseline close to those used by ",[2251,4133,2778],{}," – coloured bounding boxes around visible interactive elements.",[11,4136,4137,4138,4143],{},"To evaluate snapshots isolated from specific agent logic, we crafted a dataset that spans all UI states that occur while solving a related task. We sampled our dataset from the existing ",[31,4139,4142],{"href":4140,"rel":4141},"https://github.com/OSU-NLP-Group/Online-Mind2Web",[35],"Online-Mind2Web"," dataset.",[99,4145],{":width":4146,"alt":4147,"format":106,"loading":103,"src":4148},"800","Exemplary solution UI state trajectory of a defined web-based task","/blog/dom-downsampling-for-web-agents/3.png",[11,4150,4151],{},[2821,4152,4153],{},"Exemplary solution UI state trajectory for the task: “View the pricing plan for 'Business'. Specifically, we have 100 users. We need a 1PB storage quota and a 50 TB transfer quota.”",[11,4155,4156],{},"These are our key findings...",[2394,4158,4160],{"id":4159},"substantial-success-rates","Substantial Success Rates",[11,4162,4163,4164,4166],{},"The results exceeded our expectations. Not only did ",[2251,4165,2896],{}," meet the baseline's performance – our best configuration outperformed it by a significant margin. Full linearisation matches performance, and estimated model input token size order of the baseline.",[99,4168],{":width":4169,"alt":4170,"format":106,"loading":103,"src":4171},"550","Success rate per web agent snapshot subject evaluated across the dataset","/blog/dom-downsampling-for-web-agents/4.png",[2821,4173,4174,4175,4182,4183,4185,4186,4189,4190,4193,4194,4197,4198,4201,4202,4205,4206,4209],{},"\n  Success rate per web agent snapshot subject evaluated across the dataset.\n  Labels: ",[188,4176,4177,4178],{},"GUI",[4179,4180,4181],"sub",{}," gr.",": Baseline, ",[188,4184,3919],{},": Raw DOM (cut-off at ~8K tokens), ",[188,4187,4188],{},"k( l m)",": Parameter values; e.g., ",[188,4191,4192],{},".9 .3 .6",", or ",[188,4195,4196],{},".4"," if equal). ",[188,4199,4200],{},"∞",": Linearisation,  ",[188,4203,4204],{},"8192 / 32768",": via token-limited (resp.) ",[4207,4208,3772],"i",{},".\n",[2394,4211,4213],{"id":4212},"containable-token-and-byte-size","Containable Token and Byte Size",[11,4215,4216,4217,4219],{},"Even light downsampling delivers dramatic size reductions. Most ",[2251,4218,2896],{}," configurations average just one token order above the baseline – a massive improvement over raw DOM snapshots. Better yet, most DOMs from the dataset could actually be downsampled to the baseline order. And while image data balloons in file size, our text-based approach stays lean and efficient.",[99,4221],{":width":4146,"alt":4222,"format":106,"loading":103,"src":4223},"Comparison of mean input size across and per subject","/blog/dom-downsampling-for-web-agents/5.png",[2821,4225,4226,4227,4230,4231,4233],{},"\n  Left: Comparison of mean input size (tokens vs bytes) across and per subject.",[4228,4229],"br",{},"\n  Right: Estimated input token size across the dataset created by a single ",[4207,4232,2896],{}," evaluation subject.\n",[2394,4235,4237],{"id":4236},"hierarchy-actually-matters","Hierarchy Actually Matters",[11,4239,4240],{},"Which UI feature matters most for LLM web agent backend performance? We alternated parameter configurations to find out. Interestingly, hierarchy reveals itself as the strongest of the three assessed features. Element extraction throws away hierarchy, which suggests that downsampling is a superior technique.",[2973,4242,4245,4250],{"className":4243,"dataFootnotes":239},[4244],"footnotes",[94,4246,4249],{"className":4247,"id":2838},[4248],"sr-only","Footnotes",[148,4251,4252,4267,4278,4289],{},[57,4253,4255,4259,4260],{"id":4254},"user-content-fn-1",[31,4256,4257],{"href":4257,"rel":4258},"https://arxiv.org/abs/2210.03945",[35]," ",[31,4261,4266],{"href":4262,"ariaLabel":4263,"className":4264,"dataFootnoteBackref":239},"#user-content-fnref-1","Back to reference 1",[4265],"data-footnote-backref","↩",[57,4268,4270,4259,4273],{"id":4269},"user-content-fn-2",[31,4271,2902],{"href":2902,"rel":4272},[35],[31,4274,4266],{"href":4275,"ariaLabel":4276,"className":4277,"dataFootnoteBackref":239},"#user-content-fnref-2","Back to reference 2",[4265],[57,4279,4281,4259,4284],{"id":4280},"user-content-fn-3",[31,4282,3809],{"href":3809,"rel":4283},[35],[31,4285,4266],{"href":4286,"ariaLabel":4287,"className":4288,"dataFootnoteBackref":239},"#user-content-fnref-3","Back to reference 3",[4265],[57,4290,4292,4259,4296],{"id":4291},"user-content-fn-4",[31,4293,4294],{"href":4294,"rel":4295},"https://aclanthology.org/W04-3252",[35],[31,4297,4266],{"href":4298,"ariaLabel":4299,"className":4300,"dataFootnoteBackref":239},"#user-content-fnref-4","Back to reference 4",[4265],[2653,4302,4303],{},"html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .s9rnR, html code.shiki .s9rnR{--shiki-default:#179299;--shiki-dark:#7FDBCA}html pre.shiki code .sY2RG, html code.shiki .sY2RG{--shiki-default:#1E66F5;--shiki-dark:#CAECE6}html pre.shiki code .swkLt, html code.shiki .swkLt{--shiki-default:#DF8E1D;--shiki-default-font-style:inherit;--shiki-dark:#C5E478;--shiki-dark-font-style:italic}html pre.shiki code .sbuKk, html code.shiki .sbuKk{--shiki-default:#40A02B;--shiki-dark:#D9F5DD}html pre.shiki code .sfrMT, html code.shiki .sfrMT{--shiki-default:#40A02B;--shiki-dark:#ECC48D}html pre.shiki code .s2kId, html code.shiki .s2kId{--shiki-default:#4C4F69;--shiki-dark:#D6DEEB}html pre.shiki code .s76yb, html code.shiki .s76yb{--shiki-default:#8839EF;--shiki-dark:#C792EA}html pre.shiki code .sXbZB, html code.shiki .sXbZB{--shiki-default:#DF8E1D;--shiki-default-font-style:italic;--shiki-dark:#D6DEEB;--shiki-dark-font-style:inherit}html pre.shiki code .s-_ek, html code.shiki .s-_ek{--shiki-default:#179299;--shiki-dark:#C792EA}html pre.shiki code .s-DR7, html code.shiki .s-DR7{--shiki-default:#DF8E1D;--shiki-default-font-style:italic;--shiki-dark:#FFCB8B;--shiki-dark-font-style:inherit}html pre.shiki code .scrte, html code.shiki .scrte{--shiki-default:#8839EF;--shiki-dark:#C5E478}html pre.shiki code .scGhl, html code.shiki .scGhl{--shiki-default:#7C7F93;--shiki-dark:#D6DEEB}html pre.shiki code .swl0y, html code.shiki .swl0y{--shiki-default:#4C4F69;--shiki-default-font-style:italic;--shiki-dark:#D6DEEB;--shiki-dark-font-style:inherit}html pre.shiki code .sDmS1, html code.shiki .sDmS1{--shiki-default:#7C7F93;--shiki-default-font-style:italic;--shiki-dark:#637777;--shiki-dark-font-style:italic}html pre.shiki code .s5FwJ, html code.shiki .s5FwJ{--shiki-default:#179299;--shiki-default-font-style:inherit;--shiki-dark:#C792EA;--shiki-dark-font-style:italic}html pre.shiki code .sNstc, html code.shiki .sNstc{--shiki-default:#1E66F5;--shiki-default-font-style:italic;--shiki-dark:#82AAFF;--shiki-dark-font-style:italic}html pre.shiki code .sqxXB, html code.shiki .sqxXB{--shiki-default:#4C4F69;--shiki-dark:#82AAFF}html pre.shiki code .s8Irk, html code.shiki .s8Irk{--shiki-default:#DF8E1D;--shiki-default-font-style:italic;--shiki-dark:#C5E478;--shiki-dark-font-style:inherit}html pre.shiki code .sZ_Zo, html code.shiki .sZ_Zo{--shiki-default:#FE640B;--shiki-dark:#F78C6C}",{"title":239,"searchDepth":253,"depth":253,"links":4305},[4306,4310,4311,4318],{"id":2786,"depth":253,"text":2787,"children":4307},[4308,4309],{"id":2797,"depth":282,"text":2798},{"id":2826,"depth":282,"text":2827},{"id":2875,"depth":253,"text":2876},{"id":2893,"depth":253,"text":2896,"children":4312},[4313,4314,4315,4316,4317],{"id":2930,"depth":282,"text":2931},{"id":3048,"depth":282,"text":3049},{"id":3769,"depth":282,"text":3772},{"id":3784,"depth":282,"text":3785},{"id":4121,"depth":282,"text":4122},{"id":2838,"depth":253,"text":4249},"2025-08-18","We propose D2Snap – a first-of-its-kind downsampling algorithm for DOMs. D2Snap can be used as a pre-processing technique for DOM snapshots to optimise web agency context quality and token costs.",{"homepage":1146,"relatedLinks":4322},[4323,4327,4330],{"text":4324,"href":4325,"description":4326},"What is a Website Snapshot?","/blog/snapshots-provide-llms-with-website-state","Learn what a website snapshot is and how to utilise it for web agents",{"text":4328,"href":2739,"description":4329},"What is a Web Agent?","Learn the basics of web agents",{"text":4041,"href":4331,"external":1146,"description":4332},"https://dev.webfuse.com/automation-api#take_dom_snapshot","Check out the Webfuse Automation API",{"title":135,"description":4320},{"loc":134},"blog/1012.dom-downsampling-for-llm-based-web-agents",[2697,4337,4338,4339,2749,4340],"browser-agents","llms","llm-context","web-automation","bGJtg_9k7O95O2CJswaRFj4ONGhX4hGr_8aL5dhDZms",{"id":4343,"title":2738,"authorId":2755,"body":4344,"category":2697,"created":5058,"description":5059,"extension":2700,"faqs":2730,"featurePriority":253,"head":2730,"landingPath":2730,"meta":5060,"navigation":1146,"ogImage":2730,"path":2739,"robots":2730,"schemaOrg":2730,"seo":5069,"sitemap":5070,"stem":5071,"tags":5072,"__hash__":5073},"blog/blog/1011.a-gentle-introduction-to-ai-agents-for-the-web.md",{"type":8,"value":4345,"toc":5039},[4346,4360,4363,4370,4376,4380,4383,4398,4402,4412,4416,4420,4433,4437,4441,4444,4449,4453,4462,4466,4477,4482,4486,4504,4508,4514,4613,4616,4839,4854,4858,4861,4866,4870,4873,4877,4895,4920,4927,4931,4969,4972,4983,4987,4990,5018,5022,5030,5036],[11,4347,4348,4349,204,4353,208,4356,4359],{},"In no time, AI became a natural part of modern web interfaces. AI agents for the web enjoy a recent hype, sparked by the means of ",[31,4350,2768],{"href":4351,"rel":4352},"https://openai.com/index/introducing-operator/",[35],[31,4354,2773],{"href":2771,"rel":4355},[35],[31,4357,2778],{"href":2776,"rel":4358},[35],". By now, it is within reach to automate arbitrary web-based tasks, such as booking the cheapest flight from Berlin to Amsterdam.",[94,4361,4328],{"id":4362},"what-is-a-web-agent",[11,4364,4365,4366,4369],{},"For starters, let us break down the term ",[21,4367,4368],{},"web AI agent",": An agent is an entity that autonomously acts on behalf of another entity. An artificially intelligent agent is an application that acts on behalf of a human. In contrast to non-AI computer agents, it solves complex tasks with at least human-grade effectiveness and efficiency. For a human-centric web, web agents have deliberately been designed to browse the web in a human fashion – through UIs rather than APIs.",[99,4371],{":width":4372,"alt":4373,"format":4374,"loading":103,"src":4375},"610","High-level agent description comparing human and computer agents","svg","/blog/a-gentle-introduction-to-ai-agents-for-the-web/1.svg",[137,4377,4379],{"id":4378},"the-role-of-frontier-llms","The Role of Frontier LLMs",[11,4381,4382],{},"Web agents have been a vague desire for a long time. AI agents used to rely on complete models of a problem domain in order to allow (heuristic) search through problem states. Such models would comprise the problem world (e.g., a chessboard), actors (pawns, rooks, etc.), possible actions per actor (rook moves straight), and constraints (i.a., max one piece per field). A heterogeneous space of web application UIs describes the problem domain of a web agent: how to understand a web page, and how to interact with it to solve the declared task?",[11,4384,4385,4386,4393,4394,4397],{},"Frontier LLMs disrupted the AI agent world: explicit problem domain models beyond feasibility can now be replaced by an LLM. The LLM thereby acts as an instantaneous domain model backend that can be consulted with twofold context: serialised problem state, such as a chess position code (",[2251,4387,4388,4389,4392],{},"“",[243,4390,4391],{},"..."," e4 e5 2. Nc3 f5”","), and the respective task (",[2251,4395,4396],{},"“What is the best move for white?”","). For web agents, problem state corresponds to the currently browsed web application's runtime state, for instance, a screenshot.",[137,4399,4401],{"id":4400},"generalist-web-agents","Generalist Web Agents",[11,4403,4404,4405,208,4408,4411],{},"Generalist web agents are supposed to solve arbitrary tasks through a web browser. Web-based tasks can be as diverse as ",[2251,4406,4407],{},"“Find a picture of a cat.”",[2251,4409,4410],{},"“Book the cheapest flight from Berlin to Amsterdam tomorrow afternoon (business class, window seat).”"," In reality, generalist agents still fail uncommon or too precise tasks. While they have been critically acclaimed, they mainly act as early proofs-of-concept. Tasks that are indeed solvable with a generalist agent promise great results with an according specialist agent.",[99,4413],{":width":101,"alt":4414,"format":106,"loading":103,"src":4415},"Screenshot of a generalist web agent UI (Director)","/blog/a-gentle-introduction-to-ai-agents-for-the-web/2.png",[137,4417,4419],{"id":4418},"specialist-web-agents","Specialist Web Agents",[11,4421,4422,4423,4426,4427,4432],{},"Other than generalist agents, specialist web agents are constrained to a certain task and application domain. Specialist agents bear the major share of commercial value. Most prominently, modal chat agents that provide users with on-page help. Picture a little floating widget that can be chatted to via text or voice input. In most cases, in fact, the term ",[2251,4424,4425],{},"web (AI) agent"," refers to chat agents. Chat agents – text or voice – can be implemented on top of virtually any existing website. Frontier LLMs provide a lot of commonsense out-of-the-box. A ",[31,4428,4431],{"href":4429,"rel":4430},"https://docs.claude.com/en/docs/build-with-claude/prompt-engineering/system-prompts",[35],"system prompt"," can, moreover, be leveraged to drive specialist agent quality for the respective problem domain.",[99,4434],{":width":101,"alt":4435,"format":106,"loading":103,"src":4436},"Screenshots of two modal specialist web agent UIs augmenting an underlying website's UI","/blog/a-gentle-introduction-to-ai-agents-for-the-web/3.png",[94,4438,4440],{"id":4439},"how-does-a-web-agent-work","How Does a Web Agent Work?",[11,4442,4443],{},"LLM-based web agents are premised on a more or less uniform architecture. The agent application embodies a mediator between a web browser (environment), and the LLM backend (model).",[99,4445],{":width":4446,"alt":4447,"format":4374,"loading":103,"src":4448},"480","High-level web agent architecture component view","/blog/a-gentle-introduction-to-ai-agents-for-the-web/4.svg",[137,4450,4452],{"id":4451},"the-agent-lifecycle","The Agent Lifecycle",[11,4454,4455,4456,4461],{},"To reduce a user's cognitive load, solving a web-based task is usually chunked into a sequence of UI states. Consider looking for rental apartments on ",[31,4457,4460],{"href":4458,"rel":4459},"https://www.redfin.com",[35],"redfin.com",": In the first step, you specify a location. Only subsequently are you provided with a grid of available apartments for that location.",[99,4463],{":width":101,"alt":4464,"format":106,"loading":103,"src":4465},"Example of separated UI states in a rental home search application","/blog/a-gentle-introduction-to-ai-agents-for-the-web/5.png",[11,4467,4468,4469,4476],{},"Web agent logic is iterative; not least for a sequential web interaction model, but also for a conversational agent interaction model. Browsing the web, human and computer agents represent users alike. That said, Norman's well-known ",[31,4470,4473],{"href":4471,"rel":4472},"https://mitpress.mit.edu/9780262640374/the-design-of-everyday-things/",[35],[2251,4474,4475],{},"Seven Stages of Action",", which hierarchically model the human cognition cycle, transfer to the web agent lifecycle. For each UI state in a web browser (environment) and web-based task (action intention); decide where to click, type, etc. (action planning), and perform those clicks, etc. (action execution). Afterwards, perceive, interpret, and evaluate the results of those actions in the web browser (state). As long as there is a mismatch between the evaluated state and the declared goal state, repeat that cycle. Potentially prompt the user with more required information.",[99,4478],{":width":4479,"alt":4480,"format":4374,"loading":103,"src":4481},"580","Donald 'Norman's Seven Stages of Action' model of the human cognition cycle that transfers to non-human agents","/blog/a-gentle-introduction-to-ai-agents-for-the-web/6.svg",[137,4483,4485],{"id":4484},"web-context-for-llms","Web Context for LLMs",[11,4487,4488,4489,4491,4492,4495,4496,4499,4500,4503],{},"The gap from an agent towards the environment, according to ",[2251,4490,4475],{},", is known as the ",[2251,4493,4494],{},"gulf of execution",". In real-world scenarios, how to act in the environment in respect to a planned sequence of actions might be difficult (e.g., how to actually open the trunk of a new car?). Arguably, web agents face a novel ",[2251,4497,4498],{},"gulf of intention"," towards the action planning stage: how to serialise a currently browsed web page's runtime state for LLMs? ",[2251,4501,4502],{},"Snapshot"," is a more comprehensive term to describe the serialisation of a web page's current runtime state. Screenshots, for instance, represent a type of snapshot that closely resembles how humans perceive a web page at a given point in time. But are they as accessible to LLMs?",[137,4505,4507],{"id":4506},"agentic-ui-interaction","Agentic UI Interaction",[11,4509,4510,4511,4513],{},"With a qualified set of well-defined actuation methods, web agents are able to close the ",[2251,4512,4494],{}," quite well. HTML element types strongly afford a certain action (e.g., click a button, type to a field). Below is how an actuation schema to present the LLM backend with could look like:",[234,4515,4517],{"className":3815,"code":4516,"language":3817,"meta":239,"style":239},"interface ActuationSchema = {\n    thought: string;\n    action: \"click\"\n        | \"scroll\"\n        | \"type\";\n    cssSelector: string;\n    data?: string;\n}[];\n",[188,4518,4519,4532,4543,4558,4570,4582,4593,4604],{"__ignoreMap":239},[243,4520,4521,4524,4527,4530],{"class":245,"line":246},[243,4522,4523],{"class":843},"interface",[243,4525,4526],{"class":3826}," ActuationSchema",[243,4528,4529],{"class":707}," = ",[243,4531,250],{"class":249},[243,4533,4534,4537,4539,4541],{"class":245,"line":253},[243,4535,4536],{"class":707},"    thought",[243,4538,266],{"class":1018},[243,4540,3845],{"class":3844},[243,4542,933],{"class":249},[243,4544,4545,4548,4550,4552,4556],{"class":245,"line":282},[243,4546,4547],{"class":707},"    action",[243,4549,266],{"class":1018},[243,4551,270],{"class":269},[243,4553,4555],{"class":4554},"sgAC-","click",[243,4557,1040],{"class":269},[243,4559,4560,4563,4565,4568],{"class":245,"line":302},[243,4561,4562],{"class":1018},"        |",[243,4564,270],{"class":269},[243,4566,4567],{"class":4554},"scroll",[243,4569,1040],{"class":269},[243,4571,4572,4574,4576,4578,4580],{"class":245,"line":323},[243,4573,4562],{"class":1018},[243,4575,270],{"class":269},[243,4577,1401],{"class":4554},[243,4579,263],{"class":269},[243,4581,933],{"class":249},[243,4583,4584,4587,4589,4591],{"class":245,"line":343},[243,4585,4586],{"class":707},"    cssSelector",[243,4588,266],{"class":1018},[243,4590,3845],{"class":3844},[243,4592,933],{"class":249},[243,4594,4595,4598,4600,4602],{"class":245,"line":364},[243,4596,4597],{"class":707},"    data",[243,4599,3867],{"class":1018},[243,4601,3845],{"class":3844},[243,4603,933],{"class":249},[243,4605,4606,4608,4611],{"class":245,"line":380},[243,4607,907],{"class":249},[243,4609,4610],{"class":707},"[]",[243,4612,933],{"class":249},[11,4614,4615],{},"And a suggested actions response could, in turn, look as follows:",[234,4617,4619],{"className":236,"code":4618,"language":238,"meta":239,"style":239},"[\n    {\n        \"thought\": \"Scroll newsletter cta into view\",\n        \"action\": \"scroll\",\n        \"cssSelector\": \"section#newsletter\"\n    },\n    {\n        \"thought\": \"Type email address to newsletter cta\",\n        \"action\": \"type\",\n        \"cssSelector\": \"section#newsletter > input\",\n        \"data\": \"user@example.org\"\n    },\n    {\n        \"thought\": \"Submit newsletter sign up\",\n        \"action\": \"click\",\n        \"cssSelector\": \"section#newsletter > button\"\n    }\n]\n",[188,4620,4621,4625,4630,4650,4669,4687,4691,4695,4714,4732,4751,4769,4773,4777,4796,4814,4831,4835],{"__ignoreMap":239},[243,4622,4623],{"class":245,"line":246},[243,4624,1336],{"class":249},[243,4626,4627],{"class":245,"line":253},[243,4628,4629],{"class":249},"    {\n",[243,4631,4632,4634,4637,4639,4641,4643,4646,4648],{"class":245,"line":282},[243,4633,1431],{"class":256},[243,4635,4636],{"class":260},"thought",[243,4638,263],{"class":256},[243,4640,266],{"class":249},[243,4642,270],{"class":269},[243,4644,4645],{"class":273},"Scroll newsletter cta into view",[243,4647,263],{"class":269},[243,4649,279],{"class":249},[243,4651,4652,4654,4657,4659,4661,4663,4665,4667],{"class":245,"line":302},[243,4653,1431],{"class":256},[243,4655,4656],{"class":260},"action",[243,4658,263],{"class":256},[243,4660,266],{"class":249},[243,4662,270],{"class":269},[243,4664,4567],{"class":273},[243,4666,263],{"class":269},[243,4668,279],{"class":249},[243,4670,4671,4673,4676,4678,4680,4682,4685],{"class":245,"line":323},[243,4672,1431],{"class":256},[243,4674,4675],{"class":260},"cssSelector",[243,4677,263],{"class":256},[243,4679,266],{"class":249},[243,4681,270],{"class":269},[243,4683,4684],{"class":273},"section#newsletter",[243,4686,1040],{"class":269},[243,4688,4689],{"class":245,"line":343},[243,4690,809],{"class":249},[243,4692,4693],{"class":245,"line":364},[243,4694,4629],{"class":249},[243,4696,4697,4699,4701,4703,4705,4707,4710,4712],{"class":245,"line":380},[243,4698,1431],{"class":256},[243,4700,4636],{"class":260},[243,4702,263],{"class":256},[243,4704,266],{"class":249},[243,4706,270],{"class":269},[243,4708,4709],{"class":273},"Type email address to newsletter cta",[243,4711,263],{"class":269},[243,4713,279],{"class":249},[243,4715,4716,4718,4720,4722,4724,4726,4728,4730],{"class":245,"line":812},[243,4717,1431],{"class":256},[243,4719,4656],{"class":260},[243,4721,263],{"class":256},[243,4723,266],{"class":249},[243,4725,270],{"class":269},[243,4727,1401],{"class":273},[243,4729,263],{"class":269},[243,4731,279],{"class":249},[243,4733,4734,4736,4738,4740,4742,4744,4747,4749],{"class":245,"line":818},[243,4735,1431],{"class":256},[243,4737,4675],{"class":260},[243,4739,263],{"class":256},[243,4741,266],{"class":249},[243,4743,270],{"class":269},[243,4745,4746],{"class":273},"section#newsletter > input",[243,4748,263],{"class":269},[243,4750,279],{"class":249},[243,4752,4753,4755,4758,4760,4762,4764,4767],{"class":245,"line":849},[243,4754,1431],{"class":256},[243,4756,4757],{"class":260},"data",[243,4759,263],{"class":256},[243,4761,266],{"class":249},[243,4763,270],{"class":269},[243,4765,4766],{"class":273},"user@example.org",[243,4768,1040],{"class":269},[243,4770,4771],{"class":245,"line":856},[243,4772,809],{"class":249},[243,4774,4775],{"class":245,"line":921},[243,4776,4629],{"class":249},[243,4778,4779,4781,4783,4785,4787,4789,4792,4794],{"class":245,"line":926},[243,4780,1431],{"class":256},[243,4782,4636],{"class":260},[243,4784,263],{"class":256},[243,4786,266],{"class":249},[243,4788,270],{"class":269},[243,4790,4791],{"class":273},"Submit newsletter sign up",[243,4793,263],{"class":269},[243,4795,279],{"class":249},[243,4797,4798,4800,4802,4804,4806,4808,4810,4812],{"class":245,"line":1204},[243,4799,1431],{"class":256},[243,4801,4656],{"class":260},[243,4803,263],{"class":256},[243,4805,266],{"class":249},[243,4807,270],{"class":269},[243,4809,4555],{"class":273},[243,4811,263],{"class":269},[243,4813,279],{"class":249},[243,4815,4816,4818,4820,4822,4824,4826,4829],{"class":245,"line":1210},[243,4817,1431],{"class":256},[243,4819,4675],{"class":260},[243,4821,263],{"class":256},[243,4823,266],{"class":249},[243,4825,270],{"class":269},[243,4827,4828],{"class":273},"section#newsletter > button",[243,4830,1040],{"class":269},[243,4832,4833],{"class":245,"line":1242},[243,4834,1604],{"class":249},[243,4836,4837],{"class":245,"line":1271},[243,4838,1599],{"class":249},[2951,4840,4841],{},[11,4842,4843,956,4848,4853],{},[31,4844,4847],{"href":4845,"rel":4846},"https://platform.openai.com/docs/guides/function-calling",[35],"Function Calling",[31,4849,4852],{"href":4850,"rel":4851},"https://modelcontextprotocol.io",[35],"Model Context Protocol"," represent two ends to outsource an explicit actuation model – server- and client-side, respectively.",[137,4855,4857],{"id":4856},"agentic-ui-augmentation","Agentic UI Augmentation",[11,4859,4860],{},"An agent represents yet another feature to integrate with an application and its UI. Discoverability and availability, however, are among the most fundamental requirements of a web agent. Evidently, when a user experiences UI/UX friction, at least the agent should be interactive. That said, a scrolling modal web agent UI has been the go-to approach, that is, a little floating widget on top of the underlying application's UI. It comes with a major advantage: the agent application can be decoupled from the underlying, self-contained application.",[99,4862],{":width":4863,"alt":4864,"format":4374,"loading":103,"src":4865},"360","Depiction of a web agent application augmenting an underlying application in an isolated layer","/blog/a-gentle-introduction-to-ai-agents-for-the-web/7.svg",[94,4867,4869],{"id":4868},"how-to-build-a-web-agent","How to Build a Web Agent?",[11,4871,4872],{},"Believe it or not: enhancing an existing web application with a purposeful agent is a lower-hanging fruit. The evolving agent ecosystem provides you with a spectrum of solutions: instantly use a pre-compiled agent, tweak a templated agent, or develop an agent from scratch. Either way, LLMs and web browsers exist for reuse, boiling down agent development to LLM context engineering, and UI augmentation.",[137,4874,4876],{"id":4875},"develop-a-web-agent","Develop a Web Agent",[11,4878,4879,4880,4883,4884,208,4889,4894],{},"Opting for a ",[21,4881,4882],{},"pre-compiled agent"," does not necessarily involve any actual development step. Instead, pre-compiled agents allow for high-level configuration through an agent-as-a-service provider's interface. Popular agent-as-a-service providers are, i.a., ",[31,4885,4888],{"href":4886,"rel":4887},"https://elevenlabs.io/conversational-ai",[35],"ElevenLabs",[31,4890,4893],{"href":4891,"rel":4892},"https://www.intercom.com/drlp/ai-agent",[35],"Intercom",". Serviced agents hide LLM communication and potentially interaction with a web browser behind the configuration interface.",[11,4896,4897,4898,4901,4902,4907,4908,4913,4914,4919],{},"Using a ",[21,4899,4900],{},"templated agent"," resembles the agent-as-a-service approach on a lower level. Openly sourced from a ",[31,4903,4906],{"href":4904,"rel":4905},"https://github.com/webfuse-com/agent-extension-blueprint",[35],"code repository",", templated agents allow for any kind of development tweaks. Favourably, agent templates shortcut integration with ",[31,4909,4912],{"href":4910,"rel":4911},"https://openai.com/api/",[35],"LLM APIs"," and web ",[31,4915,4918],{"href":4916,"rel":4917},"https://developer.mozilla.org/en-US/docs/Web/API",[35],"browser APIs",". Using a templated agent usually represents the preferable, best-of-both-worlds approach; common- and best-practice code snippets are available from the beginning, but everything can be customised as desired.",[11,4921,4922,4923,4926],{},"Of course, developing an ",[21,4924,4925],{},"agent from scratch"," is always an option. It is preferable whenever agent requirements deviate to a large extent from what exists in the service or template landscape.",[137,4928,4930],{"id":4929},"deploy-a-web-agent","Deploy a Web Agent",[11,4932,4933,4934,131,4939,4944,4945,4950,4951,4956,4957,4962,4963,4968],{},"When web agent code lives side-by-side with the augmented application's code, agent deployment is covered by a generic pipeline. Something like: ",[31,4935,4938],{"href":4936,"rel":4937},"https://eslint.org",[35],"linting",[31,4940,4943],{"href":4941,"rel":4942},"https://prettier.io",[35],"formatting"," agent code, ",[31,4946,4949],{"href":4947,"rel":4948},"https://esbuild.github.io",[35],"transpiling and bundling"," agent modules, ",[31,4952,4955],{"href":4953,"rel":4954},"https://www.cypress.io",[35],"testing"," agent, ",[31,4958,4961],{"href":4959,"rel":4960},"https://pages.cloudflare.com",[35],"hosting"," agent bundle, and ",[31,4964,4967],{"href":4965,"rel":4966},"https://docs.github.com/en/actions/get-started/continuous-integration",[35],"tiggering"," post deployment events. In that case, an agent represents a modular feature component in the application, no different than, for instance, a sign-up component.",[11,4970,4971],{},"Web agent source code right inside the application codebase comes at a cost:",[54,4973,4974,4977,4980],{},[57,4975,4976],{},"Agent developers can manipulate the source code of the underlying application.",[57,4978,4979],{},"Agent functionality could introduce side effects on the underlying application.",[57,4981,4982],{},"Agent changes require deployment of the entire application.",[137,4984,4986],{"id":4985},"best-practices-of-agentic-ux","Best Practices of Agentic UX",[11,4988,4989],{},"When designing user experiences for agent-enhanced applications, there are a few things to consider:",[54,4991,4992,4993,4992,5002,4992,5010],{},"\n    ",[57,4994,4995,4996,4995,4999,5001],{},"\n        ",[21,4997,4998],{},"Stream input and output to reduce latency",[4228,5000],{},"\n        LLMs (re-)introduce noticeable communication round-trip time. To reduce wait time for the human user, stream chunks of data whenever they are available.\n    ",[57,5003,4995,5004,4995,5007,5009],{},[21,5005,5006],{},"Provide fine-grained feedback to bridge high-latency",[4228,5008],{},"\n        Human attention is sensitive to several seconds of [system response time](https://www.nngroup.com/articles/response-times-3-important-limits/). Periodically provide agent _thoughts_ as feedback to perceptibly break down round-trip time.\n    ",[57,5011,4995,5012,4995,5015,5017],{},[21,5013,5014],{},"Always prompt the human user for consent to perform critical actions",[4228,5016],{},"\n        Some actions in a web application lead to irreversible or significant changes of state. Never have the agent perform such actions on behalf of the user without explicitly asking for the permission.\n    ",[137,5019,5021],{"id":5020},"non-invasive-web-agents-with-webfuse","Non-Invasive Web Agents with Webfuse",[11,5023,5024,5029],{},[31,5025,5027],{"href":4045,"rel":5026},[35],[21,5028,4047],{}," is a configurable web proxy that lets you augment any web application. As pictured, web agents represent highly self-contained applications. Moreover, web agents and underlying applications communicate at runtime in the client. This does, in fact, render opportunities to bridge the above-mentioned drawbacks with Webfuse: Develop web agents with a sandbox extension methodology, and deploy them through the low-latency proxy layer. On demand, seamlessly serve users with your agent-enhanced website. Benefit from information hiding, safe code, and fewer deployments.",[5031,5032],"article-signup-cta",{":demoAction":5033,"heading":5034,"subtitle":5035},"{\"text\":\"Read more\",\"showIcon\":false,\"href\":\"https://www.webfuse.com/blog/category/ai-agents\"}","Deploy Web Agents with Webfuse","Develop or deploy web agents in minutes; serve agent-enhanced websites through an isolated application layer.",[2653,5037,5038],{},"html pre.shiki code .s76yb, html code.shiki .s76yb{--shiki-default:#8839EF;--shiki-dark:#C792EA}html pre.shiki code .sXbZB, html code.shiki .sXbZB{--shiki-default:#DF8E1D;--shiki-default-font-style:italic;--shiki-dark:#D6DEEB;--shiki-dark-font-style:inherit}html pre.shiki code .s2kId, html code.shiki .s2kId{--shiki-default:#4C4F69;--shiki-dark:#D6DEEB}html pre.shiki code .scGhl, html code.shiki .scGhl{--shiki-default:#7C7F93;--shiki-dark:#D6DEEB}html pre.shiki code .s9rnR, html code.shiki .s9rnR{--shiki-default:#179299;--shiki-dark:#7FDBCA}html pre.shiki code .scrte, html code.shiki .scrte{--shiki-default:#8839EF;--shiki-dark:#C5E478}html pre.shiki code .sbuKk, html code.shiki .sbuKk{--shiki-default:#40A02B;--shiki-dark:#D9F5DD}html pre.shiki code .sgAC-, html code.shiki .sgAC-{--shiki-default:#40A02B;--shiki-default-font-style:italic;--shiki-dark:#ECC48D;--shiki-dark-font-style:inherit}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .srFR9, html code.shiki .srFR9{--shiki-default:#7C7F93;--shiki-dark:#7FDBCA}html pre.shiki code .s30W1, html code.shiki .s30W1{--shiki-default:#1E66F5;--shiki-dark:#7FDBCA}html pre.shiki code .sCC8C, html code.shiki .sCC8C{--shiki-default:#40A02B;--shiki-dark:#C789D6}",{"title":239,"searchDepth":253,"depth":253,"links":5040},[5041,5046,5052],{"id":4362,"depth":253,"text":4328,"children":5042},[5043,5044,5045],{"id":4378,"depth":282,"text":4379},{"id":4400,"depth":282,"text":4401},{"id":4418,"depth":282,"text":4419},{"id":4439,"depth":253,"text":4440,"children":5047},[5048,5049,5050,5051],{"id":4451,"depth":282,"text":4452},{"id":4484,"depth":282,"text":4485},{"id":4506,"depth":282,"text":4507},{"id":4856,"depth":282,"text":4857},{"id":4868,"depth":253,"text":4869,"children":5053},[5054,5055,5056,5057],{"id":4875,"depth":282,"text":4876},{"id":4929,"depth":282,"text":4930},{"id":4985,"depth":282,"text":4986},{"id":5020,"depth":282,"text":5021},"2025-06-15","LLMs only recently enabled serviceable web agents: autonomous systems that browse web on behalf of a human. Get started with fundamental methodology, key design challenges, and technological opportunities.",{"homepage":1146,"relatedLinks":5061},[5062,5063,5067],{"text":4324,"href":4325,"description":4326},{"text":5064,"href":5065,"description":5066},"Develop an AI Agent for Any Website with Webfuse","/blog/develop-an-ai-agent-for-any-website-with-webfuse","Learn how to develop and deploy a web agent for any website with Webfuse",{"text":4041,"href":5068,"external":1146,"description":4332},"https://dev.webfuse.com/automation-api/",{"title":2738,"description":5059},{"loc":2739},"blog/1011.a-gentle-introduction-to-ai-agents-for-the-web",[2697,4337,4338,2749,4340],"Ky-gggxmZkldeN3wb7OvPpBxNaP72MwefaxFypvbUzY",1777376332646]