# AgentGrade — full content > Scan any site for AI agent capabilities and payment protocols. Lighthouse-like reports for agentic services. > Source: https://agentgrade.com ## About agentgrade scans any URL for agent readiness — payment protocols (x402, MPP, L402), discovery files (llms.txt, sitemap, robots.txt), MCP endpoints, OpenAPI specs, identity (WebFinger, DID, Nostr), content negotiation, and infrastructure hygiene. Returns a 0–100 score, a letter grade, and per-check fix hints. Live at https://agentgrade.com. Free API at https://agentgrade.com/api/scan?url=https://example.com. MCP endpoint at https://agentgrade.com/mcp. CLI: npm i -g agentgrade-cli. ## Agent Readiness — the canonical guide **Agent Readiness: how websites get ready for AI agents** (https://agentgrade.com/agent-readiness) Agent readiness is how prepared a website is to be used by autonomous AI agents — software that browses, queries, and transacts on a user’s behalf without rendering pages. A site is agent-ready when its capabilities (data, search, payments, tools) are exposed through machine-readable protocols rather than buried in JavaScript and clickflows. As of May 2026, the top 100 websites average a 55% agent readiness score; 99% fail basic content negotiation. **Q: What is agent readiness?** A: Agent readiness is how prepared a website is for autonomous AI agents — software that browses, queries, and transacts on a user’s behalf. It measures whether a site’s capabilities are exposed through machine-readable protocols rather than locked behind JavaScript and clickflows. **Q: Why does agent readiness matter in 2026?** A: AI agents now route a measurable share of commercial traffic for major platforms. Adobe Analytics tracked a 4,700% year-over-year surge in generative-AI traffic to US shopping sites by July 2025, with a further 393% Q1 2026 increase. eMarketer forecasts AI platforms will process roughly 1.5% of US retail ecommerce in 2026 (~$20.9 billion, ~4× 2025), and Morgan Stanley projects up to $385 billion in agentic-commerce impact by 2030. Sites that aren’t agent-ready get bypassed in favor of sites that are. **Q: What is the difference between SEO and agent readiness?** A: SEO optimizes for human search-engine traffic — ranking pages so people find and click them. Agent readiness optimizes for non-human callers — exposing data and capabilities so agents can use them programmatically. They share some signals (sitemap, robots.txt, structured data) but the goals differ: SEO wants visibility, agent readiness wants addressability. **Q: Is agent readiness the same as AEO or GEO?** A: They overlap. AEO (Answer Engine Optimization) and GEO (Generative Engine Optimization) focus on getting cited inside LLM answers (ChatGPT, Perplexity, Google AI Overviews). Agent readiness is broader — it also covers agent-driven transactions, tool calls, and capability exposure. If you’re being cited by ChatGPT, that’s AEO; if an agent can complete a purchase on your site, that’s agent readiness. **Q: How do I measure my site’s agent readiness?** A: Run a scan at agentgrade.com. It checks 70+ signals across discovery, capability exposure, content negotiation, payment protocols, and trust/identity. You get a 0–100 score, a letter grade, and per-check fix hints. The API is at /api/scan and there is also a CLI: npm i -g agentgrade-cli. **Q: What is a typical agent readiness score?** A: The top 100 websites by traffic average 55% as of May 2026. Cursor leads at 82%. Major social platforms (Facebook, X, Instagram, LinkedIn, Reddit) score 0% because they block scanners or require auth. Grade distribution across the top-100: 0 A grades, 43 B grades, 35 C grades, 12 D grades, 10 F grades. **Q: What is the single fastest way to improve my score?** A: Add /llms.txt — a plain-text file at your domain root listing key pages with one-line summaries. 65% of top-100 sites are still missing it, and it takes about 10 minutes to write a good one. **Q: Will agent readiness affect my SEO ranking?** A: Indirectly, in some cases. Some of the same signals (sitemap, structured data, content negotiation) feed both. But agent readiness is not a Google ranking factor in the conventional sense. Its impact is on agent-driven referrals — LLM citations, agentic checkout, programmatic API discovery. **Q: Is there a single open standard for agent readiness?** A: No. Agent readiness is a composite of many emerging protocols (MCP, x402, llms.txt, OpenAPI, A2A, WebMCP, SKILL.md). AgentGrade’s scoring model weights each based on adoption, criticality, and whether the protocol can be verified at scan time. ## Author Eoin Siegel — Creator of AgentGrade. Eoin Siegel is the creator of AgentGrade, the scanner that grades websites on how prepared they are for AI agents. He works on the protocols and standards that make sites discoverable, queryable, and transactable by autonomous agents — including x402, MCP, llms.txt, OpenAPI, A2A, and SKILL.md. Profile: https://agentgrade.com/humans/eoin-siegel. undefined ## Standards reference --- ### RFC 9421 — HTTP Message Signatures > The cryptographic foundation of agent identity on the web: a standard way to sign HTTP requests so the receiver can verify who sent them — regardless of the User-Agent string, which anyone can fake. Status: Proposed Standard (IETF), published February 2024 Spec: https://www.rfc-editor.org/rfc/rfc9421 Source: https://agentgrade.com/standards/rfc-9421 RFC 9421 defines two HTTP fields. Signature-Input declares what was signed — a list of covered components plus parameters like key id and creation time. Signature carries the signature value itself. Covered components can be ordinary header fields or derived components describing the request itself: @method, @target-uri, @authority, @path, @query and friends (derived names always start with @). Why it matters for the agentic web: user-agent strings are self-declared and freely spoofable, and IP-range lists are coarse and operationally painful. A signed request is neither — the signature either verifies against the operator’s published key or it doesn’t. This is the mechanism underneath Web Bot Auth, and it is already in production: OpenAI documents that its ChatGPT agent signs every outbound request per RFC 9421, sending Signature-Agent: "https://chatgpt.com" with verification keys published at https://chatgpt.com/.well-known/http-message-signatures-directory. --- ### Web Bot Auth > The emerging standard for cryptographically identifying automated clients: a profile of RFC 9421 that lets a bot prove which operator it belongs to, replacing spoofable User-Agent strings and brittle IP lists. Status: Individual drafts under a chartered IETF working group (webbotauth, formed October 2025); not yet an RFC Spec: https://datatracker.ietf.org/wg/webbotauth/documents/ Source: https://agentgrade.com/standards/web-bot-auth The IETF chartered the webbotauth working group in October 2025 to “standardize methods for cryptographically authenticating automated clients and providing additional information about their operators.” The core documents are still individual drafts — the protocol draft (draft-meunier-webbotauth-httpsig-protocol, June 2026) profiles RFC 9421 for bot identification, with companion drafts for the key-directory format and an operator registry. Deployment is ahead of standardization. Cloudflare verifies Web Bot Auth signatures (Signature-Input, Signature, Signature-Agent headers) and runs a Signed Agents program whose initial signers included OpenAI’s ChatGPT agent, Block’s Goose, Browserbase, and Anchor Browser; in July 2026 it merged verified bots and signed agents into one directory distinguished by a direct-vs-intermediary access field. Cloudflare has also proposed a registry format — “a list of URLs at which to retrieve agent keys” — now an IETF draft. The practical takeaway for site owners: signature verification is how the may-ignore-robots.txt tier of agent traffic becomes accountable. For agent operators: signing your fetcher’s requests is becoming the price of admission at CDN gates. --- ### RFC 8615 — Well-Known URIs > The quiet workhorse of agent discovery: the /.well-known/ path prefix that gives machines a fixed place to look for a site’s metadata — and the IANA registry that says which names are real. Status: Proposed Standard (IETF), published May 2019; a revision draft (rfc8615bis) is circulating as an individual draft Spec: https://www.rfc-editor.org/rfc/rfc8615 Source: https://agentgrade.com/standards/rfc-8615 RFC 8615 (2019, obsoleting RFC 5785) reserves the /.well-known/ path prefix and establishes an IANA registry for names under it. Practically the whole agent-discovery layer lives there: A2A agent cards, x402 payment manifests, MCP discovery files, OAuth metadata, signature key directories. The registry is also a useful reality check on the ecosystem’s maturity. As of mid-2026, the agent-relevant names actually registered are agent-card.json (registered August 2025, change-controlled by the Linux Foundation for the A2A spec) and api-catalog (RFC 9727). Everything else the agentic web uses — x402.json, mcp.json, webmcp.json — is convention, not registration. Registration isn’t required for a name to work, but it is the difference between “a spec owns this name” and “everyone hopes nobody collides.” A revision, draft-nottingham-rfc8615bis, is circulating as an individual draft (February 2026) to refresh the well-known governance rules as usage explodes. --- ### MCP — Model Context Protocol > The protocol that turns a website into a callable tool: a JSON-RPC 2.0 server declares named, schema-described tools that any MCP-speaking agent can discover and invoke — the closest thing the agentic web has to a universal capability layer. Status: Open specification with broad multi-vendor adoption; originated by Anthropic in late 2024 Spec: https://modelcontextprotocol.io/ Source: https://agentgrade.com/standards/mcp An MCP server exposes three things over JSON-RPC 2.0: an initialize handshake (protocol version, server identity, capabilities), a tools/list catalog of named tools with JSON-Schema inputs, and tools/call execution. An agent that has never seen your service can hold the entire conversation programmatically: connect, list, call. Adoption is the protocol’s argument: Claude, Cursor, Windsurf and a growing set of agent runtimes speak it, and server registries list tens of thousands of endpoints. For discovery, sites publish a /.well-known/mcp.json manifest (a convention, not part of the spec — and not IANA-registered; see RFC 8615) that points at the real server, which usually lives on a subdomain like mcp.example.com. --- ### A2A — Agent-to-Agent Protocol > The protocol for agents talking to agents: a site hosting an agent publishes a discoverable Agent Card declaring identity, skills, and endpoint, so other agents can find it, verify it, and delegate tasks to it. Status: v1.0.0 stable (March 2026), governed by the Linux Foundation; agent-card.json is IANA-registered Spec: https://a2a-protocol.org/latest/specification/ Source: https://agentgrade.com/standards/a2a The discovery surface is the Agent Card: a JSON manifest at /.well-known/agent-card.json — one of only two agent-era names actually registered in IANA’s well-known registry (August 2025, change-controlled by the Linux Foundation). Spec versions before v0.3.0 used agent.json; serve the new path and redirect the old one. v1.0.0 (March 2026) is the project’s first stable, production-ready release, and its headline addition is signed Agent Cards: a signatures field lets a consuming agent verify cryptographically who published the card, closing the gap between “found a card” and “trust the card.” The Linux Foundation reported more than 150 organizations supporting the standard as of April 2026. --- ### x402 — HTTP 402 Payments > The protocol that finally gives HTTP 402 a meaning: a server answers a paid request with a machine-readable challenge quoting price, asset, and recipient, and an agent’s wallet pays and retries — per-call payments with no accounts or API keys. Status: Production protocol; stewarded by the x402 Foundation under the Linux Foundation since July 2026 Spec: https://github.com/x402-foundation/x402 Source: https://agentgrade.com/standards/x402 Two envelope versions coexist. In v1, the challenge is the JSON body of the 402 response; in v2, it moves into a base64-encoded PAYMENT-REQUIRED header with structured service catalogs. The spec ships both, current docs present v2 as current, and AgentGrade’s scanner still observes v1 bodies across deployed services — a client should decode both. Coined by Coinbase, x402 moved to foundation governance in July 2026: the x402 Foundation launched operationally under the Linux Foundation with roughly 40 members, premier members including Visa, Mastercard, Stripe, Google, AWS, Cloudflare, and Shopify (the canonical repo moved with it; coinbase/x402 continues as a development fork). Chainalysis counted over 100 million x402 agentic payments on Base in the protocol’s first year, and platform support is arriving: Cloudflare’s Monetization Gateway (waitlist) and Amazon Bedrock AgentCore Payments (preview) both speak it natively. --- ### WebMCP > MCP’s in-browser sibling: a page registers its functionality as schema-described tools via a browser API, so user-in-the-loop agents can act through the user’s own session — no separate server, no separate auth. Status: W3C Community Group draft (not on the standards track); Chrome origin trial since Chrome 149 (June 2026), Edge opt-in trial Spec: https://webmachinelearning.github.io/webmcp/ Source: https://agentgrade.com/standards/webmcp The draft defines a single surface: document.modelContext, where a page registers tools that browser-hosted agents can call (Chrome deprecated the earlier navigator.modelContext name in Chrome 150). The security model is the browser’s own: same-origin rules and the user’s existing session — an agent can only do what the user could do on that page. Status precisely: a Community Group draft, which is not a W3C standard nor on the standards track. Chrome opened an origin trial in Chrome 149 (June 2026); Microsoft Edge runs its own opt-in origin trial. Nothing ships by default. The /.well-known/webmcp.json manifest that AgentGrade also checks is a community convention for out-of-page discovery — the draft itself defines only the in-page API. --- ### llms.txt > A markdown index at your root that tells agents what your site offers and where its machine-readable surfaces are — widely generated, barely fetched, and still worth ten minutes for the agents that do read it. Status: Community convention (llmstxt.org); no standards body, not IANA-registered; measured consumption is minimal Spec: https://llmstxt.org/ Source: https://agentgrade.com/standards/llms-txt The format is deliberately simple: an H1 for the site, a blockquote summary, then sections of links with one-line descriptions. Its real value is curation and cross-reference — the highest-value lines point at your MCP endpoint, OpenAPI spec, and payment discovery files, which an agent cannot reliably find otherwise. The honest status: Google documents that Search does not use it; Ahrefs measured 97% of llms.txt files receiving zero requests in May 2026; and no AI vendor primarily claims to consume third-party llms.txt — while Shopify, Yoast, Rank Math, AIOSEO, and Mintlify all generate it, and Chrome’s Lighthouse audits it under agentic browsing. It is agent infrastructure with generation running far ahead of consumption. The full reality check carries the sources. --- ### RFC 9309 — Robots Exclusion Protocol > The rules of engagement for crawlers, now doing a job it was never designed for: expressing per-vendor AI policy across training, search, and user-fetch tiers through User-agent tokens. Status: Proposed Standard (IETF, 2022) — the formalization of 30 years of robots.txt practice Spec: https://www.rfc-editor.org/rfc/rfc9309 Source: https://agentgrade.com/standards/rfc-9309 RFC 9309 standardizes what robots.txt always was informally: groups addressed to User-agent tokens, Allow/Disallow rules, most-specific-match wins, and — crucially — voluntary compliance. Nothing in the protocol enforces anything. The agent era stretched it in one specific way: every AI vendor now runs several bots with separate tokens and separate compliance behavior (training crawlers honor it; search crawlers honor it; user-initiated fetchers mostly document that they may not). A robots.txt that treats “AI” as one thing misses the actual control surface. The robots.txt guide covers the tier model; the user-agent reference documents every token. --- ### RFC 9110 — HTTP Semantics (content negotiation) > The oldest agent-readiness mechanism on this list: proactive content negotiation, where the same URL serves HTML to browsers and markdown or JSON to agents that ask — no new protocol required. Status: Internet Standard (IETF, 2022) — the HTTP core specification Spec: https://www.rfc-editor.org/rfc/rfc9110#name-content-negotiation Source: https://agentgrade.com/standards/rfc-9110 RFC 9110 defines proactive negotiation: the client states preferences in the Accept header with quality weights, and the server picks the representation. For agents this is the highest-leverage low-tech signal on the web — an agent that sends Accept: text/markdown and receives clean markdown ingests your content in one pass, no scraping, no rendering. The subtleties are where sites fail: honoring the leading preference rather than serving any non-HTML type, labeling the response’s Content-Type from what was negotiated, and varying caches correctly. Fewer than 1% of top sites pass basic negotiation checks — which makes it the cheapest differentiation available. The content-negotiation guide covers the mechanics and the common bugs. --- ### RFC 9116 — security.txt > A machine-parsable file that tells anyone — human researcher or automated scanner — where to report a security problem: two required fields, one fixed location, and an expiry date that keeps the answer honest. Status: Informational (IETF), published April 2022 Spec: https://www.rfc-editor.org/rfc/rfc9116 Source: https://agentgrade.com/standards/rfc-9116 RFC 9116 — which began as Edwin Foudil’s 2017 Internet-Draft — defines /.well-known/security.txt. Exactly two fields are required — Contact (a URI: mailto:, tel:, or a web form) and Expires, a timestamp after which the file should be considered stale. Optional fields add an OpenPGP Encryption key, a disclosure Policy, Preferred-Languages, and Canonical, which states the file’s authoritative URL — so a signed file can’t be replayed from somewhere it doesn’t belong. The RFC recommends (but does not require) an OpenPGP cleartext signature over the whole file. Location matters: the file must live under /.well-known/ and be served over HTTPS; a top-level /security.txt is tolerated only as a legacy fallback, and when both exist the well-known copy wins. The mandatory Expires field is the RFC’s best idea — a security contact that was true in 2022 and never revisited is worse than none, and expiry makes staleness detectable by machine. Without the file, a researcher who finds a vulnerability on your site has no sanctioned channel to report it. Adoption is small but compounding. A 2026 scan of 241 million gTLD domains (iotdef.com) found 573,000 serving the file — 0.24%, up sevenfold from 2021’s 82,000 (about 4.4× per-domain). Among the top million sites the rate is roughly 1.25% (URIports, 2025). Quality is improving too: 89% of 2026 files carry the once-rare Expires field. In the US it is more than endorsed: CISA’s Binding Operational Directive 20-01 requires security.txt on federal agencies’ primary .gov sites. For the agentic web the file is a preview of a broader pattern: its Security Considerations anticipate “reports being sent in an automated fashion” — automated reporters need a machine-readable answer too. --- ### OAuth Discovery — RFC 8414 & RFC 9728 > The two metadata files that let an agent walk from “401 Unauthorized” to a completed OAuth flow with no human in the loop — and, since the 2026-07-28 MCP spec, the mandatory front door of every authenticated MCP server. Status: RFC 8414: Proposed Standard, June 2018 · RFC 9728: Proposed Standard, April 2025 Spec: https://www.rfc-editor.org/rfc/rfc9728 Source: https://agentgrade.com/standards/oauth-discovery Authorization used to require reading the docs. These two RFCs replace the docs with JSON. RFC 9728 (Protected Resource Metadata, April 2025) gives the resource server a discovery file — /.well-known/oauth-protected-resource — naming the authorization servers that protect it; a 401 response can point straight at that file via the WWW-Authenticate parameter resource_metadata. RFC 8414 (Authorization Server Metadata, June 2018) is the older sibling on the other side: /.well-known/oauth-authorization-server describes the authorization server itself — authorization and token endpoints, PKCE support, and the registration endpoint if clients may self-register. RFC 8414 generalizes OpenID Connect Discovery (2014), with one trap: for issuers with a path component, OIDC appends its well-known segment while 8414 inserts it between host and path — so clients probe multiple candidate URLs. Chained, they make auth fully self-describing: 401 → resource metadata → authorization_servers → AS metadata → endpoints → token. Every hop is a GET to a predictable URL with a machine-readable answer, which is exactly the property an autonomous agent needs. The MCP specification made this concrete: the current version (2026-07-28) requires MCP servers to implement RFC 9728 (“MCP servers MUST implement OAuth 2.0 Protected Resource Metadata”), requires the authorization_servers field that the RFC itself leaves optional — so the minimal compliant document is just resource plus authorization_servers — and requires authorization servers to publish RFC 8414 or OIDC Discovery metadata — clients must support both. Resource Indicators (RFC 8707) bind the issued token to the specific MCP server. On the agentic web, this pair has graduated from good practice to protocol requirement. --- ### RFC 7591 — Dynamic Client Registration > The 2015 RFC that lets a client register itself with an authorization server by POSTing JSON — no human, no form. It made the first wave of agent auth possible, and the agentic web is already replacing it. Status: Proposed Standard (IETF), published July 2015; deprecated by MCP in favor of Client ID Metadata Documents Spec: https://www.rfc-editor.org/rfc/rfc7591 Source: https://agentgrade.com/standards/rfc-7591 RFC 7591 defines a registration endpoint: a client POSTs its metadata (name, redirect URIs, grant types) as JSON and receives a client_id — and optionally a secret — in return. Registration can be open (“the client registration endpoint SHOULD allow registration requests with no authorization”) or gated by an initial access token; signed software statements let a trusted party vouch for client metadata. Its companion, RFC 7592 (managing registrations after the fact), never advanced past Experimental. For agents, DCR answered the cold-start question: an agent encountering a brand-new MCP server can’t have pre-registered, so the 2025-06-18 MCP spec recommended DCR to let clients “obtain OAuth client IDs without user interaction.” The cost surfaced quickly — an open registration endpoint means anyone in the world can mint clients, so operators bolted on rate limits and verification. And every server issues its own client_id, so a popular agent accumulates thousands of identities, one per server it has ever met. That churn is why the recommendation flipped. Since the 2025-11-25 revision — unchanged in the current 2026-07-28 spec — MCP recommends OAuth Client ID Metadata Documents (CIMD; an active OAuth WG draft by Aaron Parecki and Emelia Smith): the client’s client_id is an HTTPS URL, and the authorization server fetches the client’s metadata from it. Same self-service property, no registration endpoint to abuse, one stable identity everywhere — and it reuses RFC 7591’s metadata vocabulary, so the RFC’s field names outlive its endpoint. The spec keeps DCR as a MAY, explicitly “deprecated and retained for backwards compatibility.” --- ### RFC 9727 — api-catalog > One fixed URL that lists every API a site offers, in a machine-readable linkset — the newest IANA-registered member of the discovery layer, with adoption you can still count on one hand. Status: Proposed Standard (IETF httpapi WG), published June 2025 Spec: https://www.rfc-editor.org/rfc/rfc9727 Source: https://agentgrade.com/standards/rfc-9727 RFC 9727 (June 2025) defines /.well-known/api-catalog: a linkset (RFC 9264, served as application/linkset+json) in which each item entry is one of the publisher’s APIs. Entries should carry more than a bare URL — the service-desc relation points at a machine-readable description (in practice, an OpenAPI document), service-doc at human documentation, status at a health endpoint. Unlike most of the agent-discovery layer, this name is actually in the IANA well-known registry (registered December 2024) — see RFC 8615 for how rare that is. Adoption is thin, and measurably so: a May 2026 probe of 74 major API providers found exactly four serving a real catalog — Cloudflare, Merge.dev, Zuplo, and Memesio (whose catalog lists an MCP server among its APIs). The interesting motion is in tooling: Fern serves an RFC 9727 catalog on its hosted docs sites by default, pitching it as letting “AI agents, MCP clients, and API catalog crawlers discover your APIs without scraping HTML.” For agents the pitch is the same as the rest of the well-known family: a fixed place to ask “what can I call here?” with a parseable answer — the API-inventory complement to what an MCP manifest says about tools. No agent runtime is known to consume it automatically yet; it is a bet on the discovery layer, not a requirement of it. --- ### ACP · UCP · AP2 — the agent-commerce protocols > Three overlapping answers to “how does an AI agent buy something?” — a checkout API called by ChatGPT, a self-published merchant profile read by Google-side surfaces, and a mandate format for proving the human said yes. They are not one standard, and none has won. Status: ACP: OpenAI + Stripe, Sept 2025 · UCP: Google + Shopify, Jan 2026 · AP2: Google, Sept 2025 (FIDO donation announced Apr 2026) — none an IETF standard Spec: https://ucp.dev/ Source: https://agentgrade.com/standards/agent-commerce-protocols The three cover different layers. ACP (Agentic Commerce Protocol, OpenAI + Stripe, September 2025) is a checkout-session API the platform calls on the merchant — POST /checkout_sessions, complete, cancel — plus a product feed the merchant pushes privately to OpenAI, with payment handled by delegated tokens on the payment processor’s side. UCP (Universal Commerce Protocol, Google + Shopify, January 2026) inverts the direction: the merchant self-publishes a signed profile at /.well-known/ucp — capabilities in reverse-domain form, JWK signing keys, payment-handler declarations — that platforms discover and call. AP2 (Agent Payments Protocol, Google, September 2025) sits below both: cryptographically signed Checkout and Payment Mandates that make “the human authorized this purchase” verifiable and auditable, payment-method-agnostic, riding on A2A — and since v0.2, covering human-not-present autonomous payments. 2026 sorted the momentum. OpenAI scaled back in-chat Instant Checkout in March (stale merchant data and thin usage were the cited reasons; roughly 30 Shopify merchants had gone live on checkout per Forrester) and pivoted to discover-in-chat, buy-on-merchant — ACP’s live role today is the feed, not the purchase. UCP picked up the broadest coalition: its Tech Council added Amazon, Meta, Microsoft, Salesforce, and Stripe in April 2026 — Stripe co-maintains ACP, so its council seat is the ecosystem’s most-quoted hedge. The same month Google announced AP2’s donation to the FIDO Alliance, moving the authorization layer to neutral ground. UCP composes with AP2 (its payments layer references AP2 mandates) rather than competing; ACP and UCP genuinely compete at the checkout layer, and no official bridge exists. For a site owner the practical asymmetry is discoverability. UCP is the only one of the three with a public merchant-origin artifact — /.well-known/ucp — so it is the only one an outside scanner (or an unknown agent platform) can detect and verify. ACP’s surfaces are authenticated endpoints and privately pushed feeds; its own FAQ says discovery mechanisms are still being worked on. AP2 lives inside agent-to-agent payment flows and leaves nothing on the origin at all. The takeaway for a merchant: publishing /.well-known/ucp is the only self-serve way to be discoverable to outside platforms today — ACP and AP2 require a direct integration. Protocol churn — three camps, one retreat, one donation, in ten months — is why integrators now sell multi-protocol interoperability: nobody can safely bet on one. ## Knowledge Base --- ### Getting Started — Make Your Site Agent-Ready > Quick checklist to make your site discoverable and usable by AI agents. Source: https://agentgrade.com/kb/getting-started ## The 5-minute checklist These four files make your site visible to AI agents. Each takes minutes to add and immediately improves your AgentGrade score. ### 1. Add [llms.txt](/kb/llms-txt) Create `/llms.txt` — a plain-text description of your service for LLMs: ```markdown # Your Service Name > One-line description of what your service does. ## API GET /api/search?q=term — Search items POST /api/create — Create an item (requires auth) ## Example curl "https://yoursite.com/api/search?q=test" ``` **Why:** LLMs read this to understand what your service does and how to use it. Start the file with an H1 heading for a verified check. ### 2. Add [OpenAPI](/kb/openapi) spec Serve `/openapi.json` describing your API endpoints: ```json { "openapi": "3.0.0", "info": { "title": "Your API", "version": "1.0" }, "paths": { "/api/search": { "get": { "summary": "Search items", "parameters": [ { "name": "q", "in": "query", "schema": { "type": "string" } } ] } } } } ``` **Why:** Agents use this to know exactly what endpoints exist and how to call them. Most frameworks can auto-generate this. ### 3. Add [robots.txt](/kb/robots-txt) with agent directives Add agent-specific rules to `/robots.txt`: ``` User-agent: GPTBot Allow: / User-agent: Claude-Web Allow: / User-agent: Anthropic-AI Allow: / ``` **Why:** Signals that your site welcomes AI agents. Many sites block AI crawlers by default. ### 4. Add a health endpoint Serve `/health` returning JSON: ```json { "status": "ok" } ``` **Why:** Agents and monitoring tools use this to check if your service is up before making requests. ## Next steps Once the basics are in place, consider: - **MCP endpoint** — Let AI models call your tools directly via JSON-RPC 2.0 ([learn more](/kb/mcp)) - **Payment support** — Accept micropayments from agents via x402 or [MPP](/kb/mpp) ([learn more](/kb/x402)) - **Service catalog** — Publish discoverable endpoints via Bazaar ([learn more](/kb/bazaar)) - **Skills manifest** — Curate the key actions agents should take ([learn more](/kb/skills)) ## Scan your site Enter your domain on [agentgrade.com](https://agentgrade.com) to see your current score and what's missing. ## Related - [A2A](/kb/a2a) - [WebMCP](/kb/webmcp) --- ### Understanding Your Score > How AgentGrade scores your site, what verified vs declared means, and how to improve. Source: https://agentgrade.com/kb/understanding-your-score ## How scoring works AgentGrade checks for 10 capabilities across payments, discovery, and identity. Each capability has sub-checks that fall into two tiers: - **Verified** — AgentGrade made a live request and confirmed the capability works (e.g., [MCP](/kb/mcp) handshake completed, [OpenAPI](/kb/openapi) spec returned valid JSON) - **Declared** — a manifest or config file was found that claims the capability exists, but it wasn't independently confirmed Verified checks are weighted **2x** in the score calculation. A site that works is worth more than a site that claims to work. ## The 10 capabilities ### Payments (highest weight) - **Machine Payments** — [x402](/kb/x402), [MPP](/kb/mpp), or [L402](/kb/l402) detected via HTTP 402 headers - **Bazaar** — x402.json service catalog with discoverable endpoints ### Discovery - **MCP** — Model Context Protocol endpoint (JSON-RPC 2.0) - **AI Plugin** — ai-plugin.json manifest with reachable API spec - **Claude Plugin** — claude.json manifest with valid endpoints - **OpenAPI** — openapi.json spec that returns valid JSON - **[llms.txt](/kb/llms-txt)** — LLM context file starting with an H1 heading - **Skills** — skills.json manifest with reachable endpoints ### Informational (lower weight) - **[agents.txt](/kb/agents-txt)** — Agent access policy file - **[robots.txt](/kb/robots-txt)** — Agent-aware directives for AI crawlers ### Optional (don't hurt your score) - **Identity** — WebFinger, DID, Nostr NIP-05, AT Protocol DID ## Score breakdown The percentage score is: **(passed check weight / total check weight) × 100** The summary shows "X / Y checks passed" where Y excludes optional checks that weren't found. Optional checks (identity protocols) can only help your score, never hurt it. ## How to improve your score 1. **Add discovery files first** — `/openapi.json` and `/llms.txt` are the easiest wins 2. **Make sure they work** — a reachable, valid OpenAPI spec gets you verified checks, not just declared 3. **Add MCP** — the MCP handshake (initialize → tools/list → tools/call) earns multiple verified checks 4. **Add payment support** — x402 or MPP headers on at least one endpoint lights up the Machine Payments capability 5. **Publish a service catalog** — `/.well-known/x402.json` with discoverable endpoints earns Bazaar checks ## Related - [SKILL.md](/kb/skills) - [A2A](/kb/a2a) - [WebMCP](/kb/webmcp) --- ### Cloudflare & Agent Access > Why Cloudflare blocks agent traffic and how to configure it for agent accessibility. Source: https://agentgrade.com/kb/cloudflare-agent-access ## The problem Cloudflare's managed challenge (bot protection) blocks automated HTTP requests — including those from AI agents. If your site is behind Cloudflare with default settings, agents can't reach your API endpoints, payment gates, or discovery files. AgentGrade detects this per-probe. When a check is blocked, you'll see "Blocked by Cloudflare" instead of a pass/fail result. Your score may appear low not because capabilities are missing, but because Cloudflare prevented verification. ## What gets blocked Cloudflare's challenge triggers on requests that: - Don't execute JavaScript (all API/agent requests) - Lack browser fingerprints (TLS, headers, cookies) - Come from cloud/datacenter IP ranges This means **every agent-facing endpoint** is potentially blocked: [MCP](/kb/mcp), [OpenAPI](/kb/openapi), [llms.txt](/kb/llms-txt), x402.json, payment gates, etc. ## How to fix it ### Option 1: Bypass challenge for API paths (recommended) In Cloudflare's WAF rules, create a rule that skips the managed challenge for agent-facing paths: **Expression:** ``` (http.request.uri.path matches "^/\.well-known/.*" or http.request.uri.path matches "^/api/.*" or http.request.uri.path eq "/mcp" or http.request.uri.path eq "/openapi.json" or http.request.uri.path eq "/llms.txt" or http.request.uri.path eq "/agents.txt" or http.request.uri.path eq "/skills.json" or http.request.uri.path eq "/robots.txt") ``` **Action:** Skip → Managed Challenge This keeps bot protection on your HTML pages while allowing agents to reach machine-facing endpoints. ### Option 2: Allowlist specific User-Agents Create a WAF rule that skips the challenge for known agent User-Agents: ``` (http.user_agent contains "AgentGrade" or http.user_agent contains "Claude" or http.user_agent contains "GPTBot") ``` ### Option 3: Use Cloudflare's Bot Management tiers Cloudflare Enterprise and Business plans offer more granular bot management that can distinguish between "good bots" (API clients, agents) and malicious bots. ## Verifying the fix After updating your Cloudflare rules, scan your site again on AgentGrade. Previously blocked checks should now show pass/fail results instead of "Blocked by Cloudflare." ## Related - [WebMCP](/kb/webmcp) - [SKILL.md](/kb/skills) - [A2A](/kb/a2a) --- ### Comparing Payment Protocols > x402 vs MPP vs L402 — when to use each machine payment protocol. Source: https://agentgrade.com/kb/comparing-payment-protocols ## Overview Three payment protocols let AI agents pay for API access. Each has different trade-offs: | | [x402](/kb/x402) | [MPP](/kb/mpp) | [L402](/kb/l402) | |---|---|---|---| | **Network** | Base (Ethereum L2) | Tempo | Bitcoin Lightning | | **Currency** | USDC | pathUSD | BTC (satoshis) | | **Speed** | ~2 seconds | Sub-second | Milliseconds | | **Fees** | Low (L2 gas) | Very low | Very low | | **SDK** | @coinbase/x402-express | mppx | Custom (LND/CLN) | | **Facilitator** | Coinbase | Tempo network | Lightning node | | **Stablecoin** | Yes (USDC) | Yes (pathUSD) | No (BTC volatility) | ## When to use x402 **Best for:** Production services that want the broadest ecosystem support. - Backed by Coinbase with official SDKs in TypeScript, Go, and Python - USDC stablecoin means predictable pricing - Base L2 keeps gas fees low - Largest growing ecosystem of x402-enabled services - Includes Bazaar discovery for service catalogs ## When to use MPP **Best for:** High-frequency micropayments where speed matters. - Sub-second finality on the Tempo chain - Designed specifically for machine-to-machine payments - pathUSD stablecoin (1:1 with USD) - Simple SDK (mppx) with Express middleware - Lowest overhead per transaction ## When to use L402 **Best for:** Bitcoin-native services and Lightning ecosystem integration. - Instant settlement via Lightning Network - No stablecoin — payments in satoshis (BTC) - Macaroon-based auth tokens enable flexible access control - Established ecosystem (since 2020, originally "LSAT") - Requires running or connecting to a Lightning node ## Can I support multiple protocols? Yes. AgentGrade checks for all three independently. Supporting multiple protocols gives agents more payment options. The agent chooses which to use based on what wallets/funds it has available. Publish all supported protocols in your `/.well-known/x402.json` service catalog so agents can discover them. ## Which should I start with? If you're unsure, **start with x402**. It has the most complete SDK, Coinbase backing, and stablecoin pricing. Add MPP or L402 later if your use case benefits from their specific strengths. ## The commerce layer above the rails The protocols above answer "how does an agent *pay*?" A second family answers "how does an agent *shop*?" — carts, offers, order handoff, checkout. They sit a layer up and delegate the actual money movement to rails like the ones on this page. - **UCP (Universal Commerce Protocol)** — co-developed by Google, Shopify, Etsy, Wayfair, Target, and Walmart (announced January 2026; spec at [ucp.dev](https://ucp.dev/)). JSON over REST and JSON-RPC, with A2A and MCP transports, and discovery via a `/.well-known/ucp` manifest. It powers Google's Universal Cart across Search, Gemini, and YouTube; Shopify's UCP-based agent layer has been self-serve for developers since June 2026. - **ACP (Agentic Commerce Protocol)** — maintained by OpenAI and Stripe ([agenticcommerce.dev](https://www.agenticcommerce.dev/), Apache 2.0, beta). It defines product feeds for discovery plus a checkout API; payment is delegated via Stripe-developed Shared Payment Tokens — PSP-agnostic by design, Stripe first. Note the trajectory: OpenAI pulled back in-chat Instant Checkout in March 2026 ("the initial version… did not offer the level of flexibility that we aspire to provide"), refocusing ACP on product discovery with merchant-owned checkout; the checkout spec remains published and gated to approved partners. - **AP2 (Agent Payments Protocol)** — the authorization layer: tamper-proof, cryptographically signed *mandates* proving a human authorized an agent's purchase. Announced by Google in September 2025 with 60+ partners and donated to the FIDO Alliance in April 2026, where two working groups (chaired by CVS Health, Google, and OpenAI; Mastercard and Visa) are standardizing it. AP2 is an extension of A2A and UCP and is payment-method-agnostic — cards first, crypto via the A2A x402 extension. As of mid-2026 it is a spec with broad endorsement and no publicly named production deployment. The layering matters when you plan: a 402 rail (this page) makes you *payable* today with a few endpoints; UCP/ACP integration is a platform decision that mostly applies to catalog commerce; AP2 is the trust layer arriving underneath both. What AgentGrade verifies on the wire is the rail layer — a live, decodable payment challenge — because that is the part any site can ship independently. ## Related - [OpenAPI](/kb/openapi) --- ### About Scanning > How AgentGrade scans sites, what data it collects, and how to opt out. Source: https://agentgrade.com/kb/about-scanning ## How AgentGrade scans your site AgentGrade is a diagnostic tool — like SSL Labs for agent-readiness. When someone enters a domain, we send a small set of targeted HTTP requests to check what agent-facing capabilities the site exposes. ### What we check - **~15-20 requests** to well-known paths (`/.well-known/x402.json`, `/openapi.json`, `/robots.txt`, etc.) - **HTTP headers** on responses (Payment-Required, WWW-Authenticate, Content-Type) - **Machine-readable config files** (MCP manifests, AI plugin manifests, skills.json) - **Identity endpoints** (WebFinger, DID, Nostr NIP-05, AT Protocol) ### What we don't do - **No crawling.** We don't follow links or discover new URLs. - **No content indexing.** We never read, store, or index page content. - **No authentication bypass.** We only check publicly accessible endpoints. - **No continuous scanning.** Every scan is user-initiated. No autonomous traversal. ## Data we store We store scan **metadata only**: the score, which capabilities were found, and which payment protocols were detected. We do not store page content, response bodies, or any sensitive data from the scanned site. ## Rate limits - Each domain can only be scanned **once per hour** - Individual users are rate-limited to prevent abuse - Each scan sends ~15-20 requests over ~10 seconds ## Our User-Agent All requests from AgentGrade identify themselves with: ``` AgentGrade/0.2 (+https://agentgrade.com/kb/about-scanning) ``` ## Does AgentGrade respect [robots.txt](/kb/robots-txt)? robots.txt is a standard for search engine crawlers that systematically discover and index content. AgentGrade is a site auditor, not a crawler — it doesn't index or store your content. We read your robots.txt to **grade** it, not to obey crawling directives. This is the same approach used by Lighthouse, SecurityHeaders.com, and SSL Labs. ## How to opt out You can block AgentGrade by filtering the User-Agent `agentgrade` in your firewall or WAF. However, since AgentGrade only checks machine-facing configuration that you've intentionally made public, blocking it means you lose visibility into how agents perceive your site. ## Questions? If you have questions about how AgentGrade scans your site, open an issue on [GitHub](https://github.com/aluminumio/agentgrade). ## Related - [SKILL.md](/kb/skills) - [OpenAPI](/kb/openapi) - [A2A](/kb/a2a) - [WebMCP](/kb/webmcp) - [llms.txt](/kb/llms-txt) --- ### x402 — HTTP Payment Protocol > The HTTP 402 payment protocol that lets agents pay per-request with USDC on Base. Specification, comparison with traditional API monetization, ecosystem, and how to implement. Source: https://agentgrade.com/kb/x402 ## What is x402? x402 turns the HTTP 402 `Payment Required` status code into a real payment protocol. When an agent hits a paid endpoint, the server returns a 402 response with a `Payment-Required` header containing structured payment instructions. The agent (or its wallet) inspects the header, decides whether the price is acceptable, pays on-chain, attaches the receipt to a retry, and receives the response. Conceptually, x402 finally completes the HTTP 402 status code that has sat unused in the HTTP spec since 1996 — the spec reserved the code for "Payment Required" but never specified *how* a client should pay. x402 specifies the mechanism: USDC on Base, signed payment intents, facilitator-mediated settlement, and a discovery format so agents can find paid endpoints before calling them. ## Why x402 matters Traditional API monetization is built for humans: sign up, generate an API key, manage a credit card on file, get a monthly invoice. Every step requires a UI, an account, and an out-of-band relationship between the API provider and the developer. Autonomous agents don't have those things. An agent calling a paid API for the first time needs to: - Discover the price *before* committing - Pay programmatically, without human approval - Settle the transaction in seconds, not days - Receive a receipt the API provider can verify x402 addresses all four with a single mechanism. The price is in the 402 header. The payment is a signed transaction on Base. Settlement is sub-second. The receipt is the on-chain confirmation. This makes x402 the foundational payment primitive for the agentic web — analogous to what TLS was for the commercial web, or OAuth for delegated authorization: a protocol that turns something previously human-mediated into something machines can negotiate end-to-end. ## How it works 1. Agent sends a request to a paid endpoint 2. Server returns **HTTP 402** with a base64-encoded `Payment-Required` header 3. The header contains: amount, asset (USDC), network (Base), recipient wallet, and facilitator 4. Agent pays via the facilitator (e.g., Coinbase) 5. Agent retries the request with a `Payment` header containing the receipt 6. Server verifies the payment through the facilitator and serves the response The whole flow takes a few seconds end-to-end. No API keys. No subscriptions. No human in the loop. ## x402 vs traditional API monetization | Aspect | API keys + subscription | x402 | |---|---|---| | Signup | Account creation required | None | | Authentication | Per-account API key | Per-request payment | | Billing model | Monthly subscription | Pay-per-request | | Discovery | Out-of-band (docs, sales) | In-protocol (402 header) | | Settlement | Invoice cycle (~30 days) | Sub-second (on-chain) | | Failure mode | Quota exceeded → 429 | Payment insufficient → 402 | | Agent compatibility | Hard (account management) | Native | | Geographic limits | Common (Stripe restrictions) | Minimal (on-chain) | The key shift: x402 puts pricing into the protocol itself, where any agent can read it. With API keys, the price exists only in a contract negotiated between humans. With x402, the price is in the HTTP response, the same way the status code is — first-class transport metadata, not paperwork. ## Key concepts - **Facilitator**: A service that verifies and settles payments. Set `"facilitator": "coinbase"` in your x402.json to use Coinbase's facilitator on Base mainnet. Other facilitators can support different networks and assets. - **Envelope versions**: v1 carries the payment challenge as the JSON body of the 402 response; v2 moves it into a base64-encoded `PAYMENT-REQUIRED` header and adds structured service catalogs, Bazaar discovery, and richer payment options. The spec ships both — and AgentGrade’s scanner still observes v1 JSON bodies across deployed services — so decode both when building a client. - **Network**: Payments happen on Base (`eip155:8453`) using USDC. The USDC contract on Base is `0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913`. Multi-network support is on the roadmap. - **Per-request pricing**: Each API call has its own price — no subscriptions, no tiered plans, no API keys. - **Discoverable services**: Mark services with `"discoverable": true` to appear in the [x402 Bazaar](/kb/bazaar) — a catalog of paid endpoints that agents browse to find capabilities. ## Who's using x402 The x402 ecosystem has formed around two anchors: - **Coinbase Developer Platform** — the protocol originator. Ships official SDKs in TypeScript, Go, and Python; runs the canonical facilitator on Base mainnet. - **Tempo [MPP](/kb/mpp)** — the Paradigm and Stripe-backed payment proxy. Tempo runs `*.mpp.tempo.xyz` proxies that translate between x402 and traditional payment rails for sites that haven't natively implemented x402. Beyond those anchors, individual API providers, agent runtimes, and [MCP](/kb/mcp) server operators are integrating x402 for per-call billing — paid MCP tools, metered data APIs, AI inference endpoints, and agent marketplaces. AgentGrade's x402 Bazaar discovery catalogs paid endpoints across the agentic web as they go live. ## How to add x402 to your service ### 1. Install the SDK ```bash npm install @coinbase/x402-express ``` ### 2. Add middleware to your Express app ```javascript import { paymentMiddleware } from '@coinbase/x402-express'; app.use('/api/paid-endpoint', paymentMiddleware({ payTo: '0xYourWalletAddress', amount: '100000', // 0.10 USDC (smallest unit) network: 'base', facilitator: 'coinbase', })); ``` ### 3. Publish discovery file Serve `/.well-known/x402.json` so agents can find your paid endpoints: ```json { "x402Version": 2, "name": "Your Service", "network": "base", "facilitator": "coinbase", "payTo": "0xYourWalletAddress", "services": [{ "method": "POST", "path": "/api/paid-endpoint", "amount": "100000", "discoverable": true }] } ``` ### 4. Test the flow ```bash curl -i https://your-domain.com/api/paid-endpoint # Expect: HTTP/1.1 402 Payment Required # Expect: Payment-Required: ``` Decode the `Payment-Required` header (base64 → JSON) and confirm amount, asset, recipient, and facilitator match your middleware configuration. ## Common errors and debugging - **402 with no Payment-Required header**: Middleware not configured. Confirm `payTo` and `amount` are set on the middleware call. - **Payment header rejected**: Receipt is for the wrong amount, wrong asset, or expired. Most facilitators reject receipts older than a few minutes. - **Wallet address mismatch**: `payTo` in middleware doesn't match the receipt's recipient. Must match exactly. - **Network mismatch**: Receipt is on a different chain than declared. Confirm `network` is `base` in both middleware and x402.json. - **Facilitator unreachable**: The facilitator service is down. Use a fallback facilitator or fail open during outages. AgentGrade's scanner probes these directly — its x402 check verifies live 402 responses parse cleanly and that the discovery file matches what endpoints actually return. ## FAQ ### Is x402 a blockchain protocol or an HTTP protocol? Both. The transport is HTTP (a 402 status with structured headers). The settlement is on-chain (USDC on Base). x402 is the bridge — the protocol that lets HTTP servers and HTTP clients negotiate a payment that gets settled by a blockchain. ### Do I need a crypto wallet to accept x402 payments? Yes. You need a Base wallet to receive USDC. Coinbase's CDP makes this manageable for non-crypto-native teams — you can provision a custodied wallet via API and never touch keys yourself. ### What's the difference between x402 and Stripe? Stripe is the dominant traditional rail: per-account API keys, monthly subscriptions, fraud detection trained on human buyers. x402 is per-request, agent-native, and settles on-chain. They're complementary — Stripe for human checkout, x402 for agent metered access. Tempo MPP bridges between them for sites that want both. ### Is x402 production-ready? Yes. The protocol is stewarded by the x402 Foundation under the Linux Foundation (operational since July 2026), with official SDKs in TypeScript, Go, and Python. The canonical facilitator runs in production, Cloudflare has opened the waitlist for its x402 Monetization Gateway, and Amazon Bedrock AgentCore Payments (preview) handles x402 negotiation as a managed service. ### Can agents pay each other with x402, not just API providers? Yes. x402 doesn't care whether the "server" is a human-run API, an agent, or an MCP tool. Any HTTP responder can return a 402 and any HTTP requester can pay. Agent-to-agent metered work is one of the most active use cases. ### Why USDC and not ETH? Stable. Predictable price. Most API providers price in dollars and want a dollar-stable asset for settlement; volatile assets create accounting friction that defeats the per-request model. ### What happens if the agent doesn't have funds? The wallet returns insufficient-funds and the call fails. There's no retry-buy-credits flow in the protocol itself — funding is the wallet's concern, not the API's. ### How discoverable are x402 endpoints? Endpoints marked `"discoverable": true` in your x402.json appear in the x402 Bazaar — the public catalog of paid services. Agents browse the Bazaar the way developers browse npm. AgentGrade's scanner walks the Bazaar to surface paid endpoints across the agentic web. ## Spec maturity **Production-ready, foundation-governed.** Coinbase donated x402 to the x402 Foundation, which launched operationally under the Linux Foundation in July 2026 with about 40 member organizations — premier members include Visa, Mastercard, Stripe, Google, AWS, Cloudflare, and Shopify. The canonical repository now lives at github.com/x402-foundation/x402 (coinbase/x402 continues as a development fork). The spec documents v2’s header transport as current while still shipping the v1 body transport. Chainalysis counted over 100 million x402 agentic payments on Base in the protocol’s first year, and platform-level support is arriving: Cloudflare’s Monetization Gateway (waitlist) and Amazon Bedrock AgentCore Payments (preview) both speak x402 natively. ## Learn more - [x402.org](https://www.x402.org/) — Protocol specification and whitepaper - [Coinbase x402 docs](https://docs.cdp.coinbase.com/x402/docs/welcome) — SDK and integration guide - [x402 npm package](https://www.npmjs.com/package/@coinbase/x402-express) — Express middleware - [Agent Readiness](/agent-readiness) — How x402 fits in the broader agent-readiness landscape ## Related - [OpenAPI](/kb/openapi) - [A2A](/kb/a2a) --- ### MPP — Machine Payment Protocol > Micropayment protocol using pathUSD on the Tempo network for sub-second agent payments. Source: https://agentgrade.com/kb/mpp ## What is MPP? MPP (Machine Payment Protocol) is a micropayment system built for AI agents. It uses pathUSD on the Tempo blockchain for near-instant, low-fee payments. Agents pay per API call using the mppx SDK. ## How it works 1. Agent sends a request to a paid endpoint 2. Server returns **HTTP 402** with a `WWW-Authenticate: Payment` header 3. The header contains: realm, amount, recipient, and network details 4. Agent pays using the mppx SDK 5. Agent retries with payment proof 6. Server verifies and responds ## Key concepts - **pathUSD**: A stablecoin on the Tempo chain (1 pathUSD = 1 USD) - **mppx**: The CLI and SDK for making and receiving MPP payments - **Sub-second finality**: Payments confirm almost instantly - **Low fees**: Designed for micropayments (fractions of a cent) ## How to add MPP to your service ### 1. Install mppx ```bash npm install mppx ``` ### 2. Create a wallet ```bash npx mppx account create npx mppx account fund # for testnet ``` ### 3. Add Express middleware ```javascript import { mppMiddleware } from 'mppx'; app.use('/api/paid-endpoint', mppMiddleware({ amount: 0.01, // in USD })); ``` ### 4. Set environment variables ```bash MPP_SECRET_KEY=your_secret_key MPP_RECIPIENT_ADDRESS=your_wallet_address ``` ## Spec maturity **Production-ready.** Live on the Tempo network with active services including AgentNews. ## Learn more - [mppx on npm](https://www.npmjs.com/package/mppx) — SDK, CLI, and Express middleware ## Related - [OpenAPI](/kb/openapi) --- ### What Is an AI Agent? > What an AI agent is, how it differs from a bot or a crawler, and what it needs from your website to actually work. Source: https://agentgrade.com/kb/what-is-an-agent ## The definition An **AI agent** is software that uses a large language model to plan and execute actions on a user's behalf — running searches, calling APIs, comparing prices, filling orders, making payments. The defining trait is not intelligence but *delegation*: a human states a goal, and the agent decides which sites to visit, which tools to call, and when the job is done. That makes an agent a fundamentally different visitor from anything the web was built for. It does not browse — it *uses*. It has no eyes for your design, no patience for your clickflow, and a hard timeout where a human would wait. ## Agent vs. bot vs. crawler The three words get used interchangeably; they describe different machines: | | Crawler | Bot | Agent | |---|---|---|---| | Drives itself by | A schedule and a URL frontier | A fixed script | A goal and a plan | | Works for | An index or dataset | Whoever wrote the script | One user, right now | | Visits your site | Broadly and repeatedly | Wherever the script says | Only if you're useful to the task | | Example | GPTBot, ClaudeBot | A price-monitoring script | ChatGPT booking a table | The confusion is understandable because the same vendors run all three. OpenAI operates a training crawler (GPTBot), a search-index crawler (OAI-SearchBot), *and* the live fetcher its agents use (ChatGPT-User) — three tiers with separate robots.txt tokens and separate behavior. [The robots.txt guide](/kb/robots-txt) explains the tier model; [the user-agent reference](/agents) documents every bot in it. ## The anatomy of an agent Four parts, each of which meets your website differently: - **The planner** — the LLM itself. It never touches your server; it only sees what the other parts bring back. - **The tools** — how the agent acts. If your site exposes an [MCP server](/kb/mcp) or an [OpenAPI spec](/kb/openapi), the agent can call your capabilities directly instead of scraping pages. - **The fetcher** — the HTTP client that actually hits your server. This is where [content negotiation](/kb/content-negotiation) happens: a fetcher that asks for `text/markdown` and gets clean markdown ingests your content in one pass. - **The wallet** — how the agent pays. A machine-readable [402 payment challenge](/kb/comparing-payment-protocols) is the difference between an agent buying from you and an agent recommending your competitor. ## What an agent needs from your website An agent completes a task on your site exactly as far as your machine-readable surface lets it. The layers, in the order an agent encounters them: discovery files ([llms.txt](/kb/llms-txt), agent-aware [robots.txt](/kb/robots-txt)) so it can orient; callable capabilities ([MCP](/kb/mcp), [OpenAPI](/kb/openapi)) so it can act; [content negotiation](/kb/content-negotiation) so it can read; and a [payment path](/kb/comparing-payment-protocols) so it can transact. That stack is what [agent readiness](/agent-readiness) measures. ## What agent traffic looks like in your logs Less obvious than you'd expect. Some of it announces itself — the named user-agents documented in [the reference](/agents), verifiable against published IP ranges. But a large share arrives anonymously: coding agents and desktop assistants fetch from the *user's own machine*, so the request comes from a residential IP with a generic client string like `curl` or a plain browser UA. If your logs show growing traffic from generic clients that fetch one page and never load assets, that is often agent traffic you cannot attribute. Blocking it blocks the humans who sent it. ## FAQ ### Is ChatGPT an AI agent? ChatGPT is an assistant that *contains* agents. When it only converses, it isn't acting as one; when it searches the web, fetches your page, or completes a checkout on a user's behalf, that is agent behavior — and it arrives at your server as ChatGPT-User or an agent-mode fetcher. ### Is an AI agent the same as a chatbot? No. A chatbot converses; an agent acts. The test is whether the software takes real-world actions (fetching, calling APIs, transacting) in pursuit of a goal, not whether it talks. ### Do AI agents render JavaScript? Mostly no. Most fetchers read the raw HTTP response and never execute scripts, so content that only exists after JavaScript runs is invisible to them. See [JavaScript rendering](/kb/javascript-rendering). ### How do I know whether agents visit my site? Check your access logs against the named tokens in [the user-agent reference](/agents), and watch for the anonymous pattern: generic client strings, residential IPs, single-page fetches with no asset loads. Then [scan your site](/) to see what those visitors can actually do once they arrive. ## Related - [How AI agents actually browse the web](/kb/how-ai-agents-browse) - [Agent readiness: the definitive guide](/agent-readiness) - [AI agent user-agents: the reference list](/agents) --- ### How AI Agents Actually Browse the Web > How ChatGPT, Perplexity, and Gemini retrieve and process web content — and what it means for your site. Source: https://agentgrade.com/kb/how-ai-agents-browse ## The problem with assumptions Most website optimization assumes a visitor fetches your page via HTTP, sees the headers, follows redirects, and renders HTML. AI agents break every one of these assumptions. ## ChatGPT ChatGPT's browsing tool fetches pages live via HTTP, but the model never sees the raw response: - **Text extraction only** — HTML is stripped to a bounded plain-text extract before the model sees it (the exact budget is undocumented; community tests have measured a few thousand tokens) - **No headers** — the model never knows Content-Type, status codes, or redirects - **SearchGPT intermediate** — a secondary model checks for prompt injection before content reaches the main model - **Agent Mode** uses a fake Chrome UA (`Chrome/138.0.0.0`) and identifies via RFC 9421 cryptographic signatures, not User-Agent **What this means:** Content negotiation works silently (the tool layer handles it), but the model only sees the extracted text. Serve clean, structured text and your content will be more useful to ChatGPT. ## Perplexity Perplexity uses a multi-stage retrieval pipeline: - **Stealth crawlers** — 3-6 million requests/day with generic Chrome UAs and rotating IPs, not `PerplexityBot` - **Hybrid ranking** — BM25 keyword matching + vector similarity to find relevant passages - **Atomic span retrieval** — extracts specific text spans rather than full pages - **Separate index** — maintains its own crawled index alongside web search results **What this means:** Your `robots.txt` rules for `PerplexityBot` may not stop their stealth crawlers. Structured content with clear headings helps their span extraction find the right passages. ## Gemini Gemini's most common browsing mode never hits your server at all: - **Index-based** — `url_context` reads from Google's internal index, not live HTTP. When tested, no request appeared in server logs - **Screenshot-based** — Gemini’s agentic browsing modes render the page visually for tasks that need it (press reports say the Project Mariner prototype was folded into Gemini’s agent features in 2026) - **Rejected markdown** — Gemini CLI rejected `Accept: text/markdown` responses in early testing **What this means:** Your site needs to be indexed by Googlebot for Gemini to see it. Adding `` in your HTML ensures Google indexes the [llms.txt](/kb/llms-txt) relationship. JSON-LD structured data also survives the indexing pipeline. ## What to do about it | Action | Helps with | |--------|------------| | Serve `llms.txt` with clean markdown | ChatGPT, Perplexity | | Add `` | Gemini (via Google index) | | Add JSON-LD structured data | Gemini (via Google index) | | Don't block `Google-Extended` in [robots.txt](/kb/robots-txt) | Gemini | | Use RFC 9421 signatures for bot auth | ChatGPT Agent Mode verification | | Serve structured content with clear headings | Perplexity span extraction | ## Learn more - [Dejan.ai: Google's URL Context Tool](https://dejan.ai/blog/googles-new-url-context-tool/) - [Dejan.ai: AI Mode Is Not Live Web](https://dejan.ai/blog/ai-mode-is-not-live-web/) - [Cloudflare: Perplexity Stealth Crawlers](https://blog.cloudflare.com/perplexity-is-using-stealth-undeclared-crawlers-to-evade-website-no-crawl-directives/) - [SeatGeek: Chasing Signature](https://chairnerd.seatgeek.com/chasing-signature/) ## Related - [SKILL.md](/kb/skills) - [OpenAPI](/kb/openapi) - [A2A](/kb/a2a) - [WebMCP](/kb/webmcp) ## The crawler tiers behind the assistants Each assistant above is fed by several distinct bots with separate robots.txt tokens: **training crawlers** (GPTBot, ClaudeBot), **search-index crawlers** (OAI-SearchBot, Claude-SearchBot, PerplexityBot), and **user-initiated fetchers** (ChatGPT-User, Claude-User, Perplexity-User) — and blocking one tier does nothing to the others. The [AI agent user-agent reference](/agents) documents every bot's exact UA string, robots.txt behavior, and IP verification; [the robots.txt guide](/kb/robots-txt) explains the tier model and ships copy-paste allow/block patterns. --- ### SPT — Stripe Shared Payment Tokens > Stripe card payments for AI agents via Shared Payment Tokens and the MPP 402 flow. Source: https://agentgrade.com/kb/spt ## What is SPT? SPT (Shared Payment Token) lets AI agents pay for API calls with Stripe — using real card payments instead of crypto. A user pre-authorizes a token with spending limits, and the agent uses it to pay services autonomously. ## How it works 1. User creates an SPT via Stripe with spending limits (max amount, currency, expiration) 2. Agent sends a request to a paid endpoint 3. Server returns **HTTP 402** with `WWW-Authenticate: Payment method="stripe", intent="charge", request=""` 4. Agent decodes the `request` field to learn the price (amount, currency) 5. Agent retries with `Authorization: Payment ` containing the SPT 6. Server creates a Stripe PaymentIntent using the token, verifies it succeeded, and responds ## Key concepts - **Shared Payment Token**: A scoped, limited-use Stripe token (prefixed `spt_`) that grants an agent permission to spend - **Usage limits**: Each token has max amount, currency, and expiration — the user controls how much the agent can spend - **mppx middleware**: The same middleware that handles [MPP](/kb/mpp) (Tempo) payments also handles SPT — a server can accept both - **Multiple challenges**: A 402 response can include multiple `WWW-Authenticate: Payment` headers for different methods (tempo, stripe), letting agents choose how to pay ## How agents discover SPT SPT uses two discovery channels: 1. **Runtime (authoritative)**: The HTTP 402 response with `method="stripe"` in the `WWW-Authenticate: Payment` challenge 2. **Pre-request (advisory)**: [OpenAPI](/kb/openapi) `x-payment-info` extension on operations that require payment The 402 response is always authoritative — OpenAPI metadata is advisory only. ## How to add SPT to your service 1. Install mppx: `npm install mppx` 2. Configure your Stripe secret key 3. The mppx middleware will return 402 challenges for both Tempo and Stripe methods 4. Agents with an SPT can pay via Stripe; agents with pathUSD can pay via Tempo ## Learn more - [Stripe SPT docs](https://docs.stripe.com/agentic-commerce/concepts/shared-payment-tokens) — Token creation and usage - [mppx on npm](https://www.npmjs.com/package/mppx) — Middleware that handles both MPP and SPT - [paymentauth.org](https://paymentauth.org) — Payment discovery spec --- ### Does llms.txt Actually Work? > What llms.txt does and does not do in 2026 — the measured fetch rates, Google’s position, and why we still check it. Source: https://agentgrade.com/kb/does-llms-txt-work ## The honest answer Mostly no — and partly yes, for a narrower job than the hype claims. [llms.txt](/kb/llms-txt) does not influence search rankings, does not make AI assistants cite you, and is barely fetched at all today. What it does is cheap, useful packaging for the agents that *do* read it — and for that job it still earns a place in your root directory. A scanner that checks llms.txt owes you the unvarnished version, so here it is, sourced. ## What the data says [Ahrefs measured 137,210 domains](https://ahrefs.com/blog/llmstxt-study/) with live traffic in May 2026 and classified every request to their `/llms.txt` files. **97% of the files received zero requests — nothing fetched them at all.** Among the ~3% that got any traffic, 96% of requests came from bots of all kinds, and all AI-bot categories combined accounted for about a fifth of that already-tiny volume. That matches what the vendors say — or rather, don't: **no AI vendor has published a statement that its crawlers consume third-party llms.txt.** The companies most associated with the file — Mintlify, Yoast, Rank Math, Shopify — are all *generators* of it, not consumers. ## Google's position Google has been unusually direct. In April 2025, John Mueller compared llms.txt to the keywords meta tag: "none of the AI services have said they're using llms.txt — and you can tell when you look at your server logs that they don't even check for it." In June 2026 he called its value "purely speculative for now." That month, [Google's Search Central changelog](https://developers.google.com/search/updates) added formal guidance: Google Search does not use llms.txt — it neither helps nor harms rankings. And yet, the same company's Lighthouse now ships an [Agentic Browsing audit category](https://developer.chrome.com/docs/lighthouse/agentic-browsing/llms-txt) that checks your llms.txt. The two positions aren't contradictory — they draw the same line we do: **llms.txt is not a search signal; it is agent infrastructure.** ## What llms.txt is still good for - **The agents that fetch on demand.** A user-directed agent landing on your site can grab one file and learn what you offer, which endpoints exist, and where the machine-readable surfaces are — instead of crawling and guessing. That works today; it just isn't *proactive* consumption. - **A cross-reference hub.** The highest-value lines in an llms.txt point at your [MCP endpoint](/kb/mcp), [OpenAPI spec](/kb/openapi), and payment discovery files — things an agent cannot reliably find otherwise. This is what AgentGrade's llms.txt checks actually score. - **It costs ten minutes.** The asymmetry matters: near-zero cost, real (if narrow) benefit, and free insurance against the ecosystem maturing around it. ## What we score — and don't AgentGrade scores llms.txt as an **agent-usability signal**: does it exist, does it parse, does it give an agent navigable structure and cross-references. We have never scored it as an SEO or citation lever, because there is no evidence it is one. If a vendor sells you llms.txt as a rankings play, the numbers above are your counterargument. ## FAQ ### Does llms.txt help SEO? No. Google's documented position is that Search does not use it — it neither helps nor harms. Its purpose is agent usability, not rankings. ### Do ChatGPT or Claude read llms.txt? Neither OpenAI nor Anthropic has published a statement that their systems fetch third-party llms.txt. Both companies publish llms.txt files for their *own* documentation sites — which tells you they consider the format useful packaging, not that their crawlers consume yours. ### Should I still add llms.txt? Yes — because it takes minutes, helps the on-demand agents that do read it, and is the natural home for cross-references to your MCP endpoint, OpenAPI spec, and payment files. Validate it with [the llms.txt validator](/tools/llms-txt-validator). ### Why does AgentGrade check it if nobody fetches it? Because our score measures whether an agent that arrives *can* use your site, not how many arrive. A parseable llms.txt with real cross-references measurably shortens an agent's path to your capabilities — that's the claim we score, and the only one. ## Related - [llms.txt — the full guide](/kb/llms-txt) - [AGENTS.md vs llms.txt](/kb/agents-md-vs-llms-txt) - [What is an AI agent?](/kb/what-is-an-agent) --- ### L402 — Lightning Payments > Bitcoin Lightning Network payments for API access using macaroons and invoices. Source: https://agentgrade.com/kb/l402 ## What is L402? L402 (formerly LSAT) uses Bitcoin's Lightning Network for instant API payments. The server issues a macaroon (a bearer token) paired with a Lightning invoice — once the agent pays the invoice, the macaroon becomes valid. ## How it works 1. Agent sends a request to a paid endpoint 2. Server returns **HTTP 402** with `WWW-Authenticate: L402 macaroon="...", invoice="..."` 3. Agent pays the Lightning invoice 4. Agent retries with the paid macaroon as proof (`Authorization: L402 macaroon:preimage`) 5. Server verifies the macaroon and responds ## Key concepts - **Macaroon**: A cryptographic bearer token that becomes valid once its paired invoice is paid - **Lightning invoice**: A one-time BOLT11 payment request on Bitcoin's Lightning Network - **Preimage**: The proof-of-payment revealed when a Lightning invoice is settled - **Instant settlement**: Lightning payments confirm in milliseconds - **Bitcoin-native**: Payments are in satoshis (1 sat = 0.00000001 BTC) ## How to add L402 to your service 1. Run a Lightning node (LND, CLN) or use a Lightning Service Provider 2. For each paid request, generate a macaroon + Lightning invoice pair 3. Return 402 with `WWW-Authenticate: L402 macaroon="", invoice=""` 4. On retry, verify the macaroon and check the invoice preimage ## Spec maturity **Established.** Originally developed by Lightning Labs as LSAT, renamed to L402. Used in production by multiple Lightning-powered APIs. ## Learn more - [L402 spec](https://docs.lightning.engineering/the-lightning-network/l402) — Lightning Labs documentation - [Aperture](https://github.com/lightninglabs/aperture) — L402 reverse proxy by Lightning Labs ## Related - [OpenAPI](/kb/openapi) --- ### x-payment-info — OpenAPI Payment Discovery > Pre-request payment discovery via OpenAPI extensions so agents know pricing before triggering a 402. Source: https://agentgrade.com/kb/x-payment-info ## What is x-payment-info? `x-payment-info` is an [OpenAPI](/kb/openapi) extension that tells agents which endpoints cost money and how much — before they make a request. Instead of triggering a 402 to learn the price, agents can read the OpenAPI spec upfront. ## How it works Add the extension to any paid operation in your `/openapi.json`: ```json { "paths": { "/api/v1/submit": { "post": { "x-payment-info": { "authMode": "payment-required", "protocols": [ { "mpp": { "method": "tempo", "intent": "charge" } }, { "mpp": { "method": "stripe", "intent": "charge" } }, { "[x402](/kb/x402)": {} } ], "price": { "mode": "fixed", "amount": "0.50", "currency": "USD" } } } } } } ``` ## Key concepts - **Advisory, not authoritative**: The 402 response is always the source of truth. `x-payment-info` helps agents plan, but runtime challenges override it. - **Protocol-agnostic**: Lists all accepted payment methods (Stripe, Tempo, x402) so agents can choose. - **Pricing modes**: `fixed` (exact price) or `dynamic` (min/max range, e.g., bidding). - **Cache-friendly**: Recommended `Cache-Control: max-age=300` on the OpenAPI spec. ## Why it matters Without `x-payment-info`, agents must hit every endpoint to discover if it's paid and how much it costs. With it, agents can read the spec once and plan their budget across multiple API calls. ## How AgentGrade checks for it AgentGrade reads your `/openapi.json` and checks if any operation has an `x-payment-info` extension. This is an optional check in the OpenAPI scoring group — it can help your score but won't hurt it if missing. ## Learn more - [paymentauth.org spec](https://paymentauth.org/draft-payment-discovery-00.html) — Payment discovery draft specification --- ### MCP — Model Context Protocol > The open standard for connecting AI assistants to external tools. Spec, transport options, ecosystem, authentication, debugging, and how to implement an MCP server. Source: https://agentgrade.com/kb/mcp ## What is MCP? MCP (Model Context Protocol) is the open standard for connecting AI assistants to external tools, data sources, and services. Your server exposes "tools" — named functions with descriptions and input schemas — and the AI model decides when to call them mid-conversation. Created by Anthropic in late 2024 and now supported by Claude, ChatGPT, IDE plugins, and a growing list of agent frameworks, MCP plays the same role for AI that USB plays for hardware: one cable, any device. ## Why MCP matters Before MCP, every AI assistant connected to every external service through bespoke "plugin" or "function calling" code. Each AI vendor had its own format. Each tool integration had to be re-written per vendor — once for Claude, again for ChatGPT, again for Cursor, again for a custom agent. MCP standardizes the interface. A single MCP server works with every MCP-compatible client. That means: - Tool builders write the integration **once** instead of N times - AI clients pick up new tools the moment they're published, no client update required - Agents can discover, list, and call tools at runtime — no compile-time wiring - Open-source servers can be audited, forked, and self-hosted It's the difference between proprietary printer drivers and the IP standard. The protocol is boring. Standardizing on it unlocks an ecosystem. ## How it works All communication uses **JSON-RPC 2.0** over HTTP POST to a single endpoint (e.g., `/mcp`): 1. Client sends `initialize` to establish the session 2. Server responds with its name, version, and capabilities 3. Client sends `tools/list` to discover available tools 4. Server returns a list of tools with descriptions and input schemas 5. Client sends `tools/call` with a tool name and arguments 6. Server executes the tool and returns the result ## MCP vs alternatives | Aspect | OpenAI function calling | [OpenAPI](/kb/openapi) / Swagger | MCP | |---|---|---|---| | Vendor scope | Single vendor | Vendor-neutral | Vendor-neutral | | Designed for | LLM tool calls | REST APIs | AI agents | | Discovery | Hardcoded in client | Static spec file | Runtime via `tools/list` | | Streaming | Limited | None native | Built-in (SSE / Streamable HTTP) | | Stateful sessions | No | No | Yes (initialize → calls) | | Auth | Client-side keys | API keys, OAuth | OAuth, bearer, custom | | Ecosystem | OpenAI only | Mature, broad | New, growing fast | OpenAPI describes a REST API at design time. MCP describes a *live* tool surface at runtime. The two are complementary — many MCP servers wrap existing OpenAPI services and expose them as agent-callable tools. ## Implementation example ```javascript app.post('/mcp', (req, res) => { const { method, params, id } = req.body; if (method === 'initialize') { return res.json({ jsonrpc: '2.0', id, result: { protocolVersion: '2024-11-05', capabilities: { tools: {} }, serverInfo: { name: 'my-service', version: '1.0' } }}); } if (method === 'tools/list') { return res.json({ jsonrpc: '2.0', id, result: { tools: [{ name: 'search', description: 'Search for items', inputSchema: { type: 'object', properties: { query: { type: 'string' } }, required: ['query'] } }] }}); } if (method === 'tools/call') { const { name, arguments: args } = params; return res.json({ jsonrpc: '2.0', id, result: { content: [{ type: 'text', text: 'Search results...' }] }}); } res.json({ jsonrpc: '2.0', id, error: { code: -32601, message: 'Method not found' }}); }); ``` ## Transport options MCP supports three transports — pick based on where your client runs: - **Streamable HTTP** *(recommended for remote servers)*: Plain HTTP POST to one endpoint. Server returns either a JSON response or an SSE stream for tools that emit progress. Works through CDNs, load balancers, and firewalls. This is what `claude.ai` web and most hosted clients expect. - **SSE (Server-Sent Events)**: Older transport using a long-lived GET for server→client and POST for client→server. Still supported but Streamable HTTP supersedes it for new servers. - **stdio**: Process pipes — the client launches your server as a subprocess and communicates via stdin/stdout. Used by Claude Desktop and CLI agents. Zero network, zero CORS, but the client must be able to run your code locally. If you want one MCP server to work with Claude Desktop *and* the Claude web app *and* ChatGPT *and* Cursor, ship Streamable HTTP. Almost everyone speaks it now. ## CORS — required for browser-based agents A growing class of MCP clients runs *in the browser*: Claude.ai web, ChatGPT browser, browser extensions, and embedded chat widgets. When JavaScript running on `claude.ai` calls `fetch('https://yourdomain.com/mcp')`, the browser does two things on its own: 1. It actually sends the request to your server. 2. It refuses to hand the response back to the JavaScript that asked for it — *unless* your server's response includes an `Access-Control-Allow-Origin` header that names `claude.ai` (or `*`). So without CORS headers, your server runs fine and returns 200, but the MCP client sitting in the browser tab sees a network error and can never read the body. This is the browser protecting users from one site silently making authenticated requests to another. Server-side clients like Claude Desktop or the MCP CLI aren't subject to this — there's no browser policing the response — which is why an endpoint can work in Desktop but fail in the web. To support browser-based MCP clients, send these headers on every `/mcp` response, and handle the OPTIONS preflight: ```javascript app.use('/mcp', (req, res, next) => { res.set('Access-Control-Allow-Origin', '*'); res.set('Access-Control-Allow-Methods', 'GET, POST, OPTIONS'); res.set('Access-Control-Allow-Headers', 'Content-Type, Accept, Authorization'); if (req.method === 'OPTIONS') return res.sendStatus(204); next(); }); ``` ### Wildcard vs specific origin `Access-Control-Allow-Origin: *` is fine for **public, read-only** MCP endpoints. If your MCP endpoint requires authentication or charges for tool calls, return a specific origin (or echo back the request's `Origin` header against an allowlist) and set `Access-Control-Allow-Credentials: true`. Wildcard origins cannot be used together with credentials per the CORS spec. ### Why preflight matters For a "simple" request — a plain `GET` or a `POST` with `Content-Type: text/plain` — the browser just sends it and only the response gets blocked. But MCP uses `POST` with `Content-Type: application/json`, which the browser considers risky enough to *check first*. So before sending the actual POST, the browser sends an `OPTIONS` request asking your server: "Will you accept a POST from this origin with these headers?" If your server doesn't respond to the OPTIONS with a 2xx status and the right CORS headers, the browser cancels the POST entirely — it never reaches your server. That's why CORS middleware has to handle both: the OPTIONS preflight, *and* the actual POST. ## Authentication For public read-only servers, no auth is fine. For private or paid tools, MCP supports: - **Bearer tokens** in the `Authorization` header (simplest) - **OAuth 2.1** with PKCE — the standard for user-delegated access; the MCP spec defines a metadata endpoint at `/.well-known/oauth-authorization-server` so clients can discover your OAuth flow automatically - **Per-request payment** via [x402](/kb/x402) — return HTTP 402 with payment instructions instead of authenticating in advance OAuth is the right default if humans are authorizing on behalf of themselves. Bearer tokens are right for service-to-service. x402 is right when calls are paid and stateless. ## Who's using MCP - **Anthropic Claude** — native MCP client in Claude Desktop, Claude.ai web, and the Claude API - **OpenAI ChatGPT** — added MCP support in 2025 - **IDE integrations** — Cursor, Zed, Windsurf, and JetBrains plugins all speak MCP - **Agent frameworks** — LangChain, LlamaIndex, and most agent SDKs include MCP transports - **Official MCP Registry** at `registry.modelcontextprotocol.io` lists hundreds of public servers - **Smithery** at `smithery.ai` is the largest community-maintained MCP marketplace AgentGrade publishes its own MCP server (`com.agentgrade/mcp-server`) for agents that want to scan sites from inside an MCP-aware client. ## Common errors and debugging - **`Method not found`** (-32601): The client called a method your server doesn't implement. Always return a graceful error for unknown methods rather than throwing. - **CORS preflight fails**: OPTIONS returns 404 or 405. Add the middleware shown above — your server must handle OPTIONS as well as POST. - **Tools list is empty in the client UI**: Your `tools/list` response is well-formed but the client expects a non-empty `tools` array. Confirm at least one tool is registered. - **`Invalid params`** (-32602): The arguments sent by the client don't match your `inputSchema`. Look at the JSON Schema — required fields missing or wrong types are the usual culprits. - **Works in Desktop, fails in the web**: Almost always CORS. The browser blocks the response; server logs show 200s but the client sees nothing. Open the browser devtools network tab to confirm. ## Key concepts - **Tools**: Functions your server exposes (e.g., "search", "create_invoice") - **inputSchema**: JSON Schema describing what arguments each tool accepts - **Resources**: Read-only data your server can hand to the model (files, snippets, query results) - **Prompts**: Reusable prompt templates the server publishes for the client to use - **Streamable HTTP**: The recommended transport — all messages via POST to one endpoint - **SSE**: Server-Sent Events — older transport, kept for backward compatibility ## FAQ ### Is MCP an Anthropic protocol or an open standard? It was created by Anthropic and is published as an open specification. The reference implementations are MIT-licensed. OpenAI, IDE vendors, and agent frameworks have adopted it independently of Anthropic — it is a community standard now, not a single-vendor protocol. ### How is MCP different from OpenAI's function calling? Function calling is a feature of one vendor's API. MCP is a transport-level protocol any client can speak. With function calling, the model and tool definition live inside the same OpenAI request; with MCP, the model lives at the client and the tools live at your server, and they communicate over a defined wire format. ### Should I expose my existing REST API as MCP or just give the AI my OpenAPI spec? Both work, but they target different clients. Models with native MCP support (Claude, Cursor) call tools directly via MCP. Models that read OpenAPI specs need the spec rendered into their prompt or function-call format. If you only have time for one, ship MCP — most agent clients prefer it for runtime discovery. If you already have an OpenAPI spec, wrapping it in an MCP server is a few hundred lines. ### Does MCP require WebSockets? No. The current standard is Streamable HTTP — plain POST to one endpoint, with optional SSE streaming inside. Earlier drafts used WebSockets; that path was abandoned because plain HTTP traverses CDNs, load balancers, and corporate firewalls without configuration. ### Can MCP servers charge for tool calls? Yes. The protocol doesn't include payment, but you can layer x402 on top: have your server return HTTP 402 from `tools/call` until the agent attaches a valid payment receipt. This is one of the most active patterns in the agent ecosystem. ### How do I list my MCP server in the registry? Submit a manifest to [registry.modelcontextprotocol.io](https://registry.modelcontextprotocol.io). Smithery.ai mirrors the registry and adds discovery features. Listing is free and the review queue is short. ### Why is my MCP server slow? The protocol itself is cheap — JSON-RPC over HTTP. Slowness is almost always (a) the tool implementation, or (b) a cold serverless start. Profile the `tools/call` handler before blaming the transport. ### Do I need a separate server per tool, or one server with many tools? One server with many tools is the norm. Group tools by logical service (e.g., all GitHub operations in one server). Clients can connect to multiple servers simultaneously, so splitting only makes sense when permissioning or hosting needs differ. ## Spec maturity **Formal specification.** MCP is maintained by Anthropic with a versioned spec. Current protocol version: `2024-11-05`. Supported natively by Claude, ChatGPT, Cursor, and most agent frameworks. The Streamable HTTP transport is stable and used by every major client. ## Learn more - [modelcontextprotocol.io](https://modelcontextprotocol.io) — Official specification - [MCP TypeScript SDK](https://github.com/modelcontextprotocol/typescript-sdk) — Reference implementation - [Official MCP Registry](https://registry.modelcontextprotocol.io) — Public catalog of MCP servers - [Smithery](https://smithery.ai) — Largest community marketplace - [MDN: CORS](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS) — Cross-Origin Resource Sharing reference - [Agent readiness](/agent-readiness) — How MCP fits into the broader agentic web landscape ## Related - [SKILL.md](/kb/skills) - [A2A](/kb/a2a) - [WebMCP](/kb/webmcp) - [llms.txt](/kb/llms-txt) --- ### Bazaar — Service Discovery > The x402 service catalog that lets agents discover and browse paid API endpoints. Source: https://agentgrade.com/kb/bazaar ## What is Bazaar? Bazaar is the discovery layer for [x402](/kb/x402). It answers: "What can I buy here, and how much does it cost?" Agents browse a structured catalog of services, prices, and input/output schemas at `/.well-known/x402.json`. ## How it works Publish `/.well-known/x402.json`: ```json { "x402Version": 2, "name": "Your Service", "description": "What your service does", "network": "base", "facilitator": "coinbase", "payTo": "0xYourWallet", "services": [ { "method": "POST", "path": "/api/generate", "description": "Generate content", "amount": "100000", "discoverable": true, "outputSchema": { "input": { "type": "http", "method": "POST", "bodyFields": { "prompt": { "type": "string", "required": true } } }, "output": { "type": "json", "schema": { "result": { "type": "string" } } } } } ] } ``` ## Required fields - **x402Version** — Spec version (use `2`; the scanner also accepts `1` — see below) - **name** — Provider name - **network** — Blockchain (e.g., `base`, or the CAIP form `eip155:8453` under v2) - **facilitator** — Settlement provider (e.g., `coinbase`) - **payTo** — Wallet address that receives payments - **services[]** — Array of paid endpoints with `method` and `path` ## v1 vs v2 x402 v2 launched in December 2025 and is the current spec, but v1 servers are still common in the wild. AgentGrade accepts both. Every protocol-level difference: - **Header names**: v1 used `X-`-prefixed headers (`X-PAYMENT` on the retry request, `X-PAYMENT-RESPONSE` on success). v2 drops the `X-` prefix (`PAYMENT-SIGNATURE`, `PAYMENT-RESPONSE`) — the `X-` convention was deprecated by [RFC 6648](https://www.rfc-editor.org/rfc/rfc6648) back in 2012. - **Where the challenge lives**: v1 put the payment challenge in the JSON *body* of the 402 response. v2 moves it into the `PAYMENT-REQUIRED` response header (base64-encoded JSON), freeing the body for a human-readable paywall page. - **`amount` field rename**: v1's `accepts[]` entries used `maxAmountRequired` for the price. v2 renames this to `amount`. - **`resource` shape**: v1 put `resource` (as a string URL), `description`, and `mimeType` inside each `accepts[]` entry. v2 hoists these into a top-level `resource` object with `url`, `description`, and `mimeType` fields — declared once for the whole 402 response instead of duplicated per accepts entry. - **Chain identification**: v1 used free-form strings like `"base"` for the `network` field. v2 standardizes on [CAIP](https://chainagnostic.org/) IDs like `eip155:8453`, so the same field works for non-EVM chains and off-chain rails. - **Dynamic `payTo`**: v1 declared one static recipient per service in the discovery catalog. v2 lets the server compute `payTo` per request — useful for marketplaces routing payments to individual sellers. - **Sessions**: v1 required the full payment dance on every call. v2 adds wallet-controlled sessions (Sign In With X402) — sign once, the server issues a session, subsequent calls skip the handshake. If you're building new, build v2. If you're auditing an existing v1 server, the scanner won't penalize you for being on v1 — but the v2 differences above are real efficiency wins. ## How to return a 402 The discovery catalog above declares *what* you sell. The 402 response is what actually triggers payment when an agent calls a paid endpoint without one. ### v2 form (current spec) The payment challenge goes in the `PAYMENT-REQUIRED` response header as a base64-encoded JSON object. The response body is yours to use however you want — typically a human-readable paywall page. The retry request arrives with the signed payment in the `PAYMENT-SIGNATURE` request header (also base64-encoded JSON). On success, the server may set a `PAYMENT-RESPONSE` header with settlement details. ```javascript app.post('/api/generate', async (req, res) => { if (!req.get('PAYMENT-SIGNATURE')) { const challenge = { x402Version: 2, resource: { url: 'https://yourdomain.com/api/generate', description: 'Generate content from a prompt', mimeType: 'application/json' }, accepts: [{ scheme: 'exact', network: 'base', // or CAIP form: 'eip155:8453' amount: '100000', // smallest units; 6-decimal USDC → $0.10 asset: '0x833589fCD6EDb6E08f4c7C32D4f71b54bdA02913', payTo: '0xYourWalletAddress', maxTimeoutSeconds: 60 }], extensions: { bazaar: { discoverable: true } } }; res.status(402); res.set('PAYMENT-REQUIRED', Buffer.from(JSON.stringify(challenge)).toString('base64')); return res.send('

