[{"data":1,"prerenderedAt":2744},["ShallowReactive",2],{"/blog/agentic-coding-in-2026":3,"related-/blog/agentic-coding-in-2026":333},{"id":4,"title":5,"authorId":6,"body":7,"category":315,"created":316,"description":317,"extension":318,"faqs":319,"featurePriority":319,"head":319,"landingPath":319,"meta":320,"navigation":322,"ogImage":319,"path":323,"robots":319,"schemaOrg":319,"seo":324,"sitemap":325,"stem":326,"tags":327,"__hash__":332},"blog/blog/1041.agentic-coding-in-2026.md","Agentic Coding in 2026","salome-koshadze",{"type":8,"value":9,"toc":300},"minimark",[10,18,27,30,35,38,43,86,90,93,108,113,120,124,127,131,142,146,149,215,218,222,225,230,233,237,240,260,264,267,271,274],[11,12,13,17],"p",{},[14,15,16],"strong",{},"Agentic coding"," describes AI systems, or agents, that autonomously plan, write, test, debug, and deploy code with minimal human direction. This approach differs from traditional AI coding assistants, which function more like autocomplete or conversational partners. Agentic systems operate in persistent loops, breaking down high-level objectives into executable steps. They use a suite of tools-such as the file system, terminal, and version control-to explore codebases, recover from errors, and manage complex, multi-step tasks.",[19,20],"nuxt-picture",{":height":21,":width":22,"alt":23,"loading":24,"provider":25,"src":26},"400","820","Diagram of an agentic coding system using file system, terminal, and version control tools to execute multi-step software tasks autonomously","lazy","none","/blog/agentic-coding-in-2026/1.svg",[11,28,29],{},"This method is distinct from \"vibe coding,\" which involves quick, iterative prompting for exploration or demos. Agentic coding is a more autonomous, goal-oriented process, analogous to delegating a complete task to a capable junior engineer who works independently but under supervision. The focus is on autonomy, persistence, and the orchestration of complex software development workflows.",[31,32,34],"h2",{"id":33},"core-architecture-and-capabilities","Core Architecture and Capabilities",[11,36,37],{},"By 2026, most agentic coding systems have converged on a set of common architectural primitives and capabilities. This standardization allows for more predictable interactions and integrations across different platforms.",[19,39],{":height":40,":width":22,"alt":41,"loading":24,"provider":25,"src":42},"460","Overview of the architectural primitives shared by agentic coding systems in 2026 - persistent context, integrated tooling, multi-agent orchestration, long-running execution, and human collaboration","/blog/agentic-coding-in-2026/2.svg",[44,45,46,62,68,74,80],"ul",{},[47,48,49,52,53,57,58,61],"li",{},[14,50,51],{},"Persistent Project Context:"," Agents maintain long-term memory of a project's goals, conventions, and architecture through dedicated files (e.g., ",[54,55,56],"code",{},"CLAUDE.md",", ",[54,59,60],{},"AGENTS.md","). This allows them to retain context across sessions that can last for days or weeks.",[47,63,64,67],{},[14,65,66],{},"Integrated Tool Use:"," Agents are equipped with a digital toolkit that mirrors a human developer's environment. This includes Git for version control, shell access for command-line operations, automated testing frameworks, package managers, web browsers for research, and LSP integration for code intelligence.",[47,69,70,73],{},[14,71,72],{},"Multi-Agent Orchestration:"," Complex problems are often solved by a team of specialized sub-agents working in concert. For example, a planner agent might decompose a high-level goal, which is then distributed to separate coding, testing, and reviewing agents that can work in parallel.",[47,75,76,79],{},[14,77,78],{},"Long-Running Execution:"," Systems are designed for sessions that last from minutes to several days. These long-running tasks feature checkpointing and self-healing mechanisms, allowing an agent to recover from transient failures and resume its work without human intervention.",[47,81,82,85],{},[14,83,84],{},"Human-AI Collaboration:"," The workflow is designed as a partnership. Agents flag uncertainties and request human input for ambiguous requirements or high-stakes decisions, such as deploying to production. This shifts the developer's role from writing code to providing oversight, architectural guidance, and final approval.",[31,87,89],{"id":88},"performance-and-benchmarks","Performance and Benchmarks",[11,91,92],{},"The performance of these systems is measured using realistic coding benchmarks derived from open-source GitHub issues. These tests evaluate an agent's ability to resolve genuine software problems from start to finish.",[11,94,95,96,99,100,103,104,107],{},"The ",[14,97,98],{},"SWE-bench Verified"," benchmark has become a standard for evaluation, and the results from 2026 show major progress. Top models like Claude Opus and GPT-5.x, when paired with a suitable agent harness, achieve success rates exceeding ",[14,101,102],{},"70-90%"," on the standard benchmark, a large increase from just ~4% in 2023. Performance on more difficult \"pro\" variants of the benchmark is lower but still impressive, typically in the ",[14,105,106],{},"50-77%"," range. These figures show that the agent's scaffolding, or \"harness,\" is as important as the underlying language model for achieving high scores.",[19,109],{":height":110,":width":22,"alt":111,"loading":24,"provider":25,"src":112},"500","SWE-bench Verified pass rates in 2026 highlighting how the agent harness drives results alongside the underlying language model","/blog/agentic-coding-in-2026/4.svg",[11,114,115,116,119],{},"Agents show strong performance in well-defined tasks like ",[14,117,118],{},"bug fixes, implementing new features from detailed specifications, dependency migrations, test generation, and code refactoring."," They continue to face difficulties with creating entirely novel system architecture or acting on highly ambiguous requirements without specific human direction.",[31,121,123],{"id":122},"productivity-impact","Productivity Impact",[11,125,126],{},"The adoption of agentic coding has led to measurable gains in software development productivity. Organizations that have integrated these tools report major accelerations in their development lifecycles and sizeable increases in output.",[19,128],{":height":110,":width":22,"alt":129,"loading":24,"provider":25,"src":130},"Illustration of productivity gains from agentic coding - faster software development lifecycles, hours-long onboarding, and developers shifting from coding to orchestrating AI agents","/blog/agentic-coding-in-2026/3.svg",[11,132,133,134,137,138,141],{},"For example, ",[14,135,136],{},"TELUS"," reported saving over ",[14,139,140],{},"500,000 developer hours"," by using these systems for a variety of coding tasks. The software development life cycle (SDLC) for many common projects is now compressed from weeks into hours or days. Developer onboarding to unfamiliar codebases, a process that once took weeks of study, can now be completed in hours as agents provide guided exploration and contextual summaries. This has prompted a change in the developer's role from a primary coder to an orchestrator of AI agents.",[31,143,145],{"id":144},"leading-tools-and-agents-in-2026","Leading Tools and Agents in 2026",[11,147,148],{},"The market for agentic tools is competitive, with several platforms emerging as leaders based on performance, workflow integration, and user adoption. Rankings differ by source, but the following tools are consistently recognized in the 2026 landscape.",[150,151,152,161,167,177,183,189],"ol",{},[47,153,154,157,158,160],{},[14,155,156],{},"OpenAI Codex:"," Often cited for its overall execution capabilities, it features powerful GPT-5.x models, multi-agent worktrees for parallel tasks, and a context system based on ",[54,159,60],{}," files. It is highly effective for code generation, automated reviews, and parallelized development work.",[47,162,163,166],{},[14,164,165],{},"Claude Code (Anthropic):"," Recognized for its elite reasoning and planning capabilities, supported by a very large context window of over 1 million tokens. Its strengths lie in handling complex refactors and navigating large, intricate codebases.",[47,168,169,172,173,176],{},[14,170,171],{},"Cursor:"," An AI-native fork of VS Code that has gained wide adoption. Its hybrid model combines local IDE responsiveness with cloud-based agents for long-running tasks and parallel sub-agent execution. The company has achieved a sizeable market presence, with reported annual recurring revenue near ",[14,174,175],{},"$2 billion",".",[47,178,179,182],{},[14,180,181],{},"Devin (Cognition Labs):"," Known for its high degree of autonomy, this agent can handle tasks end-to-end-from planning and coding to testing and deployment-within a sandboxed environment. It is frequently used by large firms like Goldman Sachs for enterprise migrations and technical debt reduction.",[47,184,185,188],{},[14,186,187],{},"GitHub Copilot:"," Offers the broadest ecosystem integration, deeply embedded within the developer workflow. Its features include asynchronous agents that can convert GitHub issues directly into pull requests using a variety of underlying models.",[47,190,191,194,195,198,199,202,203,206,207,210,211,214],{},[14,192,193],{},"Other Tools:"," Other notable tools in the space include ",[14,196,197],{},"Gemini CLI"," (offering a strong free tier and large context), ",[14,200,201],{},"Windsurf"," (specialized for extremely large codebases), ",[14,204,205],{},"Replit Agent"," (focused on rapid prototyping), ",[14,208,209],{},"OpenCode"," (a flexible open-source option), and ",[14,212,213],{},"Augment Code"," (designed for massive monorepos).",[11,216,217],{},"Many of these platforms support multi-model backends, allowing development teams to choose the most suitable AI for a given task or budget.",[31,219,221],{"id":220},"key-trends-for-2026","Key Trends for 2026",[11,223,224],{},"Analysis from industry reports points to several major trends shaping the future of agentic coding. These trends affect everything from the software development lifecycle to the very definition of an engineering role.",[226,227,229],"h3",{"id":228},"foundation","Foundation",[11,231,232],{},"The core change is the transformation of the SDLC. Tactical, line-by-line coding is increasingly handled by AI, freeing humans to concentrate on strategy, system architecture, and high-level orchestration. This leads to an evolution of the engineering role into one resembling an AI team manager, where the primary job is to define goals and review outcomes.",[226,234,236],{"id":235},"capabilities","Capabilities",[11,238,239],{},"The field has moved well beyond single-agent systems. The most important capability trends include:",[44,241,242,248,254],{},[47,243,244,247],{},[14,245,246],{},"Single to Multi-Agent Teams:"," Systems now deploy specialized agents that work in parallel on different parts of a problem, mimicking a human software team.",[47,249,250,253],{},[14,251,252],{},"Long-Running Agents:"," Agents are capable of executing tasks that last for days or even weeks, such as building entire features or systems from a high-level specification.",[47,255,256,259],{},[14,257,258],{},"Intelligent Oversight:"," Agents are programmed to self-flag uncertainties, and AI-powered code reviewers are used to check the output of other AI agents, creating a layered quality control system.",[226,261,263],{"id":262},"impacts","Impacts",[11,265,266],{},"The economic and social effects of this technology are becoming apparent. The higher output volume makes smaller, previously unfeasible projects economically viable and allows organizations to address long-standing technical debt more efficiently. The autonomy of agents also creates new security and dual-use risks, which necessitates the development of new governance models to manage agents that can act independently.",[31,268,270],{"id":269},"challenges-and-limitations","Challenges and Limitations",[11,272,273],{},"Despite rapid progress, agentic systems still face important limitations and present new challenges. Full delegation of tasks remains uncommon, with human review still required for a high percentage of work, often estimated between 80-100% depending on the task's complexity.",[44,275,276,282,288,294],{},[47,277,278,281],{},[14,279,280],{},"Reliability and Hallucinations:"," Agents can still produce incorrect or nonsensical code, especially in novel or highly complex scenarios. Human oversight remains a necessary backstop to catch these errors before they reach production.",[47,283,284,287],{},[14,285,286],{},"Cost and Security:"," The computational cost of running these agents, combined with context window limitations, can be a barrier. Giving agents access to production tools, repositories, and terminals also introduces security vulnerabilities that must be carefully managed.",[47,289,290,293],{},[14,291,292],{},"Code Maintainability:"," The high speed of code generation can lead to an increase in technical debt if not properly managed. Human architectural oversight is key to ensuring the generated code is clean, efficient, and maintainable over the long term.",[47,295,296,299],{},[14,297,298],{},"Job Market Transformation:"," Routine coding tasks are being automated, leading to a major shift in job roles towards orchestration, architecture, and system design. This transformation requires new skills and creates new opportunities while displacing some existing work.",{"title":301,"searchDepth":302,"depth":302,"links":303},"",2,[304,305,306,307,308,314],{"id":33,"depth":302,"text":34},{"id":88,"depth":302,"text":89},{"id":122,"depth":302,"text":123},{"id":144,"depth":302,"text":145},{"id":220,"depth":302,"text":221,"children":309},[310,312,313],{"id":228,"depth":311,"text":229},3,{"id":235,"depth":311,"text":236},{"id":262,"depth":311,"text":263},{"id":269,"depth":302,"text":270},"ai-agents","2026-05-18","How AI agents now plan, write, test, and deploy code with minimal human direction - covering core capabilities, SWE-bench results, productivity impact, leading tools (Codex, Claude Code, Cursor, Devin, Copilot), and the challenges that remain.","md",null,{"homepage":321},false,true,"/blog/agentic-coding-in-2026",{"title":5,"description":317},{"loc":323},"blog/1041.agentic-coding-in-2026",[328,315,329,330,331],"agentic-coding","claude-code","swe-bench","developer-productivity","yOP34WryUwzRm-tzE9qmBLql1_8pvzwKUAiIjco-z10",[334,1995],{"id":335,"title":336,"authorId":337,"body":338,"category":315,"created":1970,"description":1971,"extension":318,"faqs":319,"featurePriority":319,"head":319,"landingPath":319,"meta":1972,"navigation":322,"ogImage":319,"path":1984,"robots":319,"schemaOrg":319,"seo":1985,"sitemap":1986,"stem":1987,"tags":1988,"__hash__":1994},"blog/blog/1012.dom-downsampling-for-llm-based-web-agents.md","DOM Downsampling for LLM-Based Web Agents","thassilo-schiepanski",{"type":8,"value":339,"toc":1955},[340,346,370,374,381,385,401,405,411,415,433,458,461,465,468,479,485,516,520,540,552,557,573,587,590,594,614,618,626,638,642,645,1037,1043,1050,1214,1221,1312,1319,1391,1400,1406,1415,1419,1425,1435,1447,1680,1698,1720,1726,1769,1773,1785,1794,1799,1804,1807,1811,1817,1822,1860,1864,1870,1874,1884,1888,1891,1951],[19,341],{":width":342,"alt":343,"format":344,"loading":24,"src":345},"900","Downsampling visualised for digital images and HTML","webp","/blog/dom-downsampling-for-web-agents/1.png",[11,347,348,57,355,57,360,365,366,369],{},[349,350,354],"a",{"href":351,"rel":352},"https://operator.chatgpt.com",[353],"nofollow","Operator (OpenAI)",[349,356,359],{"href":357,"rel":358},"https://www.director.ai",[353],"Director (Browserbase)",[349,361,364],{"href":362,"rel":363},"https://browser-use.com",[353],"Browser Use"," – we are currently witnessing the rise of ",[14,367,368],{},"web AI agents",". The first iteration of serviceable web agents was enabled by frontier LLMs, which act as instantaneous domain model backends. The domain, hereby, corresponds to the landscape of web application UIs.",[31,371,373],{"id":372},"what-is-a-snapshot","What is a Snapshot?",[11,375,376,377,380],{},"Web agents provide an LLM with a task, and serialised runtime state of a currently browsed web application (e.g., a screenshot). The LLM is ought to suggest relevant actions to perform in the web application. Serialisation of such runtime state is referred to as a ",[14,378,379],{},"snapshot",". And the snapshot technique primarily decides the quality of LLM interaction suggestions.",[226,382,384],{"id":383},"gui-snapshots","GUI Snapshots",[11,386,387,388,391,392,396,397,400],{},"Screenshots – for consistency reasons referred to as ",[14,389,390],{},"GUI snapshots"," – resemble how humans visually perceive web application UIs. LLM APIs subsidise the use of image input through upstream compression. Compresssion, however, irreversibly affects image dimensions, which takes away pixel precision; no way to suggest interactions like ",[393,394,395],"em",{},"“click at 100, 735”",". As a workaround, early web agents used ",[393,398,399],{},"grounded"," GUI snapshots. Grounding describes adding visual cues to the GUI, such as bounding boxes with numerical identifiers. Grounding lets the LLM refer to specific parts of the page by identifier, so the agent can trace back interaction targets.",[19,402],{":width":342,"alt":403,"format":344,"loading":24,"src":404},"Grounded GUI snapshot as implemented by Browser Use","/blog/dom-downsampling-for-web-agents/2.png",[11,406,407],{},[408,409,410],"small",{},"Grounded GUI snapshot as implemented by Browser Use.",[226,412,414],{"id":413},"dom-snapshots","DOM Snapshots",[11,416,417,418,428,429,432],{},"LLMs arguably are much better at understanding code than images. Research supports they excel at describing and classifying HTML, and also navigating an inherent UI",[419,420,421],"sup",{},[349,422,427],{"href":423,"ariaDescribedBy":424,"dataFootnoteRef":301,"id":426},"#user-content-fn-1",[425],"footnote-label","user-content-fnref-1","1",". The DOM (document object model) – a web browser's runtime state model of a web application – translates back to HTML. For this reason, ",[14,430,431],{},"DOM snapshots"," offer a compelling alternative to GUI snapshots. DOM snapshots offer a handful of key advantages:",[150,434,435,438,441,444,447],{},[47,436,437],{},"DOM snapshots connect with LLM code (HTML) interpretation abilities.",[47,439,440],{},"DOM snapshots can be compiled from deep clones, hidden from supervision (unlike GUI grounding).",[47,442,443],{},"DOM snapshots render text input that on average consume less bandwidth than screnshots.",[47,445,446],{},"DOM snapshots allow for exact programmatic targeting of elements (e.g., via CSS selectors).",[47,448,449,450,453,454,457],{},"DOM snapshots are available with the ",[54,451,452],{},"DOMContentLoaded"," event (whereas the GUI completes initial rendering with ",[54,455,456],{},"load",").",[11,459,460],{},"Yet, DOM snapshots have a major problem: potentially exhaustive model context. Whereas GUI snapshot commonly cost four figures of tokens, a raw DOM snapshot can cost into hundreds of thousands of tokens. To connect with LLM code interpretation abilities, however, developers have used element extraction techniques – picking only (likely) important elements from the DOM. Element extraction flattens the DOM tree, which disregards hierarchy as a potential UI feature (how do elements relate to each other?).",[31,462,464],{"id":463},"dom-downsampling-a-novel-approach","DOM Downsampling: A Novel Approach",[11,466,467],{},"To enable DOM snapshots for use with web agents, it requires client-side pre-processing – similar to how LLM vision APIs process image input. Downsampling is a fundamental signal processing technique that reduces data that scales out of time or space constraints under the assumption that the majority of relevant features is retained. Picture JPEG compression as an example: put simply, a JPEG image stores only an average colour for patches of pixels. The bigger the patches, the smaller the file. Although some detail is lost, key image features – colours, edges, objects – keep being recognisable – up to a large patch size.",[11,469,470,471,474,475,478],{},"We transfer the concept of ",[14,472,473],{},"downsampling"," to ",[14,476,477],{},"DOMs",". Particularly, since such an approach retains HTML characteristics that might be valuable for an LLM backend. We define UI features as concepts that, to a substantial degree, facilitate LLM suggestions on how to act in the UI in order to solve related web-based tasks.",[31,480,482],{"id":481},"d2snap",[393,483,484],{},"D2Snap",[11,486,487,488,496,504,512,513,515],{},"We recently proposed ",[349,489,492],{"href":490,"rel":491},"https://arxiv.org/abs/2508.04412",[353],[14,493,494],{},[393,495,484],{},[419,497,498],{},[349,499,503],{"href":500,"ariaDescribedBy":501,"dataFootnoteRef":301,"id":502},"#user-content-fn-2",[425],"user-content-fnref-2","2",[419,505,506],{},[349,507,511],{"href":508,"ariaDescribedBy":509,"dataFootnoteRef":301,"id":510},"#user-content-fn-3",[425],"user-content-fnref-3","3"," – a first-of-its-kind downsampling algorithm for DOMs. Herein, we'll briefly explain how the ",[393,514,484],{}," algorithm works, and how it can be utilised to build efficient and performant web agents.",[226,517,519],{"id":518},"how-it-works","How it works",[11,521,522,523,525,526,57,529,532,533,536,537,457],{},"There are basically three redundant types of DOM nodes, and HTML concepts: elements, text, and attributes. We defined and empirically adjusted three node-specific procedures. ",[393,524,484],{}," downsamples at a variable ratio, configured through procedure-specific parameters  ",[54,527,528],{},"k",[54,530,531],{},"l",", and ",[54,534,535],{},"m"," (",[54,538,539],{},"∈ [0, 1]",[541,542,543],"blockquote",{},[11,544,545,546,551],{},"We used ",[349,547,550],{"href":548,"rel":549},"https://openai.com/index/hello-gpt-4o/",[353],"GPT-4o"," to create a downsampling ground truth dataset by having it classify HTML elements and scoring semantics regarding relevance for understanding the inherent UI – a UI feature degree.",[553,554,556],"h4",{"id":555},"procedure-elements","Procedure: Elements",[11,558,559,561,562,565,566,569,570,572],{},[393,560,484],{}," downsamples (simplifies) elements by merging container elements like ",[54,563,564],{},"section"," and ",[54,567,568],{},"div"," together. A parameter ",[54,571,528],{}," controls the merge ratio depending on the total DOM tree height. For competing concepts, such as element name, the ground truth determines which element's characterisitics to keep – comparing UI feature scores.",[11,574,575,576,57,578,580,581,586],{},"Elements in content elements (",[54,577,11],{},[54,579,541],{},", ...) are translated to a more comprehensive ",[349,582,585],{"href":583,"rel":584},"https://www.markdownguide.org/basic-syntax/",[353],"Markdown"," representation.",[11,588,589],{},"Interactive elements, definite interaction target candidates, are kept as is.",[553,591,593],{"id":592},"procedure-text","Procedure: Text",[11,595,596,598,599,602,610,611,613],{},[393,597,484],{}," downsamples text by dropping a fraction. Natural units of text are space-separated words, or punctuation-separated sentences. We reuse the ",[393,600,601],{},"TextRank",[419,603,604],{},[349,605,609],{"href":606,"ariaDescribedBy":607,"dataFootnoteRef":301,"id":608},"#user-content-fn-4",[425],"user-content-fnref-4","4"," algorithm to rank sentences in text nodes. The lowest-ranking fraction of sentences, denoted by parameter ",[54,612,531],{},", is dropped.",[553,615,617],{"id":616},"procedure-attributes","Procedure: Attributes",[11,619,620,622,623,625],{},[393,621,484],{}," downsamples attributes by dropping those with a name that, according to ground truth, holds a UI feature degree below a threshold. Parameter ",[54,624,535],{}," denotes this threshold.",[541,627,628],{},[11,629,630,631,637],{},"Check out the ",[349,632,634,636],{"href":490,"rel":633},[353],[393,635,484],{}," paper"," to learn about the algorithm in-depth.",[226,639,641],{"id":640},"example-of-a-downsampled-dom","Example of a Downsampled DOM",[11,643,644],{},"Consider a partial DOM state, serialised as HTML:",[646,647,651],"pre",{"className":648,"code":649,"language":650,"meta":301,"style":301},"language-html shiki shiki-themes catppuccin-latte night-owl","\u003Csection class=\"container\" tabindex=\"3\" required=\"true\" type=\"example\">\n  \u003Cdiv class=\"mx-auto\" data-topic=\"products\" required=\"false\">\n    \u003Ch1>Our Pizza\u003C/h1>\n    \u003Cdiv>\n      \u003Cdiv class=\"shadow-lg\">\n        \u003Ch2>Margherita\u003C/h2>\n        \u003Cp>\n          A simple classic: mozzarela, tomatoes and basil.\n          An everyday choice!\n        \u003C/p>\n        \u003Cbutton type=\"button\">Add\u003C/button>\n      \u003C/div>\n      \u003Cdiv class=\"shadow-lg\">\n        \u003Ch2>Capricciosa\u003C/h2>\n        \u003Cp>\n          A rich taste: mozzarella, ham, mushrooms, artichokes, and olives.\n          A true favourite!\n          \u003C/p>\n        \u003Cbutton type=\"button\">Add\u003C/button>\n      \u003C/div>\n    \u003C/div>\n  \u003C/div>\n\u003C/section>\n","html",[54,652,653,720,763,785,794,815,834,843,849,855,865,894,904,923,941,950,956,962,972,999,1008,1018,1028],{"__ignoreMap":301},[654,655,658,662,665,669,672,676,680,682,685,687,689,691,693,696,698,700,703,705,708,710,712,715,717],"span",{"class":656,"line":657},"line",1,[654,659,661],{"class":660},"s9rnR","\u003C",[654,663,564],{"class":664},"sY2RG",[654,666,668],{"class":667},"swkLt"," class",[654,670,671],{"class":660},"=",[654,673,675],{"class":674},"sbuKk","\"",[654,677,679],{"class":678},"sfrMT","container",[654,681,675],{"class":674},[654,683,684],{"class":667}," tabindex",[654,686,671],{"class":660},[654,688,675],{"class":674},[654,690,511],{"class":678},[654,692,675],{"class":674},[654,694,695],{"class":667}," required",[654,697,671],{"class":660},[654,699,675],{"class":674},[654,701,702],{"class":678},"true",[654,704,675],{"class":674},[654,706,707],{"class":667}," type",[654,709,671],{"class":660},[654,711,675],{"class":674},[654,713,714],{"class":678},"example",[654,716,675],{"class":674},[654,718,719],{"class":660},">\n",[654,721,722,725,727,729,731,733,736,738,741,743,745,748,750,752,754,756,759,761],{"class":656,"line":302},[654,723,724],{"class":660},"  \u003C",[654,726,568],{"class":664},[654,728,668],{"class":667},[654,730,671],{"class":660},[654,732,675],{"class":674},[654,734,735],{"class":678},"mx-auto",[654,737,675],{"class":674},[654,739,740],{"class":667}," data-topic",[654,742,671],{"class":660},[654,744,675],{"class":674},[654,746,747],{"class":678},"products",[654,749,675],{"class":674},[654,751,695],{"class":667},[654,753,671],{"class":660},[654,755,675],{"class":674},[654,757,758],{"class":678},"false",[654,760,675],{"class":674},[654,762,719],{"class":660},[654,764,765,768,771,774,778,781,783],{"class":656,"line":311},[654,766,767],{"class":660},"    \u003C",[654,769,770],{"class":664},"h1",[654,772,773],{"class":660},">",[654,775,777],{"class":776},"s2kId","Our Pizza",[654,779,780],{"class":660},"\u003C/",[654,782,770],{"class":664},[654,784,719],{"class":660},[654,786,788,790,792],{"class":656,"line":787},4,[654,789,767],{"class":660},[654,791,568],{"class":664},[654,793,719],{"class":660},[654,795,797,800,802,804,806,808,811,813],{"class":656,"line":796},5,[654,798,799],{"class":660},"      \u003C",[654,801,568],{"class":664},[654,803,668],{"class":667},[654,805,671],{"class":660},[654,807,675],{"class":674},[654,809,810],{"class":678},"shadow-lg",[654,812,675],{"class":674},[654,814,719],{"class":660},[654,816,818,821,823,825,828,830,832],{"class":656,"line":817},6,[654,819,820],{"class":660},"        \u003C",[654,822,31],{"class":664},[654,824,773],{"class":660},[654,826,827],{"class":776},"Margherita",[654,829,780],{"class":660},[654,831,31],{"class":664},[654,833,719],{"class":660},[654,835,837,839,841],{"class":656,"line":836},7,[654,838,820],{"class":660},[654,840,11],{"class":664},[654,842,719],{"class":660},[654,844,846],{"class":656,"line":845},8,[654,847,848],{"class":776},"          A simple classic: mozzarela, tomatoes and basil.\n",[654,850,852],{"class":656,"line":851},9,[654,853,854],{"class":776},"          An everyday choice!\n",[654,856,858,861,863],{"class":656,"line":857},10,[654,859,860],{"class":660},"        \u003C/",[654,862,11],{"class":664},[654,864,719],{"class":660},[654,866,868,870,873,875,877,879,881,883,885,888,890,892],{"class":656,"line":867},11,[654,869,820],{"class":660},[654,871,872],{"class":664},"button",[654,874,707],{"class":667},[654,876,671],{"class":660},[654,878,675],{"class":674},[654,880,872],{"class":678},[654,882,675],{"class":674},[654,884,773],{"class":660},[654,886,887],{"class":776},"Add",[654,889,780],{"class":660},[654,891,872],{"class":664},[654,893,719],{"class":660},[654,895,897,900,902],{"class":656,"line":896},12,[654,898,899],{"class":660},"      \u003C/",[654,901,568],{"class":664},[654,903,719],{"class":660},[654,905,907,909,911,913,915,917,919,921],{"class":656,"line":906},13,[654,908,799],{"class":660},[654,910,568],{"class":664},[654,912,668],{"class":667},[654,914,671],{"class":660},[654,916,675],{"class":674},[654,918,810],{"class":678},[654,920,675],{"class":674},[654,922,719],{"class":660},[654,924,926,928,930,932,935,937,939],{"class":656,"line":925},14,[654,927,820],{"class":660},[654,929,31],{"class":664},[654,931,773],{"class":660},[654,933,934],{"class":776},"Capricciosa",[654,936,780],{"class":660},[654,938,31],{"class":664},[654,940,719],{"class":660},[654,942,944,946,948],{"class":656,"line":943},15,[654,945,820],{"class":660},[654,947,11],{"class":664},[654,949,719],{"class":660},[654,951,953],{"class":656,"line":952},16,[654,954,955],{"class":776},"          A rich taste: mozzarella, ham, mushrooms, artichokes, and olives.\n",[654,957,959],{"class":656,"line":958},17,[654,960,961],{"class":776},"          A true favourite!\n",[654,963,965,968,970],{"class":656,"line":964},18,[654,966,967],{"class":660},"          \u003C/",[654,969,11],{"class":664},[654,971,719],{"class":660},[654,973,975,977,979,981,983,985,987,989,991,993,995,997],{"class":656,"line":974},19,[654,976,820],{"class":660},[654,978,872],{"class":664},[654,980,707],{"class":667},[654,982,671],{"class":660},[654,984,675],{"class":674},[654,986,872],{"class":678},[654,988,675],{"class":674},[654,990,773],{"class":660},[654,992,887],{"class":776},[654,994,780],{"class":660},[654,996,872],{"class":664},[654,998,719],{"class":660},[654,1000,1002,1004,1006],{"class":656,"line":1001},20,[654,1003,899],{"class":660},[654,1005,568],{"class":664},[654,1007,719],{"class":660},[654,1009,1011,1014,1016],{"class":656,"line":1010},21,[654,1012,1013],{"class":660},"    \u003C/",[654,1015,568],{"class":664},[654,1017,719],{"class":660},[654,1019,1021,1024,1026],{"class":656,"line":1020},22,[654,1022,1023],{"class":660},"  \u003C/",[654,1025,568],{"class":664},[654,1027,719],{"class":660},[654,1029,1031,1033,1035],{"class":656,"line":1030},23,[654,1032,780],{"class":660},[654,1034,564],{"class":664},[654,1036,719],{"class":660},[11,1038,1039,1040,1042],{},"Here are some ",[393,1041,484],{}," downsampling results, which are based on different parametric configurations. A percentage denotes the reduced size.",[553,1044,1046,1049],{"id":1045},"k3-l3-m3-55",[54,1047,1048],{},"k=.3, l=.3, m=.3"," (55%)",[646,1051,1053],{"className":648,"code":1052,"language":650,"meta":301,"style":301},"\u003Csection tabindex=\"3\" type=\"example\" class=\"container\" required=\"true\">\n  # Our Pizza\n  \u003Cdiv class=\"shadow-lg\">\n    ## Margherita\n    A simple classic: mozzarela, tomatoes, and basil.\n    \u003Cbutton type=\"button\">Add\u003C/button>\n    ## Capricciosa\n    A rich taste: mozzarella, ham, mushrooms, artichokes, and olives.\n    \u003Cbutton type=\"button\">Add\u003C/button>\n  \u003C/div>\n\u003C/section>\n",[54,1054,1055,1103,1108,1126,1131,1136,1162,1167,1172,1198,1206],{"__ignoreMap":301},[654,1056,1057,1059,1061,1063,1065,1067,1069,1071,1073,1075,1077,1079,1081,1083,1085,1087,1089,1091,1093,1095,1097,1099,1101],{"class":656,"line":657},[654,1058,661],{"class":660},[654,1060,564],{"class":664},[654,1062,684],{"class":667},[654,1064,671],{"class":660},[654,1066,675],{"class":674},[654,1068,511],{"class":678},[654,1070,675],{"class":674},[654,1072,707],{"class":667},[654,1074,671],{"class":660},[654,1076,675],{"class":674},[654,1078,714],{"class":678},[654,1080,675],{"class":674},[654,1082,668],{"class":667},[654,1084,671],{"class":660},[654,1086,675],{"class":674},[654,1088,679],{"class":678},[654,1090,675],{"class":674},[654,1092,695],{"class":667},[654,1094,671],{"class":660},[654,1096,675],{"class":674},[654,1098,702],{"class":678},[654,1100,675],{"class":674},[654,1102,719],{"class":660},[654,1104,1105],{"class":656,"line":302},[654,1106,1107],{"class":776},"  # Our Pizza\n",[654,1109,1110,1112,1114,1116,1118,1120,1122,1124],{"class":656,"line":311},[654,1111,724],{"class":660},[654,1113,568],{"class":664},[654,1115,668],{"class":667},[654,1117,671],{"class":660},[654,1119,675],{"class":674},[654,1121,810],{"class":678},[654,1123,675],{"class":674},[654,1125,719],{"class":660},[654,1127,1128],{"class":656,"line":787},[654,1129,1130],{"class":776},"    ## Margherita\n",[654,1132,1133],{"class":656,"line":796},[654,1134,1135],{"class":776},"    A simple classic: mozzarela, tomatoes, and basil.\n",[654,1137,1138,1140,1142,1144,1146,1148,1150,1152,1154,1156,1158,1160],{"class":656,"line":817},[654,1139,767],{"class":660},[654,1141,872],{"class":664},[654,1143,707],{"class":667},[654,1145,671],{"class":660},[654,1147,675],{"class":674},[654,1149,872],{"class":678},[654,1151,675],{"class":674},[654,1153,773],{"class":660},[654,1155,887],{"class":776},[654,1157,780],{"class":660},[654,1159,872],{"class":664},[654,1161,719],{"class":660},[654,1163,1164],{"class":656,"line":836},[654,1165,1166],{"class":776},"    ## Capricciosa\n",[654,1168,1169],{"class":656,"line":845},[654,1170,1171],{"class":776},"    A rich taste: mozzarella, ham, mushrooms, artichokes, and olives.\n",[654,1173,1174,1176,1178,1180,1182,1184,1186,1188,1190,1192,1194,1196],{"class":656,"line":851},[654,1175,767],{"class":660},[654,1177,872],{"class":664},[654,1179,707],{"class":667},[654,1181,671],{"class":660},[654,1183,675],{"class":674},[654,1185,872],{"class":678},[654,1187,675],{"class":674},[654,1189,773],{"class":660},[654,1191,887],{"class":776},[654,1193,780],{"class":660},[654,1195,872],{"class":664},[654,1197,719],{"class":660},[654,1199,1200,1202,1204],{"class":656,"line":857},[654,1201,1023],{"class":660},[654,1203,568],{"class":664},[654,1205,719],{"class":660},[654,1207,1208,1210,1212],{"class":656,"line":867},[654,1209,780],{"class":660},[654,1211,564],{"class":664},[654,1213,719],{"class":660},[553,1215,1217,1220],{"id":1216},"k4-l6-m8-27",[54,1218,1219],{},"k=.4, l=.6, m=.8"," (27%)",[646,1222,1224],{"className":648,"code":1223,"language":650,"meta":301,"style":301},"\u003Csection>\n  # Our Pizza\n  \u003Cdiv>\n    ## Margherita\n    A simple classic:\n    \u003Cbutton>Add\u003C/button>\n    ## Capricciosa\n    A rich taste:\n    \u003Cbutton>Add\u003C/button>\n  \u003C/div>\n\u003C/section>\n",[54,1225,1226,1234,1238,1246,1250,1255,1271,1275,1280,1296,1304],{"__ignoreMap":301},[654,1227,1228,1230,1232],{"class":656,"line":657},[654,1229,661],{"class":660},[654,1231,564],{"class":664},[654,1233,719],{"class":660},[654,1235,1236],{"class":656,"line":302},[654,1237,1107],{"class":776},[654,1239,1240,1242,1244],{"class":656,"line":311},[654,1241,724],{"class":660},[654,1243,568],{"class":664},[654,1245,719],{"class":660},[654,1247,1248],{"class":656,"line":787},[654,1249,1130],{"class":776},[654,1251,1252],{"class":656,"line":796},[654,1253,1254],{"class":776},"    A simple classic:\n",[654,1256,1257,1259,1261,1263,1265,1267,1269],{"class":656,"line":817},[654,1258,767],{"class":660},[654,1260,872],{"class":664},[654,1262,773],{"class":660},[654,1264,887],{"class":776},[654,1266,780],{"class":660},[654,1268,872],{"class":664},[654,1270,719],{"class":660},[654,1272,1273],{"class":656,"line":836},[654,1274,1166],{"class":776},[654,1276,1277],{"class":656,"line":845},[654,1278,1279],{"class":776},"    A rich taste:\n",[654,1281,1282,1284,1286,1288,1290,1292,1294],{"class":656,"line":851},[654,1283,767],{"class":660},[654,1285,872],{"class":664},[654,1287,773],{"class":660},[654,1289,887],{"class":776},[654,1291,780],{"class":660},[654,1293,872],{"class":664},[654,1295,719],{"class":660},[654,1297,1298,1300,1302],{"class":656,"line":857},[654,1299,1023],{"class":660},[654,1301,568],{"class":664},[654,1303,719],{"class":660},[654,1305,1306,1308,1310],{"class":656,"line":867},[654,1307,780],{"class":660},[654,1309,564],{"class":664},[654,1311,719],{"class":660},[553,1313,1315,1318],{"id":1314},"k-l0-m-35",[54,1316,1317],{},"k→∞, l=0, ∀m"," (35%)",[646,1320,1322],{"className":648,"code":1321,"language":650,"meta":301,"style":301},"# Our Pizza\n## Margherita\nA simple classic: mozzarela, tomatoes, and basil.\nAn everyday choice!\n\u003Cbutton>Add\u003C/button>\n## Capricciosa\nA rich taste: mozzarella, ham, mushrooms, artichokes, and olives.\nA true favourite!\n\u003Cbutton>Add\u003C/button>\n",[54,1323,1324,1329,1334,1339,1344,1360,1365,1370,1375],{"__ignoreMap":301},[654,1325,1326],{"class":656,"line":657},[654,1327,1328],{"class":776},"# Our Pizza\n",[654,1330,1331],{"class":656,"line":302},[654,1332,1333],{"class":776},"## Margherita\n",[654,1335,1336],{"class":656,"line":311},[654,1337,1338],{"class":776},"A simple classic: mozzarela, tomatoes, and basil.\n",[654,1340,1341],{"class":656,"line":787},[654,1342,1343],{"class":776},"An everyday choice!\n",[654,1345,1346,1348,1350,1352,1354,1356,1358],{"class":656,"line":796},[654,1347,661],{"class":660},[654,1349,872],{"class":664},[654,1351,773],{"class":660},[654,1353,887],{"class":776},[654,1355,780],{"class":660},[654,1357,872],{"class":664},[654,1359,719],{"class":660},[654,1361,1362],{"class":656,"line":817},[654,1363,1364],{"class":776},"## Capricciosa\n",[654,1366,1367],{"class":656,"line":836},[654,1368,1369],{"class":776},"A rich taste: mozzarella, ham, mushrooms, artichokes, and olives.\n",[654,1371,1372],{"class":656,"line":845},[654,1373,1374],{"class":776},"A true favourite!\n",[654,1376,1377,1379,1381,1383,1385,1387,1389],{"class":656,"line":851},[654,1378,661],{"class":660},[654,1380,872],{"class":664},[654,1382,773],{"class":660},[654,1384,887],{"class":776},[654,1386,780],{"class":660},[654,1388,872],{"class":664},[654,1390,719],{"class":660},[11,1392,1393,1394,1396,1397,1399],{},"Asymptotic ",[54,1395,528],{}," (kind of 'infinite' ",[54,1398,528],{},") completely flattens the DOM, that is, leads to a full content linearisation similar to reader views as present in most browsers. Notably, it preserves all interactive elements like buttons – which are essential for a web agent.",[226,1401,1403],{"id":1402},"adaptived2snap",[393,1404,1405],{},"AdaptiveD2Snap",[11,1407,1408,1409,1411,1412,1414],{},"Fixed parameters might not be ideal for arbitrary DOMs – sourced from a landscape of web applications. We created ",[393,1410,1405],{}," – a wrapper for ",[393,1413,484],{}," that infers suitable parameters from a given DOM in order to hit a certain token budget.",[226,1416,1418],{"id":1417},"implementation-integration","Implementation & Integration",[11,1420,1421,1422,1424],{},"Picture an LLM-based weg agent that is premised on DOM snapshots. Implementing ",[393,1423,484],{}," is simple: Deep clone the DOM, and feed it to the algorithm. Now, take the snapshot; this is, serialise the resulting DOM. Done.",[541,1426,1427],{},[11,1428,1429,1430,1434],{},"Read our ",[349,1431,1433],{"href":1432},"/blog/a-gentle-introduction-to-ai-agents-for-the-web","gentle introduction to AI agents for the web"," to get started with high-level web agent concepts.",[11,1436,1437,1438,1440,1441,1446],{},"The open source ",[393,1439,484],{}," API, provided as a ",[349,1442,1445],{"href":1443,"rel":1444},"https://github.com/webfuse-com/D2Snap",[353],"package on GitHub"," provides the following signature:",[646,1448,1452],{"className":1449,"code":1450,"language":1451,"meta":301,"style":301},"language-ts shiki shiki-themes catppuccin-latte night-owl","type DOM = Document | Element | string;\ntype Options = {\n  assignUniqueIDs?: boolean; // false\n  debug?: boolean;           // true\n};\n\nD2Snap.d2Snap(\n  dom: DOM,\n  k: number, l: number, m: number,\n  options?: Options\n): Promise\u003Cstring>\n\nD2Snap.adaptiveD2Snap(\n  dom: DOM,\n  maxTokens: number = 4096,\n  maxIterations: number = 5,\n  options?: Options\n): Promise\u003Cstring>\n\n","ts",[54,1453,1454,1487,1499,1518,1532,1537,1542,1556,1568,1586,1596,1612,1616,1627,1635,1648,1660,1668],{"__ignoreMap":301},[654,1455,1456,1460,1464,1467,1471,1474,1477,1479,1483],{"class":656,"line":657},[654,1457,1459],{"class":1458},"s76yb","type",[654,1461,1463],{"class":1462},"sXbZB"," DOM ",[654,1465,671],{"class":1466},"s-_ek",[654,1468,1470],{"class":1469},"s-DR7"," Document",[654,1472,1473],{"class":660}," |",[654,1475,1476],{"class":1469}," Element",[654,1478,1473],{"class":660},[654,1480,1482],{"class":1481},"scrte"," string",[654,1484,1486],{"class":1485},"scGhl",";\n",[654,1488,1489,1491,1494,1496],{"class":656,"line":302},[654,1490,1459],{"class":1458},[654,1492,1493],{"class":1462}," Options ",[654,1495,671],{"class":1466},[654,1497,1498],{"class":1485}," {\n",[654,1500,1501,1505,1508,1511,1514],{"class":656,"line":311},[654,1502,1504],{"class":1503},"swl0y","  assignUniqueIDs",[654,1506,1507],{"class":660},"?:",[654,1509,1510],{"class":1481}," boolean",[654,1512,1513],{"class":1485},";",[654,1515,1517],{"class":1516},"sDmS1"," // false\n",[654,1519,1520,1523,1525,1527,1529],{"class":656,"line":787},[654,1521,1522],{"class":1503},"  debug",[654,1524,1507],{"class":660},[654,1526,1510],{"class":1481},[654,1528,1513],{"class":1485},[654,1530,1531],{"class":1516},"           // true\n",[654,1533,1534],{"class":656,"line":796},[654,1535,1536],{"class":1485},"};\n",[654,1538,1539],{"class":656,"line":817},[654,1540,1541],{"emptyLinePlaceholder":322},"\n",[654,1543,1544,1546,1549,1553],{"class":656,"line":836},[654,1545,484],{"class":776},[654,1547,176],{"class":1548},"s5FwJ",[654,1550,1552],{"class":1551},"sNstc","d2Snap",[654,1554,1555],{"class":776},"(\n",[654,1557,1558,1561,1565],{"class":656,"line":845},[654,1559,1560],{"class":776},"  dom: ",[654,1562,1564],{"class":1563},"sqxXB","DOM",[654,1566,1567],{"class":1485},",\n",[654,1569,1570,1573,1576,1579,1581,1584],{"class":656,"line":851},[654,1571,1572],{"class":776},"  k: number",[654,1574,1575],{"class":1485},",",[654,1577,1578],{"class":776}," l: number",[654,1580,1575],{"class":1485},[654,1582,1583],{"class":776}," m: number",[654,1585,1567],{"class":1485},[654,1587,1588,1591,1593],{"class":656,"line":857},[654,1589,1590],{"class":776},"  options",[654,1592,1507],{"class":1466},[654,1594,1595],{"class":776}," Options\n",[654,1597,1598,1601,1605,1607,1610],{"class":656,"line":867},[654,1599,1600],{"class":776},"): ",[654,1602,1604],{"class":1603},"s8Irk","Promise",[654,1606,661],{"class":1466},[654,1608,1609],{"class":776},"string",[654,1611,719],{"class":1466},[654,1613,1614],{"class":656,"line":896},[654,1615,1541],{"emptyLinePlaceholder":322},[654,1617,1618,1620,1622,1625],{"class":656,"line":906},[654,1619,484],{"class":776},[654,1621,176],{"class":1548},[654,1623,1624],{"class":1551},"adaptiveD2Snap",[654,1626,1555],{"class":776},[654,1628,1629,1631,1633],{"class":656,"line":925},[654,1630,1560],{"class":776},[654,1632,1564],{"class":1563},[654,1634,1567],{"class":1485},[654,1636,1637,1640,1642,1646],{"class":656,"line":943},[654,1638,1639],{"class":776},"  maxTokens: number ",[654,1641,671],{"class":1466},[654,1643,1645],{"class":1644},"sZ_Zo"," 4096",[654,1647,1567],{"class":1485},[654,1649,1650,1653,1655,1658],{"class":656,"line":952},[654,1651,1652],{"class":776},"  maxIterations: number ",[654,1654,671],{"class":1466},[654,1656,1657],{"class":1644}," 5",[654,1659,1567],{"class":1485},[654,1661,1662,1664,1666],{"class":656,"line":958},[654,1663,1590],{"class":776},[654,1665,1507],{"class":1466},[654,1667,1595],{"class":776},[654,1669,1670,1672,1674,1676,1678],{"class":656,"line":964},[654,1671,1600],{"class":776},[654,1673,1604],{"class":1603},[654,1675,661],{"class":1466},[654,1677,1609],{"class":776},[654,1679,719],{"class":1466},[11,1681,1682,1683,1685,1686,1691,1692,1697],{},"Moreover, ",[393,1684,484],{}," it is available on the ",[349,1687,1690],{"href":1688,"rel":1689},"https://dev.webfuse.com/automation-api",[353],"Webfuse Automation API",". ",[349,1693,1696],{"href":1694,"rel":1695},"https://www.webfuse.com",[353],"Webfuse"," essentially is a proxy to seamlessly serve any existing web application with custom augmentations, such as a web agent widget.",[646,1699,1703],{"className":1700,"code":1701,"language":1702,"meta":301,"style":301},"language-js shiki shiki-themes catppuccin-latte night-owl","const domSnapshot = await browser.webfuseSession\n    .automation\n    .take_dom_snapshot({ modifier: 'downsample' })\n","js",[54,1704,1705,1710,1715],{"__ignoreMap":301},[654,1706,1707],{"class":656,"line":657},[654,1708,1709],{},"const domSnapshot = await browser.webfuseSession\n",[654,1711,1712],{"class":656,"line":302},[654,1713,1714],{},"    .automation\n",[654,1716,1717],{"class":656,"line":311},[654,1718,1719],{},"    .take_dom_snapshot({ modifier: 'downsample' })\n",[11,1721,1722,1723,1725],{},"Need precise control over the underlying ",[393,1724,484],{}," invocation? Configure it exactly how you want:",[646,1727,1729],{"className":1700,"code":1728,"language":1702,"meta":301,"style":301},"const domSnapshot = await browser.webfuseSession\n    .automation\n    .take_dom_snapshot({\n        modifier: {\n            name: 'D2Snap',\n            params: { hierarchyRatio: 0.6, textRatio: 0.2, attributeRatio: 0.8 }\n        }\n    })\n",[54,1730,1731,1735,1739,1744,1749,1754,1759,1764],{"__ignoreMap":301},[654,1732,1733],{"class":656,"line":657},[654,1734,1709],{},[654,1736,1737],{"class":656,"line":302},[654,1738,1714],{},[654,1740,1741],{"class":656,"line":311},[654,1742,1743],{},"    .take_dom_snapshot({\n",[654,1745,1746],{"class":656,"line":787},[654,1747,1748],{},"        modifier: {\n",[654,1750,1751],{"class":656,"line":796},[654,1752,1753],{},"            name: 'D2Snap',\n",[654,1755,1756],{"class":656,"line":817},[654,1757,1758],{},"            params: { hierarchyRatio: 0.6, textRatio: 0.2, attributeRatio: 0.8 }\n",[654,1760,1761],{"class":656,"line":836},[654,1762,1763],{},"        }\n",[654,1765,1766],{"class":656,"line":845},[654,1767,1768],{},"    })\n",[226,1770,1772],{"id":1771},"performance-evaluation","Performance Evaluation",[11,1774,1775,1776,1778,1779,1781,1782,1784],{},"Now for the moment of truth: How does ",[393,1777,484],{}," stack up against the industry standard? We evaluated ",[393,1780,484],{}," in comparison to a grounded GUI snapshot baseline close to those used by ",[393,1783,364],{}," – coloured bounding boxes around visible interactive elements.",[11,1786,1787,1788,1793],{},"To evaluate snapshots isolated from specific agent logic, we crafted a dataset that spans all UI states that occur while solving a related task. We sampled our dataset from the existing ",[349,1789,1792],{"href":1790,"rel":1791},"https://github.com/OSU-NLP-Group/Online-Mind2Web",[353],"Online-Mind2Web"," dataset.",[19,1795],{":width":1796,"alt":1797,"format":344,"loading":24,"src":1798},"800","Exemplary solution UI state trajectory of a defined web-based task","/blog/dom-downsampling-for-web-agents/3.png",[11,1800,1801],{},[408,1802,1803],{},"Exemplary solution UI state trajectory for the task: “View the pricing plan for 'Business'. Specifically, we have 100 users. We need a 1PB storage quota and a 50 TB transfer quota.”",[11,1805,1806],{},"These are our key findings...",[553,1808,1810],{"id":1809},"substantial-success-rates","Substantial Success Rates",[11,1812,1813,1814,1816],{},"The results exceeded our expectations. Not only did ",[393,1815,484],{}," meet the baseline's performance – our best configuration outperformed it by a significant margin. Full linearisation matches performance, and estimated model input token size order of the baseline.",[19,1818],{":width":1819,"alt":1820,"format":344,"loading":24,"src":1821},"550","Success rate per web agent snapshot subject evaluated across the dataset","/blog/dom-downsampling-for-web-agents/4.png",[408,1823,1824,1825,1832,1833,1835,1836,1839,1840,1843,1844,1847,1848,1851,1852,1855,1856,1859],{},"\n  Success rate per web agent snapshot subject evaluated across the dataset.\n  Labels: ",[54,1826,1827,1828],{},"GUI",[1829,1830,1831],"sub",{}," gr.",": Baseline, ",[54,1834,1564],{},": Raw DOM (cut-off at ~8K tokens), ",[54,1837,1838],{},"k( l m)",": Parameter values; e.g., ",[54,1841,1842],{},".9 .3 .6",", or ",[54,1845,1846],{},".4"," if equal). ",[54,1849,1850],{},"∞",": Linearisation,  ",[54,1853,1854],{},"8192 / 32768",": via token-limited (resp.) ",[1857,1858,1405],"i",{},".\n",[553,1861,1863],{"id":1862},"containable-token-and-byte-size","Containable Token and Byte Size",[11,1865,1866,1867,1869],{},"Even light downsampling delivers dramatic size reductions. Most ",[393,1868,484],{}," configurations average just one token order above the baseline – a massive improvement over raw DOM snapshots. Better yet, most DOMs from the dataset could actually be downsampled to the baseline order. And while image data balloons in file size, our text-based approach stays lean and efficient.",[19,1871],{":width":1796,"alt":1872,"format":344,"loading":24,"src":1873},"Comparison of mean input size across and per subject","/blog/dom-downsampling-for-web-agents/5.png",[408,1875,1876,1877,1880,1881,1883],{},"\n  Left: Comparison of mean input size (tokens vs bytes) across and per subject.",[1878,1879],"br",{},"\n  Right: Estimated input token size across the dataset created by a single ",[1857,1882,484],{}," evaluation subject.\n",[553,1885,1887],{"id":1886},"hierarchy-actually-matters","Hierarchy Actually Matters",[11,1889,1890],{},"Which UI feature matters most for LLM web agent backend performance? We alternated parameter configurations to find out. Interestingly, hierarchy reveals itself as the strongest of the three assessed features. Element extraction throws away hierarchy, which suggests that downsampling is a superior technique.",[564,1892,1895,1900],{"className":1893,"dataFootnotes":301},[1894],"footnotes",[31,1896,1899],{"className":1897,"id":425},[1898],"sr-only","Footnotes",[150,1901,1902,1917,1928,1939],{},[47,1903,1905,1909,1910],{"id":1904},"user-content-fn-1",[349,1906,1907],{"href":1907,"rel":1908},"https://arxiv.org/abs/2210.03945",[353]," ",[349,1911,1916],{"href":1912,"ariaLabel":1913,"className":1914,"dataFootnoteBackref":301},"#user-content-fnref-1","Back to reference 1",[1915],"data-footnote-backref","↩",[47,1918,1920,1909,1923],{"id":1919},"user-content-fn-2",[349,1921,490],{"href":490,"rel":1922},[353],[349,1924,1916],{"href":1925,"ariaLabel":1926,"className":1927,"dataFootnoteBackref":301},"#user-content-fnref-2","Back to reference 2",[1915],[47,1929,1931,1909,1934],{"id":1930},"user-content-fn-3",[349,1932,1443],{"href":1443,"rel":1933},[353],[349,1935,1916],{"href":1936,"ariaLabel":1937,"className":1938,"dataFootnoteBackref":301},"#user-content-fnref-3","Back to reference 3",[1915],[47,1940,1942,1909,1946],{"id":1941},"user-content-fn-4",[349,1943,1944],{"href":1944,"rel":1945},"https://aclanthology.org/W04-3252",[353],[349,1947,1916],{"href":1948,"ariaLabel":1949,"className":1950,"dataFootnoteBackref":301},"#user-content-fnref-4","Back to reference 4",[1915],[1952,1953,1954],"style",{},"html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .s9rnR, html code.shiki .s9rnR{--shiki-default:#179299;--shiki-dark:#7FDBCA}html pre.shiki code .sY2RG, html code.shiki .sY2RG{--shiki-default:#1E66F5;--shiki-dark:#CAECE6}html pre.shiki code .swkLt, html code.shiki .swkLt{--shiki-default:#DF8E1D;--shiki-default-font-style:inherit;--shiki-dark:#C5E478;--shiki-dark-font-style:italic}html pre.shiki code .sbuKk, html code.shiki .sbuKk{--shiki-default:#40A02B;--shiki-dark:#D9F5DD}html pre.shiki code .sfrMT, html code.shiki .sfrMT{--shiki-default:#40A02B;--shiki-dark:#ECC48D}html pre.shiki code .s2kId, html code.shiki .s2kId{--shiki-default:#4C4F69;--shiki-dark:#D6DEEB}html pre.shiki code .s76yb, html code.shiki .s76yb{--shiki-default:#8839EF;--shiki-dark:#C792EA}html pre.shiki code .sXbZB, html code.shiki .sXbZB{--shiki-default:#DF8E1D;--shiki-default-font-style:italic;--shiki-dark:#D6DEEB;--shiki-dark-font-style:inherit}html pre.shiki code .s-_ek, html code.shiki .s-_ek{--shiki-default:#179299;--shiki-dark:#C792EA}html pre.shiki code .s-DR7, html code.shiki .s-DR7{--shiki-default:#DF8E1D;--shiki-default-font-style:italic;--shiki-dark:#FFCB8B;--shiki-dark-font-style:inherit}html pre.shiki code .scrte, html code.shiki .scrte{--shiki-default:#8839EF;--shiki-dark:#C5E478}html pre.shiki code .scGhl, html code.shiki .scGhl{--shiki-default:#7C7F93;--shiki-dark:#D6DEEB}html pre.shiki code .swl0y, html code.shiki .swl0y{--shiki-default:#4C4F69;--shiki-default-font-style:italic;--shiki-dark:#D6DEEB;--shiki-dark-font-style:inherit}html pre.shiki code .sDmS1, html code.shiki .sDmS1{--shiki-default:#7C7F93;--shiki-default-font-style:italic;--shiki-dark:#637777;--shiki-dark-font-style:italic}html pre.shiki code .s5FwJ, html code.shiki .s5FwJ{--shiki-default:#179299;--shiki-default-font-style:inherit;--shiki-dark:#C792EA;--shiki-dark-font-style:italic}html pre.shiki code .sNstc, html code.shiki .sNstc{--shiki-default:#1E66F5;--shiki-default-font-style:italic;--shiki-dark:#82AAFF;--shiki-dark-font-style:italic}html pre.shiki code .sqxXB, html code.shiki .sqxXB{--shiki-default:#4C4F69;--shiki-dark:#82AAFF}html pre.shiki code .s8Irk, html code.shiki .s8Irk{--shiki-default:#DF8E1D;--shiki-default-font-style:italic;--shiki-dark:#C5E478;--shiki-dark-font-style:inherit}html pre.shiki code .sZ_Zo, html code.shiki .sZ_Zo{--shiki-default:#FE640B;--shiki-dark:#F78C6C}",{"title":301,"searchDepth":302,"depth":302,"links":1956},[1957,1961,1962,1969],{"id":372,"depth":302,"text":373,"children":1958},[1959,1960],{"id":383,"depth":311,"text":384},{"id":413,"depth":311,"text":414},{"id":463,"depth":302,"text":464},{"id":481,"depth":302,"text":484,"children":1963},[1964,1965,1966,1967,1968],{"id":518,"depth":311,"text":519},{"id":640,"depth":311,"text":641},{"id":1402,"depth":311,"text":1405},{"id":1417,"depth":311,"text":1418},{"id":1771,"depth":311,"text":1772},{"id":425,"depth":302,"text":1899},"2025-08-18","We propose D2Snap – a first-of-its-kind downsampling algorithm for DOMs. D2Snap can be used as a pre-processing technique for DOM snapshots to optimise web agency context quality and token costs.",{"homepage":322,"relatedLinks":1973},[1974,1978,1981],{"text":1975,"href":1976,"description":1977},"What is a Website Snapshot?","/blog/snapshots-provide-llms-with-website-state","Learn what a website snapshot is and how to utilise it for web agents",{"text":1979,"href":1432,"description":1980},"What is a Web Agent?","Learn the basics of web agents",{"text":1690,"href":1982,"external":322,"description":1983},"https://dev.webfuse.com/automation-api#take_dom_snapshot","Check out the Webfuse Automation API","/blog/dom-downsampling-for-llm-based-web-agents",{"title":336,"description":1971},{"loc":1984},"blog/1012.dom-downsampling-for-llm-based-web-agents",[315,1989,1990,1991,1992,1993],"browser-agents","llms","llm-context","web-agents","web-automation","bGJtg_9k7O95O2CJswaRFj4ONGhX4hGr_8aL5dhDZms",{"id":1996,"title":1997,"authorId":337,"body":1998,"category":315,"created":2728,"description":2729,"extension":318,"faqs":319,"featurePriority":319,"head":319,"landingPath":319,"meta":2730,"navigation":322,"ogImage":319,"path":1432,"robots":319,"schemaOrg":319,"seo":2739,"sitemap":2740,"stem":2741,"tags":2742,"__hash__":2743},"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":1999,"toc":2709},[2000,2014,2017,2024,2030,2034,2037,2052,2056,2066,2070,2074,2087,2091,2095,2098,2103,2107,2116,2120,2131,2136,2140,2158,2162,2168,2272,2275,2508,2524,2528,2531,2536,2540,2543,2547,2565,2590,2597,2601,2639,2642,2653,2657,2660,2688,2692,2700,2706],[11,2001,2002,2003,57,2007,532,2010,2013],{},"In no time, AI became a natural part of modern web interfaces. AI agents for the web enjoy a recent hype, sparked by the means of ",[349,2004,354],{"href":2005,"rel":2006},"https://openai.com/index/introducing-operator/",[353],[349,2008,359],{"href":357,"rel":2009},[353],[349,2011,364],{"href":362,"rel":2012},[353],". By now, it is within reach to automate arbitrary web-based tasks, such as booking the cheapest flight from Berlin to Amsterdam.",[31,2015,1979],{"id":2016},"what-is-a-web-agent",[11,2018,2019,2020,2023],{},"For starters, let us break down the term ",[14,2021,2022],{},"web AI agent",": An agent is an entity that autonomously acts on behalf of another entity. An artificially intelligent agent is an application that acts on behalf of a human. In contrast to non-AI computer agents, it solves complex tasks with at least human-grade effectiveness and efficiency. For a human-centric web, web agents have deliberately been designed to browse the web in a human fashion – through UIs rather than APIs.",[19,2025],{":width":2026,"alt":2027,"format":2028,"loading":24,"src":2029},"610","High-level agent description comparing human and computer agents","svg","/blog/a-gentle-introduction-to-ai-agents-for-the-web/1.svg",[226,2031,2033],{"id":2032},"the-role-of-frontier-llms","The Role of Frontier LLMs",[11,2035,2036],{},"Web agents have been a vague desire for a long time. AI agents used to rely on complete models of a problem domain in order to allow (heuristic) search through problem states. Such models would comprise the problem world (e.g., a chessboard), actors (pawns, rooks, etc.), possible actions per actor (rook moves straight), and constraints (i.a., max one piece per field). A heterogeneous space of web application UIs describes the problem domain of a web agent: how to understand a web page, and how to interact with it to solve the declared task?",[11,2038,2039,2040,2047,2048,2051],{},"Frontier LLMs disrupted the AI agent world: explicit problem domain models beyond feasibility can now be replaced by an LLM. The LLM thereby acts as an instantaneous domain model backend that can be consulted with twofold context: serialised problem state, such as a chess position code (",[393,2041,2042,2043,2046],{},"“",[654,2044,2045],{},"..."," e4 e5 2. Nc3 f5”","), and the respective task (",[393,2049,2050],{},"“What is the best move for white?”","). For web agents, problem state corresponds to the currently browsed web application's runtime state, for instance, a screenshot.",[226,2053,2055],{"id":2054},"generalist-web-agents","Generalist Web Agents",[11,2057,2058,2059,532,2062,2065],{},"Generalist web agents are supposed to solve arbitrary tasks through a web browser. Web-based tasks can be as diverse as ",[393,2060,2061],{},"“Find a picture of a cat.”",[393,2063,2064],{},"“Book the cheapest flight from Berlin to Amsterdam tomorrow afternoon (business class, window seat).”"," In reality, generalist agents still fail uncommon or too precise tasks. While they have been critically acclaimed, they mainly act as early proofs-of-concept. Tasks that are indeed solvable with a generalist agent promise great results with an according specialist agent.",[19,2067],{":width":342,"alt":2068,"format":344,"loading":24,"src":2069},"Screenshot of a generalist web agent UI (Director)","/blog/a-gentle-introduction-to-ai-agents-for-the-web/2.png",[226,2071,2073],{"id":2072},"specialist-web-agents","Specialist Web Agents",[11,2075,2076,2077,2080,2081,2086],{},"Other than generalist agents, specialist web agents are constrained to a certain task and application domain. Specialist agents bear the major share of commercial value. Most prominently, modal chat agents that provide users with on-page help. Picture a little floating widget that can be chatted to via text or voice input. In most cases, in fact, the term ",[393,2078,2079],{},"web (AI) agent"," refers to chat agents. Chat agents – text or voice – can be implemented on top of virtually any existing website. Frontier LLMs provide a lot of commonsense out-of-the-box. A ",[349,2082,2085],{"href":2083,"rel":2084},"https://docs.claude.com/en/docs/build-with-claude/prompt-engineering/system-prompts",[353],"system prompt"," can, moreover, be leveraged to drive specialist agent quality for the respective problem domain.",[19,2088],{":width":342,"alt":2089,"format":344,"loading":24,"src":2090},"Screenshots of two modal specialist web agent UIs augmenting an underlying website's UI","/blog/a-gentle-introduction-to-ai-agents-for-the-web/3.png",[31,2092,2094],{"id":2093},"how-does-a-web-agent-work","How Does a Web Agent Work?",[11,2096,2097],{},"LLM-based web agents are premised on a more or less uniform architecture. The agent application embodies a mediator between a web browser (environment), and the LLM backend (model).",[19,2099],{":width":2100,"alt":2101,"format":2028,"loading":24,"src":2102},"480","High-level web agent architecture component view","/blog/a-gentle-introduction-to-ai-agents-for-the-web/4.svg",[226,2104,2106],{"id":2105},"the-agent-lifecycle","The Agent Lifecycle",[11,2108,2109,2110,2115],{},"To reduce a user's cognitive load, solving a web-based task is usually chunked into a sequence of UI states. Consider looking for rental apartments on ",[349,2111,2114],{"href":2112,"rel":2113},"https://www.redfin.com",[353],"redfin.com",": In the first step, you specify a location. Only subsequently are you provided with a grid of available apartments for that location.",[19,2117],{":width":342,"alt":2118,"format":344,"loading":24,"src":2119},"Example of separated UI states in a rental home search application","/blog/a-gentle-introduction-to-ai-agents-for-the-web/5.png",[11,2121,2122,2123,2130],{},"Web agent logic is iterative; not least for a sequential web interaction model, but also for a conversational agent interaction model. Browsing the web, human and computer agents represent users alike. That said, Norman's well-known ",[349,2124,2127],{"href":2125,"rel":2126},"https://mitpress.mit.edu/9780262640374/the-design-of-everyday-things/",[353],[393,2128,2129],{},"Seven Stages of Action",", which hierarchically model the human cognition cycle, transfer to the web agent lifecycle. For each UI state in a web browser (environment) and web-based task (action intention); decide where to click, type, etc. (action planning), and perform those clicks, etc. (action execution). Afterwards, perceive, interpret, and evaluate the results of those actions in the web browser (state). As long as there is a mismatch between the evaluated state and the declared goal state, repeat that cycle. Potentially prompt the user with more required information.",[19,2132],{":width":2133,"alt":2134,"format":2028,"loading":24,"src":2135},"580","Donald 'Norman's Seven Stages of Action' model of the human cognition cycle that transfers to non-human agents","/blog/a-gentle-introduction-to-ai-agents-for-the-web/6.svg",[226,2137,2139],{"id":2138},"web-context-for-llms","Web Context for LLMs",[11,2141,2142,2143,2145,2146,2149,2150,2153,2154,2157],{},"The gap from an agent towards the environment, according to ",[393,2144,2129],{},", is known as the ",[393,2147,2148],{},"gulf of execution",". In real-world scenarios, how to act in the environment in respect to a planned sequence of actions might be difficult (e.g., how to actually open the trunk of a new car?). Arguably, web agents face a novel ",[393,2151,2152],{},"gulf of intention"," towards the action planning stage: how to serialise a currently browsed web page's runtime state for LLMs? ",[393,2155,2156],{},"Snapshot"," is a more comprehensive term to describe the serialisation of a web page's current runtime state. Screenshots, for instance, represent a type of snapshot that closely resembles how humans perceive a web page at a given point in time. But are they as accessible to LLMs?",[226,2159,2161],{"id":2160},"agentic-ui-interaction","Agentic UI Interaction",[11,2163,2164,2165,2167],{},"With a qualified set of well-defined actuation methods, web agents are able to close the ",[393,2166,2148],{}," quite well. HTML element types strongly afford a certain action (e.g., click a button, type to a field). Below is how an actuation schema to present the LLM backend with could look like:",[646,2169,2171],{"className":1449,"code":2170,"language":1451,"meta":301,"style":301},"interface ActuationSchema = {\n    thought: string;\n    action: \"click\"\n        | \"scroll\"\n        | \"type\";\n    cssSelector: string;\n    data?: string;\n}[];\n",[54,2172,2173,2187,2199,2216,2228,2240,2251,2262],{"__ignoreMap":301},[654,2174,2175,2178,2181,2184],{"class":656,"line":657},[654,2176,2177],{"class":1458},"interface",[654,2179,2180],{"class":1462}," ActuationSchema",[654,2182,2183],{"class":776}," = ",[654,2185,2186],{"class":1485},"{\n",[654,2188,2189,2192,2195,2197],{"class":656,"line":302},[654,2190,2191],{"class":776},"    thought",[654,2193,2194],{"class":660},":",[654,2196,1482],{"class":1481},[654,2198,1486],{"class":1485},[654,2200,2201,2204,2206,2209,2213],{"class":656,"line":311},[654,2202,2203],{"class":776},"    action",[654,2205,2194],{"class":660},[654,2207,2208],{"class":674}," \"",[654,2210,2212],{"class":2211},"sgAC-","click",[654,2214,2215],{"class":674},"\"\n",[654,2217,2218,2221,2223,2226],{"class":656,"line":787},[654,2219,2220],{"class":660},"        |",[654,2222,2208],{"class":674},[654,2224,2225],{"class":2211},"scroll",[654,2227,2215],{"class":674},[654,2229,2230,2232,2234,2236,2238],{"class":656,"line":796},[654,2231,2220],{"class":660},[654,2233,2208],{"class":674},[654,2235,1459],{"class":2211},[654,2237,675],{"class":674},[654,2239,1486],{"class":1485},[654,2241,2242,2245,2247,2249],{"class":656,"line":817},[654,2243,2244],{"class":776},"    cssSelector",[654,2246,2194],{"class":660},[654,2248,1482],{"class":1481},[654,2250,1486],{"class":1485},[654,2252,2253,2256,2258,2260],{"class":656,"line":836},[654,2254,2255],{"class":776},"    data",[654,2257,1507],{"class":660},[654,2259,1482],{"class":1481},[654,2261,1486],{"class":1485},[654,2263,2264,2267,2270],{"class":656,"line":845},[654,2265,2266],{"class":1485},"}",[654,2268,2269],{"class":776},"[]",[654,2271,1486],{"class":1485},[11,2273,2274],{},"And a suggested actions response could, in turn, look as follows:",[646,2276,2280],{"className":2277,"code":2278,"language":2279,"meta":301,"style":301},"language-json shiki shiki-themes catppuccin-latte night-owl","[\n    {\n        \"thought\": \"Scroll newsletter cta into view\",\n        \"action\": \"scroll\",\n        \"cssSelector\": \"section#newsletter\"\n    },\n    {\n        \"thought\": \"Type email address to newsletter cta\",\n        \"action\": \"type\",\n        \"cssSelector\": \"section#newsletter > input\",\n        \"data\": \"user@example.org\"\n    },\n    {\n        \"thought\": \"Submit newsletter sign up\",\n        \"action\": \"click\",\n        \"cssSelector\": \"section#newsletter > button\"\n    }\n]\n","json",[54,2281,2282,2287,2292,2316,2335,2353,2358,2362,2381,2399,2418,2436,2440,2444,2463,2481,2498,2503],{"__ignoreMap":301},[654,2283,2284],{"class":656,"line":657},[654,2285,2286],{"class":1485},"[\n",[654,2288,2289],{"class":656,"line":302},[654,2290,2291],{"class":1485},"    {\n",[654,2293,2294,2298,2302,2304,2306,2308,2312,2314],{"class":656,"line":311},[654,2295,2297],{"class":2296},"srFR9","        \"",[654,2299,2301],{"class":2300},"s30W1","thought",[654,2303,675],{"class":2296},[654,2305,2194],{"class":1485},[654,2307,2208],{"class":674},[654,2309,2311],{"class":2310},"sCC8C","Scroll newsletter cta into view",[654,2313,675],{"class":674},[654,2315,1567],{"class":1485},[654,2317,2318,2320,2323,2325,2327,2329,2331,2333],{"class":656,"line":787},[654,2319,2297],{"class":2296},[654,2321,2322],{"class":2300},"action",[654,2324,675],{"class":2296},[654,2326,2194],{"class":1485},[654,2328,2208],{"class":674},[654,2330,2225],{"class":2310},[654,2332,675],{"class":674},[654,2334,1567],{"class":1485},[654,2336,2337,2339,2342,2344,2346,2348,2351],{"class":656,"line":796},[654,2338,2297],{"class":2296},[654,2340,2341],{"class":2300},"cssSelector",[654,2343,675],{"class":2296},[654,2345,2194],{"class":1485},[654,2347,2208],{"class":674},[654,2349,2350],{"class":2310},"section#newsletter",[654,2352,2215],{"class":674},[654,2354,2355],{"class":656,"line":817},[654,2356,2357],{"class":1485},"    },\n",[654,2359,2360],{"class":656,"line":836},[654,2361,2291],{"class":1485},[654,2363,2364,2366,2368,2370,2372,2374,2377,2379],{"class":656,"line":845},[654,2365,2297],{"class":2296},[654,2367,2301],{"class":2300},[654,2369,675],{"class":2296},[654,2371,2194],{"class":1485},[654,2373,2208],{"class":674},[654,2375,2376],{"class":2310},"Type email address to newsletter cta",[654,2378,675],{"class":674},[654,2380,1567],{"class":1485},[654,2382,2383,2385,2387,2389,2391,2393,2395,2397],{"class":656,"line":851},[654,2384,2297],{"class":2296},[654,2386,2322],{"class":2300},[654,2388,675],{"class":2296},[654,2390,2194],{"class":1485},[654,2392,2208],{"class":674},[654,2394,1459],{"class":2310},[654,2396,675],{"class":674},[654,2398,1567],{"class":1485},[654,2400,2401,2403,2405,2407,2409,2411,2414,2416],{"class":656,"line":857},[654,2402,2297],{"class":2296},[654,2404,2341],{"class":2300},[654,2406,675],{"class":2296},[654,2408,2194],{"class":1485},[654,2410,2208],{"class":674},[654,2412,2413],{"class":2310},"section#newsletter > input",[654,2415,675],{"class":674},[654,2417,1567],{"class":1485},[654,2419,2420,2422,2425,2427,2429,2431,2434],{"class":656,"line":867},[654,2421,2297],{"class":2296},[654,2423,2424],{"class":2300},"data",[654,2426,675],{"class":2296},[654,2428,2194],{"class":1485},[654,2430,2208],{"class":674},[654,2432,2433],{"class":2310},"user@example.org",[654,2435,2215],{"class":674},[654,2437,2438],{"class":656,"line":896},[654,2439,2357],{"class":1485},[654,2441,2442],{"class":656,"line":906},[654,2443,2291],{"class":1485},[654,2445,2446,2448,2450,2452,2454,2456,2459,2461],{"class":656,"line":925},[654,2447,2297],{"class":2296},[654,2449,2301],{"class":2300},[654,2451,675],{"class":2296},[654,2453,2194],{"class":1485},[654,2455,2208],{"class":674},[654,2457,2458],{"class":2310},"Submit newsletter sign up",[654,2460,675],{"class":674},[654,2462,1567],{"class":1485},[654,2464,2465,2467,2469,2471,2473,2475,2477,2479],{"class":656,"line":943},[654,2466,2297],{"class":2296},[654,2468,2322],{"class":2300},[654,2470,675],{"class":2296},[654,2472,2194],{"class":1485},[654,2474,2208],{"class":674},[654,2476,2212],{"class":2310},[654,2478,675],{"class":674},[654,2480,1567],{"class":1485},[654,2482,2483,2485,2487,2489,2491,2493,2496],{"class":656,"line":952},[654,2484,2297],{"class":2296},[654,2486,2341],{"class":2300},[654,2488,675],{"class":2296},[654,2490,2194],{"class":1485},[654,2492,2208],{"class":674},[654,2494,2495],{"class":2310},"section#newsletter > button",[654,2497,2215],{"class":674},[654,2499,2500],{"class":656,"line":958},[654,2501,2502],{"class":1485},"    }\n",[654,2504,2505],{"class":656,"line":964},[654,2506,2507],{"class":1485},"]\n",[541,2509,2510],{},[11,2511,2512,2517,2518,2523],{},[349,2513,2516],{"href":2514,"rel":2515},"https://platform.openai.com/docs/guides/function-calling",[353],"Function Calling"," and the ",[349,2519,2522],{"href":2520,"rel":2521},"https://modelcontextprotocol.io",[353],"Model Context Protocol"," represent two ends to outsource an explicit actuation model – server- and client-side, respectively.",[226,2525,2527],{"id":2526},"agentic-ui-augmentation","Agentic UI Augmentation",[11,2529,2530],{},"An agent represents yet another feature to integrate with an application and its UI. Discoverability and availability, however, are among the most fundamental requirements of a web agent. Evidently, when a user experiences UI/UX friction, at least the agent should be interactive. That said, a scrolling modal web agent UI has been the go-to approach, that is, a little floating widget on top of the underlying application's UI. It comes with a major advantage: the agent application can be decoupled from the underlying, self-contained application.",[19,2532],{":width":2533,"alt":2534,"format":2028,"loading":24,"src":2535},"360","Depiction of a web agent application augmenting an underlying application in an isolated layer","/blog/a-gentle-introduction-to-ai-agents-for-the-web/7.svg",[31,2537,2539],{"id":2538},"how-to-build-a-web-agent","How to Build a Web Agent?",[11,2541,2542],{},"Believe it or not: enhancing an existing web application with a purposeful agent is a lower-hanging fruit. The evolving agent ecosystem provides you with a spectrum of solutions: instantly use a pre-compiled agent, tweak a templated agent, or develop an agent from scratch. Either way, LLMs and web browsers exist for reuse, boiling down agent development to LLM context engineering, and UI augmentation.",[226,2544,2546],{"id":2545},"develop-a-web-agent","Develop a Web Agent",[11,2548,2549,2550,2553,2554,532,2559,2564],{},"Opting for a ",[14,2551,2552],{},"pre-compiled agent"," does not necessarily involve any actual development step. Instead, pre-compiled agents allow for high-level configuration through an agent-as-a-service provider's interface. Popular agent-as-a-service providers are, i.a., ",[349,2555,2558],{"href":2556,"rel":2557},"https://elevenlabs.io/conversational-ai",[353],"ElevenLabs",[349,2560,2563],{"href":2561,"rel":2562},"https://www.intercom.com/drlp/ai-agent",[353],"Intercom",". Serviced agents hide LLM communication and potentially interaction with a web browser behind the configuration interface.",[11,2566,2567,2568,2571,2572,2577,2578,2583,2584,2589],{},"Using a ",[14,2569,2570],{},"templated agent"," resembles the agent-as-a-service approach on a lower level. Openly sourced from a ",[349,2573,2576],{"href":2574,"rel":2575},"https://github.com/webfuse-com/agent-extension-blueprint",[353],"code repository",", templated agents allow for any kind of development tweaks. Favourably, agent templates shortcut integration with ",[349,2579,2582],{"href":2580,"rel":2581},"https://openai.com/api/",[353],"LLM APIs"," and web ",[349,2585,2588],{"href":2586,"rel":2587},"https://developer.mozilla.org/en-US/docs/Web/API",[353],"browser APIs",". Using a templated agent usually represents the preferable, best-of-both-worlds approach; common- and best-practice code snippets are available from the beginning, but everything can be customised as desired.",[11,2591,2592,2593,2596],{},"Of course, developing an ",[14,2594,2595],{},"agent from scratch"," is always an option. It is preferable whenever agent requirements deviate to a large extent from what exists in the service or template landscape.",[226,2598,2600],{"id":2599},"deploy-a-web-agent","Deploy a Web Agent",[11,2602,2603,2604,565,2609,2614,2615,2620,2621,2626,2627,2632,2633,2638],{},"When web agent code lives side-by-side with the augmented application's code, agent deployment is covered by a generic pipeline. Something like: ",[349,2605,2608],{"href":2606,"rel":2607},"https://eslint.org",[353],"linting",[349,2610,2613],{"href":2611,"rel":2612},"https://prettier.io",[353],"formatting"," agent code, ",[349,2616,2619],{"href":2617,"rel":2618},"https://esbuild.github.io",[353],"transpiling and bundling"," agent modules, ",[349,2622,2625],{"href":2623,"rel":2624},"https://www.cypress.io",[353],"testing"," agent, ",[349,2628,2631],{"href":2629,"rel":2630},"https://pages.cloudflare.com",[353],"hosting"," agent bundle, and ",[349,2634,2637],{"href":2635,"rel":2636},"https://docs.github.com/en/actions/get-started/continuous-integration",[353],"tiggering"," post deployment events. In that case, an agent represents a modular feature component in the application, no different than, for instance, a sign-up component.",[11,2640,2641],{},"Web agent source code right inside the application codebase comes at a cost:",[44,2643,2644,2647,2650],{},[47,2645,2646],{},"Agent developers can manipulate the source code of the underlying application.",[47,2648,2649],{},"Agent functionality could introduce side effects on the underlying application.",[47,2651,2652],{},"Agent changes require deployment of the entire application.",[226,2654,2656],{"id":2655},"best-practices-of-agentic-ux","Best Practices of Agentic UX",[11,2658,2659],{},"When designing user experiences for agent-enhanced applications, there are a few things to consider:",[44,2661,2662,2663,2662,2672,2662,2680],{},"\n    ",[47,2664,2665,2666,2665,2669,2671],{},"\n        ",[14,2667,2668],{},"Stream input and output to reduce latency",[1878,2670],{},"\n        LLMs (re-)introduce noticeable communication round-trip time. To reduce wait time for the human user, stream chunks of data whenever they are available.\n    ",[47,2673,2665,2674,2665,2677,2679],{},[14,2675,2676],{},"Provide fine-grained feedback to bridge high-latency",[1878,2678],{},"\n        Human attention is sensitive to several seconds of [system response time](https://www.nngroup.com/articles/response-times-3-important-limits/). Periodically provide agent _thoughts_ as feedback to perceptibly break down round-trip time.\n    ",[47,2681,2665,2682,2665,2685,2687],{},[14,2683,2684],{},"Always prompt the human user for consent to perform critical actions",[1878,2686],{},"\n        Some actions in a web application lead to irreversible or significant changes of state. Never have the agent perform such actions on behalf of the user without explicitly asking for the permission.\n    ",[226,2689,2691],{"id":2690},"non-invasive-web-agents-with-webfuse","Non-Invasive Web Agents with Webfuse",[11,2693,2694,2699],{},[349,2695,2697],{"href":1694,"rel":2696},[353],[14,2698,1696],{}," is a configurable web proxy that lets you augment any web application. As pictured, web agents represent highly self-contained applications. Moreover, web agents and underlying applications communicate at runtime in the client. This does, in fact, render opportunities to bridge the above-mentioned drawbacks with Webfuse: Develop web agents with a sandbox extension methodology, and deploy them through the low-latency proxy layer. On demand, seamlessly serve users with your agent-enhanced website. Benefit from information hiding, safe code, and fewer deployments.",[2701,2702],"article-signup-cta",{":demoAction":2703,"heading":2704,"subtitle":2705},"{\"text\":\"Read more\",\"showIcon\":false,\"href\":\"https://www.webfuse.com/blog/category/ai-agents\"}","Deploy Web Agents with Webfuse","Develop or deploy web agents in minutes; serve agent-enhanced websites through an isolated application layer.",[1952,2707,2708],{},"html pre.shiki code .s76yb, html code.shiki .s76yb{--shiki-default:#8839EF;--shiki-dark:#C792EA}html pre.shiki code .sXbZB, html code.shiki .sXbZB{--shiki-default:#DF8E1D;--shiki-default-font-style:italic;--shiki-dark:#D6DEEB;--shiki-dark-font-style:inherit}html pre.shiki code .s2kId, html code.shiki .s2kId{--shiki-default:#4C4F69;--shiki-dark:#D6DEEB}html pre.shiki code .scGhl, html code.shiki .scGhl{--shiki-default:#7C7F93;--shiki-dark:#D6DEEB}html pre.shiki code .s9rnR, html code.shiki .s9rnR{--shiki-default:#179299;--shiki-dark:#7FDBCA}html pre.shiki code .scrte, html code.shiki .scrte{--shiki-default:#8839EF;--shiki-dark:#C5E478}html pre.shiki code .sbuKk, html code.shiki .sbuKk{--shiki-default:#40A02B;--shiki-dark:#D9F5DD}html pre.shiki code .sgAC-, html code.shiki .sgAC-{--shiki-default:#40A02B;--shiki-default-font-style:italic;--shiki-dark:#ECC48D;--shiki-dark-font-style:inherit}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .srFR9, html code.shiki .srFR9{--shiki-default:#7C7F93;--shiki-dark:#7FDBCA}html pre.shiki code .s30W1, html code.shiki .s30W1{--shiki-default:#1E66F5;--shiki-dark:#7FDBCA}html pre.shiki code .sCC8C, html code.shiki .sCC8C{--shiki-default:#40A02B;--shiki-dark:#C789D6}",{"title":301,"searchDepth":302,"depth":302,"links":2710},[2711,2716,2722],{"id":2016,"depth":302,"text":1979,"children":2712},[2713,2714,2715],{"id":2032,"depth":311,"text":2033},{"id":2054,"depth":311,"text":2055},{"id":2072,"depth":311,"text":2073},{"id":2093,"depth":302,"text":2094,"children":2717},[2718,2719,2720,2721],{"id":2105,"depth":311,"text":2106},{"id":2138,"depth":311,"text":2139},{"id":2160,"depth":311,"text":2161},{"id":2526,"depth":311,"text":2527},{"id":2538,"depth":302,"text":2539,"children":2723},[2724,2725,2726,2727],{"id":2545,"depth":311,"text":2546},{"id":2599,"depth":311,"text":2600},{"id":2655,"depth":311,"text":2656},{"id":2690,"depth":311,"text":2691},"2025-06-15","LLMs only recently enabled serviceable web agents: autonomous systems that browse web on behalf of a human. Get started with fundamental methodology, key design challenges, and technological opportunities.",{"homepage":322,"relatedLinks":2731},[2732,2733,2737],{"text":1975,"href":1976,"description":1977},{"text":2734,"href":2735,"description":2736},"Develop an AI Agent for Any Website with Webfuse","/blog/develop-an-ai-agent-for-any-website-with-webfuse","Learn how to develop and deploy a web agent for any website with Webfuse",{"text":1690,"href":2738,"external":322,"description":1983},"https://dev.webfuse.com/automation-api/",{"title":1997,"description":2729},{"loc":1432},"blog/1011.a-gentle-introduction-to-ai-agents-for-the-web",[315,1989,1990,1992,1993],"9anWTMfg6llLSdye3e9qWZZZcEAZcELLMk_vpnixn3M",1779282829740]