惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

N
News and Events Feed by Topic
Malwarebytes
Malwarebytes
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
C
Cybersecurity and Infrastructure Security Agency CISA
F
Future of Privacy Forum
C
Cisco Blogs
T
The Exploit Database - CXSecurity.com
A
Arctic Wolf
S
Securelist
K
Kaspersky official blog
S
Schneier on Security
T
ThreatConnect
T
Tenable Blog
Spread Privacy
Spread Privacy
T
True Tiger Recordings
AWS News Blog
AWS News Blog
F
Fox-IT International blog
量子位
T
Threatpost
V
Vulnerabilities – Threatpost
C
CERT Recently Published Vulnerability Notes
Cisco Talos Blog
Cisco Talos Blog
GbyAI
GbyAI
宝玉的分享
宝玉的分享
腾讯CDC
G
Google Developers Blog
aimingoo的专栏
aimingoo的专栏
Cyberwarzone
Cyberwarzone
有赞技术团队
有赞技术团队
S
SegmentFault 最新的问题
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
V
Visual Studio Blog
U
Unit 42
雷峰网
雷峰网
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
Simon Willison's Weblog
Simon Willison's Weblog
O
OpenAI News
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
The GitHub Blog
The GitHub Blog
The Register - Security
The Register - Security
MyScale Blog
MyScale Blog
小众软件
小众软件
A
About on SuperTechFans
Last Week in AI
Last Week in AI
Y
Y Combinator Blog
博客园 - 三生石上(FineUI控件)
美团技术团队
Google Online Security Blog
Google Online Security Blog
P
Proofpoint News Feed
MongoDB | Blog
MongoDB | Blog

DEV Community

