AI news, problem solutions & tool picks
DigestX

Tool Suggestions

Latch: One Line of Code That Makes Your Website Usable by AI Agents

· 3 min read

AI agents are already clicking through websites — and failing on their buttons and forms. Latch, launched on Show HN on October 24, fixes that from the site owner's side with a single script tag: it exposes your search, cart and contact forms as tools an agent can actually use, with no server, no rewrite and no API keys. The pitch is one line of code, pasted before the closing body tag, that makes your site work inside AI browsers.

What it does

Latch reads your page — read-only — and registers the actions an agent needs, nothing else. It exposes four tools: search_site, which finds your search box, types the query and submits it; add_to_cart, which detects "Add to cart" and "Buy now" controls and clicks them on the agent's behalf; submit_form, which maps contact, booking and signup fields into a tool an agent can fill and send; and navigate, which surfaces your main navigation links so an agent can move around the site reliably. The script is about 6 KB with zero dependencies, and it is built on WebMCP, the W3C standard for exposing web page capabilities to agents, currently in origin trial in Chrome 149 and Edge 147 and supported by agentic browsers such as Atlas and Comet.

What it costs — and what it does with your data

The script is free and open source forever. You can self-host it or load it from latch.tools, and a paid hosted dashboard — €19 per month per project — shows what agents actually do on your site, with 90-day history, a per-agent breakdown of which AI browsers visit, a full event feed and a weekly email summary. The free tier includes opt-in analytics for the last 14 days.

The privacy design is the part worth reading carefully. Analytics is opt-in and metadata-only: with a data key added to the script tag, Latch reports the tool name, the outcome and the page path — never form contents, query strings or personal data. Without a key, it makes zero network calls. And where WebMCP is not present, it does nothing and never breaks the page.

The honest limits

Latch only works where WebMCP exists, which today means origin trials and a handful of agentic browsers — most visitors' browsers will simply ignore it, which is safe but means the benefit arrives gradually as the standard spreads. There is also a question every site owner should ask before installing it: exposing your cart and forms to agents means agents can submit orders and signups on your behalf, so the controls you already have for bots, fraud and abuse now apply to a new kind of visitor. Latch's own page runs the script on itself with a live demo, so you can see exactly what an agent sees before deciding. For any site already noticing agent traffic — or expecting it — this is currently the cheapest way to stop agents failing on the front door.