Computer-Use and Browser Agents: AI That Operates SoftwareAgent protocols and agent-ready websites · Lesson 13 of 16

Making your website agent-friendly

Article · 7 min · 8 min lecture

Video lecture

Making your website agent-friendly

15 chapters · about 8 min · full transcript

Coming soon

Chapter 1 of 15

Making your website agent-friendly

  • Agents as visitors
  • The seven-layer stack
  • An audit you can run today

The narrated lecture is in production

Every chapter is scripted and ready. Browse the chapters and read the full transcript now — the video will appear here when it’s published.

Chapters

Your next visitor might not be human

AI assistants now read, summarize and act on websites for their users: comparing products, booking appointments, filling inquiry forms, checking policies. An agent-friendly site lets those agents understand and complete tasks accurately, on your terms. The good news: most of what helps agents also helps accessibility, SEO and conversion.

The agent-friendliness stack

1. Semantic, accessible HTML. Agents rely on the accessibility tree. Use real button, a, label, select elements, meaningful accessible names ("Book a consultation", not "Click here"), visible labels on every form field, logical heading order and full keyboard operability. Follow WCAG 2.2.

2. Structured data (schema.org JSON-LD). Mark up what things are: Organization, LocalBusiness, Product with Offer (price, currency, availability), Service, Event, FAQPage, BreadcrumbList. Search engines use it and agents benefit from unambiguous facts. Keep it consistent with visible content.

<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "Product",
  "name": "Hydrating Serum 30ml",
  "sku": "HS-30",
  "brand": {"@type": "Brand", "name": "Example Skin"},
  "offers": {
    "@type": "Offer",
    "price": "3499",
    "priceCurrency": "PKR",
    "availability": "https://schema.org/InStock",
    "hasMerchantReturnPolicy": {
      "@type": "MerchantReturnPolicy",
      "returnPolicyCategory": "https://schema.org/MerchantReturnFiniteReturnWindow",
      "merchantReturnDays": 14
    }
  }
}
</script>

Place this in the page template for each product and validate it before publishing.

3. Clear, forgiving forms. Label every field, state formats ("Phone, including country code, e.g. +971..."), accept reasonable variations, show errors next to the field in text, avoid time-limited steps without warning, and avoid unusual custom widgets. Use standard autocomplete attributes. Consider which forms you want agents to complete (inquiries, bookings) and which you do not (account creation at scale), and protect the latter with rate limits and abuse controls rather than obscurity.

4. Machine-readable policies and facts. Put prices, availability, delivery areas and times, returns, warranties, opening hours and contact routes in plain text and structured data, not only in images or PDFs.

5. An llms.txt file (optional, low cost). llms.txt is a community proposal (published in September 2024) for a Markdown file at your site root that gives language models a concise overview and links to the most useful pages, ideally with clean Markdown versions. Some documentation sites and tools use it; major AI search providers have not committed to relying on it, so treat it as a cheap, harmless helper, not a ranking lever.

# Example Skin

> Pakistani skincare brand selling cruelty-free serums and moisturizers,
> shipping across Pakistan and to the UAE and KSA.

## Products
- [Product catalog](https://www.example-skin.pk/products.md): all products with prices in PKR
- [Hydrating Serum](https://www.example-skin.pk/products/hydrating-serum.md)

## Policies
- [Shipping and delivery times](https://www.example-skin.pk/shipping.md)
- [Returns (14 days)](https://www.example-skin.pk/returns.md)

## Optional
- [Brand story](https://www.example-skin.pk/about.md)

6. APIs and protocol endpoints. For high-value actions (booking, quoting, availability), a documented API, an MCP server or participation in commerce protocols is far more reliable than an agent clicking your UI. Start with read-only endpoints (availability, pricing) and add authenticated write actions with proper authorization.

7. Crawler and agent access policy. Decide which AI crawlers and agents may access what, using robots.txt for the crawlers that honor it, and bot management at your CDN for the rest. Be aware that some user-directed agents browse as the user rather than as a declared crawler. Balance: blocking everything also blocks assistants that could send you customers.

Hands-on: an agent-friendliness audit

Run this checklist on your top five conversion pages, using the accessibility snapshot script from module one and a structured-data validator (Google's Rich Results Test or the Schema.org validator):

CheckPass criteria
Accessible namesEvery button and link has a specific name
Form labelsEvery field has a programmatic label and format hint
Keyboard pathTask completable with keyboard only
Structured dataValid, matches visible content, includes price, availability and policies
Policies in textShipping, returns, hours in HTML text
Agent task testA browser agent completes the key task in a sandbox on a test account
llms.txtPresent and accurate (optional)

Worked example: a Riyadh clinic booking page

A dental clinic in Riyadh found that assistants misreported its hours and agents failed to book. Causes: hours only in an image, a date picker with no labels, and Arabic and English versions with conflicting phone numbers. Fixes: LocalBusiness structured data with openingHoursSpecification, an accessible date input with text alternatives, consistent contact details in both languages, and a simple booking-request form. A sandboxed agent then completed a booking request reliably, and staff reported fewer calls asking about hours.

Pitfalls

  • Structured data that contradicts visible content (can be treated as spam by search engines).
  • Hiding key facts in images, PDFs or chat widgets.
  • Using CAPTCHAs everywhere, blocking legitimate assistants and frustrating users; use risk-based bot management instead.

How to measure success

Pass rate on the audit checklist, agent task-completion rate in sandbox tests, structured-data errors in Search Console, and (where your analytics can identify them) referrals and conversions from AI assistants.

Key takeaways

  • Agent-friendly sites overlap heavily with accessible, SEO-sound sites: semantic HTML, clear labels, keyboard operability.
  • Use schema.org JSON-LD that matches visible content for products, offers, policies and local business facts.
  • llms.txt is an optional, low-cost proposal, not a ranking lever; APIs or protocol endpoints beat UI automation for high-value actions.
  • Decide deliberately which tasks agents should complete and protect sensitive flows with rate limits and bot management.

Check your understanding

Quick questions to lock in the lesson. They don’t count towards your certificate.

  1. An assistant keeps misreporting a shop's opening hours. What is the most likely fix?
  2. What is an accurate description of llms.txt?
  3. Why can structured data that differs from the visible page be harmful?

Put it into practice

Run the agent-friendliness audit on your top five conversion pages and fix the two highest-impact failures.

Enrol for free to save your progress

Reading is always free. Enrol to keep your place, take the final assessment and earn a verifiable certificate.