Botkibble
AI agents, LLMs, and crawlers have to wade through navigation bars, sidebars, ads, and comment forms to reach the content they want, and every element costs tokens. Cloudflare measured an 80% reduction in token usage when converting a blog post from HTML to Markdown (16,180 tokens down to 3,150). Botkibble adds a Markdown endpoint to every published post and page. Cloudflare offers Markdown for Agents at the CDN edge on Pro, Business, and Enterprise plans. Botkibble does the same thing (for free) at the origin, so it works on any host. GitHub Repository Three ways to request Markdown: .md suffix: append .md to any post or page URL (e.g. example.com/my-post.md) Query parameter: add ?format=markdown to any post or page URL Content negotiation: send Accept: text/markdown in the request header What’s in every response: Structured metadata header with title, date, categories, tags, word count, character count, and estimated token count (in YAML frontmatter format, readable by any AI agent) Clean Markdown converted from fully-rendered post HTML (shortcodes run, filters applied) Content-Type: text/markdown and Vary: Accept response headers Content-Signal header for AI signal declaration — defaults to ai-train=no, search=yes, ai-input=yes — see contentsignals.org X-Markdown-Tokens header with estimated token count Discovery via in the HTML head and Link HTTP header Automatic cache invalidation when a post is updated or deleted Performance: Botkibble writes Markdown to disk on the first request, then serves it as a static file. A built-in Fast-Path serves cached files during WordPress’s init hook, before the main database query runs. No extra configuration needed. Add a web server rewrite rule and Botkibble bypasses PHP entirely, serving .md files the same way a server would serve an image or CSS file: Method Avg. response time Standard HTML 0.97s Markdown (cold, first request) 0.95s Markdown (cached, PHP Fast-Path) 0.87s Markdown (Nginx/Apache direct) 0.11s Serving directly from disk is 88% faster than a full WordPress page load. See the Performance section below for Nginx and Apache configuration. Security: Drafts, private posts, and password-protected content return 403 Forbidden Rate limits cache-miss regenerations (20/min by default) to mitigate DoS abuse X-Robots-Tag: noindex keeps Markdown versions out of search results Link: rel="canonical" points search engines back to the HTML version Cache variants (optional): You can persist alternate cached representations by adding ?botkibble_variant=slim (or any other variant name). Variant caches are stored under: /wp-content/uploads/botkibble/_v/ / .md What it does NOT do: Expose drafts, private posts, or password-protected content Serve non-post/page content types by default Require any configuration. Activate and it works. Why Markdown? HTML is expensive for AI systems to process. Cloudflare measured an 80% reduction in token usage when converting a blog post from HTML to Markdown (16,180 tokens down to 3,150). Cloudflare now offers Markdown for Agents at the CDN edge via the Accept: text/markdown header, available on Pro, Business, and Enterprise plans. This plugin does the same thing at the origin, so it works on any host. It also adds .md suffix URLs, ?format=markdown query parameters, YAML frontmatter, static file caching, and server-level offloading. If you use Cloudflare, both share the same Accept: text/markdown header, Content-Signal headers, and X-Markdown-Tokens response headers. Cloudflare currently defaults to Content-Signal: ai-train=yes, search=yes, ai-input=yes with no way to change it. Botkibble defaults to ai-train=no and lets you override the full signal per site via the botkibble_content_signal filter. Performance & Static Offloading This plugin supports static file offloading by writing Markdown content to /wp-content/uploads/botkibble/. Nginx Configuration To bypass PHP entirely and have Nginx serve the files (including variants) directly: # Variants location ~* ^/(_v/[^/]+/.+)\.md$ { default_type text/markdown; try_files /wp-content/uploads/botkibble/$1.md /index.php?$args; } # Default location ~* ^/(.+)\.md$ { default_type text/markdown; try_files /wp-content/uploads/botkibble/$1.md /index.php?$args; } Apache (.htaccess) Add this to your .htaccess before the WordPress rules: RewriteEngine On # Variants RewriteCond %{DOCUMENT_ROOT}/wp-content/uploads/botkibble/_v/$1/$2.md -f RewriteRule ^_v/([^/]+)/(.+)\.md$ /wp-content/uploads/botkibble/_v/$1/$2.md [L,T=text/markdown] # Default RewriteCond %{DOCUMENT_ROOT}/wp-content/uploads/botkibble/$1.md -f RewriteRule ^(.*)\.md$ /wp-content/uploads/botkibble/$1.md [L,T=text/markdown] Even without these rules, the plugin uses a “Fast-Path” that serves cached files from PHP before the main database query is executed. Credits We thank Cristi Constantin (https://github.com/cristi-constantin) for contributing cache variants, URL and SEO improvements, and fixing important bugs.
Top keywords
- markdown24×3.18%
- md16×2.12%
- botkibble15×1.99%
- text8×1.06%
- text markdown8×1.06%
- uploads8×1.06%
- uploads botkibble8×1.06%
- wp-content8×1.06%
- wp-content uploads8×1.06%
- wp-content uploads botkibble8×1.06%
- content7×0.93%
- header7×0.93%
Mescio for Agents
Mescio for Agents makes your WordPress site AI-ready by silently serving posts, pages and WooCommerce products as clean, structured Markdown to any AI agent or LLM pipeline that requests it — using the standard HTTP Accept: text/markdown content negotiation header. Human visitors using a browser are completely unaffected. Mescio for Agents only activates when an AI agent or crawler explicitly asks for Markdown. Why Markdown? Feeding raw HTML to an AI is expensive and noisy. A heading like ## About Us costs ~3 tokens in Markdown vs 12–15 tokens as HTML — before accounting for wrappers, navigation bars and script tags that carry zero semantic value. This blog post you are reading takes 16,180 tokens in HTML and 3,150 tokens in Markdown. That is an 80% reduction. Markdown has become the lingua franca for AI systems. Mescio for Agents lets your site speak it natively, at zero cost to your human visitors. How it works When an HTTP client sends a request with Accept: text/markdown, Mescio for Agents intercepts the WordPress request lifecycle before any template is rendered, converts the post content to clean Markdown, and returns it with the correct Content-Type: text/markdown header. curl https://yoursite.com/your-post/ \ -H "Accept: text/markdown" Features Zero configuration — works out of the box on any singular post, page or custom post type /llms.txt endpoint — auto-generated index of all your content in the llmstxt.org standard format, so AI agents can discover what’s on your site /llms-full.txt endpoint — full site content in a single Markdown file, ready for RAG pipelines WooCommerce support — product pages include price, SKU, stock status, rating, attributes and gallery; products are grouped by category in llms.txt YAML front matter — every document includes structured metadata (title, description, URL, date, categories, tags, featured image) Multilingual — detects language via WPML, Polylang, TranslatePress or WordPress locale; emits Content-Language and Link: rel=alternate headers REST API endpoint — /wp-json/mescio-for-agents/v1/markdown?id= or ?url= Page builder cleanup — aggressively strips Elementor, Divi, WPBakery and Beaver Builder layout noise Token count header — X-Markdown-Tokens tells AI pipelines how large the document is before processing Content Signals — emits Content-Signal: ai-train=yes, search=yes, ai-input=yes Correct HTTP caching — Vary: Accept ensures CDNs cache HTML and Markdown versions separately Response headers Content-Type: text/markdown; charset=utf-8 Content-Language: it (or detected language) Vary: Accept X-Markdown-Tokens: 725 Content-Signal: ai-train=yes, search=yes, ai-input=yes Link: ; rel="alternate"; hreflang="en" (when translations available) Multilingual plugin support WPML — reads language and available translations automatically Polylang — reads language and links to translated post IDs TranslatePress — reads trp_language post meta Manual — configure primary language and additional languages in Settings → Mescio for Agents REST API GET /wp-json/mescio-for-agents/v1/markdown?id=42 GET /wp-json/mescio-for-agents/v1/markdown?url=https://yoursite.com/my-page/ Developer hooks Filter: mescio_enabled_post_types — add or remove post types dynamically. Filter: mescio_pre_convert_content — modify the HTML before conversion to Markdown. Filter: mescio_post_convert_content — modify the Markdown after conversion. Privacy This plugin does not collect, store or transmit any personal data. It does not set cookies. It does not make external HTTP requests.