$0.10 to generate content

'); } // Verify the signature with your facilitator, then run the work. // The @coinbase/x402 SDK handles the verification call for you. res.json({ result: '...' }); }); ``` ### v1 form (legacy, body-based) v1 servers put the challenge in the JSON *body* of the 402 response. The retry request used the `X-PAYMENT` header, and a successful settlement was returned in `X-PAYMENT-RESPONSE`. v1 also uses `maxAmountRequired` instead of v2's `amount`. ```javascript app.post('/api/generate', async (req, res) => { if (!req.get('X-PAYMENT')) { return res.status(402).json({ x402Version: 1, error: 'Payment required to access this resource', accepts: [{ scheme: 'exact', network: 'base', maxAmountRequired: '100000', asset: '0x833589fCD6EDb6E08f4c7C32D4f71b54bdA02913', payTo: '0xYourWalletAddress', resource: 'https://yourdomain.com/api/generate', maxTimeoutSeconds: 60 }] }); } // ...verify the X-PAYMENT signature, then serve the work }); ``` **Heads up — AgentGrade's live-402 check is v2-only.** Our scanner reads the `PAYMENT-REQUIRED` response header to confirm a working paywall. A v1 server that puts its challenge in the body will pass the discovery-catalog check (`/.well-known/x402.json`) but won't score on the live-402 check. If that matters to you, build v2. ### Use the SDK You almost certainly don't want to hand-roll signature verification — call the [`@coinbase/x402`](https://github.com/coinbase/x402) middleware instead. It wraps both response shapes and the facilitator round-trip in one line of Express/Fastify/Hono setup. ## extensions.bazaar in the live 402 header When an agent calls a paid endpoint without payment, your server returns HTTP 402 with a base64-encoded `Payment-Required` header. That header's JSON payload should declare `extensions.bazaar` so agents know this endpoint is part of a discoverable catalog. The JSON payload **before** base64 encoding (v2 form): ```json { "x402Version": 2, "accepts": [ { "scheme": "exact", "network": "base", "amount": "100000", "asset": "0xUSDC...", "payTo": "0xYourWallet", "maxTimeoutSeconds": 60 } ], "extensions": { "bazaar": { "discoverable": true } } } ``` Without `extensions.bazaar`, agents that hit a 402 have no signal that the endpoint is also catalogued at `/.well-known/x402.json` — they may treat it as a one-off paid endpoint instead of part of a browseable service. ## Spec maturity **Part of x402 v2.** Bazaar discovery is defined within the x402 specification. ## Learn more - [x402.org](https://www.x402.org/) — x402 protocol spec (includes Bazaar) ## Related - [OpenAPI](/kb/openapi) - [A2A](/kb/a2a) --- ### OpenAPI — API Specification > Machine-readable API description that tells agents what endpoints exist and how to call them. Source: https://agentgrade.com/kb/openapi ## What is OpenAPI? OpenAPI (originally Swagger) is the dominant specification for describing REST APIs in machine-readable form. An OpenAPI document — typically a JSON or YAML file at `/openapi.json` or `/swagger.json` — enumerates every endpoint, the HTTP verb, the parameters each accepts, the response schema, the authentication scheme, and any custom extensions. The 3.x version is maintained by the OpenAPI Initiative, a Linux Foundation project with contributors from Google, Microsoft, IBM, Postman, SmartBear, and others. For AI agents, OpenAPI is the difference between guessing your API surface and *knowing* it. An agent that can fetch your OpenAPI document has the same first-class affordance a generated SDK gives a human developer: every endpoint, parameter, type, and example, statically discoverable. ## Why OpenAPI matters for agents Agents calling REST APIs face an iteration cost problem. Without a schema, the loop is: guess the endpoint → call it → parse the error → guess the parameter shape → call it again → parse the next error. Three to five round-trips per endpoint is typical, and the agent burns tokens and clock time on each failed call. With OpenAPI, the agent can: - **Pick the right endpoint** by reading the `summary` and `description` fields against the user's intent. - **Construct a valid request the first time** by reading the parameter schema, including required fields, types, and enums. - **Parse responses correctly** by binding to the response schema rather than improvising regex. - **Discover authentication** from the `securitySchemes` object — including [x402](/kb/x402) payment requirements via the `x-payment-info` extension AgentGrade looks for. Agents that find OpenAPI on a site succeed on the first call at a measurably higher rate than agents that have to scrape docs. This is why a published OpenAPI spec is one of the highest-weighted checks AgentGrade runs on API-bearing sites. ## How OpenAPI works OpenAPI is a JSON or YAML document. It opens with metadata (`info`, `servers`), then enumerates every path under `paths`, then declares reusable schemas under `components`. Tools read it via HTTP fetch — no SDK or parser required beyond standard JSON handling. A minimal valid OpenAPI 3.0 document: ```json { "openapi": "3.0.3", "info": { "title": "Catalog API", "version": "1.0.0", "description": "Search the product catalog and place orders." }, "servers": [ { "url": "https://api.example.com" } ], "paths": { "/search": { "get": { "summary": "Search the product catalog", "parameters": [ { "name": "q", "in": "query", "required": true, "schema": { "type": "string" }, "description": "Search query string" } ], "responses": { "200": { "description": "Search results", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/Product" } } } } } } } } }, "components": { "schemas": { "Product": { "type": "object", "properties": { "id": { "type": "string" }, "title": { "type": "string" }, "price_usd": { "type": "number" } } } } } } ``` Most web frameworks generate this automatically from route definitions (FastAPI in Python, Hono in TypeScript, Echo in Go, Spring's springdoc-openapi in Java). Hand-authoring is rarely necessary. ## OpenAPI vs other agent-readability layers | Spec | Format | What it answers | Agent uses it for | |---|---|---|---| | **OpenAPI** | JSON/YAML | *Endpoints, parameters, types, auth* | Constructing valid requests | | **[SKILL.md](/kb/skills)** | Markdown + frontmatter | *How to use this service in prose* | Picking which endpoint to call | | **[MCP](/kb/mcp) manifest** | JSON-RPC | *Tools exposed over persistent connection* | Calling the server as a long-lived tool | | **[llms.txt](/kb/llms-txt)** | Markdown | *What is this site* | Triage — is this site relevant? | | **`ai-plugin.json`** | JSON | *Legacy ChatGPT plugin metadata* | Plugin discovery (deprecated) | OpenAPI is the schema-of-record. The other files refer to it; agents validate against it. A site with SKILL.md + OpenAPI gives an agent both the playbook and the formal contract. ## The `x-payment-info` extension OpenAPI supports custom extension fields prefixed with `x-`. AgentGrade looks for an `x-payment-info` object at the operation level that declares whether an endpoint is paid, the price, the protocol ([x402](/kb/x402), [L402](/kb/l402), [MPP](/kb/mpp), [SPT](/kb/spt)), and any payment URL. ```json { "paths": { "/api/order": { "post": { "summary": "Place an order", "x-payment-info": { "required": true, "protocol": "x402", "price_usd": "0.10", "currency": "USDC", "network": "base" } } } } } ``` This makes the paid-endpoint signal machine-checkable without the agent needing to issue a probe request and parse a 402 response. AgentGrade verifies the declared payment info matches a live probe — declared-only without live verification scores lower than declared + verified. ## Who's using OpenAPI OpenAPI is genuinely universal. Major API platforms (Stripe, Twilio, GitHub, Cloudflare, AWS via its OpenAPI generator) publish OpenAPI specs as the canonical reference. Major framework adoptions: - **FastAPI** (Python) — generates OpenAPI from type hints - **Hono** + `zod` — runtime-validated TypeScript routes that emit OpenAPI - **NestJS** (TypeScript) — decorator-driven OpenAPI generation - **Spring Boot** + springdoc — annotation-based OpenAPI for Java - **Echo** + echo-swagger — Go OpenAPI generation - **Rails** + rswag — Ruby OpenAPI generation For agents, the practical effect is that any modern API built in the last five years either has OpenAPI or can have it added with a single dependency. ## How to add OpenAPI to your service 1. **Pick a generator.** If your framework supports automatic OpenAPI generation, use it. Hand-writing is error-prone and goes stale. 2. **Serve it at a stable path.** `/openapi.json` is the conventional location; `/swagger.json` is accepted by most tools. Serving at the root or under `/.well-known/` are both fine. 3. **Set CORS.** Allow agent fetchers to read the document from a browser context: `Access-Control-Allow-Origin: *` on the spec endpoint. 4. **Declare `servers` with the production URL.** Without this, agents construct request URLs against the wrong origin. 5. **Add `description` fields.** Every endpoint, every parameter. Agents read these to pick endpoints and infer semantics. 6. **Declare `x-payment-info`** if any endpoint requires payment. Match it against the live response. 7. **Link from llms.txt or SKILL.md.** Optional but helps agents discover the spec. ## Common errors scanners flag - **Wrong content-type** — the spec is served as `text/html` (often a Swagger UI page) instead of `application/json`. Agents that look for the spec at `/openapi.json` get the UI HTML and fail to parse. - **Stale spec** — the file lists endpoints that no longer exist or omits new ones. Auto-generation prevents this. - **Missing `servers[].url`** — agents that read this field to construct request URLs default to the same origin as the spec, which is often wrong (e.g., spec on `docs.example.com`, API on `api.example.com`). - **No `description` on endpoints** — agents can read the path, but without prose descriptions they cannot reliably pick between similar endpoints. - **Declared `x-payment-info` doesn't match live probe** — claims an endpoint is paid but live request returns 200 without a payment challenge, or claims free but returns 402. - **CORS blocks the fetch** — the spec is served but a missing `Access-Control-Allow-Origin` header prevents browser-context agents from reading it. ## FAQ **What's the difference between OpenAPI and Swagger?** "Swagger" was the original name; in 2015 it was renamed to OpenAPI when donated to the Linux Foundation. SmartBear retains the "Swagger" brand for tools (Swagger UI, Swagger Editor). The spec is OpenAPI; the tooling is often still called Swagger. **Do I need OpenAPI if I have [SKILL.md](/kb/skills)?** Ship both if you have an API. SKILL.md is the "playbook" — prose, agent-readable. OpenAPI is the "contract" — formal, machine-validatable. Agents use SKILL.md to decide which endpoint to call and OpenAPI to construct the call correctly. **Should I serve at `/openapi.json` or `/.well-known/openapi.json`?** `/openapi.json` at the root is the dominant convention. Some agents probe `/.well-known/openapi.json` as a fallback. Serving both is fine. **OpenAPI 3.0 vs 3.1 vs 2.0 — does it matter?** 3.1 is current; 3.0 is fine and widely supported. 2.0 (the original "Swagger 2.0" format) is still recognized but you should migrate. Tools handle all three; agents typically don't care about the version line. **Can I serve OpenAPI for a GraphQL API?** OpenAPI describes REST. For GraphQL, agents introspect the schema directly via the GraphQL endpoint. Some sites publish both an OpenAPI shim and the GraphQL endpoint. **Does AgentGrade penalize sites with declared-only payment info?** Sites with OpenAPI declaring `x-payment-info` but no live verification score positively but below sites where the live probe confirms the declared protocol. Both are better than no signal. **What about `x-mcp-server` or other extensions?** OpenAPI's `x-` prefix is open. AgentGrade currently looks for `x-payment-info` on paid-endpoint declarations. Other agent-relevant extensions may be added as the ecosystem standardizes. **How big can an OpenAPI spec get before agents struggle?** Multi-MB specs are common at large API platforms (Stripe's is ~10MB). Agents generally fetch and parse fine but may not load the full spec into their context — they'll search or chunk. Keep `description` fields concise; that's where most token weight lands. ## Spec maturity **Universal industry standard.** OpenAPI 3.x is maintained by the OpenAPI Initiative under the Linux Foundation. Supported by virtually every API tool, code generator, AI coding assistant, and modern web framework. ## Learn more - [OpenAPI Specification](https://www.openapis.org/) — official spec and docs - [Swagger Editor](https://editor.swagger.io/) — write and validate specs - [SKILL.md](/kb/skills) — companion prose layer for agents - [x402](/kb/x402) — payment protocol that integrates via `x-payment-info` - [Agent Readiness](/agent-readiness) — how OpenAPI fits into the bigger picture --- ### llms.txt — LLM Context File > Plain-text file that explains your service to large language models. Source: https://agentgrade.com/kb/llms-txt ## What is llms.txt? llms.txt is a plain-text Markdown file served at the root of your domain (`/llms.txt`) that describes your service to large language models in human-readable prose. Where [OpenAPI](/kb/openapi) gives machines a structured spec and [robots.txt](/kb/robots-txt) tells crawlers what to fetch, llms.txt gives an LLM the *narrative context* it needs to understand what your service does, when an agent should use it, and which endpoints matter — in the format LLMs already process best. The spec was proposed by Jeremy Howard (fast.ai, Answer.AI) in September 2024. It is intentionally lightweight: no schema validation, no JSON parsing, no versioning. A Markdown file with an H1 heading and a one-line summary. The simplicity is the feature — anyone can author one in five minutes, and any LLM can read it without special tooling. ## Why llms.txt matters LLMs that browse the web have a triage problem. A single page on a modern site can be 200KB of HTML with most of the meaningful text behind JavaScript that the agent's fetcher can't render. Even when the agent can render JS, the signal-to-noise ratio is poor — navigation, ads, cookie banners, and tracking scripts dominate the bytes. llms.txt is the inverse: a single document, plain text, fits in a few KB, leads with what matters. An agent retrieving `https://example.com/llms.txt` gets: - What the service is, in one sentence - The endpoints or pages that matter, listed - Auth/payment rules in prose - Example calls the agent can copy This is the difference between "agent has to figure out your site" and "agent can decide whether your site is relevant in one fetch." For sites that want to be cited by ChatGPT, Claude, Perplexity, or any retrieval-augmented system, llms.txt is the cheapest possible affordance. ## How it works There is no protocol negotiation. Agents request `/llms.txt` the same way they request `/robots.txt`, expect `text/markdown` or `text/plain` back, and parse the Markdown. The file MUST start with an H1 heading; everything else is convention. A minimal valid llms.txt: ```markdown # Your Service Name > One-line description of what the service does. ## Overview What your service is for, in 2-3 sentences. Lead with the use case an agent would care about, not your company history. ## Endpoints - `GET /api/search?q=` — Search the catalog (free) - `POST /api/order` — Place an order (paid: x402) - `GET /api/status` — Health check (free) ## Authentication Free endpoints need no auth. Paid endpoints return HTTP 402 with an x402 payment challenge. Settle in USDC on Base. ## Examples Search for shoes: GET /api/search?q=shoes Place an order: POST /api/order {"sku": "ABC123", "qty": 1} ``` That's the whole spec. Headings beyond H1 are optional. Bulleted lists, fenced code blocks, and links work because they're Markdown — agents parse them with whatever Markdown library they already use. ## llms.txt vs other agent-readability files | File | Purpose | Format | Who reads it | |---|---|---|---| | `/llms.txt` | Narrative context for LLMs | Markdown | LLMs, browsing agents | | `/llms-full.txt` | Full text corpus, one file | Markdown / plaintext | RAG pipelines, embedded agents | | `/robots.txt` | Crawl permissions | Plaintext directives | Crawlers, bots | | `/sitemap.xml` | URL index for crawlers | XML | Search engines | | `/openapi.json` | Programmatic API spec | JSON/YAML | Code generators, API clients | | `/.well-known/mcp` | Tool-server protocol | JSON-RPC | MCP-capable agents | llms.txt does not replace any of these — it fills the gap between robots.txt (machine directives) and OpenAPI (machine specs) with a layer that is optimized for the *language* models that need to reason about what your site is for. ## The companion: llms-full.txt The llmstxt.org spec defines an optional sibling file: [llms-full.txt](/kb/llms-full-txt). Convention is the same — Markdown, served at the root — but the content is different. llms.txt is the *directory* (a brief overview with pointers). llms-full.txt is the *corpus* (the full concatenated text content of your site in a single file). Why both? Two different consumers: - **Browsing agents** with limited context windows want the directory — pick what to fetch next based on llms.txt. - **Non-browsing agents** (RAG pipelines, one-shot retrieval, embedded agents in mobile apps) want the corpus — ingest llms-full.txt once and answer questions without making more HTTP requests. Ship both if you can. llms.txt is the marketing front; llms-full.txt is the knowledge base. ## Who's publishing llms.txt Adoption has been broad across AI infrastructure, developer tools, and content platforms: - **Anthropic** publishes llms.txt at [docs.anthropic.com/llms.txt](https://docs.anthropic.com/llms.txt) listing every page in the developer docs. - **Cloudflare** publishes one at [developers.cloudflare.com/llms.txt](https://developers.cloudflare.com/llms.txt) for the Workers and platform docs. - **Stripe** publishes one for the API reference. - **Vercel, Mintlify, Netlify, Supabase, and Fly.io** all publish llms.txt for their developer documentation. - **Many open-source projects** ship llms.txt automatically via documentation generators (Mintlify and Docusaurus both have plugins). The pattern that's emerged: docs platforms publish llms.txt for their *documentation*, and product sites publish llms.txt for their *API surface*. Both are useful — agents discovering a product for the first time read the marketing llms.txt, then dive into the docs llms.txt when they need integration details. ## How to add llms.txt to your service ### 1. Decide what an agent needs to know Skip everything an agent doesn't need: your company story, design philosophy, marketing copy. Lead with what the service *does* and what endpoints exist. If you can't write the summary in one sentence, your service is too broad — split it. ### 2. Author the file Create `/llms.txt` as plain Markdown. Required: an H1 heading on the first line and a blockquote summary. Recommended: an "Endpoints" section, an "Authentication" section, and 2-3 example requests. Keep the whole file under 10KB. ### 3. Serve it at the root The file MUST be at `/llms.txt` — not `/.well-known/llms.txt`, not `/docs/llms.txt`. Agents probe the root directly. Most static-site hosts let you drop a file in `public/` or `static/` and serve it as-is. Set `Content-Type: text/markdown` or `text/plain`. Some agents reject `application/octet-stream`. ### 4. Link it from your homepage Add a `rel="alternate"` link in your HTML head so agents and crawlers discover it: ```html ``` ### 5. Ship llms-full.txt too Concatenate your documentation pages into a single Markdown file at `/llms-full.txt`. Most docs generators can emit this. If you're hand-rolling, a build step that walks your Markdown sources and joins them with H1 separators is enough. ## Common errors and debugging - **File served as HTML.** Static hosts sometimes wrap text files in their template. Check that `curl https://your-domain.com/llms.txt` returns the raw Markdown, not an HTML page that contains it. - **Missing H1 on first line.** The spec requires the document to start with `#`. Files that lead with a blockquote, frontmatter, or HTML comment fail parsers that expect the H1. - **Content negotiation overrides.** Some servers return HTML to browsers and Markdown to agents — but if the `Accept` header is wrong, agents get HTML. Always serve the file directly; don't gate it behind content negotiation. - **Stale llms.txt.** Authors ship the file once and never update it. Agents that re-fetch on a schedule see stale endpoints. Treat llms.txt as a build artifact — regenerate when the API changes. - **Too long.** Files over 50KB get truncated by some agents. If your llms.txt is that long, you actually want llms-full.txt — split into the directory and the corpus. AgentGrade's scanner probes `/llms.txt` directly and checks that the file exists, starts with an H1, and has non-trivial content. ## FAQ ### Is llms.txt the same as robots.txt? No. robots.txt is directives for *crawlers* (what URLs they're allowed to fetch). llms.txt is *context* for LLMs (what your service is and how to use it). A site can and should publish both. ### Do search engines read llms.txt? Some do, informally. Google has not committed to anything official. The primary consumers are LLM-powered tools — ChatGPT browsing, Claude with web search, Perplexity, Cursor's @web — which retrieve llms.txt when summarizing or citing your service. ### Should I author llms.txt by hand or generate it? Hand-author the top-level llms.txt — it's short (10-50 lines) and the editorial judgment matters. Generate llms-full.txt from your docs build pipeline — it's long and mechanical. ### What if my service has paid endpoints? Describe the payment in prose ("Paid endpoints return HTTP 402 with an x402 payment challenge"). Don't try to encode payment metadata in llms.txt — that's what [x402](/kb/x402) and [OpenAPI](/kb/openapi) `x-payment-info` are for. ### Does llms.txt replace OpenAPI? No. OpenAPI is a strict machine spec — code generators consume it directly. llms.txt is narrative — LLMs read it to understand intent. Ship both: OpenAPI for tooling, llms.txt for context. ### How is llms.txt different from a SKILL.md? [SKILL.md](/kb/skills) is *instructional* — a playbook the agent follows to perform a task. llms.txt is *descriptive* — context about what the service is for. SKILLs go inside agent runtimes (Claude Code, Cursor, etc.) and tell an agent *how to operate*. llms.txt sits on your site and tells *any* LLM *what you are*. ### Does the file have to be Markdown? The spec says Markdown. In practice, plaintext works — most LLMs ignore Markdown syntax anyway. But Markdown is the recommended format because the headings give structure that agents can use to skip to the relevant section. ### Will publishing llms.txt help my SEO? Indirectly. Traditional search engines don't rank pages on llms.txt presence. But AI Overviews, Perplexity, ChatGPT search, and Bing's generative answers increasingly cite sources — and a clear, well-structured llms.txt makes you a more citable source. That's GEO (generative engine optimization), the AEO-adjacent practice that's emerged alongside LLM-powered search. ## Spec maturity **Community standard.** Defined at [llmstxt.org](https://llmstxt.org/) by Jeremy Howard, September 2024. No formal governance body, but widely adopted by major AI infrastructure providers (Anthropic, Cloudflare, Stripe, Vercel) and docs platforms (Mintlify, Docusaurus). The spec is short and stable — no breaking changes expected. ## Learn more - [llmstxt.org](https://llmstxt.org/) — Specification - [llms-full.txt](/kb/llms-full-txt) — The full-content companion - [Anthropic llms.txt](https://docs.anthropic.com/llms.txt) — Reference implementation - [Agent Readiness](/agent-readiness) — How llms.txt fits in the broader landscape ## Cross-references {#cross-references} If your site also serves OpenAPI, MCP, SKILL.md, x402, A2A, or WebMCP, mention them inside llms.txt. The point of llms.txt is to be the *one document* an agent reads to learn what your service offers — if reading it doesn't reveal that you have a paid API or an MCP endpoint, the agent has to probe well-known paths on the chance they exist. Most won't. A good cross-reference is a one-line bullet with the URL the agent can fetch: - `POST /api/order` — Place an order (paid via x402 — see `/.well-known/x402.json`) - MCP server: `/mcp` - Full corpus for RAG: `/llms-full.txt` - OpenAPI spec: `/openapi.json` - SKILL.md (agent playbook): `/skill.md` - A2A agent card: `/.well-known/agent.json` - WebMCP manifest: `/.well-known/webmcp.json` No special section is required — inline mentions count. AgentGrade's scan emits one optional sub-check per resource your site exposes: if the scanner detected your `/mcp` endpoint but `llms.txt` never says the word "mcp", that's a soft fail flagging the gap. These are optional checks: they don't reduce your overall score, but they surface where your llms.txt is *less useful than it could be* for the agents reading it. ## Markdown structure {#markdown-structure} The llms.txt spec only requires an H1, but a file with just a title teaches an agent nothing. AgentGrade's *Markdown structure* check confirms the file has at least one of three structural signals that give an agent something to act on: 1. **A list of markdown links** — at least three bullets in `- [Title](url)` form. This is the docs-directory shape used by Anthropic, Stripe, Cloudflare, Vercel, Mintlify, and most platform llms.txt files. Each link points the agent at real content it can fetch and read. 2. **A fenced code block** — anything wrapped in triple-backticks. A `curl` example, a sample JSON response, a snippet showing how to authenticate. This is the API-surface shape: one file describes one service with a working example. 3. **A named operational section** — an H2 heading like `## Endpoints`, `## API`, `## Routes`, `## Authentication`, `## Examples`, `## Usage`, or `## Quick Start`. These names signal "this is operational content for agents" rather than marketing prose. Any **one** of the three is enough to pass. Most well-formed llms.txt files hit at least two — for example, agentgrade.com's own file has link bullets in the Knowledge Base section *and* a `## Example` section *and* a `curl` fence. ### What fails A marketing footer dressed up as an llms.txt: ```markdown # Acme > We make great products. ## Product - Home - About - Pricing ## Legal - Terms - Privacy ``` Fifteen lines, passes the old line-count check, but: no markdown links (the bullets are plain text labels), no code block, no operational section. An agent reading this learns Acme exists and has pages — but nothing it can navigate to. Fails the *Markdown structure* check. ### Why links matter llms.txt is a routing file, not a content file (that's what [llms-full.txt](/kb/llms-full-txt) is for). Its job is to point agents to the URLs they should fetch next. Plain-text bullets like `- About` give the agent a label with no URL — it can't follow the lead. A markdown link like `- [About](/about) — company background` gives it a URL plus a one-line description so it can decide whether the page is worth fetching. The simplest fix when this check fails: turn your plain-text bullets into markdown links, or add one fenced example showing an agent how to call your service. --- ### llms-full.txt — Full Content for LLMs > Companion to llms.txt: the entire site text concatenated into one file so non-browsing LLMs can ingest your content in a single fetch. Source: https://agentgrade.com/kb/llms-full-txt ## What is llms-full.txt? llms-full.txt is the companion file to `/llms.txt` — same [llmstxt.org](https://llmstxt.org/) convention, but instead of *listing* your important pages, it contains the **entire concatenated text content** of your site in a single file. One fetch, the whole corpus. ## When does it help? llms.txt is a directory. An agent reads it, picks a relevant URL, fetches that page, repeats. That works well for agents that can browse. llms-full.txt is the full text. An agent reads it once and has everything. That matters for: - **No-browse retrieval pipelines** — RAG systems that ingest text but cannot make follow-up HTTP requests - **Embedded agents** — running in environments without arbitrary network access - **One-shot context** — when an LLM needs the whole knowledge base in its context window up front - **Training and fine-tuning ingestion** — when content goes into a model build pipeline rather than a runtime fetch For browsing agents, llms-full.txt is harmless overhead (they can choose not to fetch it). For non-browsing agents, it is the difference between "the agent has your docs" and "the agent has nothing about you." ## Format Plain text or markdown. Standard convention is to start with the same header as llms.txt, then concatenate every page in your llms.txt directory, separated by clear headings or `---` separators. Example skeleton: ```markdown # Your Service Name > Brief one-line description. ## Overview Your Service does X, Y, Z. --- ### /docs/getting-started (full markdown content of the getting-started page) --- ### /docs/api-reference (full markdown content of the API reference) (...continues for every page) ``` ## How agents discover it Two ways: **1. `` in your HTML head** ```html ``` **2. Reference it from `/llms.txt`** Most llms.txt files end with an "Optional" section. Add the companion there so agents reading the directory know the full-content version exists. ```markdown ## Optional - [Full content](/llms-full.txt) — entire site text in one file ``` ## How to generate it Most modern docs platforms (Mintlify, Docusaurus with plugins, Hugo with templates) can auto-generate llms-full.txt from your source. If you maintain docs manually, a simple build step that concatenates your markdown source files works fine. **Regenerate when content changes.** A stale llms-full.txt is worse than none — it gives agents outdated information about your service. Wire generation into the same CI step that builds your docs. ## Tradeoffs - **Pro** — A single fetch gives consumers everything; no crawling needed - **Pro** — Strong AEO signal: ChatGPT, Perplexity, and Claude all weight machine-readable corpus availability - **Pro** — Works for agents without browsing capability (RAG pipelines, embedded agents) - **Con** — Larger response: tens of KB to several MB depending on docs size - **Con** — Must be regenerated when content changes - **Con** — Concatenates everything, including content you might prefer agents fetch piecemeal (paid docs, gated content) ## What AgentGrade checks - **llms-full.txt found** — `/llms-full.txt` responds 200 with at least 20 characters of non-HTML content that does not look like a soft-404 - **llms-full.txt linked from HTML** (optional) — `` is present in your homepage `` The check is scored at weight 1 — lower than llms.txt itself at weight 2, reflecting that llms-full is recommended companion content rather than a primary directory file. ## Real-world examples - [docs.anthropic.com/llms-full.txt](https://docs.anthropic.com/llms-full.txt) — Anthropic's full Claude docs in one file - [agentgrade.com/llms-full.txt](https://agentgrade.com/llms-full.txt) — our own dogfood version, generated from this knowledge base - The original llmstxt.org spec describes both files as the canonical pair ## Spec maturity **Emerging standard, growing fast.** Defined alongside llms.txt at llmstxt.org. Adoption is rising, driven by AI-first docs platforms (Mintlify auto-generates it) and the spread of no-browse retrieval workflows. Sites that ship both files now position themselves as authoritative sources for AI answer engines. ## Learn more - [llmstxt.org](https://llmstxt.org/) — Specification - [llms.txt](/kb/llms-txt) — The companion directory file ## Related - [SKILL.md](/kb/skills) - [OpenAPI](/kb/openapi) --- ### agents.txt — Agent Access Policies > Defines what AI agents are allowed to do on your service. Source: https://agentgrade.com/kb/agents-txt ## What is agents.txt? agents.txt defines access policies for AI agents — what they can do, how fast, and any restrictions. Think of it as [robots.txt](/kb/robots-txt) evolved for autonomous agents that don't just crawl but take actions. ## Example Serve at `/agents.txt`: ``` [agent:*] Allow-Actions: read, search Rate-Limit: 60/minute [agent:claude] Allow-Actions: read, search, post, vote Rate-Limit: 120/minute [agent:gptbot] Allow-Actions: read Rate-Limit: 30/minute ``` ## Key concepts - **Agent sections**: Define policies per agent or for all agents (`agent:*`) - **Allow-Actions**: What actions agents can take (read, write, post, etc.) - **Rate-Limit**: How many requests per time period - **Agent-specific rules**: Different agents can have different permissions ## Spec maturity **Emerging standard — not yet formal.** Multiple proposals exist: - An [IETF Internet-Draft](https://www.ietf.org/archive/id/draft-srijal-agents-policy-00.html) defines a formal policy file format - Community proposals on GitHub define alternative formats The concept is gaining traction but the format is not finalized. The example above follows the most common community convention. ## Learn more - [IETF agents-policy draft](https://www.ietf.org/archive/id/draft-srijal-agents-policy-00.html) — Formal specification proposal ## Related - [llms.txt](/kb/llms-txt) - [SKILL.md](/kb/skills) - [OpenAPI](/kb/openapi) --- ### Organization JSON-LD — Entity Graph for Agents > Declare your site as a schema.org Organization with sameAs links to your other canonical surfaces. The linked-data signal LLMs use to consolidate scattered surfaces into one entity in their knowledge graph. Source: https://agentgrade.com/kb/organization-jsonld ## What is Organization JSON-LD? Organization JSON-LD is a ` ``` ## What is sameAs? `sameAs` is the linked-data declaration that says "the entity described here is the same entity as the one at these other URLs." It is how machines consolidate scattered surfaces (your GitHub, your npm package, your LinkedIn, your registry listings) into a single entity in their knowledge graph. Without `sameAs`, each surface looks like an unrelated orphan to a crawler. With it, your authority and identity signals consolidate. ## Why it matters for AI agents LLM-driven assistants (ChatGPT browsing, Claude, Perplexity, Gemini via Google's index) rely heavily on entity resolution before they answer. When a user asks "what is acme.example?", the model: 1. Looks up the domain in its entity index 2. Pulls in all the surfaces marked `sameAs` — your code, your social, your packages, your registry listings 3. Builds a unified picture: "this is the company, here is what they ship, here is who runs them" JSON-LD is the most agent-accessible structured data format — it survives HTML-to-text conversion that strips microdata attributes, and it is directly parseable JSON. Schema.org is the vocabulary every major model has trained on. ## What AgentGrade checks - **Organization JSON-LD** (optional) — A JSON-LD block on the homepage declares `@type: Organization` - **sameAs entity links** (optional) — The Organization block includes a `sameAs` array with at least two valid HTTPS URLs Both checks are optional — they do not penalize a passing score if absent — but they are strongly recommended for any site that wants AI assistants to talk about it accurately. ## What to link in sameAs The point of `sameAs` is to list **authoritative profiles for the same entity**. Good candidates: - **Code**: your GitHub organization, your GitLab, your public repos - **Packages**: npm, PyPI, crates.io, Maven Central, RubyGems - **Identity**: X/Twitter, LinkedIn company page, Mastodon, Bluesky - **Registries**: Crunchbase, Wikidata, Wikipedia entry - **Agent surfaces**: your listing on the Model Context Protocol Registry, Smithery, the [x402 Bazaar](/kb/bazaar) Pick the surfaces that are public, canonical, and stable. Do not link to dashboards, login pages, or surfaces that gate the content. ## Where to put it In your homepage ``. You can have multiple JSON-LD blocks — one for `WebApplication` or `WebSite`, one for `Organization`. Most rich-results tools handle both. ## Spec maturity **Established standard.** schema.org `Organization` and `sameAs` are mature, widely adopted, and supported by every major search engine and AI agent. Google's Rich Results Test validates them, and Google's [Article on knowledge panels](https://developers.google.com/search/docs/appearance/structured-data/article) lists them as primary identity signals. ## Learn more - [schema.org/Organization](https://schema.org/Organization) - [schema.org/sameAs](https://schema.org/sameAs) - [Google: Logo structured data](https://developers.google.com/search/docs/appearance/structured-data/logo) ## Related - [SKILL.md](/kb/skills) - [llms.txt](/kb/llms-txt) - [OpenAPI](/kb/openapi) --- ### AGENTS.md vs llms.txt > Two root files for agents with different jobs: llms.txt is a content index; AGENTS.md is operating instructions. When to ship each — or both. Source: https://agentgrade.com/kb/agents-md-vs-llms-txt ## Two files, two jobs Both live at your root, both address agents, and they answer different questions: | | llms.txt | AGENTS.md | |---|---|---| | Answers | "What is here?" | "How should you behave here?" | | Shape | Markdown link index with one-line summaries | Freeform markdown instructions | | Born in | Documentation sites ([llmstxt.org](https://llmstxt.org)) | Code repositories, for coding agents | | Read by | Agents orienting on a site | Agents about to *do work* in a context | | Analogy | A site map for machines | A README addressed to the machine | [llms.txt](/kb/llms-txt) is a curated index: key URLs with one-line descriptions, so an agent learns your surface in one fetch. **AGENTS.md** is prose instructions: conventions, do's and don'ts, how to run things — the file coding agents look for in a repository before touching it, now spreading beyond repos. ## Why storefronts suddenly have AGENTS.md Shopify made the convention mainstream on the storefront web: every Shopify store now serves a default `/agents.md`, and — per [Shopify's own theme docs](https://shopify.dev/docs/storefronts/themes/architecture/templates/llms-txt-liquid) — **Shopify manages /llms.txt by mirroring the content of /agents.md**, with `/llms-full.txt` pointing the same way. Merchants override any of the three with Liquid templates (`templates/agents.md.liquid`, `templates/llms.txt.liquid`, `templates/llms-full.txt.liquid`). One instruction file, three doors. That design choice is telling: when forced to pick a single source of truth, Shopify picked the *instructions* file and generated the *index* from it. ## Which should you ship? - **You have documentation or an API** → llms.txt first. Index your key pages and cross-reference your [MCP endpoint](/kb/mcp) and [OpenAPI spec](/kb/openapi). - **Agents transact or operate on your site** (checkout, booking, support flows) → add AGENTS.md with behavioral instructions: what agents may do, rate expectations, where the machine-readable paths are. - **Both is the safe default.** They cross-reference cleanly: llms.txt links AGENTS.md as "operating instructions," AGENTS.md links llms.txt as "the index." Don't confuse either with [agents.txt](/kb/agents-txt) (an access-policy proposal) or [robots.txt](/kb/robots-txt) (crawl permissions). Four root files, four jobs: permission, policy, index, instructions. ## FAQ ### Is AGENTS.md a standard? It's a convention, not a specification — there is no formal spec body behind it. Its strength is adoption: coding agents look for it in repositories, and Shopify serves it by default for every storefront. ### Does AGENTS.md replace llms.txt? No — they answer different questions, and Shopify's mirror design shows how they coexist: instructions as the source, index as a view. A site with only AGENTS.md loses the one-fetch link index; a site with only llms.txt gives agents no behavioral guidance. ### Does AgentGrade check AGENTS.md? The scanner's discovery checks center on llms.txt, which remains the wider convention for the "what is here" job — and on whether it cross-references your other machine files. [Scan your site](/) to see what your root files currently tell an agent. ## Related - [llms.txt — the full guide](/kb/llms-txt) - [Does llms.txt actually work?](/kb/does-llms-txt-work) - [agents.txt](/kb/agents-txt) --- ### robots.txt for Agents > How robots.txt controls AI crawlers: the three-tier model (training, search, user-fetch), current tokens for OpenAI, Anthropic, Perplexity, Google, and Meta, and allow/block patterns. Source: https://agentgrade.com/kb/robots-txt ## How robots.txt controls AI agents robots.txt ([RFC 9309](https://www.rfc-editor.org/rfc/rfc9309)) is a voluntary-compliance protocol: you publish rules, and well-run crawlers choose to follow them. Nothing in the protocol enforces anything — which is why knowing *which* AI bots honor it matters as much as writing the rules. Every major AI vendor now operates several bots with different jobs, and robots.txt treats each `User-agent` token as a separate addressee: a crawler obeys the most specific group matching its own token and ignores groups aimed at other tokens. Blocking one bot therefore does nothing to its siblings. The tokens sort into three tiers: - **Training crawlers** (GPTBot, ClaudeBot, meta-externalagent) collect content for model training. Blocking one opts your content out of future models — it does not affect live answers or search citations. - **Search-index crawlers** (OAI-SearchBot, Claude-SearchBot, PerplexityBot) build the indexes AI assistants cite. Allowing these is what makes your pages retrievable and citable in ChatGPT, Claude, and Perplexity answers. - **User-initiated fetchers** (ChatGPT-User, Claude-User, Perplexity-User, Google-Agent) fetch a page live because a human just asked the assistant about it. Most vendors state this tier may ignore robots.txt — their reasoning: a person, not a crawler, requested the specific page. (Documented exceptions exist — Anthropic's Claude-User and Mistral's MistralAI-User both state they respect robots.txt.) The practical consequence: `User-agent: GPTBot` + `Disallow: /` opts you out of OpenAI training but does not remove you from ChatGPT search (that's OAI-SearchBot) and does not stop live user fetches (that's ChatGPT-User). Each behavior needs its own group. ## Current AI crawler tokens | Token | Operator | Tier | Honors robots.txt? | |---|---|---|---| | GPTBot | OpenAI | Training | Yes | | OAI-SearchBot | OpenAI | Search index | Yes — OpenAI recommends allowing it | | ChatGPT-User | OpenAI | User fetch | "Rules may not apply" (OpenAI's wording) | | ClaudeBot | Anthropic | Training | Yes | | Claude-SearchBot | Anthropic | Search index | Yes | | Claude-User | Anthropic | User fetch | Yes — a documented exception | | PerplexityBot | Perplexity | Search index | Yes | | Perplexity-User | Perplexity | User fetch | "Generally ignores" (Perplexity's wording) | | Google-Extended | Google | Training policy token | Token only — read by Googlebot, no crawler of its own | | Google-Agent | Google | User fetch | Generally ignores | | meta-externalagent | Meta | Training | Yes | Older lists still circulate `anthropic-ai` and `claude-web` — Anthropic no longer crawls under those tokens; its current crawlers are the three above. Each token in the table has a full page — exact UA string, robots.txt snippets, IP-range verification — in [the AI agent user-agent reference](/agents). ## Welcome agents explicitly An explicit `Allow` group is a signal, not a no-op: the default is already "allowed", but naming an agent token tells crawl operators (and scanners like AgentGrade) that access is a decision, not an oversight. ``` User-agent: GPTBot Allow: / User-agent: OAI-SearchBot Allow: / User-agent: ClaudeBot Allow: / User-agent: Claude-SearchBot Allow: / User-agent: PerplexityBot Allow: / Sitemap: https://example.com/sitemap.xml ``` The `Sitemap:` directive matters for agents too — it is how a crawler finds your canonical page list without walking every link. ## Opt out of training, stay citable The most common middle position: keep your pages citable in AI search while opting out of model training. ``` # Block training crawlers User-agent: GPTBot Disallow: / User-agent: ClaudeBot Disallow: / User-agent: meta-externalagent Disallow: / User-agent: Google-Extended Disallow: / # Everything else (search indexers, user fetchers) stays allowed by default ``` ## Blocking everything — and what it costs Disallowing every AI token makes your site invisible to AI search indexes, so assistants cannot cite you. It still does not firmly stop user-initiated fetchers — most of that tier ignores robots.txt by design. A firm block requires server-side controls: filtering by the vendors' published IP ranges or a WAF rule. Verification endpoints for each bot are listed on [the /agents pages](/agents). ## FAQ ### Does blocking GPTBot remove my site from ChatGPT? No. GPTBot only collects training data. ChatGPT search citations come from OAI-SearchBot's index, and live page visits come from ChatGPT-User — both keep working unless you block their tokens too (and ChatGPT-User may ignore the block). ### Do AI agents actually respect robots.txt? By tier: training and search crawlers from OpenAI, Anthropic, Perplexity, Google, and Meta document that they do. User-initiated fetchers mostly document that they do not (Claude-User and MistralAI-User are the stated exceptions). robots.txt is a published preference, not an access control. ### Is Google-Extended a crawler I will see in my logs? No. Google-Extended is a robots.txt policy token read by regular Googlebot. Disallowing it opts your content out of Gemini training and grounding without affecting Google Search. No request ever carries a Google-Extended user-agent. ### Should my site allow or block AI crawlers? It is a business decision about two separate things: training (your content improving future models) and visibility (assistants citing and recommending you). Many sites now block training tokens and allow search tokens — the "opt out of training, stay citable" pattern above. ## Spec maturity **Established standard.** robots.txt is specified in [RFC 9309](https://www.rfc-editor.org/rfc/rfc9309). The AI-specific tokens are defined and documented by each vendor, and change often enough that the [user-agent reference](/agents) is kept current per bot. ## Learn more - [RFC 9309](https://www.rfc-editor.org/rfc/rfc9309) — the robots.txt specification - [AI agent user-agents: the reference list](/agents) — UA strings, robots.txt behavior, and IP verification per bot ## Related - [llms.txt](/kb/llms-txt) — the additive counterpart: robots.txt says what agents may fetch; llms.txt tells them where to start - [How AI agents actually browse the web](/kb/how-ai-agents-browse) --- ### llms.txt for Shopify > Shopify already serves llms.txt for your store — what the default contains, when to override it, and how to customize it with Liquid templates. Source: https://agentgrade.com/kb/llms-txt-for-shopify ## You probably already have one Shopify generates an agent-instruction surface for every store: a default `/agents.md`, with `/llms.txt` and `/llms-full.txt` mirrored from it (as of May 2026). Check yours right now — open `https://your-store.com/llms.txt`. If you've never touched it, you're serving Shopify's default. That default is generic by design. The question isn't "how do I add llms.txt to Shopify" — it's "should I replace the stock one," and usually yes: the default can't know which collections matter, what your return policy highlights should be, or that your [MCP endpoint](/kb/mcp) exists. ## How the template system works Per Shopify's theme docs, three Liquid templates control the three paths, with a fallback chain: 1. `templates/llms.txt.liquid` — controls `/llms.txt` only 2. `templates/agents.md.liquid` — controls `/agents.md` *and* is the default source for the other paths 3. No templates → Shopify's generated default So the leverage point is `agents.md.liquid`: customize it once and all three surfaces inherit, or split `llms.txt.liquid` out separately if you want the index and the instructions to diverge (see [AGENTS.md vs llms.txt](/kb/agents-md-vs-llms-txt) for why you might). ## Customizing it In your theme editor (Online Store → Themes → Edit code → Templates), add `llms.txt.liquid`: ``` # {{ shop.name }} > {{ shop.description }} ## Key pages - [Best sellers](/collections/best-sellers): our most-bought products - [Shipping & returns](/policies/shipping-policy): what agents should quote customers ## Machine-readable surfaces - [Product feed](/products.json): live catalog with prices ``` Liquid objects work as in any template, so the file can stay current automatically — loop collections, inject policies, reference metafields. ## What to include The highest-value lines for agents: your top collections with one-line descriptions, policy pages (shipping, returns — what an agent quotes a customer), and cross-references to machine surfaces (`/products.json`, any [OpenAPI spec](/kb/openapi) or MCP endpoint). Skip marketing prose — agents want structure, not slogans. Full format guidance: [the llms.txt guide](/kb/llms-txt). ## Validate it Run your store through [the llms.txt validator](/tools/llms-txt-validator) — it checks the file exists, parses, and gives agents navigable structure — or [scan the whole store](/) to see every agent-facing surface at once. ## FAQ ### Does Shopify generate llms.txt automatically? Yes — every store serves a default /agents.md, and Shopify manages /llms.txt and /llms-full.txt by mirroring it. You override any of the three with Liquid templates. ### Which template should I edit? Edit templates/agents.md.liquid to change all three surfaces from one source. Add templates/llms.txt.liquid only if you want the llms.txt index to differ from the agents.md instructions. ### Will editing llms.txt affect my Google rankings? No — Google has documented that Search doesn't use llms.txt either way. Its value is for agents reading your store, not for rankings. See [Does llms.txt actually work?](/kb/does-llms-txt-work) ## Related - [llms.txt — the full guide](/kb/llms-txt) - [AGENTS.md vs llms.txt](/kb/agents-md-vs-llms-txt) - [llms.txt for WordPress](/kb/llms-txt-for-wordpress) · [llms.txt for Next.js](/kb/llms-txt-for-nextjs) --- ### llms.txt for WordPress > WordPress core doesn’t generate llms.txt — but your SEO plugin probably can. The current options (Yoast, Rank Math, AIOSEO, standalone plugins) and what to put in the file. Source: https://agentgrade.com/kb/llms-txt-for-wordpress ## Core doesn't do this (yet) WordPress core does not generate llms.txt. A core proposal exists (Trac ticket #64959, modeled on how core serves a virtual robots.txt), but as of mid-2026 it is a proposal, not a shipped feature. In practice, llms.txt on WordPress comes from your SEO plugin — and you may already have the capability installed: - **Yoast SEO** — generates llms.txt natively, in the free tier. - **Rank Math** — an "LLMS Txt" module you toggle on, configurable per post type. - **All in One SEO** — generates it and has the feature enabled by default. - **Website LLMs.txt** — a dedicated standalone plugin (40,000+ active installs) that integrates with all the above if you'd rather manage the file independently. If you run any of the big three, check `yoursite.com/llms.txt` before installing anything — AIOSEO in particular may already be serving one. ## Plugin output vs. a curated file Auto-generated llms.txt files tend to be sitemaps in markdown clothing: every post, no hierarchy of importance. That passes an existence check but wastes the format's point — *curation*. An agent reading 400 undifferentiated links learns less than one reading twelve chosen ones. The better pattern: let the plugin handle generation, then use its configuration (post-type filters, exclusions) to cut the list down to what an agent actually needs — cornerstone content, product/service pages, docs, policies. Or hand-write the file and serve it statically: drop `llms.txt` in your site root via SFTP or your host's file manager. A static file beats a worse dynamic one. ## What to include One-line descriptions matter more than link count. Lead with what the site *is*, then key pages grouped by section, then cross-references to machine surfaces — your [REST API](/kb/openapi) if it's public, and any [MCP endpoint](/kb/mcp). Full format guidance: [the llms.txt guide](/kb/llms-txt). ## Validate it Whichever route you take, run it through [the llms.txt validator](/tools/llms-txt-validator) — existence, parseability, navigable structure — or [scan the whole site](/) to see every agent-facing signal at once. ## FAQ ### Does WordPress generate llms.txt automatically? Core doesn't. Yoast, Rank Math, and AIOSEO all generate it natively (AIOSEO by default), and standalone plugins exist. Check yoursite.com/llms.txt first — you may already have one. ### Is a plugin-generated llms.txt good enough? It passes existence checks, but generated lists are usually uncurated. Use the plugin's filters to trim to cornerstone content, or hand-write the file — curation is the format's entire value. ### Will llms.txt improve my WordPress SEO? No — Google's documented position is that Search doesn't use it. It's for agents, not rankings. See [Does llms.txt actually work?](/kb/does-llms-txt-work) ## Related - [llms.txt — the full guide](/kb/llms-txt) - [llms.txt for Shopify](/kb/llms-txt-for-shopify) · [llms.txt for Next.js](/kb/llms-txt-for-nextjs) - [Does llms.txt actually work?](/kb/does-llms-txt-work) --- ### Identity Protocols > Decentralized identity standards that let agents verify who owns a domain. Source: https://agentgrade.com/kb/identity ## What are identity protocols? Identity protocols let agents verify who is behind a domain or service. They answer: "Who are you, and how can I verify that?" ## WebFinger Discover information about a user or service from their domain. Served at `/.well-known/webfinger`: ```json { "subject": "acct:service@yourdomain.com", "links": [ { "rel": "self", "type": "application/activity+json", "href": "https://yourdomain.com/actor" } ] } ``` **Spec**: [RFC 7033](https://www.rfc-editor.org/rfc/rfc7033) ## DID Document Decentralized Identifiers — self-sovereign identity URIs. Served at `/.well-known/did.json`: ```json { "id": "did:web:yourdomain.com", "verificationMethod": [{ "id": "did:web:yourdomain.com#key-1", "type": "Ed25519VerificationKey2020", "publicKeyMultibase": "z6Mk..." }] } ``` **Spec**: [W3C DID Core](https://www.w3.org/TR/did-core/) ## Nostr NIP-05 Maps human-readable names to Nostr public keys. Served at `/.well-known/nostr.json`: ```json { "names": { "service": "npub1..." } } ``` **Spec**: [NIP-05](https://github.com/nostr-protocol/nips/blob/master/05.md) ## AT Protocol DID Links a domain to a Bluesky/AT Protocol identity. Served at `/.well-known/atproto-did`: ``` did:plc:abc123xyz ``` **Spec**: [AT Protocol Identity](https://atproto.com/specs/did) ## Apple App Links & Android Asset Links Mobile deep-linking protocols that prove a domain is associated with a mobile app. - Apple: `/.well-known/apple-app-site-association` - Android: `/.well-known/assetlinks.json` ## Spec maturity All identity protocols listed here have **formal specifications**. WebFinger and DID are W3C/IETF standards. Nostr and AT Protocol are ecosystem-specific but well-defined. ## Related - [A2A](/kb/a2a) - [SKILL.md](/kb/skills) --- ### llms.txt for Next.js > Next.js has no llms.txt file convention (yet) — the two patterns that work today: a static public file or an App Router route handler that stays in sync with your content. Source: https://agentgrade.com/kb/llms-txt-for-nextjs ## No first-party convention (yet) Next.js ships metadata file conventions for `robots.txt` and `sitemap.xml` — you export a function from `app/robots.ts` and the framework serves the file. **No such convention exists for llms.txt** (there's an open feature request, vercel/next.js discussion #80692), so you wire it yourself. Two patterns, both trivial: ## Pattern 1: static file Drop `llms.txt` in `public/`. Next.js serves anything there at the root, so `public/llms.txt` → `yoursite.com/llms.txt`. Done. Right choice when your key pages change rarely. The risk is drift: the file says what your site *was*. ## Pattern 2: route handler For content that moves — docs, products, posts — generate the file from the same source of truth as your pages: ``` // app/llms.txt/route.ts import { getDocs } from '@/lib/content'; export async function GET() { const docs = await getDocs(); const body = [ '# Acme', '', '> Acme is a widget API for developers.', '', '## Docs', ...docs.map(d => `- [${d.title}](/docs/${d.slug}): ${d.summary}`), '', '## Machine-readable surfaces', '- [OpenAPI spec](/openapi.json): full API schema', ].join('\n'); return new Response(body, { headers: { 'Content-Type': 'text/plain; charset=utf-8' }, }); } ``` Add `export const revalidate = 3600` if your content source is expensive. The same pattern serves [llms-full.txt](/kb/llms-full-txt) if you want the full-text companion. ## What to include Curation beats completeness: what the site is (one blockquote), the dozen pages an agent should start from with one-line summaries, and cross-references to your machine surfaces — the [OpenAPI spec](/kb/openapi) and any [MCP endpoint](/kb/mcp) are the highest-value lines in the file. Full format guidance: [the llms.txt guide](/kb/llms-txt). ## Validate it Run [the llms.txt validator](/tools/llms-txt-validator) against your deployment — existence, parseability, navigable structure — or [scan the site](/) for the full agent-readiness picture. ## FAQ ### Does Next.js have an llms.ts metadata convention like robots.ts? No. The metadata file conventions cover robots.txt, sitemap.xml, icons, and OG images — not llms.txt. A feature request is open; until then, use public/llms.txt or a route handler. ### Should the route handler set a special Content-Type? Serve it as text/plain (or text/markdown) with UTF-8. Agents parse the markdown structure from the body; what matters is that the route returns 200 with the content directly. ### Static file or route handler? Static if your key pages are stable. Route handler if the file lists anything that changes — it's the difference between documentation and a snapshot. ## Related - [llms.txt — the full guide](/kb/llms-txt) - [llms-full.txt](/kb/llms-full-txt) - [llms.txt for Shopify](/kb/llms-txt-for-shopify) · [llms.txt for WordPress](/kb/llms-txt-for-wordpress) --- ### Skill file (SKILL.md) > A markdown file with YAML frontmatter that tells agents how to use your service. Source: https://agentgrade.com/kb/skills ## What is SKILL.md? SKILL.md is a single Markdown file — typically served at `/skill.md` — that tells an AI agent how to use your service. The file opens with YAML frontmatter declaring two fields, `name` and `description`, then free-form Markdown that documents the endpoints, auth model, and request shapes the agent needs to act. The spec is published at [agentskills.io](https://agentskills.io/specification) and has been adopted as a cross-vendor convention by Anthropic's Claude Code, OpenAI Codex, Cursor, GitHub Copilot, and Microsoft's Agent Framework. A SKILL.md file is the smallest possible artifact that lets an agent go from "I found this site" to "I know how to call it." ## Why SKILL.md matters LLM agents face the same onboarding cost humans do: figuring out what an unfamiliar service is for and how to call it correctly. With humans you write a quickstart guide; with agents you write a SKILL.md. The frontmatter `name` gives the agent a stable identifier it can register internally; the `description` is what shows up in tool listings and the agent's planner; the body is the playbook. The alternative — an agent reading your full docs site, OpenAPI schema, and homepage to reconstruct the same information — is slow, expensive, and lossy. SKILL.md collapses the onboarding step to a single fetch and a few hundred tokens. For sites that want agents to *actually use them* (not just discover them), SKILL.md is the highest-leverage file you can publish. ## How SKILL.md works There is no protocol handshake. An agent requests `/skill.md`, parses the YAML frontmatter for `name` and `description`, validates the name against the spec's regex, and reads the Markdown body as instructions. A minimal valid SKILL.md: ```markdown --- name: scan-url description: Scan any URL for AI agent readiness and return a 0-100 score. Use when a user asks how agent-ready a site is or wants to compare protocol support across sites. --- # Agent Readiness Scan Use `GET /api/v1/scan?url={url}` for the agent-friendly JSON response. ## Endpoints - `GET /api/v1/scan?url={url}` — flat JSON for agents - `GET /api/scan?url={url}` — full HTML report (for humans) - `GET /api/badge?url={url}` — SVG badge ## Auth None. All endpoints are free. ## Example `curl https://agentgrade.com/api/v1/scan?url=https://example.com` ``` That is the entire surface. Agents that find this file know enough to call your service correctly on the first try. ## SKILL.md vs other agent-readability files | File | Who serves it | What it answers | Format | |---|---|---|---| | **SKILL.md** | The service | *How do I use this service?* | Markdown + frontmatter | | **[OpenAPI](/kb/openapi)** | The service | *What endpoints exist and what's the schema?* | JSON/YAML | | **[MCP](/kb/mcp) manifest** | The MCP server | *What tools does this server expose over JSON-RPC?* | JSON-RPC | | **`ai-plugin.json`** | The service | *Plugin metadata for ChatGPT plugin format* (legacy) | JSON | | **[llms.txt](/kb/llms-txt)** | The service | *What is this site, in prose?* | Markdown | SKILL.md is the "playbook" layer; OpenAPI is the "schema" layer. The two compose: SKILL.md tells the agent which endpoints to call and when; OpenAPI provides the formal parameter schema. Agents that find both are strictly better off than agents that find either alone. `ai-plugin.json` predates SKILL.md and was tied to the original ChatGPT plugin format, which OpenAI has since deprecated. SKILL.md is the modern, cross-vendor successor. ## Frontmatter validation The agentskills.io spec is strict about two fields: - **`name`** — 1 to 64 characters, lowercase alphanumeric with single hyphens. Must match `^[a-z0-9]+(-[a-z0-9]+)*$`. No leading, trailing, or consecutive hyphens. Good: `scan-url`, `book-flight`, `order-status`. Bad: `ScanUrl`, `-scan`, `scan--url`, `scan_url`. - **`description`** — 1 to 1024 characters. Lead with the verb the agent should perform ("Scan a URL...", "Book a flight from..."). The description shows up in tool pickers and planner reasoning, so write it for an agent making a snap decision. Agents and scanners that conform to the spec will reject files with malformed frontmatter — your file effectively becomes invisible to them. ## Who's adopted SKILL.md The spec moved from a single-vendor convention to an interoperable standard over 2025: - **Claude Code** ([docs.claude.com/en/docs/claude-code/skills](https://docs.claude.com/en/docs/claude-code/skills)) — Anthropic's coding agent loads SKILL.md files from local directories and uses them to scope tool access. - **OpenAI Codex** — Adopted the same format for agent skill definitions. - **Cursor** — Reads SKILL.md from project workspaces for inline agent guidance. - **GitHub Copilot** — Honors the same frontmatter convention for repository-level agent instructions. - **Microsoft Agent Framework** — Cross-vendor implementations follow the agentskills.io spec. Because the format is just Markdown with YAML frontmatter, adoption cost is near zero: every agent that already parses Markdown can read it; every site that already publishes docs can author it. ## How to add SKILL.md to your site 1. **Pick the name.** One verb-noun phrase, lowercase-hyphen, under 64 chars. Match what the agent should "do" with your service. `book-flight` is good; `flights` is too vague. 2. **Write the description.** Two sentences. Sentence 1: what the agent accomplishes. Sentence 2: when to use it (the trigger phrase or context). 3. **Write the body.** Endpoints with HTTP verbs, auth model, one copy-pasteable curl example. Keep it under a screen of text — terse beats exhaustive. 4. **Serve at `/skill.md`.** Static file. `Content-Type: text/markdown`. 5. **Link from llms.txt or `/.well-known/`.** Optional but recommended — gives agents that find your llms.txt first a path to the skill file. A site with a valid SKILL.md and an [OpenAPI](/kb/openapi) spec is well-equipped for any agent that arrives knowing nothing. ## Common errors scanners flag - **Missing frontmatter delimiters** — the file does not start with `---`, so the YAML block is not detected. - **Invalid `name`** — uppercase, underscores, or leading/trailing hyphens. The most common failure. - **Description too short** — under 1 character (empty) or so short the agent has no signal. Aim for 80-200 chars. - **Description too long** — over 1024 characters. Move detail into the body. - **Wrong path** — served at `/skills.md` (plural), `/.well-known/skill.md`, or `/skill/index.md`. The spec is `/skill.md` at the document root. - **Wrong content-type** — served as `text/html` because a CMS auto-renders Markdown. Serve raw `text/markdown` or `text/plain`. ## FAQ **Is SKILL.md the same as Anthropic's "Claude Skills"?** The on-disk format is the same. "Claude Skills" is Anthropic's product name for the feature that consumes SKILL.md files; the file format itself is the cross-vendor agentskills.io spec. **Do I need both SKILL.md and OpenAPI?** Ship both if you have an API. SKILL.md answers "how do I use this?" in prose; OpenAPI answers "what is the exact schema?" formally. Agents use OpenAPI to validate requests and SKILL.md to decide whether to call the service at all. **What replaced `/skills.json`?** `/skills.json` was an early, hand-rolled manifest format that predated any standard. It has been superseded by SKILL.md for the "how to use" layer and OpenAPI's `x-payment-info` (see [OpenAPI](/kb/openapi)) for declaring paid endpoints. AgentGrade no longer scores `/skills.json`. **Where should the SKILL.md file live?** `/skill.md` at the document root. Some agents will also probe `/.well-known/skill.md` as a fallback — publishing both is harmless. **Can a site have multiple SKILL.md files?** The convention is one `/skill.md` per origin. Services with multiple distinct surfaces (search vs checkout vs support) typically describe each as a section within one file, or split into sub-services on subdomains. **Does SKILL.md replace [MCP](/kb/mcp)?** No — they answer different questions. SKILL.md tells an agent how to use your HTTP service via existing endpoints. MCP defines a JSON-RPC interface where the agent calls your server as a tool over a persistent connection. A site can publish both. **Does AgentGrade penalize sites that publish SKILL.md without OpenAPI?** No. SKILL.md is a positive signal on its own. OpenAPI is a separate check. **Will agents actually read this file?** Claude Code, Codex, Cursor, and Copilot read SKILL.md files in their workspaces today. Browsing agents that discover your site for the first time are increasingly probing `/skill.md` as part of the discovery handshake, alongside `/llms.txt` and `/openapi.json`. ## Spec maturity **Cross-vendor standard.** Defined at [agentskills.io](https://agentskills.io/specification). Adopted by Claude Code, OpenAI Codex, Cursor, GitHub Copilot, and Microsoft Agent Framework. Active development; the canonical implementation is well-documented. ## Learn more - [agentskills.io](https://agentskills.io/specification) — the specification - [Claude Code skills documentation](https://docs.claude.com/en/docs/claude-code/skills) — Anthropic's adoption - [OpenAPI](/kb/openapi) — companion schema layer - [MCP](/kb/mcp) — alternative for JSON-RPC tool servers - [Agent Readiness](/agent-readiness) — how SKILL.md fits into the broader picture --- ### Content Negotiation for AI Agents > How to serve agent-optimized responses based on User-Agent and Accept headers. Source: https://agentgrade.com/kb/content-negotiation ## What is content negotiation for agents? Content negotiation means serving different responses from the same URL based on what the client asks for. For AI agents, this means returning markdown or plain text — the format LLMs already parse well — when the request comes from an agent, while still serving HTML to browsers. Same URL, different representation, per [RFC 9110 §12.5](https://www.rfc-editor.org/rfc/rfc9110#name-content-negotiation). ## Why it matters LLM-driven agents typically receive only the response body, not HTTP headers, status codes, or redirect chains. Serving HTML forces the agent to parse DOM structure, strip layout, and discard navigation — wasting tokens before the model sees anything useful. A clean text response gives the model the actual content directly. ## The Accept preference order gotcha The most common content-negotiation bug is treating the Accept header as a simple substring check. Take Claude Code's WebFetch tool — it sends: ``` Accept: text/markdown, text/html, */* ``` This is the client saying, in preference order: "I'd prefer markdown if you have it, otherwise HTML, otherwise anything." A naive check like `if (accept.includes('text/html'))` sees `text/html` in the string and serves HTML — ignoring that `text/markdown` was listed first. Per [RFC 9110 §12.5.1](https://www.rfc-editor.org/rfc/rfc9110#name-accept), when q-values are not specified the **order of media types expresses preference**. A correct implementation parses the Accept list, applies q-values, and picks the leftmost type the server can serve. ## What AgentGrade checks **Agent UA gets non-HTML** — We send `User-Agent: claude-code/1.0.0` with `Accept: text/markdown, text/html, */*` to your homepage. The check passes if you serve `text/markdown`, `text/plain`, or `application/json` with body ≥20 bytes. Sites that substring-match Accept and serve HTML fail this. **Accept: JSON returns JSON** — We send `Accept: application/json` and check for valid JSON. **Accept: text returns text** — We send `Accept: text/plain` and check for plain text or markdown. **Accept: markdown returns markdown** — We send `Accept: text/markdown` and check for markdown or plain text. **Vary: Accept set** — When you negotiate, the response must include `Vary: Accept` so shared caches key entries correctly. ## How to implement it correctly Use a proper Accept negotiator instead of substring matching: ```javascript // Express — req.accepts uses the negotiator package under the hood app.get('/', async (req, res) => { res.vary('Accept'); const best = req.accepts(['text/html', 'text/markdown', 'text/plain', 'application/json']); if (best === 'text/markdown' || best === 'text/plain') { return res.type(best).send(await buildLlmsTxt()); } if (best === 'application/json') { return res.json({ name: 'Your Service', api: '/openapi.json' }); } res.sendFile('index.html'); }); ``` Other ecosystems: - **Node.js (no framework):** [`negotiator`](https://www.npmjs.com/package/negotiator) npm package - **Python:** `werkzeug.wrappers.AcceptMixin` or `request.accept_mimetypes.best_match` - **Go:** [`github.com/markusthoemmes/goautoneg`](https://github.com/markusthoemmes/goautoneg) - **Ruby on Rails:** `respond_to do |format|` blocks handle response generation, but Rails treats `*/*` in Accept as a license to serve HTML — `Accept: text/markdown, */*` returns HTML even though markdown is preferred. Fix by setting `request.format` explicitly in a `before_action` based on the first non-wildcard Accept type, before `respond_to` runs. Reordering `format.X` blocks alone won't override the `*/*` fallback. - **Cloudflare Workers:** parse `request.headers.get('Accept')` manually or use the `accept` npm package ## Inline vs redirect — pick inline There are two ways to serve agent-friendly content. Inline is better: **Inline (recommended):** Same URL serves different bodies based on Accept. ``` GET / → 200 OK Content-Type: text/html (browser) | text/markdown (agent) ``` **Redirect (legacy):** Send agents to `/llms.txt`. ``` GET / → 302 Found, Location: /llms.txt GET /llms.txt → 200 OK ``` Inline wins because: (1) one fetch instead of two — half the latency; (2) the URL the agent reports to the user is the URL they were asked about, not a redirect target; (3) caching is cleaner with `Vary: Accept`. The `/llms.txt` route still exists for tools that fetch it directly — both routes call the same content function so there's one source of truth. ## Vary: Accept is load-bearing Whenever the same URL returns different bodies based on Accept, set `Vary: Accept`. This tells shared caches (CDNs, proxies, browsers) that the cache key must include the Accept header value. Without it, a CDN could cache the markdown response from one agent fetch and serve it to a browser visit — or the reverse. The Vary header is the only thing that keeps cache entries from being interchangeable when the bodies are not. ## Known AI agent User-Agents | Agent | User-Agent | Purpose | |---|---|---| | ClaudeBot | `Mozilla/5.0 (compatible; ClaudeBot/1.0; +claudebot@anthropic.com)` | Anthropic training crawler | | Claude-User | `Mozilla/5.0 ... (compatible; Claude-User/1.0; +Claude-User@anthropic.com)` | claude.ai web_fetch, Claude API web_search page reads | | Claude-SearchBot | (string not published) | Anthropic search index crawler | | claude-code | `claude-code/` | Claude Code CLI WebFetch tool | | ChatGPT-User | `Mozilla/5.0 ... (compatible; ChatGPT-User/1.0; +https://openai.com/bot)` | User-initiated ChatGPT browse | | OAI-SearchBot | `Mozilla/5.0 ... (compatible; OAI-SearchBot/1.3; +https://openai.com/searchbot)` | OpenAI search index | | OAI-AdsBot | `Mozilla/5.0 ... (compatible; OAI-AdsBot/1.0; +https://openai.com/adsbot)` | OpenAI ads crawler | | GPTBot | `Mozilla/5.0 ... (compatible; GPTBot/1.3; +https://openai.com/gptbot)` | OpenAI training crawler | | PerplexityBot | `Mozilla/5.0 ... (compatible; PerplexityBot/1.0; +https://perplexity.ai/perplexitybot)` | Perplexity search-results crawler | | Perplexity-User | `Mozilla/5.0 ... (compatible; Perplexity-User/1.0; +https://perplexity.ai/perplexity-user)` | User-initiated Perplexity fetches | | Google-Extended | (uses Googlebot UA) | Google Gemini training, controlled via robots.txt | ## Web Bot Auth — the next signal A growing list of agents (ChatGPT Agent confirmed today; Anthropic, Perplexity, Google expected) cryptographically sign their requests per [RFC 9421 HTTP Message Signatures](https://www.rfc-editor.org/rfc/rfc9421). The signal is the `Signature-Agent` request header: ``` Signature-Agent: "https://chatgpt.com" Signature-Input: sig=("@authority" "signature-agent"); keyid="..."; tag="web-bot-auth" Signature: sig=... ``` If you see `Signature-Agent` on an incoming request, treat the client as a known agent even if the UA looks like a browser. For full verification, fetch the JWKS at the host named in `Signature-Agent` (`/.well-known/http-message-signatures-directory`) and verify the signature with the [`web-bot-auth`](https://www.npmjs.com/package/web-bot-auth) npm package. For content-negotiation purposes, presence of the header alone is a sufficient soft signal. ## Learn more - [RFC 9110 §12.5 — Content Negotiation](https://www.rfc-editor.org/rfc/rfc9110#name-content-negotiation) - [llms.txt specification](https://llmstxt.org/) - [Anthropic crawler docs](https://support.claude.com/en/articles/8896518) - [OpenAI bot docs](https://developers.openai.com/api/docs/bots) - [Perplexity crawler docs](https://docs.perplexity.ai/docs/resources/perplexity-crawlers) - [Cloudflare Web Bot Auth](https://blog.cloudflare.com/web-bot-auth/) ## Preferred type vs non-HTML — the next bar "Agent UA gets non-HTML" is a basic check: did the server serve anything other than HTML? "Returns preferred Content-Type" is the strict version: did the response Content-Type match the leading type the client signaled? For example, when the client sends `Accept: text/markdown, text/html, */*`: - Server returns `Content-Type: text/markdown` → passes both checks - Server returns `Content-Type: text/plain` → passes the basic check, fails the strict one - Server returns `Content-Type: text/html` → fails both The scanner runs four probes: markdown leading (the Claude Code / Cursor pattern), HTML leading with markdown listed second (the browser / ChatGPT Agent pattern — catches sites that ignore client order and use server-side preference instead), explicit q-values favoring HTML over markdown (catches sites that ignore q-values entirely), and JSON leading (programmatic discovery pattern). All four must pass. Today the Content-Type label is mostly decorative for LLM-based agents — they parse the body bytes regardless of MIME type. But browser-based AI extensions and emerging MCP tools branch on Content-Type, and the gap will widen as the ecosystem matures. The fix is a one-line change in your handler: set the response Content-Type from the negotiated type, not a hardcoded value. If your code already returns `text/plain` for both `Accept: text/plain` and `Accept: text/markdown`, branch on the negotiated type and label accordingly. This check is required — failing it costs points in the Content Negotiation group. ## Diagnosing your bug — q-values and the three patterns ### How q-values work When a client sends multiple types in Accept, it can attach **q-values** (quality factors) between 0.0 and 1.0 to express *relative* preference: ``` Accept: text/markdown;q=1.0, text/html;q=0.5, */*;q=0.1 ``` Meaning: "I really want markdown. I'll take HTML as a backup. Anything else is a last resort." When no q-value is given, it defaults to 1.0. So `Accept: text/markdown, text/html, */*` means all three are equally preferred — and the **order in the header** breaks the tie. A correct server picks markdown. A proper Accept negotiator (Express `req.accepts()`, the `negotiator` npm package, Python `werkzeug`, Go `goautoneg`) handles all this automatically: parse q-values, honor order on ties, pick the best match the server can serve. ### The three bug patterns we see in the wild If your site fails the "Agent UA gets non-HTML" check, the cause is almost always one of these: **Pattern 1: Substring matching.** Code that checks if the Accept header *contains* a type, in a fixed if-else order. Example: ```javascript // WRONG — order of checks, not order in Accept, wins if (accept.includes('text/html')) return html; else if (accept.includes('text/markdown')) return markdown; ``` Client sends `Accept: text/markdown, text/html` → server returns HTML because `text/html` is in the string. Preference order from the client is ignored entirely. **Pattern 2: Framework default that serves HTML on `*/*`.** Some frameworks treat `*/*` in Accept as a license to fall back to HTML, even when explicit non-HTML types are listed earlier. Rails 8's `respond_to` is a notable example: ``` Accept: text/markdown, */* → Rails returns HTML (markdown ignored) Accept: text/markdown, text/html → Rails returns markdown (no */*, honors order) ``` **Pattern 3: Server-internal preference order + q-values ignored.** Server has its own priority list (often hardcoded somewhere) and picks whichever type from the Accept header is highest *on the server's list* — not on the client's list. q-values aren't parsed at all: ``` Accept: text/plain;q=0.9, text/html;q=0.5 → returns HTML (server prefers html despite q-values explicitly favoring plain) ``` The smoking gun for pattern 3 is q-values being ignored. If the same site returns HTML for the row above and markdown for `Accept: text/plain, text/markdown` (markdown won despite plain being listed first), it's pattern 3. ### A quick diagnostic test Run these five curl commands against your homepage. The pattern in the responses tells you which bug you have: ```bash curl -sI -H "Accept: text/markdown" YOUR_SITE/ curl -sI -H "Accept: text/markdown, text/html, */*" YOUR_SITE/ curl -sI -H "Accept: text/plain, text/markdown" YOUR_SITE/ curl -sI -H "Accept: text/markdown, */*" YOUR_SITE/ curl -sI -H "Accept: text/plain;q=0.9, text/html;q=0.5" YOUR_SITE/ ``` - If only the first returns markdown: pattern 1 (substring matching). - If the first three return markdown but the fourth returns HTML: pattern 2 (`*/*` fallback). - If the fifth returns HTML and the third returns markdown (or vice versa with whatever you think you serve): pattern 3 (server preference + q-values ignored). The fix recipe is the same in all three cases: replace whatever ad-hoc selection logic you have with a proper Accept negotiator from the list above. ## Inline vs 302 redirect — what to do Two patterns for serving agent-friendly content at your homepage: **Inline** — same URL returns different bodies based on Accept header. ``` GET / + Accept: text/html → 200 + HTML GET / + Accept: text/markdown → 200 + markdown ``` **Redirect** — server sends agent requests to a separate canonical URL. ``` GET / + Accept: text/markdown → 302, Location: /llms.txt GET /llms.txt → 200 + markdown ``` **Use inline.** It is the documented best practice in [RFC 9110 §12.2](https://www.rfc-editor.org/rfc/rfc9110#name-reactive-negotiation), which explicitly lists the disadvantages of redirect-based (reactive) negotiation: "suffers from transmitting a list of alternatives... and needing a second request to obtain an alternate representation" and "does not define a mechanism for supporting automatic selection." Every major content-negotiation-aware site we tested uses inline: - **GitHub API** — same URL varies on Accept (`application/vnd.github+json` vs `application/vnd.github.html+json`), no redirect - **Stripe docs** — `docs.stripe.com/api` returns HTML or markdown from the same URL with `Vary: Accept` - **Cloudflare developer docs** — edge converts inline, same URL - **Vercel**, **Mintlify**, **Sanity** — all recommend inline in their public guidance for agent-friendly pages ## Why inline wins concretely 1. **Half the latency.** One HTTP fetch instead of two. HTTP/2 and HTTP/3 multiplexing do not eliminate the redirect cost — the client still has to receive the 302, parse `Location`, and issue a new request. 2. **URL fidelity.** The URL the agent reports to the user is the URL the user actually asked about. With 302, the agent ends up at `/llms.txt` — a different URL than the homepage. 3. **Cleaner caching.** Inline with `Vary: Accept` lets caches store both representations under one URL key. With 302, caches have to handle two URLs and keep their coherence. 4. **No magic agent-only URL.** Inline keeps the URL space unified — humans and agents hit the same URL; the server picks what to serve based on Accept. ## What AgentGrade checks The `Inline content negotiation` check sends an agent-shaped request (`claude-code/1.0.0` UA with `Accept: text/markdown, text/html, */*`) and verifies the response does not end up at a different URL than a browser request would. Specifically: if the agent fetch was redirected to a path that the browser fetch was not, the check fails. Universal redirects that affect everyone (HTTPS upgrade, trailing-slash normalization) are not penalized — only agent-specific redirects to a separate URL. ## How to fix Replace your 302 logic with inline negotiation. Express example: ```javascript app.get('/', async (req, res) => { res.vary('Accept'); const best = req.accepts(['text/html', 'text/markdown', 'text/plain']); if (best === 'text/markdown') { return res.type('text/markdown').send(await buildLlmsTxt()); } // Honor browser preference res.sendFile('index.html'); }); ``` The `/llms.txt` route can still exist as a separate URL — both routes call the same content function. Sites that fetch `/llms.txt` directly still work; sites that hit `/` with an agent Accept also work, in one request. This check is emerging (optional) today — it does not yet penalize sites that use 302. It will graduate to required once industry adoption of inline is broad enough that the few remaining 302-based sites are clearly the outliers. --- ### Web Bot Auth (RFC 9421) > How AI agents prove their identity with cryptographic HTTP message signatures. Source: https://agentgrade.com/kb/web-bot-auth ## What is web-bot-auth? Web-bot-auth is an emerging standard for AI agents to prove their identity using cryptographic HTTP message signatures (RFC 9421). Instead of relying on User-Agent strings — which can be faked — agents sign their requests with a private key. Sites verify the signature against a published public key. ## Why it matters User-Agent detection is no longer reliable: - **ChatGPT Agent Mode** uses a fake Chrome UA (`Chrome/138.0.0.0`) — indistinguishable from a browser by UA alone - **Perplexity** runs stealth crawlers (3-6M requests/day) with generic Chrome UAs - **Google-Agent** uses standard Chrome UA strings The industry is moving to cryptographic identity. OpenAI, Google, Cloudflare, Shopify, Vercel, and Visa are backing this approach. IETF standardization is in progress. ## What AgentGrade checks **Signatures directory published** — We check for `/.well-known/http-message-signatures-directory`. This is the standard location where a site publishes its agent identity and the public keys that can be used to verify its signed requests. **Members declared** — The directory should contain a `members` array listing the agent identities (e.g., "ChatGPT", "GoogleAgent") that the site recognizes or acts as. **Public keys available** — Each member should have a `publicKeyUrl` pointing to a fetchable public key for signature verification. ## How to implement Publish a JSON file at `/.well-known/http-message-signatures-directory`: ```json { "members": [ { "name": "my-agent", "publicKeyUrl": "https://example.com/.well-known/keys/agent.pub" } ] } ``` To verify incoming signed requests from known agents (like ChatGPT), use the `web-bot-auth` npm package: ```bash npm install web-bot-auth ``` ## Known agent directories | Agent | Directory URL | |-------|---------------| | ChatGPT | `https://chatgpt.com/.well-known/http-message-signatures-directory` | ## Learn more - [RFC 9421: HTTP Message Signatures](https://www.rfc-editor.org/rfc/rfc9421) - [web-bot-auth npm package](https://www.npmjs.com/package/web-bot-auth) - [Cloudflare blog: web-bot-auth](https://blog.cloudflare.com/web-bot-auth/) - [SeatGeek implementation](https://chairnerd.seatgeek.com/chasing-signature/) ## Related - [A2A](/kb/a2a) - [SKILL.md](/kb/skills) --- ### A2A — Agent-to-Agent Protocol > Google's protocol for AI agents to discover and communicate with other agents. Source: https://agentgrade.com/kb/a2a ## What is A2A? A2A (Agent-to-Agent) is an open protocol for AI agents to discover, authenticate with, and communicate with each other. A site that hosts an agent publishes an **Agent Card** — a JSON manifest at `/.well-known/agent-card.json` — that declares the agent's identity, capabilities, skills, and the URL where other agents can reach it. The protocol was introduced by Google in April 2025 and donated to the Linux Foundation later that year as part of an industry push for an open agent interoperability layer. A2A sits in a different layer than [MCP](/kb/mcp). MCP defines how an agent calls a *tool*; A2A defines how an agent calls *another agent*. The two compose: an MCP server exposes tools to a single agent; an A2A endpoint exposes a whole agent to the wider agent network. ## Why A2A matters The agent ecosystem in 2025-2026 is converging on a multi-agent pattern: a user-facing agent (Claude, ChatGPT, Gemini) coordinates with specialist agents hosted by other services. The booking agent on a travel site is one specialist; the refund agent on an e-commerce site is another. The user-facing agent needs a way to discover those specialists, learn what they can do, and call them — without per-vendor SDK integration. A2A is the protocol for that discovery and routing layer. An Agent Card tells the calling agent: - **Who you are** — name, description, version, vendor. - **What you can do** — a list of named skills, each with its own description. - **How to reach you** — the URL of your agent endpoint and supported transport (HTTP, SSE, WebSocket). - **How to authenticate** — the auth scheme, including OAuth flows or API key handoff. Without A2A, an agent that finds your site has no path from "this site exists" to "this site can help me with refunds via this exact endpoint and this exact auth." A2A is the bridge. ## How A2A works There are two pieces: the **Agent Card** (discovery) and the **A2A endpoint** (execution). **1. The Agent Card** is a static JSON file at `/.well-known/agent-card.json`. Other agents fetch it the same way they fetch any well-known file. A minimal valid Agent Card: ```json { "name": "Acme Support Agent", "description": "Handles customer inquiries, refunds, and order status.", "version": "1.0.0", "url": "https://acme.example.com/agent", "capabilities": { "streaming": true, "pushNotifications": false }, "skills": [ { "id": "process-refund", "name": "Process Refund", "description": "Issue a refund for a given order ID." }, { "id": "order-status", "name": "Order Status", "description": "Look up the status of an order by order ID." } ] } ``` **2. The A2A endpoint** at the URL declared in the card accepts requests for those skills. The protocol uses JSON-RPC-style messaging over HTTP (with optional SSE for streaming) and supports a structured message format with text, file, and structured-data parts. The calling agent reads the card, picks a matching skill, authenticates as needed, and POSTs a message to the endpoint. The receiving agent processes it and responds — possibly with streaming if the card declared streaming support. ## A2A vs other agent-interop protocols | Protocol | Purpose | Transport | What it exposes | |---|---|---|---| | **A2A** | Agent calls another agent | HTTP/SSE | A whole agent with named skills | | **[MCP](/kb/mcp)** | Agent calls a tool | JSON-RPC over HTTP/SSE | Discrete tools on a server | | **[OpenAPI](/kb/openapi)** | Agent calls a REST API | HTTP | API endpoints with schemas | | **[SKILL.md](/kb/skills)** | Tells agent how to use a service | Static Markdown | Prose playbook for an HTTP service | | **[WebMCP](/kb/webmcp)** | Agent calls a website through the browser | Browser API | Annotated HTML forms | A2A is the only one of these where the *callee is itself an agent*, not a tool or a static API. The difference matters: A2A endpoints can reason, plan, and delegate further. They're peers, not functions. ## Agent Card fields The full Agent Card spec includes: - **`name`** — human-readable agent name. Required. - **`description`** — what the agent does, in prose. Required. - **`url`** — where the A2A endpoint lives. Required. - **`version`** — agent version string. Recommended. - **`provider`** — vendor info: organization name, URL. - **`capabilities`** — feature flags: `streaming`, `pushNotifications`, `stateTransitionHistory`. - **`skills`** — array of skill objects with `id`, `name`, `description`, and optional `inputModes` / `outputModes`. - **`authentication`** — auth scheme details: type (`bearer`, `oauth2`, `apiKey`), and scheme-specific fields. - **`defaultInputModes`** / **`defaultOutputModes`** — supported content types for skill calls (`text`, `file`, `data`). AgentGrade's A2A check validates that the card exists, parses as JSON, and contains at least `name` and `url`. Richer cards score the same on the binary check but signal to consuming agents that the service is well-integrated. ## Who's using A2A A2A launched with backing from Google and a coalition of partners. Public adopters and integrators in 2025-2026 include: - **Google** — the original author; A2A is integrated into Vertex AI Agent Builder. - **Linux Foundation** — A2A was donated to the LF to ensure neutral governance. - **Atlassian** — published Agent Cards for Jira and Confluence agents. - **Box, MongoDB, PayPal, SAP, ServiceNow, Workday** — early ecosystem partners listed at launch. The adoption pattern mirrors OpenAPI's early years: a Google-led specification adopted by enterprise SaaS first, with broader uptake following as multi-agent orchestration moves from research demos to production. ## How to add A2A to your service 1. **Decide if you have an agent to expose.** A2A is for *agents*, not static APIs. If your service is a REST API, ship [OpenAPI](/kb/openapi); if it's an MCP tool server, ship [MCP](/kb/mcp). If you have a service that *plans, reasons, or holds conversation state*, A2A is the right layer. 2. **Author the Agent Card** at `/.well-known/agent-card.json`. Start with the minimal fields (`name`, `description`, `url`, `skills`). Add `capabilities` and `authentication` as you implement them. 3. **Stand up the A2A endpoint** at the URL in the card. The Python SDK at [github.com/a2aproject/A2A](https://github.com/a2aproject/A2A) is the reference implementation; JavaScript and other ports exist. 4. **Implement at least one skill.** Don't ship an Agent Card listing skills you haven't built — agents that call you and get errors will deprioritize you. 5. **Test with a caller.** Use a generic A2A client to verify the card parses and the endpoint responds to a real message. 6. **Link from llms.txt or SKILL.md** so non-A2A-native discovery paths find your card. ## Common errors scanners flag - **No Agent Card** — `/.well-known/agent-card.json` returns 404. AgentGrade's A2A check is informational; this is not a score penalty, but a missed opportunity for services that *do* host an agent. - **Card returns HTML, not JSON** — Single-Page App catch-all routes return the homepage HTML for every path. Serve raw JSON from a static file or framework route that bypasses the SPA fallback. - **Missing `name` or `url`** — the spec's minimum required fields. Cards without these are not callable. - **`url` points to a 404** — the card declares an endpoint that doesn't exist. - **Skills array empty or missing** — the card validates but there's nothing for an agent to call. - **CORS blocks the fetch** — agents that read the card from a browser context need `Access-Control-Allow-Origin: *` or a permissive policy. ## FAQ **Is A2A a replacement for [MCP](/kb/mcp)?** No. They solve different problems. MCP is for an agent calling a tool; A2A is for an agent calling another agent. A site that hosts a tool server publishes MCP; a site that hosts a whole agent publishes A2A. Some sites do both. **Do I need A2A if I have [OpenAPI](/kb/openapi)?** Only if your service is an agent (reasons, plans, holds state across turns). REST APIs ship OpenAPI; agents ship A2A. The two coexist — an A2A agent often calls REST APIs documented in OpenAPI as part of its implementation. **Is A2A required for AgentGrade scoring?** A2A is an informational check, not a scored one. AgentGrade flags the presence of an Agent Card but does not penalize its absence for sites that aren't agents. Static-content sites should not publish empty Agent Cards. **What happens if my Agent Card lies about capabilities?** The card declares what the agent claims; the calling agent will eventually find out via failed requests. As with any declared-vs-verified signal, lying degrades trust over time. AgentGrade's check is currently presence-only and does not probe declared skills. **Can I publish multiple Agent Cards?** The spec is one card per origin. Services that host multiple distinct agents typically split them onto subdomains. **What's the relationship between A2A and Google's Vertex AI Agent Builder?** Vertex AI Agent Builder is Google's hosted agent runtime; it produces and consumes A2A. A2A itself is the open protocol, donated to the Linux Foundation, that Vertex and any other agent runtime can speak. **How do agents discover Agent Cards?** The same way they discover any well-known file: a direct fetch of `/.well-known/agent-card.json`, or following a link from `/llms.txt`. Agent indexes and directories are starting to crawl Agent Cards the way search engines crawl sitemaps. **Does A2A support payment?** The spec includes capability declarations but payment is delegated to the underlying auth scheme. Sites that combine A2A with [x402](/kb/x402) typically declare the payment requirement in the skill description and gate the endpoint with a 402 challenge. ## Spec maturity **Open standard, early adoption.** A2A is governed by the Linux Foundation. The Python SDK is the reference implementation. Early adopters are enterprise SaaS; broader adoption is following as multi-agent orchestration moves into production. ## Learn more - [A2A Protocol Specification](https://a2a-protocol.org/latest/specification/) — official docs - [A2A GitHub repository](https://github.com/a2aproject/A2A) — reference implementations - [MCP](/kb/mcp) — companion protocol for tool calls - [Agent Readiness](/agent-readiness) — how A2A fits into the broader picture ## A2A in 2026 A2A reached **v1.0.0 on March 12, 2026** — the project calls it the first stable, production-ready version. The headline addition is **signed Agent Cards**: a `signatures` field on the card lets other agents verify cryptographically who published it. v1.0.1 followed in May 2026. The Agent Card path is now formally settled: `/.well-known/agent-card.json` is registered in the IANA well-known URI registry (permanent status, registered August 2025, change-controlled by the Linux Foundation). Spec versions before v0.3.0 used `/.well-known/agent.json` — if you published the old path, serve the new one and keep a redirect. AgentGrade's scanner probes the current path first and falls back to the legacy one. The Linux Foundation reported in April 2026 that more than 150 organizations support the standard, with production deployments across multiple industries. --- ### WebMCP — Browser Agent Interaction > A W3C draft protocol that lets browser-based AI agents interact with websites through annotated forms. Source: https://agentgrade.com/kb/webmcp ## What is WebMCP? WebMCP is a W3C Community Group draft proposal that lets AI agents interact with websites *through the user's browser* rather than over a separate API. Sites annotate existing HTML forms with attributes that declare them as callable tools; the browser exposes those tools to an agent via a new `document.modelContext` API. The proposal is backed by Google and Microsoft and is available in Chrome as an origin trial since Chrome 149 (June 2026). The name is a deliberate echo of [MCP](/kb/mcp), Anthropic's Model Context Protocol, but the two are distinct specs that solve different problems. MCP defines a JSON-RPC protocol for an agent to call tools on a server. WebMCP defines a browser API for an agent to call tools that already exist as forms on a page. They share the "tools" concept and not much else. ## Why WebMCP matters The traditional path for agent-website integration is: the site publishes an API ([OpenAPI](/kb/openapi)) or an MCP server, the agent authenticates separately, and calls run over a backchannel. This works for first-party agent integrations but breaks down for the long tail of websites that have valuable functionality but no API team to build a parallel surface. WebMCP takes the inverse approach: the site already has a form to do the thing, the user is already logged in, the browser already has the session. Why build a parallel API? Annotate the existing form with a few attributes, and an agent in the browser can call it directly — inheriting the user's auth, the site's CSRF protections, and the browser's permissions model for free. The use cases are mostly *user-in-the-loop* agent flows: an agent acting on behalf of a logged-in user on the site the user is currently visiting. Booking a flight, filing a support ticket, posting a comment — anywhere a form would normally take a human submission. ## How WebMCP differs from [MCP](/kb/mcp) | | MCP | WebMCP | |---|---|---| | Who calls whom | Agent → server | Agent → browser → server | | Where the agent runs | Outside the browser | Inside or alongside the browser | | Authentication | OAuth 2.1 / API keys | The user's existing browser session | | Transport | JSON-RPC over HTTP/SSE | Browser internal API (`document.modelContext`) | | What you build on the site | A dedicated MCP endpoint | Attribute annotations on existing HTML forms | | Connection lifetime | Persistent across sessions | Ends when the tab closes | | Discovery | MCP registry / well-known | DOM scan + `/.well-known/webmcp.json` manifest | The architectures are nearly opposites. MCP gives external agents a stable backend interface; WebMCP gives in-browser agents access to the existing frontend. A site can publish both: MCP for headless agent integrations, WebMCP for user-in-the-loop browser flows. ## How WebMCP works There are two cooperating pieces: **DOM annotations** (per-page) and an optional **manifest** (per-site). **1. Annotated forms.** A site marks any HTML form as agent-callable with three custom attributes: ```html
``` The browser-side WebMCP runtime scans the DOM for `tool-name` elements, builds a tool list, and exposes it to the agent. When the agent invokes `search-products` with `q: "running shoes"`, the browser fills in the form and submits it on the agent's behalf — through the user's session. **2. The manifest.** A site can publish `/.well-known/webmcp.json` declaring tools that may not be visible on every page (or that involve multi-step flows). The manifest format mirrors MCP's tool descriptors: ```json { "spec": "webmcp/0.1", "tools": [ { "name": "search-products", "description": "Search the product catalog", "url": "/search", "method": "GET", "parameters": [ { "name": "q", "type": "string", "description": "Search query" } ] } ] } ``` The manifest gives agents a discovery path that doesn't depend on DOM scraping. AgentGrade checks both: a present `/.well-known/webmcp.json` and any `tool-name` attributes on the homepage. ## WebMCP vs other agent-interop layers | Spec | Where the agent lives | What's exposed | Auth | |---|---|---|---| | **WebMCP** | In the browser | Annotated HTML forms | User's session | | **[MCP](/kb/mcp)** | Outside the browser | JSON-RPC tools on a server | OAuth / API keys | | **[A2A](/kb/a2a)** | Anywhere | A whole agent with named skills | Agent-level auth | | **[OpenAPI](/kb/openapi)** | Anywhere | REST endpoints with schemas | Per-endpoint scheme | | **[SKILL.md](/kb/skills)** | Anywhere | Prose playbook | N/A | WebMCP is the only one that runs inside the user's browser. The others all assume the agent is on a server or in a chat client; WebMCP assumes the agent is the *user's user agent*, with all the trust and authority that implies. ## Current status WebMCP is a **Draft Community Group Report** under the W3C Web Machine Learning Community Group. As of mid-2026: - The spec is published at [webmachinelearning.github.io/webmcp](https://webmachinelearning.github.io/webmcp/). - Chrome’s implementation is in origin trial (sign-ups opened with Chrome 149); Microsoft Edge runs its own opt-in origin trial. Neither ships by default. - It is **not** shipped in any production browser. Firefox and Safari have not announced plans. - The spec is expected to change before reaching W3C Working Draft status. Because the user-side surface is gated on browser support, sites that ship WebMCP today are early — they're betting on the spec stabilizing and browsers shipping. The cost of being early is low (a few HTML attributes); the upside is being agent-callable for the first wave of in-browser agents that adopt the spec. ## Who's backing WebMCP - **Google** — Chrome team published the proposal and ships the prototype. - **Microsoft** — co-editor on the spec; co-publisher of a [Chrome developer blog post](https://developer.chrome.com/blog/webmcp-mcp-usage) explaining the relationship between MCP and WebMCP. - **W3C Web Machine Learning Community Group** — the governance body. Notably absent: Anthropic (the MCP author) and OpenAI. The spec is positioned as complementary to MCP, not competitive, but the overlap in naming has caused some confusion. ## How to add WebMCP to your site 1. **Pick the forms that matter.** Don't annotate every form on the site. Pick the 1-3 most valuable agent-callable actions (search, submit, subscribe). 2. **Add the attributes.** `tool-name` on the `
` element, `tool-description` on the form, `tool-param-description` on each ``. 3. **Use lowercase-hyphen names.** `search-products`, not `searchProducts`. 4. **Write descriptions for an agent, not a human.** Lead with the verb. Be specific about the parameter type (e.g., "Search query string, 1-200 chars" not just "search"). 5. **Publish the manifest.** `/.well-known/webmcp.json` listing the same tools. This is the discovery path for agents that don't scan the DOM. 6. **Test via the Chrome origin trial** (or Edge’s origin trial) with a registered token. ## Common errors scanners flag - **No manifest** — `/.well-known/webmcp.json` returns 404. The check is informational; site can still expose form-level tools. - **Manifest returns HTML** — SPA catch-all routes return the homepage instead of the JSON file. - **Form annotations without descriptions** — `tool-name` is set but `tool-description` is missing, so agents can't tell what the form does. - **Invalid tool name** — uppercase, underscores, or special chars in `tool-name`. - **Annotations on non-form elements** — only `` elements should carry `tool-name`. ## FAQ **Is WebMCP a fork of [MCP](/kb/mcp)?** No. They are separate specs from separate working groups with separate architectures. They share the "tools" concept (a named, parameterized action an agent can call) but the protocols, transports, and trust models are completely different. The naming is unfortunate. **Will Chrome's WebMCP work in Firefox or Safari?** Not currently. Firefox and Safari have not implemented the spec. Cross-browser support depends on the spec maturing past Draft status, which is a multi-year process. **Should I add WebMCP if I already have MCP?** Yes if your service has a website with forms that users fill out today. The two address different agent contexts: server-side agents use MCP; user-in-the-loop browser agents use WebMCP. Sites with both let agents pick the right surface. **Does AgentGrade penalize sites without WebMCP?** No. WebMCP is an informational check. The score is not penalized for missing it. It is a positive signal when present. **Is WebMCP secure?** The security model inherits from the browser: same-origin enforcement, the user's existing session, CSRF protection. An agent can only call tools the user could call manually on the same page. There is no escalation surface beyond what the user already has. The risk is that the agent acts on the user's behalf without the user understanding what's happening — a UX problem, not a security boundary problem. **What replaces `/.well-known/webmcp.json` if I host my forms in an iframe?** Same-origin rules apply: an agent in the parent page can call form-level tools in same-origin iframes. Cross-origin iframes are isolated. The manifest should be on the iframe's origin. **Does WebMCP work with single-page apps?** Yes, but forms must be present in the DOM at the time the agent scans. SPAs that hydrate forms on user interaction may need to declare them in the manifest instead. **When will WebMCP ship to stable Chrome?** No public timeline. The spec is Draft; production rollout depends on spec stability, security review, and demonstrated developer adoption. ## Spec maturity **Draft, in origin trial.** WebMCP is a W3C Community Group draft (not on the W3C standards track). Chrome opened an origin trial in Chrome 149 (June 2026) and Edge runs its own opt-in trial; nothing ships by default yet, and the API surface is still moving — Chrome deprecated `navigator.modelContext` in favor of `document.modelContext` in Chrome 150. Note that the `/.well-known/webmcp.json` manifest is a community convention, not part of the draft — the spec defines only the in-page API. The spec may change. Adoption is early — annotating forms is cheap insurance for sites that want to be ready when production browser support arrives. ## Learn more - [WebMCP specification](https://webmachinelearning.github.io/webmcp/) — the W3C draft - [WebMCP GitHub repository](https://github.com/webmachinelearning/webmcp) — proposals and discussions - [Chrome: When to use WebMCP and MCP](https://developer.chrome.com/blog/webmcp-mcp-usage) — the official positioning - [MCP](/kb/mcp) — the server-side counterpart - [A2A](/kb/a2a) — agent-to-agent protocol --- ### Infrastructure — Cache, Errors, Redirects > HTTP-level behaviors agents rely on: cache headers, structured errors, HTTPS redirect, sitemap. Source: https://agentgrade.com/kb/infrastructure ## What is "Infrastructure"? The Infrastructure group covers low-level HTTP behavior that determines whether agents can interact with your origin reliably. None of these are protocol-specific — they apply to any site, whether it serves an [MCP](/kb/mcp) endpoint, an [OpenAPI](/kb/openapi) spec, or just static content. ## HTTPS redirect If a human types `yourdomain.com` into a browser, the browser tries HTTPS first and most of the time gets there silently. Agents don't do that. They follow whatever URL they were handed — and if that URL is `http://yourdomain.com` and your server doesn't redirect, the agent's HTTP library either refuses to send the request (most modern AI clients block plain HTTP) or sends it unencrypted (older ones). Either way, the agent never reaches your real site. **Fix**: respond with `301` or `308` from `http://yourdomain.com/*` to the same path on HTTPS. Most platforms do this for you (Cloudflare, Vercel, Heroku, build.io). If you self-host, add an nginx `server` block listening on port 80 that issues the redirect. ## Sitemap.xml Agents discover your URL surface from `/sitemap.xml`. Without it, the only paths an agent can reach are those linked from your homepage or declared in [llms.txt](/kb/llms-txt) — typically a small fraction of your real content. **Fix**: serve an XML sitemap at `/sitemap.xml`. Frameworks like Next.js, Hugo, Jekyll, and Wordpress generate one automatically. For a hand-rolled sitemap: ```xml https://yourdomain.com/ https://yourdomain.com/docs ``` ## Cache headers Every well-configured server emits at least one of `Cache-Control`, `ETag`, or `Last-Modified` on responses. Without them, agents have no way to know whether to re-fetch or use a cached copy — they either re-download every time (slow, expensive) or stale-cache forever (incorrect data). **Fix**: most web frameworks set these by default for static files. For dynamic responses, set `Cache-Control` explicitly: ```javascript // Express — for content that changes occasionally res.set('Cache-Control', 'public, max-age=3600'); // For never-cache responses (still satisfies the check): res.set('Cache-Control', 'no-store'); ``` `no-store` counts as a valid cache header — it tells the agent "do not cache this," which is itself useful information. The check fails when *no* cache header is present at all. ## Structured errors (JSON 404) When an agent hits a wrong URL, an HTML 404 page (with nav, footer, search box, etc.) wastes tokens and can fool a confused agent into thinking it got real content. A JSON 404 returns a small, parseable error: ```json { "error": "not_found", "path": "/wrong-url" } ``` **Fix**: use content negotiation in your 404 handler. Return JSON when the client sends `Accept: application/json`, HTML otherwise. Express example: ```javascript app.use((req, res) => { res.status(404); res.format({ 'application/json': () => res.json({ error: 'not_found', path: req.path }), 'text/html': () => res.send('

