[{"data":1,"prerenderedAt":3828},["ShallowReactive",2],{"/blog/webmcp-adoption-2026":3,"related-/blog/webmcp-adoption-2026":628},{"id":4,"title":5,"authorId":6,"body":7,"category":580,"created":581,"description":582,"extension":583,"faqs":584,"featurePriority":600,"head":601,"hideCta":602,"landingPath":601,"meta":603,"navigation":617,"ogImage":601,"path":618,"robots":601,"schemaOrg":601,"seo":619,"sitemap":620,"stem":621,"tags":622,"updated":601,"__hash__":627},"blog/blog/1060.webmcp-adoption-2026.md","WebMCP Adoption 2026: We Scanned the Top 1,000 Websites. Here's Who Supports It","salome-koshadze",{"type":8,"value":9,"toc":566},"minimark",[10,19,47,55,60,70,79,86,89,96,101,105,108,113,116,121,148,157,161,194,201,204,210,214,223,307,318,325,346,350,353,369,378,382,385,400,449,460,464,472,479,486,495,499,502,506,562],[11,12,13,14,18],"p",{},"As of November 2026, ",[15,16,17],"strong",{},"2 of the 627 top websites we could load register WebMCP tools: chatgpt.com and redbus.in."," Meanwhile, 91 of the 96 Shopify stores we sampled (95%) already expose 12 tools to AI agents.",[20,21,23,29,35,41],"tldr-box",{"title":22},"Key findings",[11,24,25,28],{},[15,26,27],{},"We scanned Chrome's top 1,000 websites"," (816 sites after merging domains) with WebMCP turned on, on November 25, 2026.",[11,30,31,34],{},[15,32,33],{},"2 of 627 reachable sites register WebMCP tools"," on their homepage: chatgpt.com (14 tools) and redbus.in (2 tools, 9 more on its search results page).",[11,36,37,40],{},[15,38,39],{},"Shopify leads adoption by far:"," 91 of 96 real stores (95%) expose the same 12 tools for search, cart and checkout, and Chrome users get them without a flag.",[11,42,43,46],{},[15,44,45],{},"Most of the web still has no agent tools",", so AI agents keep working through buttons and forms on almost every site.",[11,48,49,54],{},[50,51,53],"a",{"href":52},"/blog/what-is-webmcp-the-practical-guide-to-the-web-model-context-protocol","WebMCP"," is the browser API that lets a page tell an AI agent what it can do: search, add to cart, book a seat. Chrome and Edge run it as an origin trial, and announcements from Shopify, Cloudflare and OpenAI suggest it is spreading fast. We wanted a number instead of an impression, so we loaded the most visited websites in the world and asked each one for its tools.",[56,57,59],"h2",{"id":58},"webmcp-adoption-in-numbers","WebMCP adoption in numbers",[11,61,62,63,69],{},"We took the top-1,000 list from the ",[50,64,68],{"href":65,"rel":66},"https://github.com/zakird/crux-top-lists",[67],"nofollow","Chrome UX Report"," for October 2026, merged origins of the same domain into 816 sites, and opened each homepage in Chrome 158 with WebMCP turned on. Then we asked every page for its tools for 10 seconds.",[71,72],"nuxt-picture",{":height":73,":width":74,"alt":75,"loading":76,"src":77,"format":78},"700","1200","Waffle chart of the WebMCP scan of the top 1,000 websites, one square per site (816 sites): 625 loaded with no WebMCP tools, 142 blocked our browser, 47 failed with an error, and 2 registered WebMCP tools (chatgpt.com and redbus.in).","lazy","/blog/webmcp-adoption-2026/2.png","webp",[11,80,81,82,85],{},"In numbers: 627 of 816 sites loaded (76.8%), 142 blocked our browser with bot walls or 403/429 errors (17.4%), 47 failed with a timeout, crash or DNS error (5.8%), and ",[15,83,84],{},"2 registered WebMCP tools"," (0.2% of all sites, 0.3% of the ones that loaded).",[11,87,88],{},"The 189 blocked or failed sites are unknown, so the honest reading is \"at least 2 of 816\". Even if every unknown site supported WebMCP, which is very unlikely, top-site adoption would stay under a quarter.",[11,90,91,92,95],{},"A second number tells the more interesting story. In a random sample of Shopify stores from the top 50,000 sites, ",[15,93,94],{},"91 of 96 real stores (95%) registered WebMCP tools."," Platform defaults, rather than individual websites, are driving adoption.",[71,97],{":height":98,":width":74,"alt":99,"loading":76,"src":100,"format":78},"760","WebMCP adoption: 0.3% of the top 1,000 websites register WebMCP tools (2 of 627 that loaded, chatgpt.com and redbus.in), compared with 95% of Shopify stores (91 of 96).","/blog/webmcp-adoption-2026/1.png",[56,102,104],{"id":103},"which-top-websites-support-webmcp","Which top websites support WebMCP?",[11,106,107],{},"Only two sites in the top 1,000 answered with tools, and they show two very different uses.",[71,109],{":height":110,":width":74,"alt":111,"loading":76,"src":112,"format":78},"900","The WebMCP tools sites register: chatgpt.com 14 tools (start_conversation, submit_conversation_message, upload_conversation_files and more), Shopify stores 12 tools (search_catalog, get_product, create_cart, proceed_to_checkout and more), redbus.in 9 tools on its search results page (selectSeat, showSeats, continueToCheckout and more).","/blog/webmcp-adoption-2026/3.png",[11,114,115],{},"Here is what each one exposes.",[117,118,120],"h3",{"id":119},"chatgptcom-14-tools-for-its-own-chat","chatgpt.com: 14 tools for its own chat",[11,122,123,124,128,129,128,132,128,135,128,138,128,141,128,144,147],{},"ChatGPT registers 14 tools on its homepage, all about driving the chat itself: ",[125,126,127],"code",{},"start_conversation",", ",[125,130,131],{},"submit_conversation_message",[125,133,134],{},"set_composer_draft",[125,136,137],{},"select_conversation_model",[125,139,140],{},"upload_conversation_files",[125,142,143],{},"open_conversation",[125,145,146],{},"stop_conversation"," and more. An agent in the browser can open a chat, pick a model, attach files and send a message without clicking through the interface. The first tool appeared 2.4 seconds after the page started loading.",[11,149,150,151,156],{},"It fits OpenAI's wider push: the ChatGPT desktop app already ",[50,152,155],{"href":153,"rel":154},"https://learn.chatgpt.com/docs/webmcp",[67],"calls other sites' WebMCP tools as \"site tools\"",", and OpenAI ran a WebMCP Challenge for apps built on the standard.",[117,158,160],{"id":159},"redbusin-bus-search-then-seats-and-checkout","redbus.in: bus search, then seats and checkout",[11,162,163,164,167,168,171,172,128,175,128,178,128,181,128,184,128,187,128,190,193],{},"redbus.in, India's large bus-ticket site, registers ",[125,165,166],{},"searchBuses"," and ",[125,169,170],{},"get_bus_offers"," on its homepage. On a search results page (Bangalore to Chennai) it registers 9 different tools: ",[125,173,174],{},"applyFilters",[125,176,177],{},"showSeats",[125,179,180],{},"selectSeat",[125,182,183],{},"selectBoardingPoint",[125,185,186],{},"selectDroppingPoint",[125,188,189],{},"getBookingSummary",[125,191,192],{},"continueToCheckout"," and two more. It is the clearest example in our data of a site exposing a full booking flow, step by step, as the user moves through it.",[11,195,196,197,200],{},"That second finding matters for anyone measuring WebMCP: ",[15,198,199],{},"tools are registered per page."," A homepage-only scan like ours undercounts sites that only add tools on search, product or account pages.",[11,202,203],{},"Neither site carries a WebMCP origin-trial token, so regular Chrome users only see these tools with the testing flag on. They look like production code waiting for the API to ship by default.",[205,206],"article-signup-cta",{"eyebrow":207,"heading":208,"highlight":209},"Most websites don't offer agents any tools yet.","Webfuse lets your agent work on any live website.","any",[56,211,213],{"id":212},"why-shopify-stores-lead-webmcp-adoption","Why Shopify stores lead WebMCP adoption",[11,215,216,217,222],{},"Shopify adds ",[50,218,221],{"href":219,"rel":220},"https://shopify.dev/docs/api/web-mcp",[67],"WebMCP tools to its storefronts"," for every merchant, and our sample shows it working at scale. 90 of the 91 stores with tools exposed exactly the same 12:",[224,225,226,239],"table",{},[227,228,229],"thead",{},[230,231,232,236],"tr",{},[233,234,235],"th",{},"Area",[233,237,238],{},"Tools",[240,241,242,262,281,294],"tbody",{},[230,243,244,248],{},[245,246,247],"td",{},"Catalog",[245,249,250,128,253,128,256,128,259],{},[125,251,252],{},"search_catalog",[125,254,255],{},"browse_store",[125,257,258],{},"get_product",[125,260,261],{},"show_variant",[230,263,264,267],{},[245,265,266],{},"Cart",[245,268,269,128,272,128,275,128,278],{},[125,270,271],{},"get_cart",[125,273,274],{},"create_cart",[125,276,277],{},"update_cart",[125,279,280],{},"cancel_cart",[230,282,283,286],{},[245,284,285],{},"Checkout and orders",[245,287,288,128,291],{},[125,289,290],{},"proceed_to_checkout",[125,292,293],{},"manage_orders",[230,295,296,299],{},[245,297,298],{},"Store and buyer",[245,300,301,128,304],{},[125,302,303],{},"ask_business",[125,305,306],{},"get_ucp_profile",[11,308,309,310,313,314,317],{},"One store added a 13th tool, ",[125,311,312],{},"describe_loyalty_program",", which suggests merchants or apps can extend the set. The first tool appeared a median 5.3 seconds after navigation started, so agents should wait for the page's ",[125,315,316],{},"toolchange"," event instead of reading the list right away.",[11,319,320,321,324],{},"The bigger detail: 92 of 100 sampled stores carry Shopify's own WebMCP origin-trial token. ",[15,322,323],{},"Shoppers on Chrome get these tools today, with no flag."," No other group in our data reaches real users at this scale.",[11,326,327,328,332,333,336,337,167,339,341,342,345],{},"The set also changes quickly. When we built our ",[50,329,331],{"href":330},"/webmcp","live WebMCP demo"," on a Shopify store in October, it had an ",[125,334,335],{},"add_to_cart"," tool; by November Shopify had replaced it with ",[125,338,274],{},[125,340,277],{},". Agents that hard-code tool names break, so they should list tools at run time with ",[125,343,344],{},"document.modelContext.getTools()",".",[56,347,349],{"id":348},"what-low-adoption-means-for-ai-agents","What low adoption means for AI agents",[11,351,352],{},"If you build an agent that works on real websites, the data says to plan for two worlds.",[354,355,356,363],"ul",{},[357,358,359,362],"li",{},[15,360,361],{},"Shopify stores (and soon Cloudflare sites)"," offer structured tools. An agent can search, fill a cart and reach checkout without guessing at the page.",[357,364,365,368],{},[15,366,367],{},"Everything else",", which is almost all of the top 1,000, offers nothing. The agent still has to read the page, find buttons and fill forms like a person, with all the fragility that brings.",[11,370,371,372,377],{},"Cloudflare's ",[50,373,376],{"href":374,"rel":375},"https://blog.cloudflare.com/webmcp/",[67],"developer preview"," could change the second group quickly, since one dashboard switch adds tools to any site behind it. None of the 816 sites in our scan had switched it on yet.",[56,379,381],{"id":380},"how-to-check-if-a-website-supports-webmcp","How to check if a website supports WebMCP",[11,383,384],{},"You can repeat our check on any page in under a minute:",[386,387,388,394,397],"ol",{},[357,389,390,391,345],{},"Open Chrome with WebMCP available: either a site in the origin trial, or turn on ",[125,392,393],{},"chrome://flags/#enable-webmcp-testing",[357,395,396],{},"Open the page you care about, wait a few seconds, then open DevTools.",[357,398,399],{},"Run this in the console:",[401,402,407],"pre",{"className":403,"code":404,"language":405,"meta":406,"style":406},"language-javascript shiki shiki-themes github-dark github-dark","\"modelContext\" in document;              // false = no WebMCP in this browser\nawait document.modelContext.getTools();  // [] = this page registers no tools\n","javascript","",[125,408,409,430],{"__ignoreMap":406},[410,411,414,418,422,426],"span",{"class":412,"line":413},"line",1,[410,415,417],{"class":416},"s4wv1","\"modelContext\"",[410,419,421],{"class":420},"sOPea"," in",[410,423,425],{"class":424},"suv1-"," document;              ",[410,427,429],{"class":428},"sJ8bj","// false = no WebMCP in this browser\n",[410,431,433,436,439,443,446],{"class":412,"line":432},2,[410,434,435],{"class":420},"await",[410,437,438],{"class":424}," document.modelContext.",[410,440,442],{"class":441},"sFR8T","getTools",[410,444,445],{"class":424},"();  ",[410,447,448],{"class":428},"// [] = this page registers no tools\n",[11,450,451,452,455,456,459],{},"Check the pages an agent would actually use, not only the homepage. For Shopify stores there is a faster signal: every store with tools in our sample had ",[125,453,454],{},"modelContext"," in its raw HTML, so a plain ",[125,457,458],{},"curl"," and a text search are enough to estimate adoption across many stores.",[56,461,463],{"id":462},"adding-agent-tools-to-a-website-you-dont-control","Adding agent tools to a website you don't control",[11,465,466,467,471],{},"For the 99% of sites without WebMCP, you can't wait for every site owner. This is where ",[50,468,470],{"href":469},"/","Webfuse"," fits, with three parts working together:",[71,473],{":height":474,":width":475,"alt":476,"loading":76,"src":477,"provider":478},"481","786","Diagram: a target website without WebMCP opens in a Webfuse live session, Webfuse injects a tool layer with agent tools and makes no changes to the site, and an MCP agent then calls those custom tools.","/blog/webmcp-adoption-2026/4.svg","none",[11,480,481,482,485],{},"Webfuse opens any live website in a session, and an extension in that session adds tools for an agent on top of the page, without changing the site. Any MCP agent can then call those tools, as our ",[50,483,484],{"href":330},"WebMCP demo"," shows with a real store. Webfuse is our product, so weigh that suggestion accordingly.",[487,488],"article-cheatsheet-card",{"cta":489,"description":490,"href":330,"image":491,"imageAlt":492,"label":493,"title":494},"Open the live demo","Open a real Shopify store in a Webfuse session, run its WebMCP tools yourself, then connect your own MCP agent to the same session. Free, no signup, no flag.","/misc/webmcp-live-demo.png","Webfuse WebMCP demo: the store's tools listed next to the live store","Live demo","See an agent use a real store's tools",[56,496,498],{"id":497},"the-bottom-line","The bottom line",[11,500,501],{},"WebMCP adoption in November 2026 is narrow but real. Among the most visited websites, only chatgpt.com and redbus.in register tools, and only for users who turn on a flag. Shopify is the exception that makes the standard matter today: 95% of its stores expose the same 12 tools to every Chrome user. Expect the next jump to come from platforms such as Shopify and Cloudflare, rather than from websites one by one. Until then, agents need a plan for pages that offer no tools at all.",[56,503,505],{"id":504},"methodology","Methodology",[354,507,508,519,525,538,544,550,556],{},[357,509,510,513,514,518],{},[15,511,512],{},"Site list:"," Chrome UX Report top-1,000 bucket, global, October 2026 (",[50,515,517],{"href":65,"rel":516},[67],"zakird/crux-top-lists","): 1,000 origins, merged to 816 registrable domains.",[357,520,521,524],{},[15,522,523],{},"Browser:"," Google Chrome 158 stable, headless, driven by Playwright, with WebMCP enabled through Chrome's feature flags.",[357,526,527,530,531,533,534,537],{},[15,528,529],{},"Check:"," a fresh profile per site, the homepage only, then ",[125,532,344],{}," every second for 10 seconds. We also logged every ",[125,535,536],{},"registerTool"," call and origin-trial tokens on the page.",[357,539,540,543],{},[15,541,542],{},"Classes:"," \"tools\" means at least one registered tool; \"blocked\" means HTTP 401/403/429/503 or a bot-wall page; \"error\" means timeout, crash or DNS failure.",[357,545,546,549],{},[15,547,548],{},"Shopify sample:"," random sites from the CrUX top-50,000 bucket, checked for a Shopify storefront; the first 100 hits, minus 4 non-stores, gave 96 real stores.",[357,551,552,555],{},[15,553,554],{},"Limits:"," tools that appear only after login, after a click or on inner pages are not counted. The scan ran from Germany, so some blocks may be regional.",[357,557,558,561],{},[15,559,560],{},"Date:"," November 25, 2026.",[563,564,565],"style",{},"html pre.shiki code .s4wv1, html code.shiki .s4wv1{--shiki-default:#9ECBFF;--shiki-dark:#9ECBFF}html pre.shiki code .sOPea, html code.shiki .sOPea{--shiki-default:#F97583;--shiki-dark:#F97583}html pre.shiki code .suv1-, html code.shiki .suv1-{--shiki-default:#E1E4E8;--shiki-dark:#E1E4E8}html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html pre.shiki code .sFR8T, html code.shiki .sFR8T{--shiki-default:#B392F0;--shiki-dark:#B392F0}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":406,"searchDepth":432,"depth":432,"links":567},[568,569,574,575,576,577,578,579],{"id":58,"depth":432,"text":59},{"id":103,"depth":432,"text":104,"children":570},[571,573],{"id":119,"depth":572,"text":120},3,{"id":159,"depth":572,"text":160},{"id":212,"depth":432,"text":213},{"id":348,"depth":432,"text":349},{"id":380,"depth":432,"text":381},{"id":462,"depth":432,"text":463},{"id":497,"depth":432,"text":498},{"id":504,"depth":432,"text":505},"ai-agents","2026-11-25","We loaded Chrome's 1,000 most visited websites with WebMCP turned on. 2 of 627 reachable sites register agent tools: chatgpt.com and redbus.in. 91 of 96 Shopify stores do. Full data, tool names and how to check any site.","md",[585,588,591,594,597],{"question":586,"answer":587},"How many websites support WebMCP?","Very few big websites so far. In November 2026 we loaded Chrome's 1,000 most visited websites (816 sites after merging domains) with WebMCP turned on. Of the 627 that loaded, 2 registered WebMCP tools on their homepage: chatgpt.com (14 tools) and redbus.in (2 tools). Shopify is the exception: 91 of the 96 Shopify stores we sampled (95%) expose 12 WebMCP tools.",{"question":589,"answer":590},"Which websites use WebMCP?","Among the top 1,000 websites, chatgpt.com and redbus.in register WebMCP tools on their homepage. Beyond the top sites, almost every Shopify store exposes WebMCP tools such as search_catalog, get_product, create_cart and proceed_to_checkout, because Shopify adds them for its merchants. Sites behind Cloudflare can also turn on WebMCP in a developer preview.",{"question":592,"answer":593},"Does Shopify support WebMCP?","Yes. Shopify registers WebMCP tools on its Liquid storefronts. In our sample of 96 real stores, 91 exposed the same 12 tools for search, product details, cart and checkout. 92 of 100 sampled stores carried Shopify's WebMCP origin-trial token, so Chrome users get the tools without turning on a flag.",{"question":595,"answer":596},"How can I check if a website supports WebMCP?","Open the site in Chrome with WebMCP enabled (the origin trial or the chrome://flags/#enable-webmcp-testing flag), open DevTools and run: await document.modelContext.getTools(). An empty list means the page registers no tools. Tools can appear a few seconds after load and can differ per page, so check the pages agents would use, such as search or product pages.",{"question":598,"answer":599},"Why do so few websites support WebMCP?","WebMCP is still an origin trial in Chrome and Edge, it is off by default, and each site has to design and register its own tools. Platforms that add tools for all their customers, like Shopify and Cloudflare, are moving faster than individual websites.",0,null,false,{"shortTitle":604,"relatedLinks":605},"WebMCP Adoption 2026",[606,609,613],{"text":607,"href":52,"description":608},"What Is WebMCP?","How the browser API lets websites expose tools to AI agents, and how to test it.",{"text":610,"href":611,"description":612},"WebMCP vs MCP","/blog/webmcp-vs-mcp-whats-the-difference-and-when-to-use-each","The difference between browser-side WebMCP and server-side MCP, and when to use each.",{"text":614,"href":615,"description":616},"How to Connect an AI Agent to the Live Web","/blog/how-to-connect-an-ai-agent-to-the-live-web","The ways an AI agent can read and act on real websites today.",true,"/blog/webmcp-adoption-2026",{"title":5,"description":582},{"loc":618},"blog/1060.webmcp-adoption-2026",[623,580,624,625,626],"webmcp","browser-automation","web-standard","research","pMp8yQWTEbvFtjOxsoVujlWHqrfaN1AWrW9YnMhGUgY",[629,3335],{"id":630,"title":631,"authorId":632,"body":633,"category":580,"created":3315,"description":3316,"extension":583,"faqs":601,"featurePriority":601,"head":601,"hideCta":617,"landingPath":601,"meta":3317,"navigation":617,"ogImage":601,"path":3325,"robots":601,"schemaOrg":601,"seo":3326,"sitemap":3327,"stem":3328,"tags":3329,"updated":601,"__hash__":3334},"blog/blog/1012.serialising-web-ui-state-for-llms-the-complete-guide.md","Serialising Web UI State for LLMs: The Complete Guide","thassilo-schiepanski",{"type":8,"value":634,"toc":3298},[635,641,663,668,671,675,678,681,690,694,698,705,723,727,730,733,737,744,748,753,756,773,777,795,799,811,825,829,842,846,849,853,871,874,878,888,893,960,963,966,971,1042,1047,1166,1171,1280,1284,1295,1300,1602,1607,1761,1770,1774,1785,1790,1794,1798,1801,1804,1807,1914,1918,1921,1925,1928,1931,1936,2160,2165,2417,2422,2498,2503,2510,2519,2523,2526,2529,2532,2537,2546,2550,2889,2909,2962,2966,2969,3001,3150,3154,3157,3160,3164,3175,3178,3189,3195,3295],[11,636,637,638,345],{},"LLMs have become a core component of AI web browsing agents. Previously, automating a web journey required formal models of both web browsing and web-based user interfaces (UIs). An LLM can serve as a plug-in reasoning backend: given serialised web UI state, it is expected to suggest input actions that progress a specified web browsing task. Serialised UI state is, more ergonomically, referred to as a ",[15,639,640],{},"snapshot",[11,642,643,644,649,650,654,655,649,659,662],{},"Snapshots and action suggestions are the two key artefacts along the agent loop. Action suggestions are elicited from the web agent LLM backend. Suggestions can be acted out via automated web browser environments, such as ",[50,645,648],{"href":646,"rel":647},"https://playwright.dev",[67],"Playwright"," or ",[50,651,470],{"href":652,"rel":653},"https://www.webfuse.com",[67],", for example, ",[656,657,658],"em",{},"clicking",[656,660,661],{},"typing",". The snapshot, on the other hand, is an artefact created by the agent harness, that is, the individual application component between the LLM and the web browser.",[71,664],{"alt":665,"loading":76,"src":666,":width":667,"provider":478},"Figurative depiction of two key artefacts along the agent loop: the snapshot towards the LLM and the input action towards the browser","/blog/serialising-web-ui-state-for-llms-the-complete-guide/1.svg","460",[11,669,670],{},"Creating snapshots for LLMs is a central challenge of developing efficient web agents. It is a trade-off between representation utility – how well models can interpret the such encoded UI – and LLM token costs. Snapshots are the major cost factor of an agentic web journey, accumulated over multiple rounds of the loop.",[56,672,674],{"id":673},"gui-snapshots","GUI Snapshots",[11,676,677],{},"Screenshots, i.e., GUI snapshots, resemble what humans see when viewing a web page at a given point in time. Early LLM-based web agents were primarily premised on GUI snapshots because of this evident equivalence. By design, the GUI surfaces only the UI context designated to be visible to the user.",[11,679,680],{},"The document object model (DOM) is a web browser's model of a web application UI's runtime state. With few exceptions, the DOM is the single source of truth regarding the UI. Most snapshot representations are thus, technically speaking, derivatives of a raw DOM snapshot. For the cases not reflected in the DOM, GUI snapshots are a first-class base representation.",[11,682,683,684,689],{},"Rendering a GUI snapshot from the DOM is, moreover, non-trivial; no client-side library manages to create GUI snapshots in reasonable quality or time – ",[50,685,688],{"href":686,"rel":687},"https://html2canvas.hertzen.com",[67],"HTML2Canvas"," demonstrates the limits.",[71,691],{"alt":692,"loading":76,"src":693},"The same web-based user interface serialised via browser-native screenshot API and the client-side library HTML2Canvas showing significant geometric differences","/blog/serialising-web-ui-state-for-llms-the-complete-guide/2.png",[117,695,697],{"id":696},"vision-based-targeting","Vision-Based Targeting",[11,699,700,701,704],{},"The snapshot representation dictates how elements can be targeted in the live UI. Unambiguous targeting based on a visual representation must be either geometric (absolute), e.g., via point coordinates, or semantic (relative), e.g., via cues, such as ",[656,702,703],{},"\"Button with Text 'Shop'\"",". On its own, semantic targeting introduces a circular problem: which element has this text?",[11,706,707,708,711,712,715,716,719,720,345],{},"Consider the web browsing task: ",[656,709,710],{},"\"Navigate to the Apple online shop\"",". In combination with an action, in this case ",[656,713,714],{},"click",", the agent could target the ",[656,717,718],{},"Shop"," button via a point coordinate, e.g., ",[125,721,722],{},"(725, 750)",[71,724],{"alt":725,"loading":76,"src":726},"A GUI snapshot (screenshot) visualising point coordinate targeting","/blog/serialising-web-ui-state-for-llms-the-complete-guide/3.png",[11,728,729],{},"When the UI shifts between snapshot and action time, geometric targeting suggestions might have become obsolete.",[11,731,732],{},"Depending on the web browser environment, screenshots might be constrained to the GUI viewport. Scrolling is a secondary task that is imperative with viewport-contrained GUI snapshots.",[117,734,736],{"id":735},"the-problem-with-gui-snapshots","The Problem with GUI Snapshots",[11,738,739,740,743],{},"Image data is downsampled to make it economically viable as input to LLMs. It reduces LLM input tokens to a few thousand for real-world-representative full-page screenshots. A common downsampling approach is averaging ",[656,741,742],{},"n×n","-tiles of pixels, as known from image downscaling. Side effects are: pixel-precise targeting does not map back to the live UI, and small geometric features are not preserved (e.g., small labels). Downsampling effects can be accounted for under certain circumstances, e.g., by providing a snapshot format that downsamples to its identity. However, GUI aspect ratio and detail might be beyond the agent's control.",[71,745],{"alt":746,"loading":76,"src":747},"A GUI snapshot (screenshot) compared to its figuratively downsampled counterpart","/blog/serialising-web-ui-state-for-llms-the-complete-guide/4.png",[749,750,752],"h4",{"id":751},"grounded-gui-snapshots","Grounded GUI Snapshots",[11,754,755],{},"Geometric targeting remains unreliable with certain models and responsive UIs. To rely on semantic targeting instead, the agent must link relevant elements in the live UI to semantics in the screenshot. Relevance usually equates with actionability, but ultimately depends on the snapshot's purpose.",[11,757,758,761,762,772],{},[656,759,760],{},"Set-of-Mark"," prompting is the go-to technique to create grounded GUI snapshots",[763,764,765],"sup",{},[50,766,771],{"href":767,"ariaDescribedBy":768,"dataFootnoteRef":406,"id":770},"#user-content-fn-1",[769],"footnote-label","user-content-fnref-1","1",". In this context, relevant elements are parsed from the live DOM and indexed with a unique numeric identifier. Each indexed element in the live UI is then enhanced with a coloured bounding box associated with the respective identifier.",[71,774],{"alt":775,"loading":76,"src":776},"A GUI snapshot (screenshot) visualising grounded cue targeting","/blog/serialising-web-ui-state-for-llms-the-complete-guide/5.png",[11,778,779,786,787,345],{},[50,780,783],{"href":781,"rel":782},"https://browser-use.com",[67],[656,784,785],{},"Browser Use"," agents implement Set-of-Mark-grounded GUI snapshots",[763,788,789],{},[50,790,794],{"href":791,"ariaDescribedBy":792,"dataFootnoteRef":406,"id":793},"#user-content-fn-2",[769],"user-content-fnref-2","2",[56,796,798],{"id":797},"dom-snapshots","DOM Snapshots",[11,800,801,802,810],{},"The DOM is parsed from HTML. In its latest state it can be serialised back to HTML – including all runtime mutations. Research has supported LLMs' capabilities to interpret HTML, and even to navigate such encoded UIs",[763,803,804],{},[50,805,809],{"href":806,"ariaDescribedBy":807,"dataFootnoteRef":406,"id":808},"#user-content-fn-3",[769],"user-content-fnref-3","3",". For that reason, DOM snapshots are a compelling alternative to GUI snapshots. LLMs excel at code generation and review, so these capabilities are no surprise.",[11,812,813,814,817,818,821,822,824],{},"Cross-origin ",[125,815,816],{},"iframe"," elements and ",[125,819,820],{},"canvas"," elements are exceptions to the DOM-is-source-of-truth assumption: ",[125,823,820],{},"-drawn GUI is not reflected in the DOM, nor are external, self-contained DOM subtrees if no explicit policy allows it. Structurally, both are leaves in the serialisable DOM tree.",[117,826,828],{"id":827},"dom-based-targeting","DOM-Based Targeting",[11,830,831,832,167,835,838,839,345],{},"Programmatically, DOM elements can be targeted by different relative means. CSS selectors abstract targeting with a standalone language. Whilst CSS selectors can resolve to more than one element in the DOM – compare semantics of the HTML ",[125,833,834],{},"class",[125,836,837],{},"id"," attributes – every element has at least one unique CSS selector, constructed from nth-child node paths, e.g., ",[125,840,841],{},"main .section:nth-child(2) > .row:nth-of-type(5) > form button",[71,843],{"alt":844,"loading":76,"src":845},"A DOM snapshot (HTML) visualising CSS selector targeting","/blog/serialising-web-ui-state-for-llms-the-complete-guide/6.png",[11,847,848],{},"A raw DOM snapshot is complete, beyond the GUI that renders in the spatially limited browser viewport. For a human-like visual browsing experience, scrolling can be abstracted by an indirect scroll-target-into-view mechanism.",[117,850,852],{"id":851},"the-problem-with-dom-snapshots","The Problem with DOM Snapshots",[11,854,855,856,861,862,870],{},"DOM snapshots of real-world web pages may come at a size of several megabytes, which converts to millions of LLM input tokens – we estimate a raw snapshot of ",[50,857,860],{"href":858,"rel":859},"https://edition.cnn.com",[67],"cnn.com"," at around 1.5M tokens. At this size, DOM snapshots over-utilise the context window of many LLMs, or even exceed it (such as of ",[50,863,866,869],{"href":864,"rel":865},"https://openai.com/index/gpt-4o-system-card/",[67],[656,867,868],{},"GPT-4o"," (OpenAI)","). Ultimately, raw DOM snapshots out-cost GUI snapshots.",[11,872,873],{},"Using DOM snapshots with LLM-based web agents requires size-reducing transformations, similar to image downsampling implemented behind LLM APIs.",[749,875,877],{"id":876},"extracted-dom-snapshots","Extracted DOM Snapshots",[11,879,880,881,884,885,887],{},"The naïve approach to use information from the DOM as a snapshot is element extraction: relevant elements are copied from the live DOM to an initially empty virtual DOM. For small top-",[656,882,883],{},"k"," extractions – the ",[656,886,883],{}," highest-scoring elements – a snapshot of the virtual DOM comes at a fraction of the original DOM's size.",[11,889,890],{},[15,891,892],{},"Top-3 DOM Snapshot:",[401,894,898],{"className":895,"code":896,"language":897,"meta":406,"style":406},"language-html shiki shiki-themes github-dark github-dark","\u003Cbutton type=\"submit\">Submit\u003C/button>\n\u003Cbutton>More\u003C/button>\n\u003Ca href=\"/more\">Find out more\u003C/a>\n","html",[125,899,900,926,939],{"__ignoreMap":406},[410,901,902,905,909,912,915,918,921,923],{"class":412,"line":413},[410,903,904],{"class":424},"\u003C",[410,906,908],{"class":907},"sxg3X","button",[410,910,911],{"class":441}," type",[410,913,914],{"class":424},"=",[410,916,917],{"class":416},"\"submit\"",[410,919,920],{"class":424},">Submit\u003C/",[410,922,908],{"class":907},[410,924,925],{"class":424},">\n",[410,927,928,930,932,935,937],{"class":412,"line":432},[410,929,904],{"class":424},[410,931,908],{"class":907},[410,933,934],{"class":424},">More\u003C/",[410,936,908],{"class":907},[410,938,925],{"class":424},[410,940,941,943,945,948,950,953,956,958],{"class":412,"line":572},[410,942,904],{"class":424},[410,944,50],{"class":907},[410,946,947],{"class":441}," href",[410,949,914],{"class":424},[410,951,952],{"class":416},"\"/more\"",[410,954,955],{"class":424},">Find out more\u003C/",[410,957,50],{"class":907},[410,959,925],{"class":424},[11,961,962],{},"If done manually, element extraction presupposes correct assumptions about which elements and element properties count as relevant. Alternatively, element relevance scoring can be outsourced to an LLM, at the cost of another inference step.",[11,964,965],{},"Extraction disposes of deep DOM hierarchy, which might be salient to the web agent LLM backend. From the below extracted DOM snapshot alone, the original content relationship is lost:",[11,967,968],{},[15,969,970],{},"Extracted DOM Snapshot:",[401,972,974],{"className":895,"code":973,"language":897,"meta":406,"style":406},"\u003Cstrong>MacBook Air\u003C/strong>\n\u003Cbutton>Add to cart\u003C/button>\n\u003Cp>Out of stock\u003C/p>\n\u003Ch2>MacBook Pro\u003C/h2>\n\u003Cbutton>Add to cart\u003C/button>\n",[125,975,976,989,1002,1015,1029],{"__ignoreMap":406},[410,977,978,980,982,985,987],{"class":412,"line":413},[410,979,904],{"class":424},[410,981,15],{"class":907},[410,983,984],{"class":424},">MacBook Air\u003C/",[410,986,15],{"class":907},[410,988,925],{"class":424},[410,990,991,993,995,998,1000],{"class":412,"line":432},[410,992,904],{"class":424},[410,994,908],{"class":907},[410,996,997],{"class":424},">Add to cart\u003C/",[410,999,908],{"class":907},[410,1001,925],{"class":424},[410,1003,1004,1006,1008,1011,1013],{"class":412,"line":572},[410,1005,904],{"class":424},[410,1007,11],{"class":907},[410,1009,1010],{"class":424},">Out of stock\u003C/",[410,1012,11],{"class":907},[410,1014,925],{"class":424},[410,1016,1018,1020,1022,1025,1027],{"class":412,"line":1017},4,[410,1019,904],{"class":424},[410,1021,56],{"class":907},[410,1023,1024],{"class":424},">MacBook Pro\u003C/",[410,1026,56],{"class":907},[410,1028,925],{"class":424},[410,1030,1032,1034,1036,1038,1040],{"class":412,"line":1031},5,[410,1033,904],{"class":424},[410,1035,908],{"class":907},[410,1037,997],{"class":424},[410,1039,908],{"class":907},[410,1041,925],{"class":424},[11,1043,1044],{},[15,1045,1046],{},"Original DOM Snapshot – Candidate A:",[401,1048,1050],{"className":895,"code":1049,"language":897,"meta":406,"style":406},"\u003Csection class=\"product\">\n  \u003Cstrong>MacBook Air\u003C/strong>\n  \u003Cbutton>Add to cart\u003C/button>\n  \u003Cp>Out of stock\u003C/p>  👈\n\u003C/section>\n\u003Csection class=\"product\">\n  \u003Cstrong>MacBook Pro\u003C/strong>\n  \u003Cbutton>Add to cart\u003C/button>\n\u003C/section>\n",[125,1051,1052,1069,1082,1094,1107,1116,1131,1144,1157],{"__ignoreMap":406},[410,1053,1054,1056,1059,1062,1064,1067],{"class":412,"line":413},[410,1055,904],{"class":424},[410,1057,1058],{"class":907},"section",[410,1060,1061],{"class":441}," class",[410,1063,914],{"class":424},[410,1065,1066],{"class":416},"\"product\"",[410,1068,925],{"class":424},[410,1070,1071,1074,1076,1078,1080],{"class":412,"line":432},[410,1072,1073],{"class":424},"  \u003C",[410,1075,15],{"class":907},[410,1077,984],{"class":424},[410,1079,15],{"class":907},[410,1081,925],{"class":424},[410,1083,1084,1086,1088,1090,1092],{"class":412,"line":572},[410,1085,1073],{"class":424},[410,1087,908],{"class":907},[410,1089,997],{"class":424},[410,1091,908],{"class":907},[410,1093,925],{"class":424},[410,1095,1096,1098,1100,1102,1104],{"class":412,"line":1017},[410,1097,1073],{"class":424},[410,1099,11],{"class":907},[410,1101,1010],{"class":424},[410,1103,11],{"class":907},[410,1105,1106],{"class":424},">  👈\n",[410,1108,1109,1112,1114],{"class":412,"line":1031},[410,1110,1111],{"class":424},"\u003C/",[410,1113,1058],{"class":907},[410,1115,925],{"class":424},[410,1117,1119,1121,1123,1125,1127,1129],{"class":412,"line":1118},6,[410,1120,904],{"class":424},[410,1122,1058],{"class":907},[410,1124,1061],{"class":441},[410,1126,914],{"class":424},[410,1128,1066],{"class":416},[410,1130,925],{"class":424},[410,1132,1134,1136,1138,1140,1142],{"class":412,"line":1133},7,[410,1135,1073],{"class":424},[410,1137,15],{"class":907},[410,1139,1024],{"class":424},[410,1141,15],{"class":907},[410,1143,925],{"class":424},[410,1145,1147,1149,1151,1153,1155],{"class":412,"line":1146},8,[410,1148,1073],{"class":424},[410,1150,908],{"class":907},[410,1152,997],{"class":424},[410,1154,908],{"class":907},[410,1156,925],{"class":424},[410,1158,1160,1162,1164],{"class":412,"line":1159},9,[410,1161,1111],{"class":424},[410,1163,1058],{"class":907},[410,1165,925],{"class":424},[11,1167,1168],{},[15,1169,1170],{},"Original DOM Snapshot – Candidate B:",[401,1172,1174],{"className":895,"code":1173,"language":897,"meta":406,"style":406},"\u003Csection class=\"product\">\n  \u003Cstrong>MacBook Air\u003C/strong>\n  \u003Cbutton>Add to cart\u003C/button>\n\u003C/section>\n\u003Csection class=\"product\">\n  \u003Cp>Out of stock\u003C/p>  👈\n  \u003Cstrong>MacBook Pro\u003C/strong>\n  \u003Cbutton>Add to cart\u003C/button>\n\u003C/section>\n",[125,1175,1176,1190,1202,1214,1222,1236,1248,1260,1272],{"__ignoreMap":406},[410,1177,1178,1180,1182,1184,1186,1188],{"class":412,"line":413},[410,1179,904],{"class":424},[410,1181,1058],{"class":907},[410,1183,1061],{"class":441},[410,1185,914],{"class":424},[410,1187,1066],{"class":416},[410,1189,925],{"class":424},[410,1191,1192,1194,1196,1198,1200],{"class":412,"line":432},[410,1193,1073],{"class":424},[410,1195,15],{"class":907},[410,1197,984],{"class":424},[410,1199,15],{"class":907},[410,1201,925],{"class":424},[410,1203,1204,1206,1208,1210,1212],{"class":412,"line":572},[410,1205,1073],{"class":424},[410,1207,908],{"class":907},[410,1209,997],{"class":424},[410,1211,908],{"class":907},[410,1213,925],{"class":424},[410,1215,1216,1218,1220],{"class":412,"line":1017},[410,1217,1111],{"class":424},[410,1219,1058],{"class":907},[410,1221,925],{"class":424},[410,1223,1224,1226,1228,1230,1232,1234],{"class":412,"line":1031},[410,1225,904],{"class":424},[410,1227,1058],{"class":907},[410,1229,1061],{"class":441},[410,1231,914],{"class":424},[410,1233,1066],{"class":416},[410,1235,925],{"class":424},[410,1237,1238,1240,1242,1244,1246],{"class":412,"line":1118},[410,1239,1073],{"class":424},[410,1241,11],{"class":907},[410,1243,1010],{"class":424},[410,1245,11],{"class":907},[410,1247,1106],{"class":424},[410,1249,1250,1252,1254,1256,1258],{"class":412,"line":1133},[410,1251,1073],{"class":424},[410,1253,15],{"class":907},[410,1255,1024],{"class":424},[410,1257,15],{"class":907},[410,1259,925],{"class":424},[410,1261,1262,1264,1266,1268,1270],{"class":412,"line":1146},[410,1263,1073],{"class":424},[410,1265,908],{"class":907},[410,1267,997],{"class":424},[410,1269,908],{"class":907},[410,1271,925],{"class":424},[410,1273,1274,1276,1278],{"class":412,"line":1159},[410,1275,1111],{"class":424},[410,1277,1058],{"class":907},[410,1279,925],{"class":424},[749,1281,1283],{"id":1282},"downsampled-dom-snapshots","Downsampled DOM Snapshots",[11,1285,1286,1287,345],{},"Downsampling means reducing data point count whilst preserving the overall data shape and most of the relevant features. Picture an image being downsized: the depicted object remains recognisable to a large degree. The concept of image downsampling can be transferred to the DOM by locally 'averaging' DOM subtrees – trading fidelity for size",[763,1288,1289],{},[50,1290,1294],{"href":1291,"ariaDescribedBy":1292,"dataFootnoteRef":406,"id":1293},"#user-content-fn-4",[769],"user-content-fnref-4","4",[11,1296,1297],{},[15,1298,1299],{},"Original DOM Snapshot:",[401,1301,1303],{"className":895,"code":1302,"language":897,"meta":406,"style":406},"\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: mozzarella, 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",[125,1304,1305,1343,1374,1389,1397,1413,1427,1435,1440,1445,1455,1476,1486,1501,1515,1524,1530,1536,1545,1564,1573,1583,1593],{"__ignoreMap":406},[410,1306,1307,1309,1311,1313,1315,1318,1321,1323,1326,1329,1331,1334,1336,1338,1341],{"class":412,"line":413},[410,1308,904],{"class":424},[410,1310,1058],{"class":907},[410,1312,1061],{"class":441},[410,1314,914],{"class":424},[410,1316,1317],{"class":416},"\"container\"",[410,1319,1320],{"class":441}," tabindex",[410,1322,914],{"class":424},[410,1324,1325],{"class":416},"\"3\"",[410,1327,1328],{"class":441}," required",[410,1330,914],{"class":424},[410,1332,1333],{"class":416},"\"true\"",[410,1335,911],{"class":441},[410,1337,914],{"class":424},[410,1339,1340],{"class":416},"\"example\"",[410,1342,925],{"class":424},[410,1344,1345,1347,1350,1352,1354,1357,1360,1362,1365,1367,1369,1372],{"class":412,"line":432},[410,1346,1073],{"class":424},[410,1348,1349],{"class":907},"div",[410,1351,1061],{"class":441},[410,1353,914],{"class":424},[410,1355,1356],{"class":416},"\"mx-auto\"",[410,1358,1359],{"class":441}," data-topic",[410,1361,914],{"class":424},[410,1363,1364],{"class":416},"\"products\"",[410,1366,1328],{"class":441},[410,1368,914],{"class":424},[410,1370,1371],{"class":416},"\"false\"",[410,1373,925],{"class":424},[410,1375,1376,1379,1382,1385,1387],{"class":412,"line":572},[410,1377,1378],{"class":424},"    \u003C",[410,1380,1381],{"class":907},"h1",[410,1383,1384],{"class":424},">Our Pizza\u003C/",[410,1386,1381],{"class":907},[410,1388,925],{"class":424},[410,1390,1391,1393,1395],{"class":412,"line":1017},[410,1392,1378],{"class":424},[410,1394,1349],{"class":907},[410,1396,925],{"class":424},[410,1398,1399,1402,1404,1406,1408,1411],{"class":412,"line":1031},[410,1400,1401],{"class":424},"      \u003C",[410,1403,1349],{"class":907},[410,1405,1061],{"class":441},[410,1407,914],{"class":424},[410,1409,1410],{"class":416},"\"shadow-lg\"",[410,1412,925],{"class":424},[410,1414,1415,1418,1420,1423,1425],{"class":412,"line":1118},[410,1416,1417],{"class":424},"        \u003C",[410,1419,56],{"class":907},[410,1421,1422],{"class":424},">Margherita\u003C/",[410,1424,56],{"class":907},[410,1426,925],{"class":424},[410,1428,1429,1431,1433],{"class":412,"line":1133},[410,1430,1417],{"class":424},[410,1432,11],{"class":907},[410,1434,925],{"class":424},[410,1436,1437],{"class":412,"line":1146},[410,1438,1439],{"class":424},"         A simple classic: mozzarella, tomatoes and basil.\n",[410,1441,1442],{"class":412,"line":1159},[410,1443,1444],{"class":424},"         An everyday choice!\n",[410,1446,1448,1451,1453],{"class":412,"line":1447},10,[410,1449,1450],{"class":424},"        \u003C/",[410,1452,11],{"class":907},[410,1454,925],{"class":424},[410,1456,1458,1460,1462,1464,1466,1469,1472,1474],{"class":412,"line":1457},11,[410,1459,1417],{"class":424},[410,1461,908],{"class":907},[410,1463,911],{"class":441},[410,1465,914],{"class":424},[410,1467,1468],{"class":416},"\"button\"",[410,1470,1471],{"class":424},">Add\u003C/",[410,1473,908],{"class":907},[410,1475,925],{"class":424},[410,1477,1479,1482,1484],{"class":412,"line":1478},12,[410,1480,1481],{"class":424},"      \u003C/",[410,1483,1349],{"class":907},[410,1485,925],{"class":424},[410,1487,1489,1491,1493,1495,1497,1499],{"class":412,"line":1488},13,[410,1490,1401],{"class":424},[410,1492,1349],{"class":907},[410,1494,1061],{"class":441},[410,1496,914],{"class":424},[410,1498,1410],{"class":416},[410,1500,925],{"class":424},[410,1502,1504,1506,1508,1511,1513],{"class":412,"line":1503},14,[410,1505,1417],{"class":424},[410,1507,56],{"class":907},[410,1509,1510],{"class":424},">Capricciosa\u003C/",[410,1512,56],{"class":907},[410,1514,925],{"class":424},[410,1516,1518,1520,1522],{"class":412,"line":1517},15,[410,1519,1417],{"class":424},[410,1521,11],{"class":907},[410,1523,925],{"class":424},[410,1525,1527],{"class":412,"line":1526},16,[410,1528,1529],{"class":424},"          A rich taste: mozzarella, ham, mushrooms, artichokes and olives.\n",[410,1531,1533],{"class":412,"line":1532},17,[410,1534,1535],{"class":424},"          A true favourite!\n",[410,1537,1539,1541,1543],{"class":412,"line":1538},18,[410,1540,1450],{"class":424},[410,1542,11],{"class":907},[410,1544,925],{"class":424},[410,1546,1548,1550,1552,1554,1556,1558,1560,1562],{"class":412,"line":1547},19,[410,1549,1417],{"class":424},[410,1551,908],{"class":907},[410,1553,911],{"class":441},[410,1555,914],{"class":424},[410,1557,1468],{"class":416},[410,1559,1471],{"class":424},[410,1561,908],{"class":907},[410,1563,925],{"class":424},[410,1565,1567,1569,1571],{"class":412,"line":1566},20,[410,1568,1481],{"class":424},[410,1570,1349],{"class":907},[410,1572,925],{"class":424},[410,1574,1576,1579,1581],{"class":412,"line":1575},21,[410,1577,1578],{"class":424},"    \u003C/",[410,1580,1349],{"class":907},[410,1582,925],{"class":424},[410,1584,1586,1589,1591],{"class":412,"line":1585},22,[410,1587,1588],{"class":424},"  \u003C/",[410,1590,1349],{"class":907},[410,1592,925],{"class":424},[410,1594,1596,1598,1600],{"class":412,"line":1595},23,[410,1597,1111],{"class":424},[410,1599,1058],{"class":907},[410,1601,925],{"class":424},[11,1603,1604],{},[15,1605,1606],{},"Downsampled DOM Snapshot:",[401,1608,1610],{"className":895,"code":1609,"language":897,"meta":406,"style":406},"\u003Csection class=\"container\" required=\"true\" type=\"example\">\n  \u003Cdiv class=\"mx-auto\" required=\"false\">\n    Our Pizza\n    \u003Cdiv>\n      Margherita\n      A simple classic: mozzarella, tomatoes and basil.\n      An everyday choice!\n      \u003Cbutton type=\"button\">Add\u003C/button>\n      Capricciosa\n      A rich taste: mozzarella, ham, mushrooms, artichokes and olives.\n      A true favourite!\n      \u003Cbutton type=\"button\">Add\u003C/button>\n    \u003C/div>\n  \u003C/div>\n\u003C/section>\n",[125,1611,1612,1638,1658,1663,1671,1676,1681,1686,1704,1709,1714,1719,1737,1745,1753],{"__ignoreMap":406},[410,1613,1614,1616,1618,1620,1622,1624,1626,1628,1630,1632,1634,1636],{"class":412,"line":413},[410,1615,904],{"class":424},[410,1617,1058],{"class":907},[410,1619,1061],{"class":441},[410,1621,914],{"class":424},[410,1623,1317],{"class":416},[410,1625,1328],{"class":441},[410,1627,914],{"class":424},[410,1629,1333],{"class":416},[410,1631,911],{"class":441},[410,1633,914],{"class":424},[410,1635,1340],{"class":416},[410,1637,925],{"class":424},[410,1639,1640,1642,1644,1646,1648,1650,1652,1654,1656],{"class":412,"line":432},[410,1641,1073],{"class":424},[410,1643,1349],{"class":907},[410,1645,1061],{"class":441},[410,1647,914],{"class":424},[410,1649,1356],{"class":416},[410,1651,1328],{"class":441},[410,1653,914],{"class":424},[410,1655,1371],{"class":416},[410,1657,925],{"class":424},[410,1659,1660],{"class":412,"line":572},[410,1661,1662],{"class":424},"    Our Pizza\n",[410,1664,1665,1667,1669],{"class":412,"line":1017},[410,1666,1378],{"class":424},[410,1668,1349],{"class":907},[410,1670,925],{"class":424},[410,1672,1673],{"class":412,"line":1031},[410,1674,1675],{"class":424},"      Margherita\n",[410,1677,1678],{"class":412,"line":1118},[410,1679,1680],{"class":424},"      A simple classic: mozzarella, tomatoes and basil.\n",[410,1682,1683],{"class":412,"line":1133},[410,1684,1685],{"class":424},"      An everyday choice!\n",[410,1687,1688,1690,1692,1694,1696,1698,1700,1702],{"class":412,"line":1146},[410,1689,1401],{"class":424},[410,1691,908],{"class":907},[410,1693,911],{"class":441},[410,1695,914],{"class":424},[410,1697,1468],{"class":416},[410,1699,1471],{"class":424},[410,1701,908],{"class":907},[410,1703,925],{"class":424},[410,1705,1706],{"class":412,"line":1159},[410,1707,1708],{"class":424},"      Capricciosa\n",[410,1710,1711],{"class":412,"line":1447},[410,1712,1713],{"class":424},"      A rich taste: mozzarella, ham, mushrooms, artichokes and olives.\n",[410,1715,1716],{"class":412,"line":1457},[410,1717,1718],{"class":424},"      A true favourite!\n",[410,1720,1721,1723,1725,1727,1729,1731,1733,1735],{"class":412,"line":1478},[410,1722,1401],{"class":424},[410,1724,908],{"class":907},[410,1726,911],{"class":441},[410,1728,914],{"class":424},[410,1730,1468],{"class":416},[410,1732,1471],{"class":424},[410,1734,908],{"class":907},[410,1736,925],{"class":424},[410,1738,1739,1741,1743],{"class":412,"line":1488},[410,1740,1578],{"class":424},[410,1742,1349],{"class":907},[410,1744,925],{"class":424},[410,1746,1747,1749,1751],{"class":412,"line":1503},[410,1748,1588],{"class":424},[410,1750,1349],{"class":907},[410,1752,925],{"class":424},[410,1754,1755,1757,1759],{"class":412,"line":1517},[410,1756,1111],{"class":424},[410,1758,1058],{"class":907},[410,1760,925],{"class":424},[11,1762,1763,1764,345],{},"When downsampling is defined over different types of nodes – for instance, elements, attributes, and text – it becomes a powerful technique to control DOM size in a snapshot pipeline. Adaptive implementations can moreover produce snapshots that fall below a hard token limit. Our evaluation revealed that moderate downsampling ratios comfortably fit the mean DOM snapshot of real-world-representative web pages within GPT-4o's context window – leaving headroom for an agent system prompt and a trace of reasoning and action history",[763,1765,1766],{},[50,1767,1294],{"href":1291,"ariaDescribedBy":1768,"dataFootnoteRef":406,"id":1769},[769],"user-content-fnref-4-2",[117,1771,1773],{"id":1772},"the-problem-with-dom-based-targeting","The Problem with DOM-Based Targeting",[11,1775,1776,1777,1780,1781,1784],{},"When DOM snapshots are transformation artefacts, relative CSS selectors like nth-child paths might not map back to the live DOM. There are two straightforward ways to account for breaking CSS selectors: (1) assigning unique IDs to relevant elements in the live UI that persist transformations (e.g., via a unique attribute ",[125,1778,1779],{},"UNIQUE-ID=\"27\"",", which can be selected via ",[125,1782,1783],{},"[UNIQUE-ID=\"27\"]","), and (2) maintaining a source map between elements in the live DOM and the transformed DOM. The latter approach does favourably not affect the snapshot directly.",[11,1786,1787],{},[15,1788,1789],{},"DOM Snapshot with Inlined IDs:",[71,1791],{"alt":1792,"loading":76,"src":1793},"A DOM snapshot (HTML) visualising unique ID (attribute) targeting","/blog/serialising-web-ui-state-for-llms-the-complete-guide/7.png",[117,1795,1797],{"id":1796},"the-dom-based-snapshot-pipeline","The DOM-Based Snapshot Pipeline",[11,1799,1800],{},"LLMs are able to reason over HTML. Yet, HTML carries noise, such as obfuscated scripts or hidden subtrees. DOM snapshots should for that reason be seen as a base representation, rather than a target representation.",[11,1802,1803],{},"The concept of DOM downsampling can be utilised as a universal size control in a snapshot pipeline – ideally exposed as quality, the inverse property of downsampling. Moreover, the DOM can be pre-transformed by deterministic techniques, such as pruning hidden subtrees to surface only the tangible UI – a characteristic that is natural with GUI snapshots.",[11,1805,1806],{},"The pipeline approach traceably goes from the raw DOM to an abstract snapshot representation. For example:",[386,1808,1809,1832,1838,1896,1902,1908],{},[357,1810,1811,1814,1815,1820,1821,1824,1825,167,1828,1831],{},[15,1812,1813],{},"Scope Subtree."," Scope in to a task-relevant subtree. An information retrieval task on ",[50,1816,1819],{"href":1817,"rel":1818},"https://www.wikipedia.org",[67],"wikipedia.org"," can scope into the ",[125,1822,1823],{},"main"," element – ",[125,1826,1827],{},"header",[125,1829,1830],{},"footer"," are irrelevant.",[357,1833,1834,1837],{},[15,1835,1836],{},"Clone."," Clone the live DOM.",[357,1839,1840,1843,1844],{},[15,1841,1842],{},"Filter."," Apply arbitrary filters to the cloned DOM (in memory). For example:\n",[354,1845,1846,1884,1890],{},[357,1847,1848,1851,1852],{},[15,1849,1850],{},"Prune Subtrees"," E.g.:\n",[354,1853,1854,1860,1866],{},[357,1855,1856,1859],{},[15,1857,1858],{},"Non-interactive Nodes",", e.g., hidden elements.",[357,1861,1862,1865],{},[15,1863,1864],{},"Irrelevant Nodes",", e.g., comment nodes.",[357,1867,1868,1871,1872,1874,1875,1877,1878,1881,1882,345],{},[15,1869,1870],{},"Redundant Nodes",", e.g., ",[125,1873,50],{}," in the ",[125,1876,1830],{}," that has a same-",[125,1879,1880],{},"href"," equivalent in the ",[125,1883,1827],{},[357,1885,1886,1889],{},[15,1887,1888],{},"Sanitise."," E.g., sensitive information from content-editables.",[357,1891,1892,1895],{},[15,1893,1894],{},"Clean."," E.g., remove stop words from text nodes.",[357,1897,1898,1901],{},[15,1899,1900],{},"Serialise."," Serialise the cloned DOM to HTML.",[357,1903,1904,1907],{},[15,1905,1906],{},"Downsample."," Downsample the HTML to control size.",[357,1909,1910,1913],{},[15,1911,1912],{},"Translate."," Translate the downsampled HTML to any DOM-based representation, e.g., the accessibility tree.",[71,1915],{"alt":1916,"loading":76,"src":1917,"provider":478},"Example of a DOM snapshot pipeline","/blog/serialising-web-ui-state-for-llms-the-complete-guide/8.svg",[11,1919,1920],{},"A filtered DOM drastically increases stability of repeatedly run web journeys: if only a single button routes to a target page, the agent perceives an unambiguous action target element. The rule of thumb is: the less actionable options a snapshot transcribes, the better – given all relevant options are covered.",[749,1922,1924],{"id":1923},"arbitrary-snapshot-representations","Arbitrary Snapshot Representations",[11,1926,1927],{},"Any text-based snapshot representation can be derived from the single-source-of-truth DOM. Which representation is best highly depends on the given web browsing task. A high-level distinction is between (A) navigation and (B) information retrieval tasks. Navigation tasks do not require extensive text, but  actionable elements – if a snapshot omits a relevant button, the LLM is not able to use the encoded UI. Information retrieval tasks, on the other hand, require text, as the text contains topical information, whilst actionable elements do not matter.",[11,1929,1930],{},"Compare the following snapshots representations for the same UI:",[11,1932,1933],{},[15,1934,1935],{},"DOM Snapshot:",[401,1937,1939],{"className":895,"code":1938,"language":897,"meta":406,"style":406},"\u003Csection class=\"container\" required=\"true\" type=\"example\">\n  \u003Cdiv class=\"mx-auto\" required=\"false\">\n    \u003Ch1>Our Pizza\u003C/h1>\n    \u003Cdiv>\n      \u003Ch2>Margherita\u003C/h2>\n      \u003Cp>\n        A simple classic: mozzarella, tomatoes and basil.\n        An everyday choice!\n      \u003C/p>\n      \u003Ca href=\"add?p=margherita\" data-uid=\"1\">Add\u003C/a>\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      \u003Ca href=\"add?p=capricciosa\" data-uid=\"2\">Add\u003C/a>\n    \u003C/div>\n  \u003C/div>\n\u003C/section>\n",[125,1940,1941,1967,1987,1999,2007,2019,2027,2032,2037,2045,2072,2084,2092,2097,2102,2110,2136,2144,2152],{"__ignoreMap":406},[410,1942,1943,1945,1947,1949,1951,1953,1955,1957,1959,1961,1963,1965],{"class":412,"line":413},[410,1944,904],{"class":424},[410,1946,1058],{"class":907},[410,1948,1061],{"class":441},[410,1950,914],{"class":424},[410,1952,1317],{"class":416},[410,1954,1328],{"class":441},[410,1956,914],{"class":424},[410,1958,1333],{"class":416},[410,1960,911],{"class":441},[410,1962,914],{"class":424},[410,1964,1340],{"class":416},[410,1966,925],{"class":424},[410,1968,1969,1971,1973,1975,1977,1979,1981,1983,1985],{"class":412,"line":432},[410,1970,1073],{"class":424},[410,1972,1349],{"class":907},[410,1974,1061],{"class":441},[410,1976,914],{"class":424},[410,1978,1356],{"class":416},[410,1980,1328],{"class":441},[410,1982,914],{"class":424},[410,1984,1371],{"class":416},[410,1986,925],{"class":424},[410,1988,1989,1991,1993,1995,1997],{"class":412,"line":572},[410,1990,1378],{"class":424},[410,1992,1381],{"class":907},[410,1994,1384],{"class":424},[410,1996,1381],{"class":907},[410,1998,925],{"class":424},[410,2000,2001,2003,2005],{"class":412,"line":1017},[410,2002,1378],{"class":424},[410,2004,1349],{"class":907},[410,2006,925],{"class":424},[410,2008,2009,2011,2013,2015,2017],{"class":412,"line":1031},[410,2010,1401],{"class":424},[410,2012,56],{"class":907},[410,2014,1422],{"class":424},[410,2016,56],{"class":907},[410,2018,925],{"class":424},[410,2020,2021,2023,2025],{"class":412,"line":1118},[410,2022,1401],{"class":424},[410,2024,11],{"class":907},[410,2026,925],{"class":424},[410,2028,2029],{"class":412,"line":1133},[410,2030,2031],{"class":424},"        A simple classic: mozzarella, tomatoes and basil.\n",[410,2033,2034],{"class":412,"line":1146},[410,2035,2036],{"class":424},"        An everyday choice!\n",[410,2038,2039,2041,2043],{"class":412,"line":1159},[410,2040,1481],{"class":424},[410,2042,11],{"class":907},[410,2044,925],{"class":424},[410,2046,2047,2049,2051,2053,2055,2058,2061,2063,2066,2068,2070],{"class":412,"line":1447},[410,2048,1401],{"class":424},[410,2050,50],{"class":907},[410,2052,947],{"class":441},[410,2054,914],{"class":424},[410,2056,2057],{"class":416},"\"add?p=margherita\"",[410,2059,2060],{"class":441}," data-uid",[410,2062,914],{"class":424},[410,2064,2065],{"class":416},"\"1\"",[410,2067,1471],{"class":424},[410,2069,50],{"class":907},[410,2071,925],{"class":424},[410,2073,2074,2076,2078,2080,2082],{"class":412,"line":1457},[410,2075,1401],{"class":424},[410,2077,56],{"class":907},[410,2079,1510],{"class":424},[410,2081,56],{"class":907},[410,2083,925],{"class":424},[410,2085,2086,2088,2090],{"class":412,"line":1478},[410,2087,1401],{"class":424},[410,2089,11],{"class":907},[410,2091,925],{"class":424},[410,2093,2094],{"class":412,"line":1488},[410,2095,2096],{"class":424},"        A rich taste: mozzarella, ham, mushrooms, artichokes and olives.\n",[410,2098,2099],{"class":412,"line":1503},[410,2100,2101],{"class":424},"        A true favourite!\n",[410,2103,2104,2106,2108],{"class":412,"line":1517},[410,2105,1481],{"class":424},[410,2107,11],{"class":907},[410,2109,925],{"class":424},[410,2111,2112,2114,2116,2118,2120,2123,2125,2127,2130,2132,2134],{"class":412,"line":1526},[410,2113,1401],{"class":424},[410,2115,50],{"class":907},[410,2117,947],{"class":441},[410,2119,914],{"class":424},[410,2121,2122],{"class":416},"\"add?p=capricciosa\"",[410,2124,2060],{"class":441},[410,2126,914],{"class":424},[410,2128,2129],{"class":416},"\"2\"",[410,2131,1471],{"class":424},[410,2133,50],{"class":907},[410,2135,925],{"class":424},[410,2137,2138,2140,2142],{"class":412,"line":1532},[410,2139,1578],{"class":424},[410,2141,1349],{"class":907},[410,2143,925],{"class":424},[410,2145,2146,2148,2150],{"class":412,"line":1538},[410,2147,1588],{"class":424},[410,2149,1349],{"class":907},[410,2151,925],{"class":424},[410,2153,2154,2156,2158],{"class":412,"line":1547},[410,2155,1111],{"class":424},[410,2157,1058],{"class":907},[410,2159,925],{"class":424},[11,2161,2162],{},[15,2163,2164],{},"Accessibility Tree Snapshot:",[401,2166,2170],{"className":2167,"code":2168,"language":2169,"meta":406,"style":406},"language-yaml shiki shiki-themes github-dark github-dark","- document:\n  children:\n    - section:\n      children:\n        - heading:\n          name: \"Our Pizza\"\n          level: 1\n        - heading:\n          name: \"Margherita\"\n          level: 2\n        - paragraph:\n          children:\n            - text: \"A simple classic: mozzarella, tomatoes and basil. An everyday choice!\"\n        - link:\n          name: \"Add\"\n          url: \"add?p=margherita\"\n          data-uid: 1\n        - heading:\n          name: \"Capricciosa\"\n          level: 2\n        - paragraph:\n          children:\n            - text: \"A rich taste: mozzarella, ham, mushrooms, artichokes and olives. A true favourite!\"\n        - link:\n          name: \"Add\"\n          url: \"add?p=capricciosa\"\n          data-uid: 2\n","yaml",[125,2171,2172,2183,2190,2199,2206,2216,2227,2238,2246,2255,2264,2273,2280,2293,2302,2311,2321,2330,2338,2347,2355,2363,2369,2380,2389,2398,2408],{"__ignoreMap":406},[410,2173,2174,2177,2180],{"class":412,"line":413},[410,2175,2176],{"class":424},"- ",[410,2178,2179],{"class":907},"document",[410,2181,2182],{"class":424},":\n",[410,2184,2185,2188],{"class":412,"line":432},[410,2186,2187],{"class":907},"  children",[410,2189,2182],{"class":424},[410,2191,2192,2195,2197],{"class":412,"line":572},[410,2193,2194],{"class":424},"    - ",[410,2196,1058],{"class":907},[410,2198,2182],{"class":424},[410,2200,2201,2204],{"class":412,"line":1017},[410,2202,2203],{"class":907},"      children",[410,2205,2182],{"class":424},[410,2207,2208,2211,2214],{"class":412,"line":1031},[410,2209,2210],{"class":424},"        - ",[410,2212,2213],{"class":907},"heading",[410,2215,2182],{"class":424},[410,2217,2218,2221,2224],{"class":412,"line":1118},[410,2219,2220],{"class":907},"          name",[410,2222,2223],{"class":424},": ",[410,2225,2226],{"class":416},"\"Our Pizza\"\n",[410,2228,2229,2232,2234],{"class":412,"line":1133},[410,2230,2231],{"class":907},"          level",[410,2233,2223],{"class":424},[410,2235,2237],{"class":2236},"s8ozJ","1\n",[410,2239,2240,2242,2244],{"class":412,"line":1146},[410,2241,2210],{"class":424},[410,2243,2213],{"class":907},[410,2245,2182],{"class":424},[410,2247,2248,2250,2252],{"class":412,"line":1159},[410,2249,2220],{"class":907},[410,2251,2223],{"class":424},[410,2253,2254],{"class":416},"\"Margherita\"\n",[410,2256,2257,2259,2261],{"class":412,"line":1447},[410,2258,2231],{"class":907},[410,2260,2223],{"class":424},[410,2262,2263],{"class":2236},"2\n",[410,2265,2266,2268,2271],{"class":412,"line":1457},[410,2267,2210],{"class":424},[410,2269,2270],{"class":907},"paragraph",[410,2272,2182],{"class":424},[410,2274,2275,2278],{"class":412,"line":1478},[410,2276,2277],{"class":907},"          children",[410,2279,2182],{"class":424},[410,2281,2282,2285,2288,2290],{"class":412,"line":1488},[410,2283,2284],{"class":424},"            - ",[410,2286,2287],{"class":907},"text",[410,2289,2223],{"class":424},[410,2291,2292],{"class":416},"\"A simple classic: mozzarella, tomatoes and basil. An everyday choice!\"\n",[410,2294,2295,2297,2300],{"class":412,"line":1503},[410,2296,2210],{"class":424},[410,2298,2299],{"class":907},"link",[410,2301,2182],{"class":424},[410,2303,2304,2306,2308],{"class":412,"line":1517},[410,2305,2220],{"class":907},[410,2307,2223],{"class":424},[410,2309,2310],{"class":416},"\"Add\"\n",[410,2312,2313,2316,2318],{"class":412,"line":1526},[410,2314,2315],{"class":907},"          url",[410,2317,2223],{"class":424},[410,2319,2320],{"class":416},"\"add?p=margherita\"\n",[410,2322,2323,2326,2328],{"class":412,"line":1532},[410,2324,2325],{"class":907},"          data-uid",[410,2327,2223],{"class":424},[410,2329,2237],{"class":2236},[410,2331,2332,2334,2336],{"class":412,"line":1538},[410,2333,2210],{"class":424},[410,2335,2213],{"class":907},[410,2337,2182],{"class":424},[410,2339,2340,2342,2344],{"class":412,"line":1547},[410,2341,2220],{"class":907},[410,2343,2223],{"class":424},[410,2345,2346],{"class":416},"\"Capricciosa\"\n",[410,2348,2349,2351,2353],{"class":412,"line":1566},[410,2350,2231],{"class":907},[410,2352,2223],{"class":424},[410,2354,2263],{"class":2236},[410,2356,2357,2359,2361],{"class":412,"line":1575},[410,2358,2210],{"class":424},[410,2360,2270],{"class":907},[410,2362,2182],{"class":424},[410,2364,2365,2367],{"class":412,"line":1585},[410,2366,2277],{"class":907},[410,2368,2182],{"class":424},[410,2370,2371,2373,2375,2377],{"class":412,"line":1595},[410,2372,2284],{"class":424},[410,2374,2287],{"class":907},[410,2376,2223],{"class":424},[410,2378,2379],{"class":416},"\"A rich taste: mozzarella, ham, mushrooms, artichokes and olives. A true favourite!\"\n",[410,2381,2383,2385,2387],{"class":412,"line":2382},24,[410,2384,2210],{"class":424},[410,2386,2299],{"class":907},[410,2388,2182],{"class":424},[410,2390,2392,2394,2396],{"class":412,"line":2391},25,[410,2393,2220],{"class":907},[410,2395,2223],{"class":424},[410,2397,2310],{"class":416},[410,2399,2401,2403,2405],{"class":412,"line":2400},26,[410,2402,2315],{"class":907},[410,2404,2223],{"class":424},[410,2406,2407],{"class":416},"\"add?p=capricciosa\"\n",[410,2409,2411,2413,2415],{"class":412,"line":2410},27,[410,2412,2325],{"class":907},[410,2414,2223],{"class":424},[410,2416,2263],{"class":2236},[11,2418,2419],{},[15,2420,2421],{},"Markdown Snapshot:",[401,2423,2426],{"className":2424,"code":2425,"language":583,"meta":406,"style":406},"language-md shiki shiki-themes github-dark github-dark","# Our Pizza\n\n## Margherita\n\nA simple classic: mozzarella, tomatoes and basil.\nAn everyday choice!\n\n[Add](add?p=margherita)\n\n## Capricciosa\n\nA rich taste: mozzarella, ham, mushrooms, artichokes and olives.\nA true favourite!\n\n[Add](add?p=capricciosa)\n",[125,2427,2428,2433,2438,2443,2447,2452,2457,2461,2466,2470,2475,2479,2484,2489,2493],{"__ignoreMap":406},[410,2429,2430],{"class":412,"line":413},[410,2431,2432],{},"# Our Pizza\n",[410,2434,2435],{"class":412,"line":432},[410,2436,2437],{"emptyLinePlaceholder":617},"\n",[410,2439,2440],{"class":412,"line":572},[410,2441,2442],{},"## Margherita\n",[410,2444,2445],{"class":412,"line":1017},[410,2446,2437],{"emptyLinePlaceholder":617},[410,2448,2449],{"class":412,"line":1031},[410,2450,2451],{},"A simple classic: mozzarella, tomatoes and basil.\n",[410,2453,2454],{"class":412,"line":1118},[410,2455,2456],{},"An everyday choice!\n",[410,2458,2459],{"class":412,"line":1133},[410,2460,2437],{"emptyLinePlaceholder":617},[410,2462,2463],{"class":412,"line":1146},[410,2464,2465],{},"[Add](add?p=margherita)\n",[410,2467,2468],{"class":412,"line":1159},[410,2469,2437],{"emptyLinePlaceholder":617},[410,2471,2472],{"class":412,"line":1447},[410,2473,2474],{},"## Capricciosa\n",[410,2476,2477],{"class":412,"line":1457},[410,2478,2437],{"emptyLinePlaceholder":617},[410,2480,2481],{"class":412,"line":1478},[410,2482,2483],{},"A rich taste: mozzarella, ham, mushrooms, artichokes and olives.\n",[410,2485,2486],{"class":412,"line":1488},[410,2487,2488],{},"A true favourite!\n",[410,2490,2491],{"class":412,"line":1503},[410,2492,2437],{"emptyLinePlaceholder":617},[410,2494,2495],{"class":412,"line":1517},[410,2496,2497],{},"[Add](add?p=capricciosa)\n",[11,2499,2500],{},[15,2501,2502],{},"Custom Format Snapshot:",[401,2504,2508],{"className":2505,"code":2507,"language":2287},[2506],"language-text","[0] H1 \"Our Pizza\"\n[1] H2 \"Margherita\"\n[2] P \"A simple classic: mozzarella, tomatoes and basil.\\nAn everyday choice!\"\n[3] A \"Add\" \"add?p=margherita\"\n[4] H2 \"Capricciosa\"\n[5] P \"A rich taste: mozzarella, ham, mushrooms, artichokes and olives.\\nA true...\"\n[6] A \"Add\" \"add?p=capricciosa\"\n",[125,2509,2507],{"__ignoreMap":406},[11,2511,2512,2513,345],{},"Browser Use agents implement hybrid snapshots: the grounded GUI snapshot is a supplement to a custom-format indexed-list DOM snapshot, similar to the above example. Evaluations show that the indexed-list snapshot representation generally conveys most of the salient UI features for the web agent LLM backend",[763,2514,2515],{},[50,2516,1294],{"href":1291,"ariaDescribedBy":2517,"dataFootnoteRef":406,"id":2518},[769],"user-content-fnref-4-3",[56,2520,2522],{"id":2521},"non-idiomatic-application-designs","Non-Idiomatic Application Designs",[11,2524,2525],{},"An actionable element might lack affordance – not communicating its actionability through its bare appearance. That is bad UI/UX design practice. The concept extends to the DOM through HTML semantics, which communicate the general purpose of an element to web browsers and developers rather than users. Generalising to web agent LLM backends, the concept of affordance aligns between the GUI and the DOM – the model is a UI representation-agnostic user.",[11,2527,2528],{},"Missing affordances should be rectified in a snapshot wherever they can be discovered. Discoverability is another circular problem: what is an indirect affordance for actionability? Ideally, the underlying actionability is tracked, such as by checking for attached action event listeners. However, there is no browser API for this practice.",[11,2530,2531],{},"As an example for bad affordance in the GUI, imagine an overly subtle 'Shop' button. Bounding boxes in grounded GUI snapshots are a workaround – provided the element is discoverable as actionable in the DOM in the first place.",[71,2533],{"alt":2534,"loading":76,"src":2535,":width":2536},"Example of a fictional UI/UX bad practice (overly subtle button)","/blog/serialising-web-ui-state-for-llms-the-complete-guide/9.png","480",[11,2538,2539,2540,2545],{},"As an example for bad affordance in the DOM, look at this datepicker from ",[50,2541,2544],{"href":2542,"rel":2543},"https://www.webmd.com",[67],"webmd.com",":",[71,2547],{"alt":2548,"loading":76,"src":2549,":width":2536},"Example of an HTML bad practice (ignoring tag name semantics)","/blog/serialising-web-ui-state-for-llms-the-complete-guide/10.png",[401,2551,2553],{"className":895,"code":2552,"language":897,"meta":406,"style":406},"\u003Cdiv>\n  \u003Cspan class=\"cell day-header\">Sun\u003C/span>\n  \u003Cspan class=\"cell day-header\">Mon\u003C/span>\n  \u003Cspan class=\"cell day-header\">Tue\u003C/span>\n  \u003Cspan class=\"cell day-header\">Wed\u003C/span>\n  \u003Cspan class=\"cell day-header\">Thu\u003C/span>\n  \u003Cspan class=\"cell day-header\">Fri\u003C/span>\n  \u003Cspan class=\"cell day-header\">Sat\u003C/span>\n  \u003C!-- [...] -->\n  \u003Cspan class=\"cell day blank\">\u003C/span>\n  \u003Cspan class=\"cell day blank\">\u003C/span>\n  \u003Cspan class=\"cell day\">\u003Cspan>1\u003C/span>\u003C/span>\n  \u003Cspan class=\"cell day\">\u003Cspan>2\u003C/span>\u003C/span>\n  \u003Cspan class=\"cell day\">\u003Cspan>3\u003C/span>\u003C/span>\n  \u003C!-- [...] -->\n  \u003Cspan class=\"cell day\">\u003Cspan>29\u003C/span>\u003C/span>\n  \u003Cspan class=\"cell day\">\u003Cspan>30\u003C/span>\u003C/span>\n\u003C/div>\n",[125,2554,2555,2563,2583,2602,2621,2640,2659,2678,2697,2702,2722,2740,2769,2796,2823,2827,2854,2881],{"__ignoreMap":406},[410,2556,2557,2559,2561],{"class":412,"line":413},[410,2558,904],{"class":424},[410,2560,1349],{"class":907},[410,2562,925],{"class":424},[410,2564,2565,2567,2569,2571,2573,2576,2579,2581],{"class":412,"line":432},[410,2566,1073],{"class":424},[410,2568,410],{"class":907},[410,2570,1061],{"class":441},[410,2572,914],{"class":424},[410,2574,2575],{"class":416},"\"cell day-header\"",[410,2577,2578],{"class":424},">Sun\u003C/",[410,2580,410],{"class":907},[410,2582,925],{"class":424},[410,2584,2585,2587,2589,2591,2593,2595,2598,2600],{"class":412,"line":572},[410,2586,1073],{"class":424},[410,2588,410],{"class":907},[410,2590,1061],{"class":441},[410,2592,914],{"class":424},[410,2594,2575],{"class":416},[410,2596,2597],{"class":424},">Mon\u003C/",[410,2599,410],{"class":907},[410,2601,925],{"class":424},[410,2603,2604,2606,2608,2610,2612,2614,2617,2619],{"class":412,"line":1017},[410,2605,1073],{"class":424},[410,2607,410],{"class":907},[410,2609,1061],{"class":441},[410,2611,914],{"class":424},[410,2613,2575],{"class":416},[410,2615,2616],{"class":424},">Tue\u003C/",[410,2618,410],{"class":907},[410,2620,925],{"class":424},[410,2622,2623,2625,2627,2629,2631,2633,2636,2638],{"class":412,"line":1031},[410,2624,1073],{"class":424},[410,2626,410],{"class":907},[410,2628,1061],{"class":441},[410,2630,914],{"class":424},[410,2632,2575],{"class":416},[410,2634,2635],{"class":424},">Wed\u003C/",[410,2637,410],{"class":907},[410,2639,925],{"class":424},[410,2641,2642,2644,2646,2648,2650,2652,2655,2657],{"class":412,"line":1118},[410,2643,1073],{"class":424},[410,2645,410],{"class":907},[410,2647,1061],{"class":441},[410,2649,914],{"class":424},[410,2651,2575],{"class":416},[410,2653,2654],{"class":424},">Thu\u003C/",[410,2656,410],{"class":907},[410,2658,925],{"class":424},[410,2660,2661,2663,2665,2667,2669,2671,2674,2676],{"class":412,"line":1133},[410,2662,1073],{"class":424},[410,2664,410],{"class":907},[410,2666,1061],{"class":441},[410,2668,914],{"class":424},[410,2670,2575],{"class":416},[410,2672,2673],{"class":424},">Fri\u003C/",[410,2675,410],{"class":907},[410,2677,925],{"class":424},[410,2679,2680,2682,2684,2686,2688,2690,2693,2695],{"class":412,"line":1146},[410,2681,1073],{"class":424},[410,2683,410],{"class":907},[410,2685,1061],{"class":441},[410,2687,914],{"class":424},[410,2689,2575],{"class":416},[410,2691,2692],{"class":424},">Sat\u003C/",[410,2694,410],{"class":907},[410,2696,925],{"class":424},[410,2698,2699],{"class":412,"line":1159},[410,2700,2701],{"class":428},"  \u003C!-- [...] -->\n",[410,2703,2704,2706,2708,2710,2712,2715,2718,2720],{"class":412,"line":1447},[410,2705,1073],{"class":424},[410,2707,410],{"class":907},[410,2709,1061],{"class":441},[410,2711,914],{"class":424},[410,2713,2714],{"class":416},"\"cell day blank\"",[410,2716,2717],{"class":424},">\u003C/",[410,2719,410],{"class":907},[410,2721,925],{"class":424},[410,2723,2724,2726,2728,2730,2732,2734,2736,2738],{"class":412,"line":1457},[410,2725,1073],{"class":424},[410,2727,410],{"class":907},[410,2729,1061],{"class":441},[410,2731,914],{"class":424},[410,2733,2714],{"class":416},[410,2735,2717],{"class":424},[410,2737,410],{"class":907},[410,2739,925],{"class":424},[410,2741,2742,2744,2746,2748,2750,2753,2756,2758,2761,2763,2765,2767],{"class":412,"line":1478},[410,2743,1073],{"class":424},[410,2745,410],{"class":907},[410,2747,1061],{"class":441},[410,2749,914],{"class":424},[410,2751,2752],{"class":416},"\"cell day\"",[410,2754,2755],{"class":424},">\u003C",[410,2757,410],{"class":907},[410,2759,2760],{"class":424},">1\u003C/",[410,2762,410],{"class":907},[410,2764,2717],{"class":424},[410,2766,410],{"class":907},[410,2768,925],{"class":424},[410,2770,2771,2773,2775,2777,2779,2781,2783,2785,2788,2790,2792,2794],{"class":412,"line":1488},[410,2772,1073],{"class":424},[410,2774,410],{"class":907},[410,2776,1061],{"class":441},[410,2778,914],{"class":424},[410,2780,2752],{"class":416},[410,2782,2755],{"class":424},[410,2784,410],{"class":907},[410,2786,2787],{"class":424},">2\u003C/",[410,2789,410],{"class":907},[410,2791,2717],{"class":424},[410,2793,410],{"class":907},[410,2795,925],{"class":424},[410,2797,2798,2800,2802,2804,2806,2808,2810,2812,2815,2817,2819,2821],{"class":412,"line":1503},[410,2799,1073],{"class":424},[410,2801,410],{"class":907},[410,2803,1061],{"class":441},[410,2805,914],{"class":424},[410,2807,2752],{"class":416},[410,2809,2755],{"class":424},[410,2811,410],{"class":907},[410,2813,2814],{"class":424},">3\u003C/",[410,2816,410],{"class":907},[410,2818,2717],{"class":424},[410,2820,410],{"class":907},[410,2822,925],{"class":424},[410,2824,2825],{"class":412,"line":1517},[410,2826,2701],{"class":428},[410,2828,2829,2831,2833,2835,2837,2839,2841,2843,2846,2848,2850,2852],{"class":412,"line":1526},[410,2830,1073],{"class":424},[410,2832,410],{"class":907},[410,2834,1061],{"class":441},[410,2836,914],{"class":424},[410,2838,2752],{"class":416},[410,2840,2755],{"class":424},[410,2842,410],{"class":907},[410,2844,2845],{"class":424},">29\u003C/",[410,2847,410],{"class":907},[410,2849,2717],{"class":424},[410,2851,410],{"class":907},[410,2853,925],{"class":424},[410,2855,2856,2858,2860,2862,2864,2866,2868,2870,2873,2875,2877,2879],{"class":412,"line":1532},[410,2857,1073],{"class":424},[410,2859,410],{"class":907},[410,2861,1061],{"class":441},[410,2863,914],{"class":424},[410,2865,2752],{"class":416},[410,2867,2755],{"class":424},[410,2869,410],{"class":907},[410,2871,2872],{"class":424},">30\u003C/",[410,2874,410],{"class":907},[410,2876,2717],{"class":424},[410,2878,410],{"class":907},[410,2880,925],{"class":424},[410,2882,2883,2885,2887],{"class":412,"line":1538},[410,2884,1111],{"class":424},[410,2886,1349],{"class":907},[410,2888,925],{"class":424},[11,2890,2891,2892,2894,2895,2898,2899,2901,2902,2905,2906,2908],{},"The days wrapped in ",[125,2893,410],{}," (e.g., ",[125,2896,2897],{},"16",") are clickable, but the HTML communicates no such actionability. The idiomatic DOM equivalent would instead use ",[125,2900,908],{}," elements throughout, or at least assign suitable ",[125,2903,2904],{},"role"," attributes like ",[125,2907,908],{},". A DOM snapshot pipeline leaves space for solving this problem: rewrite the virtual DOM with idiomatic elements.",[401,2910,2912],{"className":895,"code":2911,"language":897,"meta":406,"style":406},"  \u003Cbutton class=\"cell day\">29\u003C/button>\n  \u003C!-- OR -->\n  \u003Cspan role=\"button\" class=\"cell day\">30\u003C/button>\n",[125,2913,2914,2932,2937],{"__ignoreMap":406},[410,2915,2916,2918,2920,2922,2924,2926,2928,2930],{"class":412,"line":413},[410,2917,1073],{"class":424},[410,2919,908],{"class":907},[410,2921,1061],{"class":441},[410,2923,914],{"class":424},[410,2925,2752],{"class":416},[410,2927,2845],{"class":424},[410,2929,908],{"class":907},[410,2931,925],{"class":424},[410,2933,2934],{"class":412,"line":432},[410,2935,2936],{"class":428},"  \u003C!-- OR -->\n",[410,2938,2939,2941,2943,2946,2948,2950,2952,2954,2956,2958,2960],{"class":412,"line":572},[410,2940,1073],{"class":424},[410,2942,410],{"class":907},[410,2944,2945],{"class":441}," role",[410,2947,914],{"class":424},[410,2949,1468],{"class":416},[410,2951,1061],{"class":441},[410,2953,914],{"class":424},[410,2955,2752],{"class":416},[410,2957,2872],{"class":424},[410,2959,908],{"class":907},[410,2961,925],{"class":424},[56,2963,2965],{"id":2964},"choosing-between-snapshot-representations","Choosing Between Snapshot Representations",[11,2967,2968],{},"No snapshot representation fits all purposes; the two base representations alone – GUI and DOM (HTML) – come with markedly different advantages and limitations. A proper snapshot tool should therefore route and cascade:",[386,2970,2971,2983,2989,2995],{},[357,2972,2973,2976,2977,2979,2980,2982],{},[15,2974,2975],{},"Route Modality."," Fall back to GUI snapshots if the UI is based on ",[125,2978,820],{}," or cross-origin ",[125,2981,816],{}," elements; use DOM snapshots by default.",[357,2984,2985,2988],{},[15,2986,2987],{},"Route Representation."," Categorise task and translate DOM snapshot to the most suitable representation. Categorising the task can be done with increasing levels of machine learning – simple keyword matching, or deploying a language model.",[357,2990,2991,2994],{},[15,2992,2993],{},"Scope Escalation."," If elicited action suggestions are unusable, widen the snapshot scope and representation richness.",[357,2996,2997,3000],{},[15,2998,2999],{},"Cascade to Hybrid."," If elicited action suggestions are still unusable, augment the rich DOM snapshot with a GUI snapshot for maximum grounding.",[224,3002,3003,3022],{},[227,3004,3005],{},[230,3006,3007,3010,3013,3016,3019],{},[233,3008],{"align":3009},"left",[233,3011,3012],{},"GUI",[233,3014,3015],{},"grounded",[233,3017,3018],{},"DOM",[233,3020,3021],{},"transformed",[240,3023,3024,3046,3067,3090,3109,3130],{},[230,3025,3026,3029,3034,3038,3041],{},[245,3027,3028],{"align":3009},"LLM Input Tokens",[245,3030,3031],{},[15,3032,3033],{},"Low",[245,3035,3036],{},[15,3037,3033],{},[245,3039,3040],{},"High",[245,3042,3043,3045],{},[15,3044,3033],{}," to Moderate",[230,3047,3048,3051,3054,3059,3063],{},[245,3049,3050],{"align":3009},"Element Targeting",[245,3052,3053],{},"Absolute",[245,3055,3056],{},[15,3057,3058],{},"Relative",[245,3060,3061],{},[15,3062,3058],{},[245,3064,3065],{},[15,3066,3058],{},[230,3068,3069,3072,3078,3082,3086],{},[245,3070,3071],{"align":3009},"Snapshot Scope",[245,3073,3074,3077],{},[15,3075,3076],{},"Free","/Viewport",[245,3079,3080,3077],{},[15,3081,3076],{},[245,3083,3084],{},[15,3085,3076],{},[245,3087,3088],{},[15,3089,3076],{},[230,3091,3092,3095,3098,3100,3105],{},[245,3093,3094],{"align":3009},"Snapshot Context",[245,3096,3097],{},"UI",[245,3099,3097],{},[245,3101,3102],{},[15,3103,3104],{},"Full",[245,3106,3107],{},[15,3108,3104],{},[230,3110,3111,3116,3121,3125,3128],{},[245,3112,3113,3115],{"align":3009},[125,3114,816],{}," Context",[245,3117,3118],{},[15,3119,3120],{},"Viewport",[245,3122,3123],{},[15,3124,3120],{},[245,3126,3127],{},"Same-origin only",[245,3129,3127],{},[230,3131,3132,3136,3141,3145,3148],{},[245,3133,3134,3115],{"align":3009},[125,3135,820],{},[245,3137,3138],{},[15,3139,3140],{},"Yes",[245,3142,3143],{},[15,3144,3140],{},[245,3146,3147],{},"No",[245,3149,3147],{},[56,3151,3153],{"id":3152},"using-snapshots-in-the-model-context","Using Snapshots In the Model Context",[11,3155,3156],{},"Creating a snapshot is one thing. Using it as context to a model prompt is the other. Usually, conversational AI maintains a full trace of history as model context. Since a snapshot is time-sensitive, however, only the latest snapshot can be targeted with actions by an LLM.",[11,3158,3159],{},"Whether to keep a trace of previous actions and model reasoning is a question in its own right. If web browsing is modelled as a history-independent task, the snapshot-to-actions agent loop could even be separated from the persistent conversational loop as transient, one-shot model prompts.",[56,3161,3163],{"id":3162},"timing-snapshots-in-the-web-client","Timing Snapshots In the Web Client",[11,3165,3166,3167,345],{},"LLM-based web agents are much slower than humans in taking and processing snapshots. Not least for that reason, snapshot rounds should be kept to a minimum and timed so that a snapshot is taken as soon as the UI has reached a stable state. That implies a non-trivial challenge: defining what qualifies as a UI change, and at what intensity such a change counts as a state shift – beyond hard page transitions, e.g., in a single-page application",[763,3168,3169],{},[50,3170,3174],{"href":3171,"ariaDescribedBy":3172,"dataFootnoteRef":406,"id":3173},"#user-content-fn-5",[769],"user-content-fnref-5","5",[3176,3177],"hr",{},[11,3179,3180,3181,345],{},"The snapshot is the central artefact in a web agent harness. Its representation is among the most significant factors for agent success",[763,3182,3183],{},[50,3184,3188],{"href":3185,"ariaDescribedBy":3186,"dataFootnoteRef":406,"id":3187},"#user-content-fn-6",[769],"user-content-fnref-6","6",[11,3190,3191,3192,3194],{},"At Webfuse, we develop a platform for agentic browsing. A focus of our research is on efficient snapshot representations. The Automation API can be used to create next-level snapshots: timed, rectified, across ",[125,3193,816],{}," boundaries, etc.",[1058,3196,3199,3204],{"className":3197,"dataFootnotes":406},[3198],"footnotes",[56,3200,3203],{"className":3201,"id":769},[3202],"sr-only","Footnotes",[386,3205,3206,3221,3233,3245,3271,3283],{},[357,3207,3209,3213,3214],{"id":3208},"user-content-fn-1",[50,3210,3211],{"href":3211,"rel":3212},"https://arxiv.org/abs/2310.11441",[67]," ",[50,3215,3220],{"href":3216,"ariaLabel":3217,"className":3218,"dataFootnoteBackref":406},"#user-content-fnref-1","Back to reference 1",[3219],"data-footnote-backref","↩",[357,3222,3224,3213,3228],{"id":3223},"user-content-fn-2",[50,3225,3226],{"href":3226,"rel":3227},"https://github.com/webfuse-com/D2Snap/blob/main/snapshots/_bu.js",[67],[50,3229,3220],{"href":3230,"ariaLabel":3231,"className":3232,"dataFootnoteBackref":406},"#user-content-fnref-2","Back to reference 2",[3219],[357,3234,3236,3213,3240],{"id":3235},"user-content-fn-3",[50,3237,3238],{"href":3238,"rel":3239},"https://arxiv.org/abs/2210.03945",[67],[50,3241,3220],{"href":3242,"ariaLabel":3243,"className":3244,"dataFootnoteBackref":406},"#user-content-fnref-3","Back to reference 3",[3219],[357,3246,3248,3213,3252,3213,3257,3213,3264],{"id":3247},"user-content-fn-4",[50,3249,3250],{"href":3250,"rel":3251},"https://arxiv.org/abs/2508.04412",[67],[50,3253,3220],{"href":3254,"ariaLabel":3255,"className":3256,"dataFootnoteBackref":406},"#user-content-fnref-4","Back to reference 4",[3219],[50,3258,3220,3262],{"href":3259,"ariaLabel":3260,"className":3261,"dataFootnoteBackref":406},"#user-content-fnref-4-2","Back to reference 4-2",[3219],[763,3263,794],{},[50,3265,3220,3269],{"href":3266,"ariaLabel":3267,"className":3268,"dataFootnoteBackref":406},"#user-content-fnref-4-3","Back to reference 4-3",[3219],[763,3270,809],{},[357,3272,3274,3213,3278],{"id":3273},"user-content-fn-5",[50,3275,3276],{"href":3276,"rel":3277},"https://github.com/webfuse-com/DOMQuake",[67],[50,3279,3220],{"href":3280,"ariaLabel":3281,"className":3282,"dataFootnoteBackref":406},"#user-content-fnref-5","Back to reference 5",[3219],[357,3284,3286,3213,3290],{"id":3285},"user-content-fn-6",[50,3287,3288],{"href":3288,"rel":3289},"https://arxiv.org/abs/2504.01382",[67],[50,3291,3220],{"href":3292,"ariaLabel":3293,"className":3294,"dataFootnoteBackref":406},"#user-content-fnref-6","Back to reference 6",[3219],[563,3296,3297],{},"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 .suv1-, html code.shiki .suv1-{--shiki-default:#E1E4E8;--shiki-dark:#E1E4E8}html pre.shiki code .sxg3X, html code.shiki .sxg3X{--shiki-default:#85E89D;--shiki-dark:#85E89D}html pre.shiki code .sFR8T, html code.shiki .sFR8T{--shiki-default:#B392F0;--shiki-dark:#B392F0}html pre.shiki code .s4wv1, html code.shiki .s4wv1{--shiki-default:#9ECBFF;--shiki-dark:#9ECBFF}html pre.shiki code .s8ozJ, html code.shiki .s8ozJ{--shiki-default:#79B8FF;--shiki-dark:#79B8FF}html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}",{"title":406,"searchDepth":432,"depth":432,"links":3299},[3300,3304,3310,3311,3312,3313,3314],{"id":673,"depth":432,"text":674,"children":3301},[3302,3303],{"id":696,"depth":572,"text":697},{"id":735,"depth":572,"text":736},{"id":797,"depth":432,"text":798,"children":3305},[3306,3307,3308,3309],{"id":827,"depth":572,"text":828},{"id":851,"depth":572,"text":852},{"id":1772,"depth":572,"text":1773},{"id":1796,"depth":572,"text":1797},{"id":2521,"depth":432,"text":2522},{"id":2964,"depth":432,"text":2965},{"id":3152,"depth":432,"text":3153},{"id":3162,"depth":432,"text":3163},{"id":769,"depth":432,"text":3203},"2025-08-28","Explore methods for serialising web user interfaces into representations for use with LLM-based web agents.",{"homepage":617,"relatedLinks":3318},[3319,3322],{"text":3320,"href":3321},"DOM Downsampling for LLM-Based Web Agents","/rnd/dom-downsampling-for-llm-based-web-agents",{"text":3323,"href":3324,"external":617},"Webfuse Automation API","https://dev.webfuse.com/automation-api/","/blog/serialising-web-ui-state-for-llms-the-complete-guide",{"title":631,"description":3316},{"loc":3325},"blog/1012.serialising-web-ui-state-for-llms-the-complete-guide",[580,3330,3331,3332,3333],"web-agents","web-automation","llms","snapshots","46C5sputqmswFMdx0QS8H2GEM1L3-YvahqGXExIuGF0",{"id":3336,"title":3337,"authorId":632,"body":3338,"category":580,"created":3813,"description":3814,"extension":583,"faqs":601,"featurePriority":601,"head":601,"hideCta":617,"landingPath":601,"meta":3815,"navigation":617,"ogImage":601,"path":3821,"robots":601,"schemaOrg":601,"seo":3822,"sitemap":3823,"stem":3824,"tags":3825,"updated":601,"__hash__":3827},"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":3339,"toc":3794},[3340,3357,3361,3369,3374,3377,3381,3384,3404,3408,3417,3421,3437,3442,3445,3449,3460,3464,3467,3471,3478,3482,3505,3509,3513,3516,3519,3523,3544,3547,3551,3555,3564,3575,3579,3583,3592,3595,3599,3602,3605,3609,3622,3625,3629,3638,3641,3646,3650,3653,3657,3661,3664,3738,3740,3743,3757],[11,3341,3342,128,3347,128,3351,3356],{},[50,3343,3346],{"href":3344,"rel":3345},"https://openai.com/index/introducing-operator/",[67],"Operator",[50,3348,785],{"href":3349,"rel":3350},"https://browser-use.com/",[67],[50,3352,3355],{"href":3353,"rel":3354},"https://www.skyvern.com/",[67],"Skyvern"," – we are currently witnessing an evolution of autonomous web browsing agents. The concept of agents is ubiquitous in the era of AI.",[56,3358,3360],{"id":3359},"what-is-an-agent","What is an Agent?",[11,3362,3363,3364,345],{},"An agent is an entity that acts on behalf of another entity – its principal. Robotic agents are modelled after humans: they perceive the world and act in it to achieve a specified goal. Whilst humans perceive through their senses, agents perceive through sensors; whilst humans act through motor systems (e.g., fingers), agents act through actuators. This terminology has been transferred from hard- to software agents, particularly those premised on artificial intelligence (AI). An agent's purpose, that is, its goal, is clearly defined; the principal interfaces with that goal by assigning the agent tasks",[763,3365,3366],{},[50,3367,771],{"href":767,"ariaDescribedBy":3368,"dataFootnoteRef":406,"id":770},[769],[71,3370],{"alt":3371,"loading":76,"src":3372,"provider":478,":width":3373},"Figurative comparison of component equivalents between a human and an AI agent","/blog/a-gentle-introduction-to-ai-agents-for-the-web/1.svg","430",[11,3375,3376],{},"The analogy is more than decorative: an agent takes over the tool-use expertise, leaving the principal with only the domain expertise. Traditional software applications like Photoshop demand both.",[117,3378,3380],{"id":3379},"what-makes-an-agent-intelligent","What Makes an Agent Intelligent?",[11,3382,3383],{},"For acting on behalf of a human, developing an agent could be as simple as making it follow a hardcoded sequence of actions. This describes process automation, but not an artificially intelligent agent. Whilst definitions for AI differ, agent intelligence comes from making informed decisions that are not hardcoded. Here are common – not necessarily mutually exclusive – high-level approaches to induce intelligence:",[354,3385,3386,3392,3398],{},[357,3387,3388,3391],{},[15,3389,3390],{},"Search"," – the agent has a complete or heuristic model of the world and the action space to anticipate the effects of actions and search for a goal state.",[357,3393,3394,3397],{},[15,3395,3396],{},"Reinforcement learning"," – the agent has an initial action space and iteratively discovers the world and effects of actions, learning an optimal policy to act in order to reach a goal state.",[357,3399,3400,3403],{},[15,3401,3402],{},"Neural networks"," – the agent has no model, only examples: a network is fitted to task–solution instances and generalises to unseen, yet related tasks.",[117,3405,3407],{"id":3406},"a-quick-note-on-multi-agent-systems","A Quick Note on Multi-Agent Systems",[11,3409,3410,3411,3416],{},"Agent design gets an additional edge when other entities act in the same world as the agent. Such entities can be considered agents on their own. Their beliefs and goals might affect the agent: cooperative agents share the designed agent's goal, whilst adversarial agents have an opposite goal. In a zero-sum game, an adversarial agent maximises the exact inverse of the designed agent's utility. Knowing this, the designed agent needs to anticipate intelligent decisions by the adversary (e.g., by applying the ",[50,3412,3415],{"href":3413,"rel":3414},"https://cs.stanford.edu/people/eroberts/courses/soco/projects/2003-04/intelligent-search/minimax.html",[67],"Minimax algorithm","), as opposed to random world changes. That said, web browsing – modelled after humans – is not a typical multi-agent scenario.",[117,3418,3420],{"id":3419},"the-agent-loop","The Agent Loop",[11,3422,3423,3428,3429,3436],{},[50,3424,3427],{"href":3425,"rel":3426},"https://www.nngroup.com/people/don-norman/",[67],"Don Norman","'s ",[50,3430,3433],{"href":3431,"rel":3432},"https://jnd.org/books/the-design-of-everyday-things-revised-and-expanded-edition/",[67],[656,3434,3435],{},"Seven Stages of Action"," is a model of the human cognition cycle that generalises to an agent's lifecycle – the agent loop: with a (1) goal, (2) intent to act, (3) plan actions, (4) execute the action plan – this alters the world – then (5) perceive the new world state, (6) interpret the perception, and finally (7) evaluate the interpretation – report task success or an irrevocable failure; continue the cycle if the world state not yet reflects a goal state.",[71,3438],{"alt":3439,"loading":76,"src":3440,"provider":478,":width":3441},"Don Norman's Seven Stages of Action – a model of human cognition","/blog/a-gentle-introduction-to-ai-agents-for-the-web/2.svg","500",[11,3443,3444],{},"Humans can run many of these cycles hierarchically, with increasing frequency the smaller the task. Take driving a car as an example: choosing a route runs on the order of minutes, choosing when to change lanes on seconds, and holding the car in its lane on fractions of a second. A cycle for holding the lane (1) is: intent to actively hold the lane (2), plan to keep the steering wheel straight, then watch the road (3), execute plan (4), observe the road (5), check whether the car is in the lane (6), if not, cycle again with an adjusted action plan (e.g., slightly rotate the steering wheel to the right) (7).",[117,3446,3448],{"id":3447},"errors-and-recovery","Errors and Recovery",[11,3450,3451,3452,3455,3456,3459],{},"Precisely speaking, \"to err is human\" means that errors are inevitable when heuristically navigating the world. Consequently, AI agents regularly run into errors, too. Norman's Seven Stages of Action make two error spaces apparent: when executing an action plan; the ",[656,3453,3454],{},"Gulf of Action (Execution)"," – how to act in the world? – and when perceiving world state; the ",[656,3457,3458],{},"Gulf of Perception (Evaluation)"," – how to understand the world?",[71,3461],{"alt":3462,"loading":76,"src":3463,"provider":478,":width":3441},"The Gulf of Action (Execution) and  Perception (Evaluation) in Don Norman's Seven Stages of Action","/blog/a-gentle-introduction-to-ai-agents-for-the-web/3.svg",[11,3465,3466],{},"There are two notable kinds of errors within the Gulf of Action: mistakes and slips. A mistake occurs when the action plan is wrong, although executing this action plan might go right in itself. A slip occurs when the action plan is right, but the execution goes wrong. Here is an example: stopping a manual-shift car without pressing the clutch. This error describes a mistake if the driver did not know about the need to press the clutch, e.g., because they only knew how to operate automatic-drive cars. It is, in turn, a slip if they simply forgot to press the clutch because of fatigue. Since cognition cycles are hierarchic, most errors can be recovered within a cycle. Hearing a choking engine sound, the driver might adjust the action plan and press the clutch late. Errors that cannot be recovered – picture the car's engine dying – require adjusting the goal, which can be seen as moving on to a new cycle.",[56,3468,3470],{"id":3469},"web-browsing-agents","Web Browsing Agents",[11,3472,3473,3474,3477],{},"The advent of large language models (LLMs) has recently opened a new perspective on developing web agents – falling back on the neural networks approach to intelligence. An LLM can serve as a plug-in reasoning backend: given a task and somehow encoded UI state, it can suggest input actions – type and target, e.g., click at ",[125,3475,3476],{},"(200, 375)"," – that progress the given task. Moreover, it can decide whether a goal state has been reached. Providing a state-and-action history within context conveys to the model prior outcomes and contributes to in-context learning.",[117,3479,3481],{"id":3480},"web-browsing-is-all-about-the-journey","Web Browsing is All About the Journey",[11,3483,3484,3485,3488,3489,3494,3495,3500,3501,3504],{},"A web browsing task is any task that can be solved through a web-based user interface (UI). For instance: ",[656,3486,3487],{},"\"Book the cheapest flight from Amsterdam to New York tomorrow night\""," on ",[50,3490,3493],{"href":3491,"rel":3492},"https://www.klm.com",[67],"klm.com",". Application programming interfaces (APIs; e.g., ",[50,3496,3499],{"href":3497,"rel":3498},"https://www.ibm.com/think/topics/rest-apis",[67],"REST APIs",") are often restricted, incomplete, or unavailable. For that reason, web browsing agents today have to rely on human-facing web application UIs. Many agent use cases, such as for customer experience, even require a human in the loop. In this context, web browsing agents come at two levels: outcome-driven agents care only about reaching a goal state, which favours shortcuts like direct URL navigation or expert navigation like ",[125,3502,3503],{},"Ctrl + F",", whilst journey-driven agents are supposed to browse a web application in human fashion, via the application-native UI.",[71,3506],{"alt":3507,"loading":76,"src":3508},"A depiction of a web journey over three web application UI states","/blog/a-gentle-introduction-to-ai-agents-for-the-web/4.png",[117,3510,3512],{"id":3511},"a-formal-model-for-web-browsing","A Formal Model for Web Browsing",[11,3514,3515],{},"The world of web application UIs is hard to formalise; a complete model spans the union of every reachable UI state in every web application on the web. For that reason, conventional AI has failed to produce capable generalist web agents. From a web agent design perspective, however, an abstract model of web browsing is sufficient.",[11,3517,3518],{},"Web browsing might afford a model that is history-independent. A human could certainly pick up a partially completed browsing task. For example, completing the payment process on an airline website for an already selected flight – assuming prior actions were correct with respect to the specified task (e.g., the selected destination).",[71,3520],{"alt":3521,"loading":76,"src":3522},"Screenshot of the payment page on klm.com that reflects outcomes of prior actions and affords next actions","/blog/a-gentle-introduction-to-ai-agents-for-the-web/5.png",[11,3524,3525,3526,3531,3532,3537,3538,3543],{},"Yet, many web applications lack ",[50,3527,3530],{"href":3528,"rel":3529},"https://www.nngroup.com/articles/ten-usability-heuristics/#toc-1-visibility-of-system-status-1",[67],"visibility of system status"," – against ",[50,3533,3536],{"href":3534,"rel":3535},"https://www.nngroup.com/people/jakob-nielsen/",[67],"Jakob Nielsen","'s first heuristic for UI usability. Visibility of system status comprises reflecting both outcomes of prior actions and affordances for next actions in the UI. With this concept, web browsing is best described as a partially observable Markov decision process (POMDP)",[763,3539,3540],{},[50,3541,794],{"href":791,"ariaDescribedBy":3542,"dataFootnoteRef":406,"id":793},[769],", adapting to discovered UI states, where states can be tuples of UI state trajectories to contain history.",[11,3545,3546],{},"Reflex agents take actions that solely depend on the current world state. Planning agents, in turn, plan ahead. For most web browsing tasks, future UI states are roughly predictable, given that web journeys are similar across different web applications that help with similar tasks. In POMDP terms, the expected next UI state has a high probability, whilst unexpected states remain with a non-negligible probability. The further a web journey is progressed, the higher the probability of the next expected UI state gets: the flight selection step is likely followed by the passenger details step, which is even more likely followed by the payment step.",[71,3548],{"alt":3549,"loading":76,"src":3550},"Graph-based web journey representation of an unknown, adaptive, partially observable Markov decision process (POMDP)","/blog/a-gentle-introduction-to-ai-agents-for-the-web/6.png",[117,3552,3554],{"id":3553},"llm-sensors-actuators-agent","LLM + Sensors + Actuators = Agent",[11,3556,3557,3558,3563],{},"Conversationally satisfying simple information requests does not reasonably qualify an LLM as an agent – no more than it would a TF-IDF search system",[763,3559,3560],{},[50,3561,809],{"href":806,"ariaDescribedBy":3562,"dataFootnoteRef":406,"id":808},[769],", or a colleague telling you the time. The web agent LLM backend is metaphorically the brain of the agent. It abstracts the world model and state transition function, and can decide whether a goal state was reached.",[11,3565,3566,3567,128,3569,128,3571,3574],{},"Turning an LLM into a web agent means, at the core, connecting it with sensors and actuators, for example, the ability to take DOM snapshots and dispatch clicks via CSS selectors. This is a specialised architecture of LLM tool calling. The set of available input actions is known from human computer use: ",[656,3568,658],{},[656,3570,661],{},[656,3572,3573],{},"scrolling",", etc. The agent loop is then a continuous cycle of serialising UI state for the model to elicit action suggestions under a goal derived from the user-specified task.",[71,3576],{"alt":3577,"loading":76,"src":3578,"provider":478,":width":667},"Figurative depiction of components in the agent loop","/blog/a-gentle-introduction-to-ai-agents-for-the-web/7.svg",[117,3580,3582],{"id":3581},"snapshots-serialised-ui-state","Snapshots – Serialised UI State",[11,3584,3585,3586,3591],{},"There are plenty of ways to serialise the state of a web-based UI – referred to as a snapshot. A screenshot resembles what humans see when viewing a web page's graphical UI (GUI) at a given point in time. That said, a UI can be represented in versatile ways. LLMs have demonstrated the ability to interpret HTML and even navigate a UI encoded in this way",[763,3587,3588],{},[50,3589,1294],{"href":1291,"ariaDescribedBy":3590,"dataFootnoteRef":406,"id":1293},[769],". The document object model (DOM) is a web browser's runtime model of a web page. Serialised as HTML, to that effect, DOM snapshots represent a compelling alternative to GUI snapshots, offering certain advantages, such as processability (e.g., filtering). Filtering the DOM by pruning hidden, disabled, or redundant subtrees saves LLM communication costs and works towards more stable and predictable journeys.",[11,3593,3594],{},"Outcome-driven web agents have used UI-invasive snapshot measures, such as grounding LLMs with bounding boxes around actionable elements.",[71,3596],{"alt":3597,"loading":76,"src":3598},"Example of a screenshot (GUI snapshot) with coloured bounding boxes that visually ground an LLM","/blog/a-gentle-introduction-to-ai-agents-for-the-web/8.png",[11,3600,3601],{},"The ideal snapshot representation depends on the task. To get an idea, classify between navigation and information retrieval tasks: navigation tasks require snapshots to preserve actionable elements, whilst retrieval tasks require them to preserve text – both can be sourced from DOM snapshots. Accessibility tree snapshots are another DOM-sourced representation. Web UIs rarely afford merely a single task, so many of their components are noise in any given snapshot – which is not just a UI serialisation, but one scoped to the task at hand. GUI snapshots become a necessity when the target application is graphics-based, such as a canvas-based application like Google Maps.",[11,3603,3604],{},"A snapshot impacts the width of Norman's Gulf of Perception: if a relevant element is omitted or diffused, the model is hindered in identifying correct actions to progress a web browsing task. The Gulf of Action mostly grows when the snapshot-encoded UI state and the live UI state have irrecoverably drifted apart. The agent loop should be fast to prevent such drift. The Gulf of Perception is much wider by the nature of the problem: what snapshot representation can an LLM interpret, and which representation is best?",[117,3606,3608],{"id":3607},"targeting-action-suggestions","Targeting – Action Suggestions",[11,3610,3611,3612,128,3614,3617,3618,3621],{},"An action is a user event, such as ",[656,3613,714],{},[656,3615,3616],{},"type",", or ",[656,3619,3620],{},"scroll",", targeting a specific element in the UI. The set of available actions thereby is defined by the accepted user input types which are generally derived and standardised over the mouse and keyboard devices.",[11,3623,3624],{},"The type of snapshot representation provided to an LLM dictates how an element can be targeted for an action. Vision-based, geometric targeting is indirect and absolute, i.e., by coordinates. DOM-based targeting is direct and relative, e.g., by CSS selectors or object references. Relative targeting remains valid if the UI shifts between snapshot and action time. A shift can happen due to many reasons, for instance, a lazy-loaded image.",[117,3626,3628],{"id":3627},"the-agent-harness","The Agent Harness",[11,3630,3631,3632,3637],{},"Any custom logic that sits between the LLM backend and the web page UI (problem world) is considered an agent harness – often linguistically equated with the agent in general. Common aspects of a harness include task decomposition, model routing, snapshot creation, history management, error recovery, and timeouts. ",[50,3633,3636],{"href":3634,"rel":3635},"https://www.anthropic.com/engineering/effective-context-engineering-for-ai-agents",[67],"System prompts"," are also part of the harness, instructing a general-purpose LLM to model a web agent for a specific domain – right in context.",[11,3639,3640],{},"Designing a harness is where the POMDP and Seven Stages of Action models come into play. The POMDP model helps with context engineering, for instance, how much history to provide to the LLM. The Seven Stages of Action set out problem components and artefacts, for example, the LLM or snapshots, respectively.",[71,3642],{"alt":3643,"loading":76,"src":3644,"provider":3645},"Don Norman's Seven Stages of Action mapped to the agentic web browsing proble","/blog/a-gentle-introduction-to-ai-agents-for-the-web/9.svg","none\"",[117,3647,3649],{"id":3648},"the-model-context-protocol","The Model Context Protocol",[11,3651,3652],{},"LLM providers commonly offer a structured output interface, which allows eliciting well-formed action suggestions from an LLM. A client can subsequently parse and drive these suggested actions in the live user interface. Through the model context protocol (MCP) – another web-based RPC standard – structured output can be bridged with tools that LLMs can call directly, without an extra client trip.",[71,3654],{"alt":3655,"loading":76,"src":3656,"provider":478,":width":3441},"Figurative depiction of components in the agent loop using the model context protocol (MCP)","/blog/a-gentle-introduction-to-ai-agents-for-the-web/10.svg",[117,3658,3660],{"id":3659},"web-browser-environments","Web Browser Environments",[11,3662,3663],{},"When connected to web perception and actuation tools via MCP, an ordinary AI chat UI already qualifies as an agent UI; the MCP integration decides where the actual web browser runs. There are several types of browser runtime environment:",[354,3665,3666,3681,3694,3706],{},[357,3667,3668,3671,3672,3675,3676],{},[15,3669,3670],{},"Agentic browser"," – the agent's UI embeds a browser.",[3673,3674],"br",{},"\nExample: ",[50,3677,3680],{"href":3678,"rel":3679},"https://www.perplexity.ai/comet",[67],"Perplexity Comet",[357,3682,3683,3686,3687,3675,3689],{},[15,3684,3685],{},"Cloud browser"," – the agent spins up a browser in the cloud.",[3673,3688],{},[50,3690,3693],{"href":3691,"rel":3692},"https://www.browserbase.com",[67],"Browserbase",[357,3695,3696,3699,3700,3675,3702],{},[15,3697,3698],{},"Local browser (3rd-party browser)"," – the agent spins up an isolated browser locally.",[3673,3701],{},[50,3703,3705],{"href":646,"rel":3704},[67],"Chromium + Playwright",[357,3707,3708,3711,3712],{},[15,3709,3710],{},"Local browser (1st-party browser)"," – the agent is embedded within a web application running in a user's personal browser, e.g., in the form of a chatbot.\n",[354,3713,3714,3727],{},[357,3715,3716,3719,3720,3675,3722],{},[15,3717,3718],{},"Implemented (1st-party app)"," – served directly through the website.",[3673,3721],{},[50,3723,3726],{"href":3724,"rel":3725},"https://www.cognigy.com/platform/ai-agent-studio",[67],"Cognigy Studio",[357,3728,3729,3732,3733,3675,3735],{},[15,3730,3731],{},"Augmented (3rd-party app)"," – served indirectly through a website proxy.",[3673,3734],{},[50,3736,470],{"href":652,"rel":3737},[67],[3176,3739],{},[11,3741,3742],{},"Building AI agents has been approached from different angles. LLMs have opened up new perspectives on the design and development of AI agents, particularly web agents, which work in a problem domain that is hard to grasp with a formal model. Whilst higher-level agent methodology can borrow much from established research, LLMs have introduced new challenges, such as how to take UI state snapshots for eliciting input action suggestions from such models.",[11,3744,3745,3746,3751,3752,345],{},"At Webfuse, we research agentic web browsing and develop a platform for agentic browsing. Our web application reverse proxy allows LLMs to perceive and act on the live web. Use cases include connecting a chat UI like ",[50,3747,3750],{"href":3748,"rel":3749},"https://claude.com/",[67],"Claude",", or shipping ",[50,3753,3756],{"href":3754,"rel":3755},"https://github.com/webfuse-com/extension-elevenlabs-mcp",[67],"perceive-and-act-ready chatbots",[1058,3758,3760,3763],{"className":3759,"dataFootnotes":406},[3198],[56,3761,3203],{"className":3762,"id":769},[3202],[386,3764,3765,3774,3780,3786],{},[357,3766,3767,3213,3771],{"id":3208},[50,3768,3769],{"href":3769,"rel":3770},"https://inst.eecs.berkeley.edu/~cs188/textbook/textbook_full.pdf",[67],[50,3772,3220],{"href":3216,"ariaLabel":3217,"className":3773,"dataFootnoteBackref":406},[3219],[357,3775,3776,3777],{"id":3223},"A POMDP is a decision process in which the agent cannot see the exact world state, only partial observations of it, and so must choose actions against a probability distribution over the states it might be in. ",[50,3778,3220],{"href":3230,"ariaLabel":3231,"className":3779,"dataFootnoteBackref":406},[3219],[357,3781,3782,3783],{"id":3235},"TF-IDF (term frequency-inverse document frequency) is an information retrieval method that ranks documents by how often a query term occurs in each one, weighted down by how common that term is across the whole collection – so terms that are frequent here but rare elsewhere carry the most weight. ",[50,3784,3220],{"href":3242,"ariaLabel":3243,"className":3785,"dataFootnoteBackref":406},[3219],[357,3787,3788,3213,3791],{"id":3247},[50,3789,3238],{"href":3238,"rel":3790},[67],[50,3792,3220],{"href":3254,"ariaLabel":3255,"className":3793,"dataFootnoteBackref":406},[3219],{"title":406,"searchDepth":432,"depth":432,"links":3795},[3796,3802,3812],{"id":3359,"depth":432,"text":3360,"children":3797},[3798,3799,3800,3801],{"id":3379,"depth":572,"text":3380},{"id":3406,"depth":572,"text":3407},{"id":3419,"depth":572,"text":3420},{"id":3447,"depth":572,"text":3448},{"id":3469,"depth":432,"text":3470,"children":3803},[3804,3805,3806,3807,3808,3809,3810,3811],{"id":3480,"depth":572,"text":3481},{"id":3511,"depth":572,"text":3512},{"id":3553,"depth":572,"text":3554},{"id":3581,"depth":572,"text":3582},{"id":3607,"depth":572,"text":3608},{"id":3627,"depth":572,"text":3628},{"id":3648,"depth":572,"text":3649},{"id":3659,"depth":572,"text":3660},{"id":769,"depth":432,"text":3203},"2025-06-15","Get an idea of agents and how to build AI agents that browse the web: key concepts, terminology, and challenges.",{"homepage":617,"relatedLinks":3816},[3817,3819,3820],{"text":3818,"href":3325},"Serialising Web UI State for LLMs",{"text":3320,"href":3321},{"text":3323,"href":3324,"external":617},"/blog/a-gentle-introduction-to-ai-agents-for-the-web",{"title":3337,"description":3814},{"loc":3821},"blog/1011.a-gentle-introduction-to-ai-agents-for-the-web",[580,3826,3330,3331,3332],"browser-agents","S85BEZTxQ_9CrlO0aDmRjI-NtF_QkDXsXnQd3vqNbtg",1795619148675]