AI agents

Tag forms and sections for AI agents

Add attributes to your sections and forms so agents can link to them and prepare forms, and decide who fills each field.

Agents find what you tag. A tagged section becomes a place agents can link to. A tagged form becomes an action agents can prepare for the visitor — Flamio never submits it; the visitor reviews it and sends it.

Before you begin

Tag your site

Open the Markup tab

Open AI agents and click Markup in the left rail. Tag forms and sections shows the rules and an example in HTML and React.

Tag your sections

Give a <section> an id and a heading. It becomes a place agents can link to.

Tag your forms

Give a <form> a toolname and a tooldescription. Every field needs a name. Add toolparamdescription to a field to tell agents what it expects.

<section id="free-audit">
  <h2>Get your free audit now</h2>
  <form id="free-audit-form" toolname="request_free_audit"
        tooldescription="Request a free UX audit of a website. Flamio's AI tester visits the site and emails a report within 24 hours.">
    <label for="targetUrl">Website URL</label>
    <input id="targetUrl" name="targetUrl" required
           toolparamdescription="Address of the website to audit, for example example.com">
    <label for="email">Work email</label>
    <input id="email" name="email" type="email" autocomplete="email" required>
    <fieldset>
      <legend>Audit mode</legend>
      <label><input type="radio" name="mode" value="explore" checked> Explore</label>
      <label><input type="radio" name="mode" value="focused"> Focused</label>
    </fieldset>
    <input name="website" tabindex="-1" autocomplete="off" aria-hidden="true"><!-- honeypot -->
    <button type="submit">Get my free audit</button>
  </form>
</section>
<form toolname="book_visit" tooldescription="Book a visit to a doctor" onSubmit={handleSubmit}>
  <select name="doctor" required toolparamdescription="Doctor's specialty">…</select>
  <input name="date" type="date" required />
  <input name="fullName" autoComplete="name" required />
  <input name="phone" type="tel" autoComplete="tel" required />
  <button type="submit">Book</button>
</form>

With React and TypeScript, add this types file to your project once:

webmcp-attributes.d.ts
// webmcp-attributes.d.ts
import 'react';
declare module 'react' {
  interface FormHTMLAttributes<T> { toolname?: string; tooldescription?: string }
  interface InputHTMLAttributes<T> { toolparamdescription?: string }
  interface SelectHTMLAttributes<T> { toolparamdescription?: string }
  interface TextareaHTMLAttributes<T> { toolparamdescription?: string }
}

Decide who fills each field

Who fills each field lists the three roles. Flamio gives each field the first role that matches:

Filled byFieldsWhat agents get
SecretPasswords, card fields (cc-*), one-time codesNever listed to agents or shown by Flamio
VisitorEmail, phone, checkbox and file fields; a personal autocomplete token (name, email, tel, address parts); any field with data-flamio-fill="human"Agents see the label; the visitor types the value
AgentEvery other field, and one with a non-personal token (organization, url)Agents may propose a value; the visitor checks it

To get the roles right:

  • Give personal fields an autocomplete token. A field named like phone without one is left to the visitor and reported as a warning.
  • Add data-flamio-fill="human" to any field only the visitor should fill — for example free text that may hold personal details.
  • Hide a spam-trap field from agents with aria-hidden="true" and tabindex="-1" on the field itself, like the website field in the HTML example.

Links from agents open your page with ?flm=…. Web SDK 0.11.0 removes it on load, but tags that fire earlier record it, and 0.11.0 is not released yet: web SDK 0.9.0 leaves it in place. In Google Analytics 4, add flm under Admin > Data streams > your stream > Redact data > URL query parameters.

Deploy and scan

Deploy your site. Then open Site tree and click Scan now to see what Flamio found. See Scan your site and fix markup issues.

Result

After the scan, Site tree lists your tagged sections and forms, and each form field with its role: Agent, Visitor or Secret.

Flamio's scan reads the HTML your server sends. A form that appears only after JavaScript runs is missing from Site tree, from agent search and from the links agents hand out. Browser agents with WebMCP still see it once it appears on the page. To make it searchable and linkable, render it on the server.

Browser agents read every field

Chrome's built-in agent (WebMCP) reads every named field of a tagged form, including email — browsers ignore autocomplete and data-flamio-fill. The roles hold wherever agents go through Flamio.