guide.html
Setting up Accessible to Agents
Install, pick a preset and check it works in about five minutes. The rest of this guide explains every option, so you can tune it to your site.
Requirements
- WordPress 6.9 or later and PHP 8.1 or later.
- Pretty permalinks (anything except "Plain" under Settings → Permalinks) for
/page.md,/llms.txtand/ask. With plain permalinks, agents can still use?format=mdand theAcceptheader. - MySQL 5.6+ or MariaDB 10.0.5+ for the full-text search index. Older databases fall back to WordPress search.
- Optional: WordPress 7.0+ to share API keys through Settings → Connectors.
Install
- In your WordPress admin, go to Plugins → Add New and search for Accessible to Agents.
- Click Install Now, then Activate.
- You'll see a notice linking to Settings → Accessible to Agents. The Recommended preset is already applied, so the plugin is working from this moment.
Installing from source code instead? Run composer install --no-dev in the plugin folder first, and make sure the folder is called accessible-to-agents.
Choose a preset
The buttons at the top of the settings page switch groups of features on or off in one go. They never touch your choices of post types, pinned pages, excluded categories or business details. Change any single option afterwards and the preset shows as "Custom".
Minimal
Markdown versions and llms.txt only. No crawler rules, no search or MCP, no editor fields, no analytics. For sites that want to be readable and nothing more.
Recommended (default)
Markdown, discovery, crawler rules that allow AI search and answers but block training, agent search, the MCP server, editor fields and insights.
Full
Every switch on, including llms-full.txt, business facts, collapsing duplicate text, email redaction and the extra FAQ rules. Review the Policy tab afterwards.
Check it works
- Open any page on your site and add
.mdto the end of the address, for examplehttps://example.com/about.md. You should see plain Markdown. - Open
https://example.com/llms.txt. - Go to Tools → Site Health. Accessible to Agents's checks carry a blue "AI agents" badge. Anything it flags comes with the exact fix (see Server configuration).
- In the block editor, open a post and use See what agents see in the "AI agents" panel.
Or from a terminal:
curl -H "Accept: text/markdown" https://example.com/about/
curl https://example.com/llms.txt
curl "https://example.com/ask?query=opening+hours"
Settings, option by option
All settings are under Settings → Accessible to Agents, in six tabs. "Default" is the Recommended preset.
Content tab
How your pages are turned into Markdown, and which content is included.
| Option | Default | What it does |
|---|---|---|
| Markdown via Accept header | On | When an agent asks for text/markdown, the normal URL returns Markdown instead of HTML. Browsers never ask for it, so visitors are unaffected. |
| /slug.md URLs | On | Adding .md to any page or post URL returns its Markdown. Your homepage (if it's a page) is at /index.md. |
| ?format=md fallback | On | Adding ?format=md to a URL also returns Markdown. Keep this on: it works even when your server blocks .md URLs. |
| Homepage and archives | On | A latest-posts homepage and category, tag, author and date archives also return Markdown: the page title and a list of its posts, each linking to its own Markdown, with next / previous page links. Search results always stay HTML. |
| Page-builder cleanup | On | Removes builder wrappers, scripts, styles, forms, icons and empty elements; turns accordions and toggles into headings, keeps tab titles with their content, fills in animated counters and turns icon rows into lists. Also needed for FAQ detection. Only switch it off to see the raw output. |
| Include media | On | Keeps images (as Markdown images), and video, audio and embeds (as links). Off removes all media, which shortens pages for text-only agents. |
| Include image alt text | On | Uses each image's alt text as its description. Only applies when media is included. |
| Keep tables as Markdown tables | On | Tables stay as Markdown tables. Off turns each row into a line of text ("Cell 1 — Cell 2"), which suits very simple agents. |
| Include last-modified date | On | Adds modified to the Markdown header, so agents know how fresh a page is. |
| Collapse duplicate blocks | Off | Leaves out paragraphs of 80+ characters that already appeared earlier on the same page. Useful for landing pages that repeat the same pitch in several sections. |
| Agent summary and key facts | On | Adds two fields to the editor. The summary becomes the description in the Markdown header; key facts appear as a list under the title. See In the editor. |
| FAQ count in header | On | Adds faq_count to the Markdown header when a page has FAQs, so agents know to look for them. |
| Manual FAQs field | On | Adds a "FAQs for agents" field to the editor. Questions you add there appear under "Frequently asked questions" at the end of the page's Markdown, unless the page already shows them. |
| Detected FAQs in preview | On | Lists the FAQs found on a page, how each was found and how sure Accessible to Agents is, in the editor's "See what agents see" preview. |
| Treat "?" headings as FAQs | Off | Counts any heading ending in "?" (and the text under it, up to the next heading) as a FAQ. Catches hand-made FAQ sections, but also headings like "Why choose us?", so check the preview before relying on it. |
| Custom FAQ selectors | Off | Finds FAQs in your theme's own markup using the three selectors below. See How FAQs are found for an example. |
| FAQ item selector | Empty | The CSS selector for the element that wraps one question and its answer, e.g. .faq-item. |
| Question selector | Empty | The question, inside an item, e.g. .faq-question. |
| Answer selector | Empty | The answer, inside an item, e.g. .faq-answer. All three selectors support tag, .class, #id, [attr], [attr="value"], [attr*="value"], a b, a > b and commas. Anything else is rejected when you save. |
| Included post types | Posts, Pages | Only these post types get Markdown versions, appear in llms.txt, the sitemap and search, and can be read over MCP. Tick your products, services or other custom post types here. |
Discovery tab
How agents find your Markdown, your key pages and your APIs.
| Option | Default | What it does |
|---|---|---|
| Advertise Markdown versions | On | Adds <link rel="alternate" type="text/markdown"> to each page's head and a matching Link header, so agents that fetch the HTML learn where the Markdown is. |
| llms.txt | On | A short guide to your site at /llms.txt: name, description, key pages, a section per post type, and how to search and connect over MCP. |
| llms-full.txt | Off | All included content in one file at /llms-full.txt (up to 200 posts). Handy for small sites; can be large on big ones. |
| Markdown sitemap | On | A list of every Markdown URL at /sitemap.md. |
| API catalog | On | Lists your APIs at /.well-known/api-catalog (the RFC 9727 standard): the WordPress REST API, agent search and the MCP server. The homepage points to it with a Link header. |
| Key pages | None | Pages pinned at the top of llms.txt, such as pricing, services and contact. Hold Ctrl (Cmd on a Mac) to pick several. Pick your three to ten most useful pages. |
| Business facts | Off | Publishes the details below at /about.md (with your About page, if you have one, added after them) and as schema.org JSON-LD on your homepage. |
| Business details | Empty | Name, type (organization, local business, shop, restaurant or professional service), description, address, phone, email, opening hours and profile links (one URL per line). Only used when Business facts is on. |
Policy tab
Who may use your content and how, and what agents must never see.
| Option | Default | What it does |
|---|---|---|
| AI crawler manager | On | Adds allow and block rules for AI crawlers to your robots.txt. Your existing rules are kept. |
| Crawler policy | Search & answers, no training |
Search & answers, no training: allows bots that power AI search and fetch pages when a person asks, blocks bots that collect content to train AI models. Allow all or Block all AI crawlers. Custom: choose per bot below. |
| Per-bot rules | From policy | The 24 known AI bots, grouped as training, search indexing and user-triggered fetch, each set to allow or block. Changing any of them switches the policy to Custom. |
| Content-Signal | On | Sends a Content-Signal header (and adds a line to robots.txt) stating how your content may be used. |
| Allowed uses | Search: yes AI input: yes AI training: no | Search: building a search index. AI input: using your pages to answer a question right now. AI training: training or fine-tuning models. |
| Exclude comments and user content | On | Keeps visitor comments out of the Markdown. Keep this on: anyone can write a comment, and text written to trick an AI ("ignore your instructions and…") is a real risk known as prompt injection. If you turn it off, comments are clearly marked as untrusted. |
| Respect noindex | On | Content marked noindex in Yoast SEO, Rank Math or SEOPress is hidden from agents too. |
| Excluded categories | None | Posts in these categories are never shown to agents, and their category archives stay HTML only. |
| Redact email addresses | Off | Replaces every email address in the Markdown with [email redacted]. |
| Redact phrases | Empty | One word or phrase per line. Each is replaced with [redacted] in the Markdown, e.g. internal project names or a phone number you don't want quoted. |
Always hidden, whatever the settings: drafts, scheduled and private posts, and password-protected posts. Single posts can also be hidden from the editor.
Search & MCP tab
The agent search at /ask and the MCP server. A status box at the top shows the search and MCP addresses, how many pages are indexed and the last provider error, with Rebuild index and Test provider connection buttons.
| Option | Default | What it does |
|---|---|---|
| Agent search | On | Agents can search your site at /ask?query=… and get back the most relevant pages. If your site already has a page at /ask, that page wins and search stays available at /wp-json/accessible-to-agents/v1/ask. |
| Search approach | Full-text |
WordPress search: the built-in search. Nothing to set up; weak for questions. Full-text index: Accessible to Agents's own index of every page's Markdown, kept up to date in the background. Recommended. Semantic: matches meaning using an embedding provider you choose. Sends your published content and search queries to that provider. See Setting up semantic search. |
| Embedding provider | OpenAI | Semantic search only. OpenAI, Google Gemini, Cloudflare Workers AI, Mistral, Voyage AI, Jina AI, Ollama (self-hosted) or any other OpenAI-compatible API. You bring your own account. |
| API key | None | Semantic search only. Stored encrypted and never shown again; you only ever see where the key comes from and its last four characters. Can also come from wp-config.php or Settings → Connectors. |
| Cloudflare account ID | Empty | Cloudflare Workers AI only. Found on your Cloudflare dashboard's overview page. |
| API URL | Provider's | Ollama and "Other OpenAI-compatible API" only. For Ollama, your Ollama server's address followed by /v1, e.g. http://localhost:11434/v1. |
| Model | Provider's | Leave empty for the provider's recommended model. Changing it rebuilds the index, because vectors from different models can't be compared. |
| Semantic searches per hour | 100 | The most new questions sent to the provider in one hour (10 to 10,000). Repeated questions are cached for a day and don't count. Above the limit, search quietly uses full-text until the hour is over. |
| MCP server | On | Lets AI assistants connect to your site as a read-only MCP server. See Connecting over MCP. |
Insights tab
| Option | Default | What it does |
|---|---|---|
| Agent analytics | On | Counts visits from AI agents and crawlers, per day, page and format (Markdown or HTML). No IP addresses or full user agents are stored, and logged-in users aren't counted. |
| AI referral tracking | On | Counts people arriving from AI assistants: ChatGPT, Perplexity, Claude, Gemini, Copilot, Meta AI, DeepSeek, Grok, Mistral and You.com. |
| Keep stats for (days) | 90 | Older daily totals are deleted automatically each day (7 to 730 days). |
Advanced tab
| Option | Default | What it does |
|---|---|---|
| Site Health checks | On | Adds Accessible to Agents's checks to Tools → Site Health. See Site Health checks. |
| Agent accessibility checks | On | Checks pages, as served with your theme, for things that stop agents (and screen readers) understanding them: images without alt text, missing or repeated main headings, skipped heading levels, links with no text or vague text, unlabelled buttons and form fields, submenus that only open on hover, and a missing page language or title. Shown in Site Health and the editor preview. |
| Cache Markdown | On | Keeps each page's rendered Markdown until the page is next saved (or settings change), so agents get it instantly. Switch off only while debugging. |
In the editor
Posts and pages get an AI agents panel in the block editor's sidebar (a box of the same name in the classic editor):
- Agent summary
- One or two sentences agents see first, as the page's description. Write it like the answer to "what is this page about?". Without one, a hand-written excerpt is used.
- Key facts
- One fact per line: prices, dates, opening hours, delivery areas. They appear as a list right under the title, where agents can't miss them.
- FAQs for agents
- Question on the first line, answer below it, a blank line between FAQs:
Do you deliver on Saturdays? Yes, between 9am and 1pm. Can I return an item? Within 30 days, unused and in its box. - Hide from AI agents
- Keeps this one post out of the Markdown,
llms.txt, the sitemap, search and MCP. - See what agents see
- Shows the exact Markdown, an estimate of its length in tokens, the detected FAQs with how each was found, and any agent accessibility problems on the published page. If the page is hidden from agents, it says why. The preview shows the last saved version, so save first.
How FAQs are found
Accessible to Agents looks for questions in several ways, in this order. If two find the same question it's listed once, named after the first, with the higher confidence. The confidence shows how sure Accessible to Agents is that it really is a FAQ.
- FAQ schema (FAQPage JSON-LD), as added by SEO plugins: 100% confidence.
- Microdata marked up as schema.org Questions: 95%.
- Details blocks (
<details><summary>): 90% when the summary ends in "?", otherwise 70%. - Accessible accordions, where a button controls a panel: 75%.
- Page-builder widgets: Kadence, Spectra, Elementor, SiteOrigin, Beaver Builder, Divi, WPBakery, Yoast and Rank Math FAQ blocks: 85%.
- Your custom selectors, if switched on: 90%.
- "?" headings, if switched on: 50%.
Tabs are never treated as FAQs: each tab title simply becomes a heading above its content.
Example: custom selectors
If your theme prints FAQs like this:
<div class="faq-list">
<div class="row">
<dt>Do you take cards?</dt>
<dd>All major cards.</dd>
</div>
</div>
switch on Custom FAQ selectors and enter .faq-list .row as the item, dt as the question and dd as the answer. Check the result in the editor preview.
Setting up semantic search
Semantic search understands meaning, so a question in the agent's words still finds your page in yours. You bring your own account with an embedding provider: any cost is between you and them, and the hourly limit keeps it predictable.
- Choose a provider and create an API key in its dashboard. Want no bills? Ollama runs on your own server, and several providers have free tiers (check their current terms).
- Go to Settings → Accessible to Agents → Search & MCP, set Search approach to Semantic and pick the provider.
- Add your key (see below), and for Cloudflare your account ID, or for Ollama your server's URL. Save.
- Click Test provider connection. Then the index rebuilds in the background; the status box shows progress.
Where to put the API key
Accessible to Agents uses the first key it finds, in this order:
- An environment variable or a constant in
wp-config.php, calledACCESSIBLE_TO_AGENTS_EMBEDDING_API_KEY. The safest option: the key is never in the database. - Settings → Connectors (WordPress 7.0+). OpenAI and Google use WordPress's own connectors; Accessible to Agents adds ones for Mistral, Voyage AI, Jina AI and Cloudflare. A key there can be shared with other plugins.
- The API key box on the Search & MCP tab. It's encrypted with your site's security keys from
wp-config.phpbefore it's saved, so it stays unreadable in database backups and copies.
// wp-config.php
define( 'ACCESSIBLE_TO_AGENTS_EMBEDDING_API_KEY', 'your-key-here' );
Good to know: if your site's security keys change, a key saved in the box can't be decrypted any more, and the settings page asks you to enter it again. Define ACCESSIBLE_TO_AGENTS_ENCRYPTION_KEY (32+ random characters) in wp-config.php to use a separate encryption key that survives a security-key reset.
What is sent to the provider
The title, summary, key facts and start of each published page agents may see (when it's indexed or updated), and the search queries agents send (once each; repeats are cached). Nothing else, and never visitors' IP addresses.
Connecting over MCP
MCP (Model Context Protocol) lets AI assistants use your site as a tool. In an assistant that supports remote MCP servers, add a connector with this URL (no login needed):
https://example.com/wp-json/accessible-to-agents/v1/mcp
The exact address is shown in the status box on the Search & MCP tab. The tools, all read-only:
- search
- Find the pages that best answer a question. Only offered when agent search is on.
- site-overview
- What the site is, its key pages and sections (your
llms.txt). - get-page
- The full Markdown of one page, by URL or path.
- list-pages
- Pages and posts with a one-line description, 50 at a time.
- get-faqs
- The questions and answers on one page.
Agents can discover the server on their own through /.well-known/ai-catalog.json, its Server Card, the API catalog and llms.txt. The same tools are also registered as WordPress Abilities, so other AI plugins on your site can use them.
Server configuration
On Apache, everything usually works out of the box. On nginx, some common configurations stop requests reaching WordPress. Site Health tells you which of these you need; add them inside your site's server { } block, then reload nginx.
.md URLs return 404
nginx treats .md as a static file. Let it fall through to WordPress:
location ~ \.md$ {
try_files $uri /index.php?$args;
}
robots.txt returns 404
Many configs have a location = /robots.txt block without a fallback:
location = /robots.txt {
try_files $uri /index.php?$args;
}
/.well-known/ files return 403
A rule like location ~ /\. { deny all; } (which protects hidden files) also blocks the API catalog and AI catalog. Keep that rule, and add:
location ^~ /.well-known/ {
try_files $uri /index.php?$args;
}
The ^~ makes it win over the hidden-files rule. Real files there, such as Let's Encrypt challenges, are still served first.
Page caches
Because one URL can return HTML or Markdown, your cache must respect the Vary: Accept header Accessible to Agents sends. If Site Health reports that HTML and Markdown are mixed up, set your cache plugin or CDN to vary on Accept, or to skip caching requests that ask for text/markdown. Agents can always use .md URLs meanwhile.
If you use Cloudflare, leave its own "Markdown for Agents" feature off, so Accessible to Agents's cleaner Markdown is served.
Site Health checks
Under Tools → Site Health, with a blue "AI agents" badge:
- URLs are registered: the rewrite rules for
.mdURLs,llms.txtandsitemap.mdare in place (with a button to fix them if not). .mdURLs are reachable: the server passes them to WordPress.- HTML and Markdown are cached separately: your page cache respects
Vary: Accept. - Cloudflare: whether Cloudflare is converting pages to Markdown itself.
llms.txtis served by Accessible to Agents: no physical file or SEO plugin is serving a different one.- AI crawler rules are published:
robots.txtreaches WordPress and includes the rules. - Discovery files in
/.well-known/are published: the API catalog and AI catalog aren't blocked. - Agent accessibility: your homepage and a sample page are checked for missing alt text, heading problems, vague or empty links, unlabelled buttons and fields, and hover-only menus. Each problem comes with how to fix it. AI agents read pages much like screen readers do, so these fixes help both.
Reading AI Insights
Go to Dashboard → AI Insights (there's also a summary widget on the main Dashboard). You'll see:
- Top agents, grouped as training, search and user-triggered: which companies' bots read your site.
- Top pages, and how many requests were for Markdown versus HTML.
- AI referrals: people who arrived from an AI assistant's answer, over time.
A lot of Markdown traffic means agents are finding the clean versions. Training bots still appearing while blocked means they're ignoring robots.txt; you may want to block them at your firewall or CDN.
WP-CLI commands
| Command | What it does |
|---|---|
| wp accessible-to-agents preview <id> [--fresh] | Show the Markdown agents get for a post, and its token estimate. |
| wp accessible-to-agents accessibility <id|url> | Check a page for agent accessibility problems. |
| wp accessible-to-agents faqs <id> | List the FAQs found on a post, with source and confidence. |
| wp accessible-to-agents search "<question>" | Search the site as agents do. --engine=wordpress|fulltext|semantic tries another approach without changing the setting. |
| wp accessible-to-agents search-index | Build the search index now instead of in the background. |
| wp accessible-to-agents set-api-key <provider> < key.txt | Save an embedding API key, encrypted. Reads the key from input so it stays out of your shell history. --remove deletes it. |
| wp accessible-to-agents preset <name> | Apply the minimal, recommended or full preset. |
| wp accessible-to-agents regenerate | Clear all cached Markdown and generated files, then re-render everything. |
For developers
Every stage has a filter. The most useful:
- accessible_to_agents_markdown_output
- The final Markdown for a post. Also:
_source_html,_clean_html,_body,_front_matter,_converter. - accessible_to_agents_faq_adapters
- Teach FAQ detection your theme's or builder's markup: item, question and answer selectors.
- accessible_to_agents_faq_detectors
- Add a whole detection layer (a class extending
AccessibleToAgents\Markdown\Faq\Detector). - accessible_to_agents_faqs
- The final FAQ list for a post.
- accessible_to_agents_bots / accessible_to_agents_ai_referrers
- Add or change known AI bots and AI assistants.
- accessible_to_agents_api_catalog
- List your own APIs in
/.well-known/api-catalog. - accessible_to_agents_mcp_tools
- Add read-only tools to the MCP server.
- accessible_to_agents_search_results
- Re-rank or adjust search results.
- accessible_to_agents_embedding_providers
- Add an embedding provider.
- accessible_to_agents_mcp_allowed_origins
- Allow browser-based MCP clients from other origins.
Troubleshooting
My page's .md URL returns 404
Check Site Health first: it's usually the nginx rule in Server configuration. Also check the page is published, in an included post type, and not hidden: the editor preview says why a page is hidden. ?format=md works meanwhile.
The Markdown still contains builder clutter
Make sure Page-builder cleanup is on, then save the page (or run wp accessible-to-agents regenerate) to refresh the cached Markdown. For a custom widget, a developer can add rules with the accessible_to_agents_markdown_remove_queries filter.
My FAQs aren't detected
Open the editor preview to see what was found. If your theme uses its own markup, set up custom selectors. Or add the FAQs by hand in the "FAQs for agents" field.
Search returns nothing
The index builds in the background after activation or a settings change; the Search & MCP tab shows progress. Until it's ready, WordPress search is used. Run wp accessible-to-agents search-index to build it straight away.
Semantic search says it fell back to full-text
The reason is shown in the search response's notice and in the status box: a missing or wrong key, the provider being unreachable, or the hourly limit. Use Test provider connection to check the key.
Another plugin also makes an llms.txt
Yoast SEO and Rank Math can generate one too. Site Health tells you; switch off one of them.
Privacy and data
- No IP addresses are stored anywhere, and no full user agents. Insights are daily totals per agent, page and format.
- No outside services by default. Everything runs on your server. Only semantic search, which you choose and configure, contacts the provider you pick.
- Only public content. Agents only ever see published, non-password-protected content you haven't excluded, whether through Markdown, search or MCP.
- API keys are encrypted when saved in the settings, or kept out of the database entirely with a constant.
- Uninstalling removes Accessible to Agents's settings, stats, search index, encrypted keys and post fields. Keys saved in Settings → Connectors are kept, because other plugins may use them.