🌱 Keep Feeding Your CI/CD — Or Watch It Die Gemma 4 vs GPT-4o vs Llama 3: What Actually Works Locally? Vessel Ops SSH in 2026: Why Every Developer Should Know It Cold Audit AI-Generated PRs Before You Merge Them (Swarm Orchestrator 10.3.0) App Store Optimization (ASO) I built a tool to visualize Django REST Framework architecture (URLs, Serializers, Models, and more) AI Can Generate Interfaces on the Fly. But Users Still Need Orientation. AI-Assisted Content Workflow How We Learned That Most Resume Rejections Happen Before Humans See Your CV How I Prepared for CKA: Resources, Labs, and Strategy That Worked for Me Remix Mini PC: Moving the Whole Operating System Onto the eMMC Stop Flying Blind: We Built an LLM Evaluation Framework That Works Across 17+ Agent Frameworks The Misleading "User is not authorized to access connection" Error in AWS CodeBuild — and Why Your IAM Policy Looks Fine I Resurrected a Dead F1 Project and Accidentally Built a Race Intelligence OS Remix Mini PC: After a Year of Dead Ends, the eMMC Finally Talks Not All Games Are Equal: The Real Difference Between a Trap and a Tool How to add Peppol e-invoicing to your SaaS without making it your team's problem I Built a Hermes Agent to Tell Me Which Hackathons to Enter. It Told Me to Enter This One. The Five Hooks That Change How You Ship With Claude Code Powering Your Progress: Building Robust Solutions with Laravel I built a self-hosted CI/CD platform with persistent queue, encrypted secrets, and rollback UI — here's what I learned Antigravity 2.0 and the $1,000 OS: Why "Agent-First" Feels Like the Direction I've Been Building Toward Anyway I built an AI PR-triage agent in 30 lines of Markdown Core Web Vitals from 74 to 91: A Real Tax Practitioner Site Rebuild I Gave Gemma 4 150 Tools on Windows. Here's What Actually Happened. Beyond the Loop: Why Monolithic AI Agents Fail and How to Build a Microkernel Architecture The Hidden Tax of AI-Assisted Development (And How I Fixed It) I Ditched Cloud LLMs for Gemma 4 4B: A DevOps Engineer's 48-Hour Reality Check Building a Schema.org @graph That Validates on the First Try The "Lift and Shift" Trap: Why Your Integration Layer Needs More Than Just a Cloud Address All 7 OSI Layers Explained with Real-World Analogies Antigravity 2.0 in one day: the four shells and what each is good for Self-Hosting Google Fonts with size-adjust: Zero CLS Web Font Swap The Multi-Provider LLM Problem: Why “One API” Is Not Enough How I indexed 69,000 Claude Code skills (and what I learned doing it) RememberMe CareGrid: Local Gemma 4 for dementia memory and safety Google Is Killing Gemini CLI on June 18. Here Is What to Do Before Then Do Domínio ao Deploy: Hospedando Arquivos de Deep Links no Cloudflare Pages (Parte 7.1) Running Gemma 4 26B on an Old GTX 1080 with llama.cpp Devlog 1: I tried building an SNES game with the super FX chip Why Gemma 4 Feels Like an Important Moment for AI Developers✨ From Zero and Confused, This Is How I Started Learning to Code I Built a Local AI Gateway That Talks to Claude, ChatGPT, DeepSeek and Gemini — Without a Single API Key Bootstrapping with AI: Why Gemma 4 is the Micro-SaaS Founder’s Best Friend MyErp Architecture Series - #02 Cellular Architecture: Mapping Biology to Software Systems NodeJS vs Bun vs Go 🌍 RTL Arabic Style UI How Does an AI Agent Actually Buy Something? Google Just Published the Spec. Google I/O 2026 Is One Uncanny F.R.I.E.N.D.S Group Upgrade I Replaced 70MB Node.js Log Viewer with a 172KB Zig Binary The "MTTR Is All You Need" Trap The Quiet Revolution: How Firebase Became the First Agent-Native Backend at Google I/O 2026 I Built ResuMate! A 100% Private, Local AI Resume Optimizer with Google Gemma 4 Learning DirectX 12 - Part 2 Initialization Theory NeuralHats: I Put Edward de Bono’s Six Thinking Hats on Local LLMs Using Gemma 4 📝 Instant Auto Save Notes Engineering the "App-Like" Experience: A Deep Dive into PWA Architecture I built a local first AI CCTV assistant using Gemma 4 + Frigate CrowdShield AI — Smart Stadium Operating System & Crowd Intelligence Platform I built a free AI observability tool, prove your AI is useful, not just running Beyond Autocomplete: Why Google Antigravity 2.0 Changes the Rules for Indie Builders 터미널 AI 에이전트 구축 (v12) Building Instagram-Powered Apps with HikerAPI (Without Fighting Scrapers) Checkpoints, Not Transcripts: Rethinking AI Coding Agent Memory From Side Project to Student Savior: My AI PPT & Resume Tool Crossed 1.5K+ Users Why Story Points Don’t Work in the AI Era, And What Should Take Their Place Instead. Self-Hosted Document AI: How to Run Document Intelligence On Your Own Infrastructure (2026) How to Extract Tables from PDFs with AI: 4 Methods That Actually Work (2026) IDP vs OCR: What's the Difference — and Which Does Your Business Actually Need? Automated PII Detection and Redaction in Business Documents: A Practical Guide Human-in-the-Loop Document Review: When to Use It and How to Set It Up (2026) Document Processing Without RPA: A Modern Approach for Small Teams Reducto Alternative: When You Need More Than a Document Parser (2026) Hermes Agent vs LangChain vs CrewAI: When to Reach for Each SparshAI: I Built an Offline AI Tutor for Students Using Gemma 4 — Here's What Happened Building NeuroSense AI: A Human-Centered Stress Insight Assistant Powered by Gemma Why I Built a Privacy-First Dev Toolkit GAS Input Tags: Ability Activation Without Hardcoded Bindings AI Legal Document Advisor Supported By Gemm 4 Model Building Convertify in Public Week 10: PDF Cluster + Blog Launch CureNet AI: Decentralized Health Intelligence for India, Powered by Gemma 4 and ABHA Standardization When Open-Weights AI Meets a Broken Healthcare System: Deploying Gemma 4 in Rural India V.A.L.I.D. Google I/O 2026: The Year Google Stopped Building AI Assistants and Started Shipping AI Engineers Bondmap: AI-Powered Relationship Network That Maps How You're Connected to Everyone Using Gemma 4 Gemma 4 challenge inspired me to build my first app! 96. LoRA: Fine-Tune a Billion-Parameter Model on a Laptop From a Student Who Used CircuitVerse to a GSoC Contributor — My Community Bonding Story How Bf-Tree Keeps Mini-Pages Small, Hot, and Cheap to Evict I asked Claude to explain the chip war and ended up understanding modern geopolitics differently Stop Manually Checking for Server Updates: Automate With Email Notifications Nostalgia Meets Cybersecurity: Spotting Modern Scams in a Retro OS Simulator - Forward or Fraud CRACKING CODING INTERVIEW From Python to Production Pipeline :A Practical guide to Apache Airflow Antigravity 2.0: Google Just Changed What It Means to Be an Engineer I Built a Free Sticker Maker Because Every Other One Hid the Export How I bypassed Blazor WebAssembly's Virtual DOM using raw WASM pointers Distributed Tracing for LLM Agents: When MCP Makes Tool Calls Observable The Zero-Budget Memory Setup Behind My AI Agent Workflow No database. No framework. Just files, startup order, correction logs, and discipline.
How I made my React site agent-ready in 100 lines
Arthur · 2026-05-25 · via DEV Community

