Skip to content

Markdown for agents, and terms they can read.

Agent Surface gives every public page of a Drupal site a Markdown alternate, and states how AI systems may use the content in response headers, front matter, robots.txt, llms.txt and an optional RSL licence.

For Drupal 10.3+ and 11.2+ · PHP 8.1+ · Markdownify 1.2+

GET /recipes/oatmeal.md
HTTP/1.1 200 OK
Content-Type: text/markdown; charset=utf-8
Content-Usage: train-ai=n, search=y
Content-Signal: search=yes, ai-input=yes, ai-train=no
Link: <http://kitchen.example/license.xml>; rel="license"; type="application/rsl+xml"
ETag: "cf0bc67390dd48bf7e3369c80a572256"
X-Markdown-Tokens: 177
X-Original-Tokens: 327

---
title: Oatmeal
# url, author, date, type, tags, published: Markdownify Metadata
language: en
content-usage: 'train-ai=n, search=y'
content-signal: 'search=yes, ai-input=yes, ai-train=no'
license: 'http://kitchen.example/license.xml'
---

Two separable halves

Representation

A Markdown alternate for every public route: entities through Markdownify, Views pages and everything else through the fallback submodule. Front matter, a strong ETag, Last-Modified, 304s on repeat fetches, and token estimates.

Declaration

Site-wide and per-bundle preferences for AI training, AI inference, search and any automated processing, written in the IETF AIPREF and Content Signals vocabularies (and RSL 1.0 with its submodule) wherever an agent looks.

Measurement

A request log with no IP addresses, cookies or session identifiers, and a report by agent, by day and by selection rule. The 304 ratio shows whether repeat fetches are being answered cheaply.

Who it is for

Site owners who want coding agents and answer engines to fetch less and to be told, in machine-readable form, what they may do with what they fetch. It does not improve search rankings: search engines do not use Markdown alternates or llms.txt.

The top of the Agent Surface settings form: a warning that the settings are a public statement, then the site default preferences for AI training, AI inference, search and any automated processing.

Modules

Module Does Needs
Agent Surface Format selection, usage declarations, front matter, validators, request log, audit page and report. Markdownify
Agent Surface Fallback A Markdown twin for every route that renders HTML, Views pages included. Recommended.
Agent Surface RSL An RSL 1.0 licence at /license.xml, advertised on every carrier.
Agent Surface llms.txt Lists the .md alternates of recent content in /llms.txt. llms.txt
Agent Surface Filesystem Cache Answers repeat /markdownify/... requests from disk. Response Filesystem Cache

See Submodules.