404 Not Found

'), default: () => res.json({ error: 'not_found', path: req.path }), }); }); ``` This change is invisible to humans (browsers send `Accept: text/html` and get HTML) but transformative for agents (they send `Accept: application/json` and get JSON they can parse). ## Rate limit headers (optional) If your service rate-limits, expose the state via `X-RateLimit-Remaining`, `X-RateLimit-Reset`, or `Retry-After`. Agents that hit a limit can wait the right amount of time and retry instead of failing. This check is optional because most sites don't rate-limit at all — only API providers and SaaS apps do. Static sites have nothing to expose. ## Why these are required None of these break a website for humans. A site missing cache headers still loads in a browser; a site that returns HTML 404s still shows a friendly error page; a site with no sitemap still ranks in Google. That's exactly why they're easy to overlook — humans don't feel the problem. Agents do. Every one of these is the difference between "the agent gets the data" and "the agent gets noise, wastes tokens, or gives up." Marking them required is how we keep them from being silently skipped. ## Related - [WebMCP](/kb/webmcp) --- ### JavaScript-Rendered Sites and Agent Visibility > Why client-rendered SPAs are invisible to AI crawlers, what it does and does not break, and how to fix it. Source: https://agentgrade.com/kb/javascript-rendering ## What is "JavaScript-rendered"? A page is JavaScript-rendered when the HTML the server sends is essentially empty — the actual content (headings, prose, product information) only appears after the browser downloads and runs a JavaScript bundle that mounts a framework like React, Vue, Svelte, or Angular into an empty root element. A typical JS-rendered homepage looks like this on the wire: ```html
``` The visible `` content is zero bytes. Everything you see in a browser was constructed client-side after the JS ran. ## Why this matters for agents Most AI crawlers do not execute JavaScript. When ChatGPT, Claude, Perplexity, Gemini fetches, or a typical agent framework hits your URL, they get the raw HTML — and your homepage is blank. Your product description, headings, links, and prose are invisible to them. This is a real harm for retrieval and summarization. An LLM asked "what does this company do?" while citing your URL will produce a poor answer or hallucinate, because there is nothing on the page to read. ## What this does *not* break Tags emitted into the static `` of your HTML are unaffected by client-side rendering. Even a fully JS-rendered SPA can pass these checks if the build tool populates the head correctly: - JSON-LD structured data (`