This is a submission for the Google I/O Writing Challenge

A 100-line recipe for making a React site agent-ready, with the diff, the new Lighthouse Agentic Browsing audit results, and what is coming next.

1. The hook

At Google I/O 2026, Matias mentioned, on the way to a different demo, that Google's Modern Web Guidance lifts coding-agent pass rates on web-development tasks by 37 percentage points versus unguided coding. He said it once and moved on, but the number stuck with me. Underneath that single statistic is the most actionable web-platform shift of the year: the "agent-ready web." I wanted to know what it actually takes to make a real site agent-ready, so I built a small React demo, added three new files plus a handful of HTML attributes, and ran the new Lighthouse Agentic Browsing audit.

About a hundred lines of code, 3 of 3 on Agentic Browsing, accessibility score still 100. Here is the recipe.

2. The four pieces

Four pieces of the agent-ready stack are worth knowing by name:

  • WebMCP. A proposed browser standard that lets your site expose typed tools to AI agents. The producer-side API ships in the Chrome 149 origin trial.
  • llms.txt. A Markdown site map for models, served at the site root.
  • Declarative form metadata. Standard HTML5 autocomplete (in the spec since 2014), ARIA roles and labels, and the new WebMCP attributes (toolname, tooldescription, toolparamdescription) on forms and inputs.
  • Lighthouse Agentic Browsing. A new audit category that ships with Chrome DevTools for Agents, available at I/O 2026 for Antigravity and more than twenty other coding agents.

One sentence on lineage: WebMCP is Google's browser-side adaptation of Model Context Protocol (which originated at Anthropic and is now broadly adopted across model vendors), developed in the open at the W3C Web Machine Learning Community Group, a multi-vendor body. From here I'll call it the Web ML CG.

3. The diff, llms.txt first

The recipe starts with the smallest possible file. Drop a public/llms.txt at the root of your site. Here is the entire file from my demo, 21 lines, verbatim:

# Acme Dashboard

Acme is a project-management tool for solo developers. This is the customer
dashboard.

## Primary pages
- [Sign in](/login)
- [Dashboard home](/dashboard)
- [Account settings](/settings/account)
- [Billing](/settings/billing)

## Public docs
- [API reference](/docs/api)
- [Getting started](/docs/quickstart)

## Notes for models
- Authentication is via email + password or Google OAuth.
- The dashboard requires a signed-in session.
- The sign-in form is annotated with declarative WebMCP attributes
  (`toolname="signIn"`); the dashboard exposes imperative WebMCP tools
  (`signOut`, `changePlan`) via `navigator.modelContext.registerTool()`.

Enter fullscreen mode Exit fullscreen mode

The shape is straightforward: a one-line H1 title, a short summary, H2 sections for primary pages, public docs, and notes-for-models. The Lighthouse llms-txt check requires the file to be served, to have at least one H1, and to contain at least one link. Beyond that, the format is a convention. Think of it as the model-facing counterpart to robots.txt and sitemap.xml: a polite, deterministic introduction to your site, expressed in the language the consumer (a language model) actually parses well.

The notes-for-models section is the high-leverage bit. That is where you describe behaviors and constraints that are not obvious from page titles alone: auth requirements, which form is the sign-in form, which tools the dashboard exposes. Spend a minute writing it as if a new contractor were reading it.

