[{"data":1,"prerenderedAt":3195},["ShallowReactive",2],{"/blog/webmcp-vs-mcp-whats-the-difference-and-when-to-use-each":3,"related-/blog/webmcp-vs-mcp-whats-the-difference-and-when-to-use-each":829},{"id":4,"title":5,"authorId":6,"body":7,"category":791,"created":792,"description":793,"extension":794,"faqs":795,"featurePriority":805,"head":806,"landingPath":806,"meta":807,"navigation":818,"ogImage":806,"path":819,"robots":806,"schemaOrg":806,"seo":820,"sitemap":821,"stem":822,"tags":823,"__hash__":828},"blog/blog/1045.webmcp-vs-mcp-whats-the-difference-and-when-to-use-each.md","WebMCP vs MCP: What's the Difference, and When to Use Each","salome-koshadze",{"type":8,"value":9,"toc":782},"minimark",[10,14,48,53,56,63,85,96,99,103,110,117,506,509,518,531,534,538,545,551,652,663,667,672,676,681,684,687,692,695,698,702,705,716,720,723,727,730,736,746,749,753,757,763,769,775,778],[11,12,13],"p",{},"If you've been building AI-powered features lately, you've probably already wired up an MCP server or two. Now there's WebMCP, and the name alone creates confusion. Are they competing standards? Is one replacing the other? The short answer: no. They solve different problems at different layers of the stack. Understanding where each fits saves you from over-engineering one side or missing obvious wins on the other.",[15,16,18,25,36,42],"tldr-box",{"title":17},"TL;DR",[11,19,20,24],{},[21,22,23],"strong",{},"MCP is server-side."," It connects agents to databases, APIs, and external services via a JSON-RPC protocol. Mature, production-ready, Linux Foundation-governed.",[11,26,27,30,31,35],{},[21,28,29],{},"WebMCP is browser-side."," It lets web pages expose structured tools to agents through ",[32,33,34],"code",{},"navigator.modelContext"," - no DOM scraping, no screenshots, no guessing.",[11,37,38,41],{},[21,39,40],{},"They're complementary, not competing."," The best architectures use both: WebMCP for in-page interactions, MCP for backend data and services.",[11,43,44,47],{},[21,45,46],{},"WebMCP is still experimental"," - testable in Chrome 146+ Canary behind flags, but not yet a cross-browser standard.",[49,50,52],"h2",{"id":51},"how-mcp-works","How MCP Works",[11,54,55],{},"MCP (Model Context Protocol) was announced by Anthropic in November 2024 and open-sourced immediately. It was built by David Soria Parra and Justin Spahr-Summers, with a design deliberately inspired by the Language Server Protocol: the same idea that standardized editor-to-language-server communication. In December 2025, Anthropic donated it to the Agentic AI Foundation under the Linux Foundation, making it vendor-neutral and community-governed.",[11,57,58,59,62],{},"At its core, MCP is a ",[21,60,61],{},"client-server protocol"," built on JSON-RPC 2.0. An MCP host (Claude Desktop, Cursor, your custom agent app) contains an MCP client that connects to one or more MCP servers. Those servers expose three types of capabilities:",[64,65,66,73,79],"ul",{},[67,68,69,72],"li",{},[21,70,71],{},"Tools:"," callable functions the model can invoke (run a query, call an API, write a file)",[67,74,75,78],{},[21,76,77],{},"Resources:"," read-only context the model can access (documents, database snapshots, API responses)",[67,80,81,84],{},[21,82,83],{},"Prompts:"," reusable templates and workflows",[11,86,87,88,91,92,95],{},"Transport is either STDIO for local servers (fast, low overhead) or Streamable HTTP for remote servers (supports OAuth and bearer tokens). The spec is versioned; the current stable release is ",[32,89,90],{},"2025-11-25",", with a ",[32,93,94],{},"2026-07-28"," release candidate adding stateless operation, Tasks for long-running jobs, and better auth patterns.",[11,97,98],{},"As of Anthropic's December 2025 ecosystem update, the Python and TypeScript SDKs were pulling roughly 97 million monthly downloads combined, with more than 10,000 public servers; the official MCP registry listed around 9,650 by May 2026. On the enterprise side, Stacklok's 2026 survey of software organizations found roughly 41% running MCP servers in limited or broad production.",[49,100,102],{"id":101},"webmcp-the-browser-native-complement","WebMCP: The Browser-Native Complement",[11,104,105,106,109],{},"WebMCP is a W3C Draft Community Group spec, co-authored by engineers from Google Chrome and Microsoft, with an early preview landing in February 2026. It's not a competitor to MCP. It's a browser-native complement that lets ",[21,107,108],{},"web pages act as lightweight MCP-like servers"," using JavaScript and the DOM.",[11,111,112,113,116],{},"The API surface is straightforward. Instead of running a backend server, you call ",[32,114,115],{},"navigator.modelContext.registerTool()"," from within a web page:",[118,119,124],"pre",{"className":120,"code":121,"language":122,"meta":123,"style":123},"language-javascript shiki shiki-themes catppuccin-latte night-owl","navigator.modelContext.registerTool({\n  name: \"submit_support_ticket\",\n  description: \"Creates a support ticket with the provided details\",\n  inputSchema: {\n    type: \"object\",\n    properties: {\n      title: { type: \"string\" },\n      priority: { type: \"string\", enum: [\"low\", \"medium\", \"high\"] },\n      description: { type: \"string\" }\n    },\n    required: [\"title\", \"description\"]\n  },\n  execute: async (params, client) => {\n    const result = await createTicket(params);\n    return { ticketId: result.id, status: \"created\" };\n  }\n});\n","javascript","",[32,125,126,157,181,198,209,226,236,262,324,347,353,382,388,422,452,490,496],{"__ignoreMap":123},[127,128,131,135,139,143,145,149,153],"span",{"class":129,"line":130},"line",1,[127,132,134],{"class":133},"sP4PM","navigator",[127,136,138],{"class":137},"s5FwJ",".",[127,140,142],{"class":141},"sHY1S","modelContext",[127,144,138],{"class":137},[127,146,148],{"class":147},"sNstc","registerTool",[127,150,152],{"class":151},"s2kId","(",[127,154,156],{"class":155},"scGhl","{\n",[127,158,160,163,167,171,175,178],{"class":129,"line":159},2,[127,161,162],{"class":151},"  name",[127,164,166],{"class":165},"sVS64",":",[127,168,170],{"class":169},"sbuKk"," \"",[127,172,174],{"class":173},"sfrMT","submit_support_ticket",[127,176,177],{"class":169},"\"",[127,179,180],{"class":155},",\n",[127,182,184,187,189,191,194,196],{"class":129,"line":183},3,[127,185,186],{"class":151},"  description",[127,188,166],{"class":165},[127,190,170],{"class":169},[127,192,193],{"class":173},"Creates a support ticket with the provided details",[127,195,177],{"class":169},[127,197,180],{"class":155},[127,199,201,204,206],{"class":129,"line":200},4,[127,202,203],{"class":151},"  inputSchema",[127,205,166],{"class":165},[127,207,208],{"class":155}," {\n",[127,210,212,215,217,219,222,224],{"class":129,"line":211},5,[127,213,214],{"class":151},"    type",[127,216,166],{"class":165},[127,218,170],{"class":169},[127,220,221],{"class":173},"object",[127,223,177],{"class":169},[127,225,180],{"class":155},[127,227,229,232,234],{"class":129,"line":228},6,[127,230,231],{"class":151},"    properties",[127,233,166],{"class":165},[127,235,208],{"class":155},[127,237,239,242,244,247,250,252,254,257,259],{"class":129,"line":238},7,[127,240,241],{"class":151},"      title",[127,243,166],{"class":165},[127,245,246],{"class":155}," {",[127,248,249],{"class":151}," type",[127,251,166],{"class":165},[127,253,170],{"class":169},[127,255,256],{"class":173},"string",[127,258,177],{"class":169},[127,260,261],{"class":155}," },\n",[127,263,265,268,270,272,274,276,278,280,282,285,288,290,293,295,298,300,302,304,307,309,311,313,316,318,321],{"class":129,"line":264},8,[127,266,267],{"class":151},"      priority",[127,269,166],{"class":165},[127,271,246],{"class":155},[127,273,249],{"class":151},[127,275,166],{"class":165},[127,277,170],{"class":169},[127,279,256],{"class":173},[127,281,177],{"class":169},[127,283,284],{"class":155},",",[127,286,287],{"class":151}," enum",[127,289,166],{"class":165},[127,291,292],{"class":151}," [",[127,294,177],{"class":169},[127,296,297],{"class":173},"low",[127,299,177],{"class":169},[127,301,284],{"class":155},[127,303,170],{"class":169},[127,305,306],{"class":173},"medium",[127,308,177],{"class":169},[127,310,284],{"class":155},[127,312,170],{"class":169},[127,314,315],{"class":173},"high",[127,317,177],{"class":169},[127,319,320],{"class":151},"] ",[127,322,323],{"class":155},"},\n",[127,325,327,330,332,334,336,338,340,342,344],{"class":129,"line":326},9,[127,328,329],{"class":151},"      description",[127,331,166],{"class":165},[127,333,246],{"class":155},[127,335,249],{"class":151},[127,337,166],{"class":165},[127,339,170],{"class":169},[127,341,256],{"class":173},[127,343,177],{"class":169},[127,345,346],{"class":155}," }\n",[127,348,350],{"class":129,"line":349},10,[127,351,352],{"class":155},"    },\n",[127,354,356,359,361,363,365,368,370,372,374,377,379],{"class":129,"line":355},11,[127,357,358],{"class":151},"    required",[127,360,166],{"class":165},[127,362,292],{"class":151},[127,364,177],{"class":169},[127,366,367],{"class":173},"title",[127,369,177],{"class":169},[127,371,284],{"class":155},[127,373,170],{"class":169},[127,375,376],{"class":173},"description",[127,378,177],{"class":169},[127,380,381],{"class":151},"]\n",[127,383,385],{"class":129,"line":384},12,[127,386,387],{"class":155},"  },\n",[127,389,391,394,396,400,404,408,410,413,416,420],{"class":129,"line":390},13,[127,392,393],{"class":147},"  execute",[127,395,166],{"class":165},[127,397,399],{"class":398},"srhcd"," async",[127,401,403],{"class":402},"sMtgK"," (",[127,405,407],{"class":406},"sIhCM","params",[127,409,284],{"class":155},[127,411,412],{"class":406}," client",[127,414,415],{"class":402},")",[127,417,419],{"class":418},"s76yb"," =>",[127,421,208],{"class":155},[127,423,425,428,432,436,439,442,444,447,449],{"class":129,"line":424},14,[127,426,427],{"class":418},"    const",[127,429,431],{"class":430},"scsc5"," result",[127,433,435],{"class":434},"s-_ek"," =",[127,437,438],{"class":398}," await",[127,440,441],{"class":147}," createTicket",[127,443,152],{"class":151},[127,445,407],{"class":446},"soAP-",[127,448,415],{"class":151},[127,450,451],{"class":155},";\n",[127,453,455,458,460,463,465,467,469,473,475,478,480,482,485,487],{"class":129,"line":454},15,[127,456,457],{"class":398},"    return",[127,459,246],{"class":155},[127,461,462],{"class":151}," ticketId",[127,464,166],{"class":165},[127,466,431],{"class":133},[127,468,138],{"class":137},[127,470,472],{"class":471},"sL4Ga","id",[127,474,284],{"class":155},[127,476,477],{"class":151}," status",[127,479,166],{"class":165},[127,481,170],{"class":169},[127,483,484],{"class":173},"created",[127,486,177],{"class":169},[127,488,489],{"class":155}," };\n",[127,491,493],{"class":129,"line":492},16,[127,494,495],{"class":155},"  }\n",[127,497,499,502,504],{"class":129,"line":498},17,[127,500,501],{"class":155},"}",[127,503,415],{"class":151},[127,505,451],{"class":155},[11,507,508],{},"An in-browser AI agent running in a sidebar, extension, or embedded widget can discover and call that tool without scraping the DOM, guessing at selectors, or issuing vision-model calls to interpret a screenshot. The web app's existing JavaScript logic runs directly.",[510,511],"nuxt-picture",{":height":512,":width":513,"alt":514,"loading":515,"src":516,"format":517},"1934","3814","Screenshot of the WebMCP Inspector tool showing registered tools, input schemas, and live execution in the browser","lazy","/blog/webmcp-vs-mcp-whats-the-difference-and-when-to-use-each/5.png","webp",[11,519,520],{},[521,522,523,530],"em",{},[524,525,529],"a",{"href":526,"rel":527},"https://webmcpinspector.com/",[528],"nofollow","WebMCP Inspector"," - browse, test, and execute WebMCP tools registered on any page, directly in your browser.",[11,532,533],{},"A declarative HTML API is also in development, letting you annotate forms and actions so browsers can synthesize tool schemas automatically. That part is still marked TODO in the spec, but the imperative API is already testable in Chrome 146+ Canary behind flags, with polyfills available for broader support.",[49,535,537],{"id":536},"the-core-architectural-difference","The Core Architectural Difference",[510,539],{":height":540,":width":541,"alt":542,"loading":515,"src":543,"provider":544},"500","900","Architecture stack diagram comparing MCP server-side layers with WebMCP browser-side layers","/blog/webmcp-vs-mcp-whats-the-difference-and-when-to-use-each/1.svg","none",[11,546,547,548,138],{},"The practical gap between the two comes down to ",[21,549,550],{},"where execution happens and what you're connecting to",[552,553,554,570],"table",{},[555,556,557],"thead",{},[558,559,560,564,567],"tr",{},[561,562],"th",{"align":563},"left",[561,565,566],{"align":563},"MCP",[561,568,569],{"align":563},"WebMCP",[571,572,573,587,600,613,626,639],"tbody",{},[558,574,575,581,584],{},[576,577,578],"td",{"align":563},[21,579,580],{},"Execution",[576,582,583],{"align":563},"Backend server process",[576,585,586],{"align":563},"JavaScript running in the page",[558,588,589,594,597],{},[576,590,591],{"align":563},[21,592,593],{},"Transport",[576,595,596],{"align":563},"STDIO or Streamable HTTP",[576,598,599],{"align":563},"Browser-mediated (same-origin)",[558,601,602,607,610],{},[576,603,604],{"align":563},[21,605,606],{},"Data access",[576,608,609],{"align":563},"Databases, filesystems, external APIs",[576,611,612],{"align":563},"DOM state, in-page business logic",[558,614,615,620,623],{},[576,616,617],{"align":563},[21,618,619],{},"Connection model",[576,621,622],{"align":563},"Persistent, stateful sessions",[576,624,625],{"align":563},"Per-page, event-driven",[558,627,628,633,636],{},[576,629,630],{"align":563},[21,631,632],{},"Auth",[576,634,635],{"align":563},"OAuth, bearer tokens, headers",[576,637,638],{"align":563},"Browser permissions policy, HTTPS",[558,640,641,646,649],{},[576,642,643],{"align":563},[21,644,645],{},"Status",[576,647,648],{"align":563},"Production, LF-governed",[576,650,651],{"align":563},"Experimental, CG draft",[11,653,654,655,658,659,662],{},"MCP is built for connecting agents to ",[21,656,657],{},"data and services that live outside the browser",": your Postgres instance, internal APIs, file systems, third-party SaaS. WebMCP is built for connecting agents to ",[21,660,661],{},"what's already rendered in a browser tab",": a form the user has partially filled out, live product inventory fetched by the page, a booking widget with its own state machine.",[510,664],{":height":540,":width":541,"alt":665,"loading":515,"src":666,"provider":544},"Side-by-side comparison card showing MCP versus WebMCP capabilities and use cases","/blog/webmcp-vs-mcp-whats-the-difference-and-when-to-use-each/2.svg",[668,669],"article-signup-cta",{"heading":670,"subtitle":671},"Make Any Website Agent-Ready","Webfuse turns any website into a shared, agent-controllable surface with zero code. Pair it with WebMCP and MCP to ship agentic customer journeys in days, not months - on the platform every customer already has: the browser.",[49,673,675],{"id":674},"when-to-use-each","When to Use Each",[11,677,678],{},[21,679,680],{},"MCP is the right tool when:",[11,682,683],{},"Your agent needs to read from or write to persistent data stores. This is the bulk of enterprise agentic work: querying a CRM, writing records to a database, pulling context from internal docs, running code execution environments. The ecosystem already has reference servers for GitHub, Google Drive, Postgres, Slack, Salesforce, and dozens more. If it lives on a server, MCP is the right abstraction.",[11,685,686],{},"It's also the right choice for multi-step, long-running workflows. The Tasks primitive in the 2026 RC spec handles jobs that span minutes or hours, with progress notifications and cancellation support. Those are things you simply can't manage from a browser page's lifecycle.",[11,688,689],{},[21,690,691],{},"WebMCP is the right tool when:",[11,693,694],{},"You're building a website and want AI agents to interact with it reliably. Think e-commerce checkouts, support ticket flows, travel booking, multi-step onboarding forms. Today, browser agents either manipulate the DOM directly (fragile, breaks on layout changes) or use vision models to interpret screenshots (slow, expensive, imprecise). WebMCP gives your app a clean API surface that agents can call with confidence, using the same business logic that powers your regular UI.",[11,696,697],{},"It's also useful for collaborative user+agent workflows where both are active in the same interface at the same time. The agent can call a registered tool to pre-fill a form or fetch account details, while the user reviews and confirms before submission.",[49,699,701],{"id":700},"using-them-together","Using Them Together",[11,703,704],{},"The strongest setups use both. A browser agent session can call WebMCP tools exposed by the page, and those tools can in turn call your MCP backend for data that the page alone can't provide.",[11,706,707,708,711,712,715],{},"A realistic example: a travel booking site registers a WebMCP tool called ",[32,709,710],{},"search_available_flights",". When an agent calls it, the tool's ",[32,713,714],{},"execute"," callback fires server-side logic (via your normal API), which may itself connect through an MCP server to an inventory database or a GDS like Amadeus. The agent gets clean structured results. The user sees the same results rendered in the UI they're already looking at. No scraping, no fragile coordinate-based clicking.",[510,717],{":height":540,":width":541,"alt":718,"loading":515,"src":719,"provider":544},"Flow diagram showing how WebMCP tools and MCP backend servers work together in a single agentic session","/blog/webmcp-vs-mcp-whats-the-difference-and-when-to-use-each/3.svg",[11,721,722],{},"This pattern keeps the browser concerns (UI state, user session, page logic) firmly in WebMCP territory, and the data/service concerns in MCP territory. Neither bleeds into the other.",[49,724,726],{"id":725},"security-considerations-worth-knowing","Security Considerations Worth Knowing",[11,728,729],{},"Both specs put user consent front and center, but the threat models differ.",[11,731,732,735],{},[21,733,734],{},"MCP's main risks"," are at the server layer: tool poisoning (a malicious server returns instructions that hijack the agent), unauthorized data access if OAuth scopes are too broad, and the general problem of agents acting on ambiguous instructions in ways users didn't intend. The spec doesn't enforce consent at the protocol level, so implementers must build those approval flows themselves; this is why early production guidance consistently stresses the same safeguards: explicit tool allowlists, scoped OAuth permissions, and audit logging.",[11,737,738,741,742,745],{},[21,739,740],{},"WebMCP's main risks"," are at the browser layer: prompt injection through page content (a malicious site injects text that manipulates the agent's next action), same-origin isolation (tools can only call code within the page's own origin), and the challenge of scoping agent permissions without making consent flows so disruptive that users dismiss them automatically. The spec uses the browser's existing permissions policy mechanism (",[32,743,744],{},"Permissions-Policy: tools=(self)","), which is a reasonable foundation, but the ecosystem hasn't had time to stress-test it in production.",[11,747,748],{},"One thing both share: the consent UX is hard. An agent that asks for permission on every tool call is annoying. One that never asks is risky. Neither spec fully solves this; it's an open design problem for both browser vendors and MCP server authors.",[49,750,752],{"id":751},"the-practical-decision","The Practical Decision",[510,754],{":height":540,":width":541,"alt":755,"loading":515,"src":756,"provider":544},"Decision flow diagram for choosing between MCP and WebMCP based on where the agent task lives","/blog/webmcp-vs-mcp-whats-the-difference-and-when-to-use-each/4.svg",[11,758,759,762],{},[21,760,761],{},"Start with MCP"," if your agent needs to read or write anything that isn't rendered in a browser: data sources, APIs, file systems, third-party services. The tooling is mature, the SDKs are solid, and the ecosystem has enough reference implementations that you rarely have to start from scratch.",[11,764,765,768],{},[21,766,767],{},"Add WebMCP"," if you're also building or maintaining a web application that agents will interact with. Registering tools in your web app now, even behind a flag, gets you ahead of the shift toward agents expecting reliable, structured web interfaces rather than DOM scraping.",[11,770,771,774],{},[21,772,773],{},"Skip WebMCP for now"," if your use case is entirely backend or CLI-based, or if your browser agent needs are already covered by existing MCP tooling. The spec is still experimental, Chrome is the only engine running it (behind flags), and production deployments aren't common yet.",[11,776,777],{},"These two standards are converging toward a world where agents have consistent interfaces at every layer: backend services through MCP, web applications through WebMCP, with JSON Schema as the shared language for tool definitions across both. Getting familiar with both now means you won't be caught retrofitting when adoption catches up.",[779,780,781],"style",{},"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 .scGhl, html code.shiki .scGhl{--shiki-default:#7C7F93;--shiki-dark:#D6DEEB}html pre.shiki code .sVS64, html code.shiki .sVS64{--shiki-default:#179299;--shiki-dark:#D6DEEB}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 .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 .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 .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 .soAP-, html code.shiki .soAP-{--shiki-default:#4C4F69;--shiki-dark:#D7DBE0}html pre.shiki code .sL4Ga, html code.shiki .sL4Ga{--shiki-default:#4C4F69;--shiki-dark:#BAEBE2}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);}",{"title":123,"searchDepth":159,"depth":159,"links":783},[784,785,786,787,788,789,790],{"id":51,"depth":159,"text":52},{"id":101,"depth":159,"text":102},{"id":536,"depth":159,"text":537},{"id":674,"depth":159,"text":675},{"id":700,"depth":159,"text":701},{"id":725,"depth":159,"text":726},{"id":751,"depth":159,"text":752},"ai-agents","2026-06-16","MCP and WebMCP are not the same thing. Learn the architectural difference, when to use each, and how to combine them - from server-side tool access with MCP to browser-native structured interaction with WebMCP.","md",[796,799,802],{"question":797,"answer":798},"What is the difference between WebMCP and MCP?","MCP connects AI agents to tools and services outside the browser - databases, APIs, file systems - via a server-side JSON-RPC protocol. WebMCP is a browser-native complement that lets web pages expose structured tools to agents through navigator.modelContext, so agents can interact with a page's existing JavaScript logic without scraping the DOM.",{"question":800,"answer":801},"Can you use WebMCP and MCP together?","Yes - and for many agentic web experiences, using both is the right call. A browser agent can call WebMCP tools registered by the page, and those tools can in turn call an MCP backend for data the page alone cannot provide. The browser concerns stay in WebMCP territory; the data and service concerns stay in MCP territory.",{"question":803,"answer":804},"Is WebMCP production-ready?","Not yet for broad deployment. The imperative API is testable in Chrome 146+ Canary behind flags, but WebMCP is still an experimental W3C Draft Community Group spec. MCP, by contrast, is mature, Linux Foundation-governed, and already running in production at dozens of enterprises.",0,null,{"shortTitle":808,"relatedLinks":809},"WebMCP vs MCP",[810,814],{"text":811,"href":812,"description":813},"What Is WebMCP?","/blog/what-is-webmcp-the-practical-guide-to-the-web-model-context-protocol","A practical guide to the Web Model Context Protocol and how websites expose tools directly to AI agents.",{"text":815,"href":816,"description":817},"The Web Is the Platform","/blog/the-web-is-the-platform-how-webmcp-makes-agentic-customer-journeys-instant","How combining Webfuse co-browsing, WebMCP, and a voice agent turns the browser into the fastest path to agentic customer journeys.",true,"/blog/webmcp-vs-mcp-whats-the-difference-and-when-to-use-each",{"title":5,"description":793},{"loc":819},"blog/1045.webmcp-vs-mcp-whats-the-difference-and-when-to-use-each",[824,825,791,826,827],"webmcp","mcp","browser-automation","web-agents","Rqk_Z0Cp69-gSvC0JWQqLTiiRwM0L1NMe5F4e0eNcSY",[830,2453],{"id":831,"title":832,"authorId":833,"body":834,"category":791,"created":2429,"description":2430,"extension":794,"faqs":806,"featurePriority":806,"head":806,"landingPath":806,"meta":2431,"navigation":818,"ogImage":806,"path":2443,"robots":806,"schemaOrg":806,"seo":2444,"sitemap":2445,"stem":2446,"tags":2447,"__hash__":2452},"blog/blog/1012.dom-downsampling-for-llm-based-web-agents.md","DOM Downsampling for LLM-Based Web Agents","thassilo-schiepanski",{"type":8,"value":835,"toc":2414},[836,840,863,867,874,879,894,898,904,908,926,952,955,959,962,973,979,1010,1014,1033,1045,1050,1066,1080,1083,1087,1107,1111,1119,1131,1135,1138,1507,1513,1520,1684,1691,1782,1789,1861,1870,1876,1885,1889,1895,1905,1917,2140,2158,2180,2186,2229,2233,2245,2254,2259,2264,2267,2271,2277,2282,2320,2324,2330,2334,2344,2348,2351,2411],[510,837],{":width":541,"alt":838,"format":517,"loading":515,"src":839},"Downsampling visualised for digital images and HTML","/blog/dom-downsampling-for-web-agents/1.png",[11,841,842,847,848,847,853,858,859,862],{},[524,843,846],{"href":844,"rel":845},"https://operator.chatgpt.com",[528],"Operator (OpenAI)",", ",[524,849,852],{"href":850,"rel":851},"https://www.director.ai",[528],"Director (Browserbase)",[524,854,857],{"href":855,"rel":856},"https://browser-use.com",[528],"Browser Use"," – we are currently witnessing the rise of ",[21,860,861],{},"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.",[49,864,866],{"id":865},"what-is-a-snapshot","What is a Snapshot?",[11,868,869,870,873],{},"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,871,872],{},"snapshot",". And the snapshot technique primarily decides the quality of LLM interaction suggestions.",[875,876,878],"h3",{"id":877},"gui-snapshots","GUI Snapshots",[11,880,881,882,885,886,889,890,893],{},"Screenshots – for consistency reasons referred to as ",[21,883,884],{},"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 ",[521,887,888],{},"“click at 100, 735”",". As a workaround, early web agents used ",[521,891,892],{},"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.",[510,895],{":width":541,"alt":896,"format":517,"loading":515,"src":897},"Grounded GUI snapshot as implemented by Browser Use","/blog/dom-downsampling-for-web-agents/2.png",[11,899,900],{},[901,902,903],"small",{},"Grounded GUI snapshot as implemented by Browser Use.",[875,905,907],{"id":906},"dom-snapshots","DOM Snapshots",[11,909,910,911,921,922,925],{},"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",[912,913,914],"sup",{},[524,915,920],{"href":916,"ariaDescribedBy":917,"dataFootnoteRef":123,"id":919},"#user-content-fn-1",[918],"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,923,924],{},"DOM snapshots"," offer a compelling alternative to GUI snapshots. DOM snapshots offer a handful of key advantages:",[927,928,929,932,935,938,941],"ol",{},[67,930,931],{},"DOM snapshots connect with LLM code (HTML) interpretation abilities.",[67,933,934],{},"DOM snapshots can be compiled from deep clones, hidden from supervision (unlike GUI grounding).",[67,936,937],{},"DOM snapshots render text input that on average consume less bandwidth than screnshots.",[67,939,940],{},"DOM snapshots allow for exact programmatic targeting of elements (e.g., via CSS selectors).",[67,942,943,944,947,948,951],{},"DOM snapshots are available with the ",[32,945,946],{},"DOMContentLoaded"," event (whereas the GUI completes initial rendering with ",[32,949,950],{},"load",").",[11,953,954],{},"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?).",[49,956,958],{"id":957},"dom-downsampling-a-novel-approach","DOM Downsampling: A Novel Approach",[11,960,961],{},"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,963,964,965,968,969,972],{},"We transfer the concept of ",[21,966,967],{},"downsampling"," to ",[21,970,971],{},"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.",[49,974,976],{"id":975},"d2snap",[521,977,978],{},"D2Snap",[11,980,981,982,990,998,1006,1007,1009],{},"We recently proposed ",[524,983,986],{"href":984,"rel":985},"https://arxiv.org/abs/2508.04412",[528],[21,987,988],{},[521,989,978],{},[912,991,992],{},[524,993,997],{"href":994,"ariaDescribedBy":995,"dataFootnoteRef":123,"id":996},"#user-content-fn-2",[918],"user-content-fnref-2","2",[912,999,1000],{},[524,1001,1005],{"href":1002,"ariaDescribedBy":1003,"dataFootnoteRef":123,"id":1004},"#user-content-fn-3",[918],"user-content-fnref-3","3"," – a first-of-its-kind downsampling algorithm for DOMs. Herein, we'll briefly explain how the ",[521,1008,978],{}," algorithm works, and how it can be utilised to build efficient and performant web agents.",[875,1011,1013],{"id":1012},"how-it-works","How it works",[11,1015,1016,1017,1019,1020,847,1023,1026,1027,403,1030,951],{},"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. ",[521,1018,978],{}," downsamples at a variable ratio, configured through procedure-specific parameters  ",[32,1021,1022],{},"k",[32,1024,1025],{},"l",", and ",[32,1028,1029],{},"m",[32,1031,1032],{},"∈ [0, 1]",[1034,1035,1036],"blockquote",{},[11,1037,1038,1039,1044],{},"We used ",[524,1040,1043],{"href":1041,"rel":1042},"https://openai.com/index/hello-gpt-4o/",[528],"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.",[1046,1047,1049],"h4",{"id":1048},"procedure-elements","Procedure: Elements",[11,1051,1052,1054,1055,1058,1059,1062,1063,1065],{},[521,1053,978],{}," downsamples (simplifies) elements by merging container elements like ",[32,1056,1057],{},"section"," and ",[32,1060,1061],{},"div"," together. A parameter ",[32,1064,1022],{}," 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,1067,1068,1069,847,1071,1073,1074,1079],{},"Elements in content elements (",[32,1070,11],{},[32,1072,1034],{},", ...) are translated to a more comprehensive ",[524,1075,1078],{"href":1076,"rel":1077},"https://www.markdownguide.org/basic-syntax/",[528],"Markdown"," representation.",[11,1081,1082],{},"Interactive elements, definite interaction target candidates, are kept as is.",[1046,1084,1086],{"id":1085},"procedure-text","Procedure: Text",[11,1088,1089,1091,1092,1095,1103,1104,1106],{},[521,1090,978],{}," downsamples text by dropping a fraction. Natural units of text are space-separated words, or punctuation-separated sentences. We reuse the ",[521,1093,1094],{},"TextRank",[912,1096,1097],{},[524,1098,1102],{"href":1099,"ariaDescribedBy":1100,"dataFootnoteRef":123,"id":1101},"#user-content-fn-4",[918],"user-content-fnref-4","4"," algorithm to rank sentences in text nodes. The lowest-ranking fraction of sentences, denoted by parameter ",[32,1105,1025],{},", is dropped.",[1046,1108,1110],{"id":1109},"procedure-attributes","Procedure: Attributes",[11,1112,1113,1115,1116,1118],{},[521,1114,978],{}," downsamples attributes by dropping those with a name that, according to ground truth, holds a UI feature degree below a threshold. Parameter ",[32,1117,1029],{}," denotes this threshold.",[1034,1120,1121],{},[11,1122,1123,1124,1130],{},"Check out the ",[524,1125,1127,1129],{"href":984,"rel":1126},[528],[521,1128,978],{}," paper"," to learn about the algorithm in-depth.",[875,1132,1134],{"id":1133},"example-of-a-downsampled-dom","Example of a Downsampled DOM",[11,1136,1137],{},"Consider a partial DOM state, serialised as HTML:",[118,1139,1143],{"className":1140,"code":1141,"language":1142,"meta":123,"style":123},"language-html shiki shiki-themes catppuccin-latte night-owl","\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","html",[32,1144,1145,1205,1248,1269,1277,1297,1315,1323,1328,1333,1342,1370,1379,1397,1414,1422,1427,1432,1442,1469,1478,1488,1498],{"__ignoreMap":123},[127,1146,1147,1151,1154,1158,1161,1163,1166,1168,1171,1173,1175,1177,1179,1182,1184,1186,1189,1191,1193,1195,1197,1200,1202],{"class":129,"line":130},[127,1148,1150],{"class":1149},"s9rnR","\u003C",[127,1152,1057],{"class":1153},"sY2RG",[127,1155,1157],{"class":1156},"swkLt"," class",[127,1159,1160],{"class":1149},"=",[127,1162,177],{"class":169},[127,1164,1165],{"class":173},"container",[127,1167,177],{"class":169},[127,1169,1170],{"class":1156}," tabindex",[127,1172,1160],{"class":1149},[127,1174,177],{"class":169},[127,1176,1005],{"class":173},[127,1178,177],{"class":169},[127,1180,1181],{"class":1156}," required",[127,1183,1160],{"class":1149},[127,1185,177],{"class":169},[127,1187,1188],{"class":173},"true",[127,1190,177],{"class":169},[127,1192,249],{"class":1156},[127,1194,1160],{"class":1149},[127,1196,177],{"class":169},[127,1198,1199],{"class":173},"example",[127,1201,177],{"class":169},[127,1203,1204],{"class":1149},">\n",[127,1206,1207,1210,1212,1214,1216,1218,1221,1223,1226,1228,1230,1233,1235,1237,1239,1241,1244,1246],{"class":129,"line":159},[127,1208,1209],{"class":1149},"  \u003C",[127,1211,1061],{"class":1153},[127,1213,1157],{"class":1156},[127,1215,1160],{"class":1149},[127,1217,177],{"class":169},[127,1219,1220],{"class":173},"mx-auto",[127,1222,177],{"class":169},[127,1224,1225],{"class":1156}," data-topic",[127,1227,1160],{"class":1149},[127,1229,177],{"class":169},[127,1231,1232],{"class":173},"products",[127,1234,177],{"class":169},[127,1236,1181],{"class":1156},[127,1238,1160],{"class":1149},[127,1240,177],{"class":169},[127,1242,1243],{"class":173},"false",[127,1245,177],{"class":169},[127,1247,1204],{"class":1149},[127,1249,1250,1253,1256,1259,1262,1265,1267],{"class":129,"line":183},[127,1251,1252],{"class":1149},"    \u003C",[127,1254,1255],{"class":1153},"h1",[127,1257,1258],{"class":1149},">",[127,1260,1261],{"class":151},"Our Pizza",[127,1263,1264],{"class":1149},"\u003C/",[127,1266,1255],{"class":1153},[127,1268,1204],{"class":1149},[127,1270,1271,1273,1275],{"class":129,"line":200},[127,1272,1252],{"class":1149},[127,1274,1061],{"class":1153},[127,1276,1204],{"class":1149},[127,1278,1279,1282,1284,1286,1288,1290,1293,1295],{"class":129,"line":211},[127,1280,1281],{"class":1149},"      \u003C",[127,1283,1061],{"class":1153},[127,1285,1157],{"class":1156},[127,1287,1160],{"class":1149},[127,1289,177],{"class":169},[127,1291,1292],{"class":173},"shadow-lg",[127,1294,177],{"class":169},[127,1296,1204],{"class":1149},[127,1298,1299,1302,1304,1306,1309,1311,1313],{"class":129,"line":228},[127,1300,1301],{"class":1149},"        \u003C",[127,1303,49],{"class":1153},[127,1305,1258],{"class":1149},[127,1307,1308],{"class":151},"Margherita",[127,1310,1264],{"class":1149},[127,1312,49],{"class":1153},[127,1314,1204],{"class":1149},[127,1316,1317,1319,1321],{"class":129,"line":238},[127,1318,1301],{"class":1149},[127,1320,11],{"class":1153},[127,1322,1204],{"class":1149},[127,1324,1325],{"class":129,"line":264},[127,1326,1327],{"class":151},"          A simple classic: mozzarela, tomatoes and basil.\n",[127,1329,1330],{"class":129,"line":326},[127,1331,1332],{"class":151},"          An everyday choice!\n",[127,1334,1335,1338,1340],{"class":129,"line":349},[127,1336,1337],{"class":1149},"        \u003C/",[127,1339,11],{"class":1153},[127,1341,1204],{"class":1149},[127,1343,1344,1346,1349,1351,1353,1355,1357,1359,1361,1364,1366,1368],{"class":129,"line":355},[127,1345,1301],{"class":1149},[127,1347,1348],{"class":1153},"button",[127,1350,249],{"class":1156},[127,1352,1160],{"class":1149},[127,1354,177],{"class":169},[127,1356,1348],{"class":173},[127,1358,177],{"class":169},[127,1360,1258],{"class":1149},[127,1362,1363],{"class":151},"Add",[127,1365,1264],{"class":1149},[127,1367,1348],{"class":1153},[127,1369,1204],{"class":1149},[127,1371,1372,1375,1377],{"class":129,"line":384},[127,1373,1374],{"class":1149},"      \u003C/",[127,1376,1061],{"class":1153},[127,1378,1204],{"class":1149},[127,1380,1381,1383,1385,1387,1389,1391,1393,1395],{"class":129,"line":390},[127,1382,1281],{"class":1149},[127,1384,1061],{"class":1153},[127,1386,1157],{"class":1156},[127,1388,1160],{"class":1149},[127,1390,177],{"class":169},[127,1392,1292],{"class":173},[127,1394,177],{"class":169},[127,1396,1204],{"class":1149},[127,1398,1399,1401,1403,1405,1408,1410,1412],{"class":129,"line":424},[127,1400,1301],{"class":1149},[127,1402,49],{"class":1153},[127,1404,1258],{"class":1149},[127,1406,1407],{"class":151},"Capricciosa",[127,1409,1264],{"class":1149},[127,1411,49],{"class":1153},[127,1413,1204],{"class":1149},[127,1415,1416,1418,1420],{"class":129,"line":454},[127,1417,1301],{"class":1149},[127,1419,11],{"class":1153},[127,1421,1204],{"class":1149},[127,1423,1424],{"class":129,"line":492},[127,1425,1426],{"class":151},"          A rich taste: mozzarella, ham, mushrooms, artichokes, and olives.\n",[127,1428,1429],{"class":129,"line":498},[127,1430,1431],{"class":151},"          A true favourite!\n",[127,1433,1435,1438,1440],{"class":129,"line":1434},18,[127,1436,1437],{"class":1149},"          \u003C/",[127,1439,11],{"class":1153},[127,1441,1204],{"class":1149},[127,1443,1445,1447,1449,1451,1453,1455,1457,1459,1461,1463,1465,1467],{"class":129,"line":1444},19,[127,1446,1301],{"class":1149},[127,1448,1348],{"class":1153},[127,1450,249],{"class":1156},[127,1452,1160],{"class":1149},[127,1454,177],{"class":169},[127,1456,1348],{"class":173},[127,1458,177],{"class":169},[127,1460,1258],{"class":1149},[127,1462,1363],{"class":151},[127,1464,1264],{"class":1149},[127,1466,1348],{"class":1153},[127,1468,1204],{"class":1149},[127,1470,1472,1474,1476],{"class":129,"line":1471},20,[127,1473,1374],{"class":1149},[127,1475,1061],{"class":1153},[127,1477,1204],{"class":1149},[127,1479,1481,1484,1486],{"class":129,"line":1480},21,[127,1482,1483],{"class":1149},"    \u003C/",[127,1485,1061],{"class":1153},[127,1487,1204],{"class":1149},[127,1489,1491,1494,1496],{"class":129,"line":1490},22,[127,1492,1493],{"class":1149},"  \u003C/",[127,1495,1061],{"class":1153},[127,1497,1204],{"class":1149},[127,1499,1501,1503,1505],{"class":129,"line":1500},23,[127,1502,1264],{"class":1149},[127,1504,1057],{"class":1153},[127,1506,1204],{"class":1149},[11,1508,1509,1510,1512],{},"Here are some ",[521,1511,978],{}," downsampling results, which are based on different parametric configurations. A percentage denotes the reduced size.",[1046,1514,1516,1519],{"id":1515},"k3-l3-m3-55",[32,1517,1518],{},"k=.3, l=.3, m=.3"," (55%)",[118,1521,1523],{"className":1140,"code":1522,"language":1142,"meta":123,"style":123},"\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",[32,1524,1525,1573,1578,1596,1601,1606,1632,1637,1642,1668,1676],{"__ignoreMap":123},[127,1526,1527,1529,1531,1533,1535,1537,1539,1541,1543,1545,1547,1549,1551,1553,1555,1557,1559,1561,1563,1565,1567,1569,1571],{"class":129,"line":130},[127,1528,1150],{"class":1149},[127,1530,1057],{"class":1153},[127,1532,1170],{"class":1156},[127,1534,1160],{"class":1149},[127,1536,177],{"class":169},[127,1538,1005],{"class":173},[127,1540,177],{"class":169},[127,1542,249],{"class":1156},[127,1544,1160],{"class":1149},[127,1546,177],{"class":169},[127,1548,1199],{"class":173},[127,1550,177],{"class":169},[127,1552,1157],{"class":1156},[127,1554,1160],{"class":1149},[127,1556,177],{"class":169},[127,1558,1165],{"class":173},[127,1560,177],{"class":169},[127,1562,1181],{"class":1156},[127,1564,1160],{"class":1149},[127,1566,177],{"class":169},[127,1568,1188],{"class":173},[127,1570,177],{"class":169},[127,1572,1204],{"class":1149},[127,1574,1575],{"class":129,"line":159},[127,1576,1577],{"class":151},"  # Our Pizza\n",[127,1579,1580,1582,1584,1586,1588,1590,1592,1594],{"class":129,"line":183},[127,1581,1209],{"class":1149},[127,1583,1061],{"class":1153},[127,1585,1157],{"class":1156},[127,1587,1160],{"class":1149},[127,1589,177],{"class":169},[127,1591,1292],{"class":173},[127,1593,177],{"class":169},[127,1595,1204],{"class":1149},[127,1597,1598],{"class":129,"line":200},[127,1599,1600],{"class":151},"    ## Margherita\n",[127,1602,1603],{"class":129,"line":211},[127,1604,1605],{"class":151},"    A simple classic: mozzarela, tomatoes, and basil.\n",[127,1607,1608,1610,1612,1614,1616,1618,1620,1622,1624,1626,1628,1630],{"class":129,"line":228},[127,1609,1252],{"class":1149},[127,1611,1348],{"class":1153},[127,1613,249],{"class":1156},[127,1615,1160],{"class":1149},[127,1617,177],{"class":169},[127,1619,1348],{"class":173},[127,1621,177],{"class":169},[127,1623,1258],{"class":1149},[127,1625,1363],{"class":151},[127,1627,1264],{"class":1149},[127,1629,1348],{"class":1153},[127,1631,1204],{"class":1149},[127,1633,1634],{"class":129,"line":238},[127,1635,1636],{"class":151},"    ## Capricciosa\n",[127,1638,1639],{"class":129,"line":264},[127,1640,1641],{"class":151},"    A rich taste: mozzarella, ham, mushrooms, artichokes, and olives.\n",[127,1643,1644,1646,1648,1650,1652,1654,1656,1658,1660,1662,1664,1666],{"class":129,"line":326},[127,1645,1252],{"class":1149},[127,1647,1348],{"class":1153},[127,1649,249],{"class":1156},[127,1651,1160],{"class":1149},[127,1653,177],{"class":169},[127,1655,1348],{"class":173},[127,1657,177],{"class":169},[127,1659,1258],{"class":1149},[127,1661,1363],{"class":151},[127,1663,1264],{"class":1149},[127,1665,1348],{"class":1153},[127,1667,1204],{"class":1149},[127,1669,1670,1672,1674],{"class":129,"line":349},[127,1671,1493],{"class":1149},[127,1673,1061],{"class":1153},[127,1675,1204],{"class":1149},[127,1677,1678,1680,1682],{"class":129,"line":355},[127,1679,1264],{"class":1149},[127,1681,1057],{"class":1153},[127,1683,1204],{"class":1149},[1046,1685,1687,1690],{"id":1686},"k4-l6-m8-27",[32,1688,1689],{},"k=.4, l=.6, m=.8"," (27%)",[118,1692,1694],{"className":1140,"code":1693,"language":1142,"meta":123,"style":123},"\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",[32,1695,1696,1704,1708,1716,1720,1725,1741,1745,1750,1766,1774],{"__ignoreMap":123},[127,1697,1698,1700,1702],{"class":129,"line":130},[127,1699,1150],{"class":1149},[127,1701,1057],{"class":1153},[127,1703,1204],{"class":1149},[127,1705,1706],{"class":129,"line":159},[127,1707,1577],{"class":151},[127,1709,1710,1712,1714],{"class":129,"line":183},[127,1711,1209],{"class":1149},[127,1713,1061],{"class":1153},[127,1715,1204],{"class":1149},[127,1717,1718],{"class":129,"line":200},[127,1719,1600],{"class":151},[127,1721,1722],{"class":129,"line":211},[127,1723,1724],{"class":151},"    A simple classic:\n",[127,1726,1727,1729,1731,1733,1735,1737,1739],{"class":129,"line":228},[127,1728,1252],{"class":1149},[127,1730,1348],{"class":1153},[127,1732,1258],{"class":1149},[127,1734,1363],{"class":151},[127,1736,1264],{"class":1149},[127,1738,1348],{"class":1153},[127,1740,1204],{"class":1149},[127,1742,1743],{"class":129,"line":238},[127,1744,1636],{"class":151},[127,1746,1747],{"class":129,"line":264},[127,1748,1749],{"class":151},"    A rich taste:\n",[127,1751,1752,1754,1756,1758,1760,1762,1764],{"class":129,"line":326},[127,1753,1252],{"class":1149},[127,1755,1348],{"class":1153},[127,1757,1258],{"class":1149},[127,1759,1363],{"class":151},[127,1761,1264],{"class":1149},[127,1763,1348],{"class":1153},[127,1765,1204],{"class":1149},[127,1767,1768,1770,1772],{"class":129,"line":349},[127,1769,1493],{"class":1149},[127,1771,1061],{"class":1153},[127,1773,1204],{"class":1149},[127,1775,1776,1778,1780],{"class":129,"line":355},[127,1777,1264],{"class":1149},[127,1779,1057],{"class":1153},[127,1781,1204],{"class":1149},[1046,1783,1785,1788],{"id":1784},"k-l0-m-35",[32,1786,1787],{},"k→∞, l=0, ∀m"," (35%)",[118,1790,1792],{"className":1140,"code":1791,"language":1142,"meta":123,"style":123},"# 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",[32,1793,1794,1799,1804,1809,1814,1830,1835,1840,1845],{"__ignoreMap":123},[127,1795,1796],{"class":129,"line":130},[127,1797,1798],{"class":151},"# Our Pizza\n",[127,1800,1801],{"class":129,"line":159},[127,1802,1803],{"class":151},"## Margherita\n",[127,1805,1806],{"class":129,"line":183},[127,1807,1808],{"class":151},"A simple classic: mozzarela, tomatoes, and basil.\n",[127,1810,1811],{"class":129,"line":200},[127,1812,1813],{"class":151},"An everyday choice!\n",[127,1815,1816,1818,1820,1822,1824,1826,1828],{"class":129,"line":211},[127,1817,1150],{"class":1149},[127,1819,1348],{"class":1153},[127,1821,1258],{"class":1149},[127,1823,1363],{"class":151},[127,1825,1264],{"class":1149},[127,1827,1348],{"class":1153},[127,1829,1204],{"class":1149},[127,1831,1832],{"class":129,"line":228},[127,1833,1834],{"class":151},"## Capricciosa\n",[127,1836,1837],{"class":129,"line":238},[127,1838,1839],{"class":151},"A rich taste: mozzarella, ham, mushrooms, artichokes, and olives.\n",[127,1841,1842],{"class":129,"line":264},[127,1843,1844],{"class":151},"A true favourite!\n",[127,1846,1847,1849,1851,1853,1855,1857,1859],{"class":129,"line":326},[127,1848,1150],{"class":1149},[127,1850,1348],{"class":1153},[127,1852,1258],{"class":1149},[127,1854,1363],{"class":151},[127,1856,1264],{"class":1149},[127,1858,1348],{"class":1153},[127,1860,1204],{"class":1149},[11,1862,1863,1864,1866,1867,1869],{},"Asymptotic ",[32,1865,1022],{}," (kind of 'infinite' ",[32,1868,1022],{},") 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.",[875,1871,1873],{"id":1872},"adaptived2snap",[521,1874,1875],{},"AdaptiveD2Snap",[11,1877,1878,1879,1881,1882,1884],{},"Fixed parameters might not be ideal for arbitrary DOMs – sourced from a landscape of web applications. We created ",[521,1880,1875],{}," – a wrapper for ",[521,1883,978],{}," that infers suitable parameters from a given DOM in order to hit a certain token budget.",[875,1886,1888],{"id":1887},"implementation-integration","Implementation & Integration",[11,1890,1891,1892,1894],{},"Picture an LLM-based weg agent that is premised on DOM snapshots. Implementing ",[521,1893,978],{}," is simple: Deep clone the DOM, and feed it to the algorithm. Now, take the snapshot; this is, serialise the resulting DOM. Done.",[1034,1896,1897],{},[11,1898,1899,1900,1904],{},"Read our ",[524,1901,1903],{"href":1902},"/blog/a-gentle-introduction-to-ai-agents-for-the-web","gentle introduction to AI agents for the web"," to get started with high-level web agent concepts.",[11,1906,1907,1908,1910,1911,1916],{},"The open source ",[521,1909,978],{}," API, provided as a ",[524,1912,1915],{"href":1913,"rel":1914},"https://github.com/webfuse-com/D2Snap",[528],"package on GitHub"," provides the following signature:",[118,1918,1922],{"className":1919,"code":1920,"language":1921,"meta":123,"style":123},"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",[32,1923,1924,1953,1964,1983,1997,2002,2007,2019,2030,2047,2057,2072,2076,2087,2095,2108,2120,2128],{"__ignoreMap":123},[127,1925,1926,1929,1933,1935,1939,1942,1945,1947,1951],{"class":129,"line":130},[127,1927,1928],{"class":418},"type",[127,1930,1932],{"class":1931},"sXbZB"," DOM ",[127,1934,1160],{"class":434},[127,1936,1938],{"class":1937},"s-DR7"," Document",[127,1940,1941],{"class":1149}," |",[127,1943,1944],{"class":1937}," Element",[127,1946,1941],{"class":1149},[127,1948,1950],{"class":1949},"scrte"," string",[127,1952,451],{"class":155},[127,1954,1955,1957,1960,1962],{"class":129,"line":159},[127,1956,1928],{"class":418},[127,1958,1959],{"class":1931}," Options ",[127,1961,1160],{"class":434},[127,1963,208],{"class":155},[127,1965,1966,1970,1973,1976,1979],{"class":129,"line":183},[127,1967,1969],{"class":1968},"swl0y","  assignUniqueIDs",[127,1971,1972],{"class":1149},"?:",[127,1974,1975],{"class":1949}," boolean",[127,1977,1978],{"class":155},";",[127,1980,1982],{"class":1981},"sDmS1"," // false\n",[127,1984,1985,1988,1990,1992,1994],{"class":129,"line":200},[127,1986,1987],{"class":1968},"  debug",[127,1989,1972],{"class":1149},[127,1991,1975],{"class":1949},[127,1993,1978],{"class":155},[127,1995,1996],{"class":1981},"           // true\n",[127,1998,1999],{"class":129,"line":211},[127,2000,2001],{"class":155},"};\n",[127,2003,2004],{"class":129,"line":228},[127,2005,2006],{"emptyLinePlaceholder":818},"\n",[127,2008,2009,2011,2013,2016],{"class":129,"line":238},[127,2010,978],{"class":151},[127,2012,138],{"class":137},[127,2014,2015],{"class":147},"d2Snap",[127,2017,2018],{"class":151},"(\n",[127,2020,2021,2024,2028],{"class":129,"line":264},[127,2022,2023],{"class":151},"  dom: ",[127,2025,2027],{"class":2026},"sqxXB","DOM",[127,2029,180],{"class":155},[127,2031,2032,2035,2037,2040,2042,2045],{"class":129,"line":326},[127,2033,2034],{"class":151},"  k: number",[127,2036,284],{"class":155},[127,2038,2039],{"class":151}," l: number",[127,2041,284],{"class":155},[127,2043,2044],{"class":151}," m: number",[127,2046,180],{"class":155},[127,2048,2049,2052,2054],{"class":129,"line":349},[127,2050,2051],{"class":151},"  options",[127,2053,1972],{"class":434},[127,2055,2056],{"class":151}," Options\n",[127,2058,2059,2062,2066,2068,2070],{"class":129,"line":355},[127,2060,2061],{"class":151},"): ",[127,2063,2065],{"class":2064},"s8Irk","Promise",[127,2067,1150],{"class":434},[127,2069,256],{"class":151},[127,2071,1204],{"class":434},[127,2073,2074],{"class":129,"line":384},[127,2075,2006],{"emptyLinePlaceholder":818},[127,2077,2078,2080,2082,2085],{"class":129,"line":390},[127,2079,978],{"class":151},[127,2081,138],{"class":137},[127,2083,2084],{"class":147},"adaptiveD2Snap",[127,2086,2018],{"class":151},[127,2088,2089,2091,2093],{"class":129,"line":424},[127,2090,2023],{"class":151},[127,2092,2027],{"class":2026},[127,2094,180],{"class":155},[127,2096,2097,2100,2102,2106],{"class":129,"line":454},[127,2098,2099],{"class":151},"  maxTokens: number ",[127,2101,1160],{"class":434},[127,2103,2105],{"class":2104},"sZ_Zo"," 4096",[127,2107,180],{"class":155},[127,2109,2110,2113,2115,2118],{"class":129,"line":492},[127,2111,2112],{"class":151},"  maxIterations: number ",[127,2114,1160],{"class":434},[127,2116,2117],{"class":2104}," 5",[127,2119,180],{"class":155},[127,2121,2122,2124,2126],{"class":129,"line":498},[127,2123,2051],{"class":151},[127,2125,1972],{"class":434},[127,2127,2056],{"class":151},[127,2129,2130,2132,2134,2136,2138],{"class":129,"line":1434},[127,2131,2061],{"class":151},[127,2133,2065],{"class":2064},[127,2135,1150],{"class":434},[127,2137,256],{"class":151},[127,2139,1204],{"class":434},[11,2141,2142,2143,2145,2146,2151,2152,2157],{},"Moreover, ",[521,2144,978],{}," it is available on the ",[524,2147,2150],{"href":2148,"rel":2149},"https://dev.webfuse.com/automation-api",[528],"Webfuse Automation API",". ",[524,2153,2156],{"href":2154,"rel":2155},"https://www.webfuse.com",[528],"Webfuse"," essentially is a proxy to seamlessly serve any existing web application with custom augmentations, such as a web agent widget.",[118,2159,2163],{"className":2160,"code":2161,"language":2162,"meta":123,"style":123},"language-js shiki shiki-themes catppuccin-latte night-owl","const domSnapshot = await browser.webfuseSession\n    .automation\n    .take_dom_snapshot({ modifier: 'downsample' })\n","js",[32,2164,2165,2170,2175],{"__ignoreMap":123},[127,2166,2167],{"class":129,"line":130},[127,2168,2169],{},"const domSnapshot = await browser.webfuseSession\n",[127,2171,2172],{"class":129,"line":159},[127,2173,2174],{},"    .automation\n",[127,2176,2177],{"class":129,"line":183},[127,2178,2179],{},"    .take_dom_snapshot({ modifier: 'downsample' })\n",[11,2181,2182,2183,2185],{},"Need precise control over the underlying ",[521,2184,978],{}," invocation? Configure it exactly how you want:",[118,2187,2189],{"className":2160,"code":2188,"language":2162,"meta":123,"style":123},"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",[32,2190,2191,2195,2199,2204,2209,2214,2219,2224],{"__ignoreMap":123},[127,2192,2193],{"class":129,"line":130},[127,2194,2169],{},[127,2196,2197],{"class":129,"line":159},[127,2198,2174],{},[127,2200,2201],{"class":129,"line":183},[127,2202,2203],{},"    .take_dom_snapshot({\n",[127,2205,2206],{"class":129,"line":200},[127,2207,2208],{},"        modifier: {\n",[127,2210,2211],{"class":129,"line":211},[127,2212,2213],{},"            name: 'D2Snap',\n",[127,2215,2216],{"class":129,"line":228},[127,2217,2218],{},"            params: { hierarchyRatio: 0.6, textRatio: 0.2, attributeRatio: 0.8 }\n",[127,2220,2221],{"class":129,"line":238},[127,2222,2223],{},"        }\n",[127,2225,2226],{"class":129,"line":264},[127,2227,2228],{},"    })\n",[875,2230,2232],{"id":2231},"performance-evaluation","Performance Evaluation",[11,2234,2235,2236,2238,2239,2241,2242,2244],{},"Now for the moment of truth: How does ",[521,2237,978],{}," stack up against the industry standard? We evaluated ",[521,2240,978],{}," in comparison to a grounded GUI snapshot baseline close to those used by ",[521,2243,857],{}," – coloured bounding boxes around visible interactive elements.",[11,2246,2247,2248,2253],{},"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 ",[524,2249,2252],{"href":2250,"rel":2251},"https://github.com/OSU-NLP-Group/Online-Mind2Web",[528],"Online-Mind2Web"," dataset.",[510,2255],{":width":2256,"alt":2257,"format":517,"loading":515,"src":2258},"800","Exemplary solution UI state trajectory of a defined web-based task","/blog/dom-downsampling-for-web-agents/3.png",[11,2260,2261],{},[901,2262,2263],{},"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,2265,2266],{},"These are our key findings...",[1046,2268,2270],{"id":2269},"substantial-success-rates","Substantial Success Rates",[11,2272,2273,2274,2276],{},"The results exceeded our expectations. Not only did ",[521,2275,978],{}," 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.",[510,2278],{":width":2279,"alt":2280,"format":517,"loading":515,"src":2281},"550","Success rate per web agent snapshot subject evaluated across the dataset","/blog/dom-downsampling-for-web-agents/4.png",[901,2283,2284,2285,2292,2293,2295,2296,2299,2300,2303,2304,2307,2308,2311,2312,2315,2316,2319],{},"\n  Success rate per web agent snapshot subject evaluated across the dataset.\n  Labels: ",[32,2286,2287,2288],{},"GUI",[2289,2290,2291],"sub",{}," gr.",": Baseline, ",[32,2294,2027],{},": Raw DOM (cut-off at ~8K tokens), ",[32,2297,2298],{},"k( l m)",": Parameter values; e.g., ",[32,2301,2302],{},".9 .3 .6",", or ",[32,2305,2306],{},".4"," if equal). ",[32,2309,2310],{},"∞",": Linearisation,  ",[32,2313,2314],{},"8192 / 32768",": via token-limited (resp.) ",[2317,2318,1875],"i",{},".\n",[1046,2321,2323],{"id":2322},"containable-token-and-byte-size","Containable Token and Byte Size",[11,2325,2326,2327,2329],{},"Even light downsampling delivers dramatic size reductions. Most ",[521,2328,978],{}," 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.",[510,2331],{":width":2256,"alt":2332,"format":517,"loading":515,"src":2333},"Comparison of mean input size across and per subject","/blog/dom-downsampling-for-web-agents/5.png",[901,2335,2336,2337,2340,2341,2343],{},"\n  Left: Comparison of mean input size (tokens vs bytes) across and per subject.",[2338,2339],"br",{},"\n  Right: Estimated input token size across the dataset created by a single ",[2317,2342,978],{}," evaluation subject.\n",[1046,2345,2347],{"id":2346},"hierarchy-actually-matters","Hierarchy Actually Matters",[11,2349,2350],{},"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.",[1057,2352,2355,2360],{"className":2353,"dataFootnotes":123},[2354],"footnotes",[49,2356,2359],{"className":2357,"id":918},[2358],"sr-only","Footnotes",[927,2361,2362,2377,2388,2399],{},[67,2363,2365,2369,2370],{"id":2364},"user-content-fn-1",[524,2366,2367],{"href":2367,"rel":2368},"https://arxiv.org/abs/2210.03945",[528]," ",[524,2371,2376],{"href":2372,"ariaLabel":2373,"className":2374,"dataFootnoteBackref":123},"#user-content-fnref-1","Back to reference 1",[2375],"data-footnote-backref","↩",[67,2378,2380,2369,2383],{"id":2379},"user-content-fn-2",[524,2381,984],{"href":984,"rel":2382},[528],[524,2384,2376],{"href":2385,"ariaLabel":2386,"className":2387,"dataFootnoteBackref":123},"#user-content-fnref-2","Back to reference 2",[2375],[67,2389,2391,2369,2394],{"id":2390},"user-content-fn-3",[524,2392,1913],{"href":1913,"rel":2393},[528],[524,2395,2376],{"href":2396,"ariaLabel":2397,"className":2398,"dataFootnoteBackref":123},"#user-content-fnref-3","Back to reference 3",[2375],[67,2400,2402,2369,2406],{"id":2401},"user-content-fn-4",[524,2403,2404],{"href":2404,"rel":2405},"https://aclanthology.org/W04-3252",[528],[524,2407,2376],{"href":2408,"ariaLabel":2409,"className":2410,"dataFootnoteBackref":123},"#user-content-fnref-4","Back to reference 4",[2375],[779,2412,2413],{},"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":123,"searchDepth":159,"depth":159,"links":2415},[2416,2420,2421,2428],{"id":865,"depth":159,"text":866,"children":2417},[2418,2419],{"id":877,"depth":183,"text":878},{"id":906,"depth":183,"text":907},{"id":957,"depth":159,"text":958},{"id":975,"depth":159,"text":978,"children":2422},[2423,2424,2425,2426,2427],{"id":1012,"depth":183,"text":1013},{"id":1133,"depth":183,"text":1134},{"id":1872,"depth":183,"text":1875},{"id":1887,"depth":183,"text":1888},{"id":2231,"depth":183,"text":2232},{"id":918,"depth":159,"text":2359},"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":818,"relatedLinks":2432},[2433,2437,2440],{"text":2434,"href":2435,"description":2436},"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":2438,"href":1902,"description":2439},"What is a Web Agent?","Learn the basics of web agents",{"text":2150,"href":2441,"external":818,"description":2442},"https://dev.webfuse.com/automation-api#take_dom_snapshot","Check out the Webfuse Automation API","/blog/dom-downsampling-for-llm-based-web-agents",{"title":832,"description":2430},{"loc":2443},"blog/1012.dom-downsampling-for-llm-based-web-agents",[791,2448,2449,2450,827,2451],"browser-agents","llms","llm-context","web-automation","bGJtg_9k7O95O2CJswaRFj4ONGhX4hGr_8aL5dhDZms",{"id":2454,"title":2455,"authorId":833,"body":2456,"category":791,"created":3179,"description":3180,"extension":794,"faqs":806,"featurePriority":806,"head":806,"landingPath":806,"meta":3181,"navigation":818,"ogImage":806,"path":1902,"robots":806,"schemaOrg":806,"seo":3190,"sitemap":3191,"stem":3192,"tags":3193,"__hash__":3194},"blog/blog/1011.a-gentle-introduction-to-ai-agents-for-the-web.md","A Gentle Introduction to AI Agents for the Web",{"type":8,"value":2457,"toc":3160},[2458,2472,2475,2482,2488,2492,2495,2510,2514,2524,2528,2532,2545,2549,2553,2556,2561,2565,2574,2578,2589,2594,2598,2616,2620,2626,2726,2729,2960,2976,2980,2983,2988,2992,2995,2999,3017,3042,3049,3053,3091,3094,3105,3109,3112,3140,3144,3152,3157],[11,2459,2460,2461,847,2465,1026,2468,2471],{},"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 ",[524,2462,846],{"href":2463,"rel":2464},"https://openai.com/index/introducing-operator/",[528],[524,2466,852],{"href":850,"rel":2467},[528],[524,2469,857],{"href":855,"rel":2470},[528],". By now, it is within reach to automate arbitrary web-based tasks, such as booking the cheapest flight from Berlin to Amsterdam.",[49,2473,2438],{"id":2474},"what-is-a-web-agent",[11,2476,2477,2478,2481],{},"For starters, let us break down the term ",[21,2479,2480],{},"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.",[510,2483],{":width":2484,"alt":2485,"format":2486,"loading":515,"src":2487},"610","High-level agent description comparing human and computer agents","svg","/blog/a-gentle-introduction-to-ai-agents-for-the-web/1.svg",[875,2489,2491],{"id":2490},"the-role-of-frontier-llms","The Role of Frontier LLMs",[11,2493,2494],{},"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,2496,2497,2498,2505,2506,2509],{},"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 (",[521,2499,2500,2501,2504],{},"“",[127,2502,2503],{},"..."," e4 e5 2. Nc3 f5”","), and the respective task (",[521,2507,2508],{},"“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.",[875,2511,2513],{"id":2512},"generalist-web-agents","Generalist Web Agents",[11,2515,2516,2517,1026,2520,2523],{},"Generalist web agents are supposed to solve arbitrary tasks through a web browser. Web-based tasks can be as diverse as ",[521,2518,2519],{},"“Find a picture of a cat.”",[521,2521,2522],{},"“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.",[510,2525],{":width":541,"alt":2526,"format":517,"loading":515,"src":2527},"Screenshot of a generalist web agent UI (Director)","/blog/a-gentle-introduction-to-ai-agents-for-the-web/2.png",[875,2529,2531],{"id":2530},"specialist-web-agents","Specialist Web Agents",[11,2533,2534,2535,2538,2539,2544],{},"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 ",[521,2536,2537],{},"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 ",[524,2540,2543],{"href":2541,"rel":2542},"https://docs.claude.com/en/docs/build-with-claude/prompt-engineering/system-prompts",[528],"system prompt"," can, moreover, be leveraged to drive specialist agent quality for the respective problem domain.",[510,2546],{":width":541,"alt":2547,"format":517,"loading":515,"src":2548},"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",[49,2550,2552],{"id":2551},"how-does-a-web-agent-work","How Does a Web Agent Work?",[11,2554,2555],{},"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).",[510,2557],{":width":2558,"alt":2559,"format":2486,"loading":515,"src":2560},"480","High-level web agent architecture component view","/blog/a-gentle-introduction-to-ai-agents-for-the-web/4.svg",[875,2562,2564],{"id":2563},"the-agent-lifecycle","The Agent Lifecycle",[11,2566,2567,2568,2573],{},"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 ",[524,2569,2572],{"href":2570,"rel":2571},"https://www.redfin.com",[528],"redfin.com",": In the first step, you specify a location. Only subsequently are you provided with a grid of available apartments for that location.",[510,2575],{":width":541,"alt":2576,"format":517,"loading":515,"src":2577},"Example of separated UI states in a rental home search application","/blog/a-gentle-introduction-to-ai-agents-for-the-web/5.png",[11,2579,2580,2581,2588],{},"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 ",[524,2582,2585],{"href":2583,"rel":2584},"https://mitpress.mit.edu/9780262640374/the-design-of-everyday-things/",[528],[521,2586,2587],{},"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.",[510,2590],{":width":2591,"alt":2592,"format":2486,"loading":515,"src":2593},"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",[875,2595,2597],{"id":2596},"web-context-for-llms","Web Context for LLMs",[11,2599,2600,2601,2603,2604,2607,2608,2611,2612,2615],{},"The gap from an agent towards the environment, according to ",[521,2602,2587],{},", is known as the ",[521,2605,2606],{},"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 ",[521,2609,2610],{},"gulf of intention"," towards the action planning stage: how to serialise a currently browsed web page's runtime state for LLMs? ",[521,2613,2614],{},"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?",[875,2617,2619],{"id":2618},"agentic-ui-interaction","Agentic UI Interaction",[11,2621,2622,2623,2625],{},"With a qualified set of well-defined actuation methods, web agents are able to close the ",[521,2624,2606],{}," 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:",[118,2627,2629],{"className":1919,"code":2628,"language":1921,"meta":123,"style":123},"interface ActuationSchema = {\n    thought: string;\n    action: \"click\"\n        | \"scroll\"\n        | \"type\";\n    cssSelector: string;\n    data?: string;\n}[];\n",[32,2630,2631,2644,2655,2671,2683,2695,2706,2717],{"__ignoreMap":123},[127,2632,2633,2636,2639,2642],{"class":129,"line":130},[127,2634,2635],{"class":418},"interface",[127,2637,2638],{"class":1931}," ActuationSchema",[127,2640,2641],{"class":151}," = ",[127,2643,156],{"class":155},[127,2645,2646,2649,2651,2653],{"class":129,"line":159},[127,2647,2648],{"class":151},"    thought",[127,2650,166],{"class":1149},[127,2652,1950],{"class":1949},[127,2654,451],{"class":155},[127,2656,2657,2660,2662,2664,2668],{"class":129,"line":183},[127,2658,2659],{"class":151},"    action",[127,2661,166],{"class":1149},[127,2663,170],{"class":169},[127,2665,2667],{"class":2666},"sgAC-","click",[127,2669,2670],{"class":169},"\"\n",[127,2672,2673,2676,2678,2681],{"class":129,"line":200},[127,2674,2675],{"class":1149},"        |",[127,2677,170],{"class":169},[127,2679,2680],{"class":2666},"scroll",[127,2682,2670],{"class":169},[127,2684,2685,2687,2689,2691,2693],{"class":129,"line":211},[127,2686,2675],{"class":1149},[127,2688,170],{"class":169},[127,2690,1928],{"class":2666},[127,2692,177],{"class":169},[127,2694,451],{"class":155},[127,2696,2697,2700,2702,2704],{"class":129,"line":228},[127,2698,2699],{"class":151},"    cssSelector",[127,2701,166],{"class":1149},[127,2703,1950],{"class":1949},[127,2705,451],{"class":155},[127,2707,2708,2711,2713,2715],{"class":129,"line":238},[127,2709,2710],{"class":151},"    data",[127,2712,1972],{"class":1149},[127,2714,1950],{"class":1949},[127,2716,451],{"class":155},[127,2718,2719,2721,2724],{"class":129,"line":264},[127,2720,501],{"class":155},[127,2722,2723],{"class":151},"[]",[127,2725,451],{"class":155},[11,2727,2728],{},"And a suggested actions response could, in turn, look as follows:",[118,2730,2734],{"className":2731,"code":2732,"language":2733,"meta":123,"style":123},"language-json shiki shiki-themes catppuccin-latte night-owl","[\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","json",[32,2735,2736,2741,2746,2770,2789,2807,2811,2815,2834,2852,2871,2889,2893,2897,2916,2934,2951,2956],{"__ignoreMap":123},[127,2737,2738],{"class":129,"line":130},[127,2739,2740],{"class":155},"[\n",[127,2742,2743],{"class":129,"line":159},[127,2744,2745],{"class":155},"    {\n",[127,2747,2748,2752,2756,2758,2760,2762,2766,2768],{"class":129,"line":183},[127,2749,2751],{"class":2750},"srFR9","        \"",[127,2753,2755],{"class":2754},"s30W1","thought",[127,2757,177],{"class":2750},[127,2759,166],{"class":155},[127,2761,170],{"class":169},[127,2763,2765],{"class":2764},"sCC8C","Scroll newsletter cta into view",[127,2767,177],{"class":169},[127,2769,180],{"class":155},[127,2771,2772,2774,2777,2779,2781,2783,2785,2787],{"class":129,"line":200},[127,2773,2751],{"class":2750},[127,2775,2776],{"class":2754},"action",[127,2778,177],{"class":2750},[127,2780,166],{"class":155},[127,2782,170],{"class":169},[127,2784,2680],{"class":2764},[127,2786,177],{"class":169},[127,2788,180],{"class":155},[127,2790,2791,2793,2796,2798,2800,2802,2805],{"class":129,"line":211},[127,2792,2751],{"class":2750},[127,2794,2795],{"class":2754},"cssSelector",[127,2797,177],{"class":2750},[127,2799,166],{"class":155},[127,2801,170],{"class":169},[127,2803,2804],{"class":2764},"section#newsletter",[127,2806,2670],{"class":169},[127,2808,2809],{"class":129,"line":228},[127,2810,352],{"class":155},[127,2812,2813],{"class":129,"line":238},[127,2814,2745],{"class":155},[127,2816,2817,2819,2821,2823,2825,2827,2830,2832],{"class":129,"line":264},[127,2818,2751],{"class":2750},[127,2820,2755],{"class":2754},[127,2822,177],{"class":2750},[127,2824,166],{"class":155},[127,2826,170],{"class":169},[127,2828,2829],{"class":2764},"Type email address to newsletter cta",[127,2831,177],{"class":169},[127,2833,180],{"class":155},[127,2835,2836,2838,2840,2842,2844,2846,2848,2850],{"class":129,"line":326},[127,2837,2751],{"class":2750},[127,2839,2776],{"class":2754},[127,2841,177],{"class":2750},[127,2843,166],{"class":155},[127,2845,170],{"class":169},[127,2847,1928],{"class":2764},[127,2849,177],{"class":169},[127,2851,180],{"class":155},[127,2853,2854,2856,2858,2860,2862,2864,2867,2869],{"class":129,"line":349},[127,2855,2751],{"class":2750},[127,2857,2795],{"class":2754},[127,2859,177],{"class":2750},[127,2861,166],{"class":155},[127,2863,170],{"class":169},[127,2865,2866],{"class":2764},"section#newsletter > input",[127,2868,177],{"class":169},[127,2870,180],{"class":155},[127,2872,2873,2875,2878,2880,2882,2884,2887],{"class":129,"line":355},[127,2874,2751],{"class":2750},[127,2876,2877],{"class":2754},"data",[127,2879,177],{"class":2750},[127,2881,166],{"class":155},[127,2883,170],{"class":169},[127,2885,2886],{"class":2764},"user@example.org",[127,2888,2670],{"class":169},[127,2890,2891],{"class":129,"line":384},[127,2892,352],{"class":155},[127,2894,2895],{"class":129,"line":390},[127,2896,2745],{"class":155},[127,2898,2899,2901,2903,2905,2907,2909,2912,2914],{"class":129,"line":424},[127,2900,2751],{"class":2750},[127,2902,2755],{"class":2754},[127,2904,177],{"class":2750},[127,2906,166],{"class":155},[127,2908,170],{"class":169},[127,2910,2911],{"class":2764},"Submit newsletter sign up",[127,2913,177],{"class":169},[127,2915,180],{"class":155},[127,2917,2918,2920,2922,2924,2926,2928,2930,2932],{"class":129,"line":454},[127,2919,2751],{"class":2750},[127,2921,2776],{"class":2754},[127,2923,177],{"class":2750},[127,2925,166],{"class":155},[127,2927,170],{"class":169},[127,2929,2667],{"class":2764},[127,2931,177],{"class":169},[127,2933,180],{"class":155},[127,2935,2936,2938,2940,2942,2944,2946,2949],{"class":129,"line":492},[127,2937,2751],{"class":2750},[127,2939,2795],{"class":2754},[127,2941,177],{"class":2750},[127,2943,166],{"class":155},[127,2945,170],{"class":169},[127,2947,2948],{"class":2764},"section#newsletter > button",[127,2950,2670],{"class":169},[127,2952,2953],{"class":129,"line":498},[127,2954,2955],{"class":155},"    }\n",[127,2957,2958],{"class":129,"line":1434},[127,2959,381],{"class":155},[1034,2961,2962],{},[11,2963,2964,2969,2970,2975],{},[524,2965,2968],{"href":2966,"rel":2967},"https://platform.openai.com/docs/guides/function-calling",[528],"Function Calling"," and the ",[524,2971,2974],{"href":2972,"rel":2973},"https://modelcontextprotocol.io",[528],"Model Context Protocol"," represent two ends to outsource an explicit actuation model – server- and client-side, respectively.",[875,2977,2979],{"id":2978},"agentic-ui-augmentation","Agentic UI Augmentation",[11,2981,2982],{},"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.",[510,2984],{":width":2985,"alt":2986,"format":2486,"loading":515,"src":2987},"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",[49,2989,2991],{"id":2990},"how-to-build-a-web-agent","How to Build a Web Agent?",[11,2993,2994],{},"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.",[875,2996,2998],{"id":2997},"develop-a-web-agent","Develop a Web Agent",[11,3000,3001,3002,3005,3006,1026,3011,3016],{},"Opting for a ",[21,3003,3004],{},"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., ",[524,3007,3010],{"href":3008,"rel":3009},"https://elevenlabs.io/conversational-ai",[528],"ElevenLabs",[524,3012,3015],{"href":3013,"rel":3014},"https://www.intercom.com/drlp/ai-agent",[528],"Intercom",". Serviced agents hide LLM communication and potentially interaction with a web browser behind the configuration interface.",[11,3018,3019,3020,3023,3024,3029,3030,3035,3036,3041],{},"Using a ",[21,3021,3022],{},"templated agent"," resembles the agent-as-a-service approach on a lower level. Openly sourced from a ",[524,3025,3028],{"href":3026,"rel":3027},"https://github.com/webfuse-com/agent-extension-blueprint",[528],"code repository",", templated agents allow for any kind of development tweaks. Favourably, agent templates shortcut integration with ",[524,3031,3034],{"href":3032,"rel":3033},"https://openai.com/api/",[528],"LLM APIs"," and web ",[524,3037,3040],{"href":3038,"rel":3039},"https://developer.mozilla.org/en-US/docs/Web/API",[528],"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,3043,3044,3045,3048],{},"Of course, developing an ",[21,3046,3047],{},"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.",[875,3050,3052],{"id":3051},"deploy-a-web-agent","Deploy a Web Agent",[11,3054,3055,3056,1058,3061,3066,3067,3072,3073,3078,3079,3084,3085,3090],{},"When web agent code lives side-by-side with the augmented application's code, agent deployment is covered by a generic pipeline. Something like: ",[524,3057,3060],{"href":3058,"rel":3059},"https://eslint.org",[528],"linting",[524,3062,3065],{"href":3063,"rel":3064},"https://prettier.io",[528],"formatting"," agent code, ",[524,3068,3071],{"href":3069,"rel":3070},"https://esbuild.github.io",[528],"transpiling and bundling"," agent modules, ",[524,3074,3077],{"href":3075,"rel":3076},"https://www.cypress.io",[528],"testing"," agent, ",[524,3080,3083],{"href":3081,"rel":3082},"https://pages.cloudflare.com",[528],"hosting"," agent bundle, and ",[524,3086,3089],{"href":3087,"rel":3088},"https://docs.github.com/en/actions/get-started/continuous-integration",[528],"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,3092,3093],{},"Web agent source code right inside the application codebase comes at a cost:",[64,3095,3096,3099,3102],{},[67,3097,3098],{},"Agent developers can manipulate the source code of the underlying application.",[67,3100,3101],{},"Agent functionality could introduce side effects on the underlying application.",[67,3103,3104],{},"Agent changes require deployment of the entire application.",[875,3106,3108],{"id":3107},"best-practices-of-agentic-ux","Best Practices of Agentic UX",[11,3110,3111],{},"When designing user experiences for agent-enhanced applications, there are a few things to consider:",[64,3113,3114,3115,3114,3124,3114,3132],{},"\n    ",[67,3116,3117,3118,3117,3121,3123],{},"\n        ",[21,3119,3120],{},"Stream input and output to reduce latency",[2338,3122],{},"\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    ",[67,3125,3117,3126,3117,3129,3131],{},[21,3127,3128],{},"Provide fine-grained feedback to bridge high-latency",[2338,3130],{},"\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    ",[67,3133,3117,3134,3117,3137,3139],{},[21,3135,3136],{},"Always prompt the human user for consent to perform critical actions",[2338,3138],{},"\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    ",[875,3141,3143],{"id":3142},"non-invasive-web-agents-with-webfuse","Non-Invasive Web Agents with Webfuse",[11,3145,3146,3151],{},[524,3147,3149],{"href":2154,"rel":3148},[528],[21,3150,2156],{}," 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.",[668,3153],{":demoAction":3154,"heading":3155,"subtitle":3156},"{\"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.",[779,3158,3159],{},"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":123,"searchDepth":159,"depth":159,"links":3161},[3162,3167,3173],{"id":2474,"depth":159,"text":2438,"children":3163},[3164,3165,3166],{"id":2490,"depth":183,"text":2491},{"id":2512,"depth":183,"text":2513},{"id":2530,"depth":183,"text":2531},{"id":2551,"depth":159,"text":2552,"children":3168},[3169,3170,3171,3172],{"id":2563,"depth":183,"text":2564},{"id":2596,"depth":183,"text":2597},{"id":2618,"depth":183,"text":2619},{"id":2978,"depth":183,"text":2979},{"id":2990,"depth":159,"text":2991,"children":3174},[3175,3176,3177,3178],{"id":2997,"depth":183,"text":2998},{"id":3051,"depth":183,"text":3052},{"id":3107,"depth":183,"text":3108},{"id":3142,"depth":183,"text":3143},"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":818,"relatedLinks":3182},[3183,3184,3188],{"text":2434,"href":2435,"description":2436},{"text":3185,"href":3186,"description":3187},"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":2150,"href":3189,"external":818,"description":2442},"https://dev.webfuse.com/automation-api/",{"title":2455,"description":3180},{"loc":1902},"blog/1011.a-gentle-introduction-to-ai-agents-for-the-web",[791,2448,2449,827,2451],"9anWTMfg6llLSdye3e9qWZZZcEAZcELLMk_vpnixn3M",1781610697330]