4. The diff, declarative WebMCP attributes

The second file to touch is the login form. Here is the "before" version, the kind of code a working React developer ships in a hurry:

<form onSubmit={(e) => {
  e.preventDefault();
  if (email && pw) setSignedIn(true);
}}>
  <input
    type="email"
    placeholder="Email"
    value={email}
    onChange={(e) => setEmail(e.target.value)}
  />
  <input
    type="password"
    placeholder="Password"
    value={pw}
    onChange={(e) => setPw(e.target.value)}
  />
  <button type="submit">Sign in</button>
</form>

Enter fullscreen mode Exit fullscreen mode

And here is the "after" version with the four kinds of changes layered on:

<form
  aria-label="Sign in to Acme"
  toolname="signIn"
  tooldescription="Sign in to the Acme dashboard with email and password."
  onSubmit={(e) => {
    e.preventDefault();
    if (email && pw) setSignedIn(true);
  }}
>
  <label htmlFor="email">Email</label>
  <input
    id="email"
    name="email"
    type="email"
    autoComplete="email"
    required
    toolparamdescription="The user's email address."
    value={email}
    onChange={(e) => setEmail(e.target.value)}
  />

  <label htmlFor="password">Password</label>
  <input
    id="password"
    name="password"
    type="password"
    autoComplete="current-password"
    required
    toolparamdescription="The user's password."
    value={pw}
    onChange={(e) => setPw(e.target.value)}
  />

  <button type="submit">Sign in</button>
</form>

Enter fullscreen mode Exit fullscreen mode

Four kinds of additions:

  1. Real <label> elements bound to inputs via htmlFor. Pure accessibility win.
  2. autoComplete="email" and autoComplete="current-password". Standard HTML5 since 2014, but easy to forget in a hand-rolled React form.
  3. aria-label on the form region.
  4. The new WebMCP attributes: toolname and tooldescription on the <form>, plus toolparamdescription on each <input>.

The first three changes help screen-reader users; the fourth helps AI agents. The same diff buys both. That overlap is the part I find most encouraging about the agent-ready story: most of the work is good old-fashioned semantic HTML, with a thin layer of new attributes on top.

What the WebMCP attributes actually do: when an agent lands on your page, it can read the form as a typed tool surface with named parameters, instead of guessing what each input represents from heuristics on placeholders or visual proximity. No manifest file, no separate registration, just attributes on the elements the agent already sees.

5. The diff, imperative WebMCP for dashboard actions

The declarative attributes cover form fills. For dashboard-style actions that have no associated form (sign out, change plan, run a job), there is an imperative API: navigator.modelContext.registerTool(). Here is the real useEffect from my demo:

useEffect(() => {
  const mc = typeof navigator !== 'undefined' && navigator.modelContext;
  if (!mc || typeof mc.registerTool !== 'function') return undefined;

  const controller = new AbortController();

  const signOutTool = {
    name: 'signOut',
    description:
      'Sign the current user out of the Acme dashboard and clear the session.',
    inputSchema: { type: 'object', properties: {} },
    execute: async () => {
      onSignOut();
      return { ok: true };
    },
  };

  const changePlanTool = {
    name: 'changePlan',
    description: 'Change the subscription plan for the current account.',
    inputSchema: {
      type: 'object',
      properties: {
        plan: {
          type: 'string',
          enum: ['free', 'pro', 'team'],
          description: 'The new plan to switch to.',
        },
      },
      required: ['plan'],
    },
    execute: async ({ plan }) => {
      onChangePlan(plan);
      return { ok: true, plan };
    },
  };

  mc.registerTool(signOutTool, { signal: controller.signal });
  mc.registerTool(changePlanTool, { signal: controller.signal });

  return () => controller.abort();
}, [onSignOut, onChangePlan]);

Enter fullscreen mode Exit fullscreen mode

Three things worth noticing. First, the feature-detection guard at the top: on stable Chrome without the origin-trial token, the function is undefined and the effect cleanly no-ops, so the page works for every user. Second, the AbortController: the spec uses an AbortSignal for unregistration, which slots into React's component-unmount lifecycle naturally. Third, the tool object shape is small and familiar: name, description, inputSchema (JSON Schema), and an execute function that runs your code and returns a result. If you've used MCP tools from any model vendor's SDK, you have already seen this shape.

Declarative attributes describe form fields the agent might fill. The imperative API registers action tools that have no form. Use both, and your site has a typed surface that an agent can both query and act on.

6. Running the audit, real numbers

Lighthouse 13.3.0 ships an agentic-browsing config. Point it at your dev server:

npx lighthouse \
  --config-path=node_modules/lighthouse/core/config/agentic-browsing-config.js \
  http://localhost:5173

Enter fullscreen mode Exit fullscreen mode

I ran the audit against three builds of the same React app: a vanilla "before" build, the "after" build with the recipe applied, and a "broken" build with deliberate violations sprinkled in.

Build Agentic Browsing Accessibility Notes
acme-before (vanilla form, no llms.txt, no WebMCP) 2 of 2 100 Audit floor is generous: several refs are informative-only.
acme-after (the recipe applied) 3 of 3 100 Form-metadata and llms.txt checks now pass.
broken-sample (deliberate violations) 1 of 2 71 Caught missing labels and form-association errors.

A quick word on the audit floor. A site with no llms.txt and no WebMCP can still get a 2 of 2 on Agentic Browsing, because the category gates only on the checks that have something to evaluate against. The 3 of 3 you actually want comes from the form-metadata path, which requires real labels, autoComplete, and the WebMCP attributes; and from llms.txt presence with an H1 and a link.

Here is the relevant excerpt from the actual after.report.json, the category block at the bottom of the report:

"agentic-browsing": {
  "title": "Agentic Browsing",
  "categoryScoreDisplayMode": "fraction",
  "id": "agentic-browsing",
  "score": 1
}

Enter fullscreen mode Exit fullscreen mode

score: 1 on a fraction-display category means full credit on every weighted ref. That is the audit pass you want to point at when you tell your team "we shipped agent-ready."

7. What is coming next

A short, forward-looking note. Chrome 149 ships the producer-side WebMCP API behind the origin trial flag, which is what wires up navigator.modelContext.registerTool() today. The consumer side, where Gemini in Chrome's side panel actually invokes the tools your site registers, is something Google has said will follow in a future Chrome build. The producer-side work pays off today (in Lighthouse audits, in accessibility scores, in a typed tool surface that any MCP-aware model can target), and it leaves you ready for the consumer side the moment it lands. The Lighthouse Agentic Browsing audit itself, importantly, runs on stable Chromium with no Chrome 149 dependency; the audit and the producer-side API ship on independent tracks.

8. Try it tonight

The full recipe in six steps:

  1. npm create vite@latest a small React app, or open your existing one.
  2. Add public/llms.txt with the shape above: H1, summary, H2 sections, notes-for-models.
  3. Upgrade one form: real <label> elements with htmlFor, autoComplete values, an aria-label on the form, and the WebMCP attributes (toolname and tooldescription on the form, toolparamdescription on each input).
  4. Register an imperative tool or two in a useEffect with navigator.modelContext.registerTool(tool, { signal }). Feature-detect the API first so stable Chrome users see a clean no-op.
  5. Run the audit: npx lighthouse --config-path=node_modules/lighthouse/core/config/agentic-browsing-config.js http://localhost:5173. Requires lighthouse@13.3.0 or later.
  6. Open the HTML report. Read the Agentic Browsing section. Tweak attributes, re-run.

If you have an evening, you have time for all six steps. Most of the diff is accessibility work you probably already know how to write. If your team is already doing WCAG compliance, you are roughly 70 percent of the way there; the new WebMCP attributes are the remaining 30 percent.

9. Closing

The mobile-friendly shift took five years to wash through the web. The accessibility shift is still in progress, decades in. The agent-ready shift is starting now, and the cost of entry is genuinely low: three new files, a handful of attributes, an audit you can run on a laptop. The producer-side work is cheap, visible in audits today, and useful to humans as a side effect. The consumer side, browsers actually invoking your registered tools, follows.

Spend a hundred lines on it before someone else makes that decision for you.

Are you starting on llms.txt and the form-metadata work tonight, or waiting for the consumer side to land in Chrome first? I'd love to hear which form on your site is the most obvious candidate for the first WebMCP annotation pass.