mod_agent_discovery

Advertise bounded anonymous reads and existing resource export through /llms.txt, /.well-known/api-catalog, /openapi.json and /api-help.

Enable this module on public publishing sites. Templates using the standard {% all include "_html_head.tpl" %} hook receive discovery links automatically. Discovery stays in HTTP headers, the HTML head and dedicated documents; no links are added to human-facing page bodies or footers. Resource response headers use the same links and preserve existing Link values.

Discovery metadata and resource visibility checks always use an anonymous context. Existing model APIs retain their own ACL and authentication behavior. This module does not change permissions, robots rules or API indexing headers. Additional JSON-LD and Turtle support awaits the SPARQL implementation merge.

The description configuration is optional public text describing the site. It is not a license grant. Site templates can override agent_api_help.tpl.

Discovery model: m.agent_discovery.info and m.agent_discovery.links[id]. Content model: m.agent_content provides bounded search, resource, related and schema reads. Markdown uses category-aware _agent_content.tpl composition and _agent_block_<type>.tpl renderers. Survey blocks are always excluded. Content routes support GET/HEAD and require ETag revalidation after anonymous permission/publication checks. See the agent discovery guide for request limits.

Edit on GitHub

Configuration

Configuration keys declared by this module. The defaults below are from the source code.

Module Key Type Default Description
mod_agent_discovery description string <<>> Public description of the information available on this site.

Observes

Notifications

observe_content_types_dispatch/3

Get available content types and their dispatch rules Example: {{<<”text”>>, <<”html”>>, []}, page} A special dispatch rule is ‘page_url’, which refers to the…

Notifications

observe_resource_headers/3

Let all modules add resource specific response headers to the request. The accumulator is the list of headers to be set.

Models

Models

agent_content

Bounded anonymous reads: search, resource/+id, related/+id and schema. Requests accept binary-keyed maps. Public listings exclude noindex resources. Direct…

Models

agent_discovery

Public discovery metadata, always evaluated with anonymous permissions.

Controllers

Controllers

controller_agent_content

Anonymous GET/HEAD projections. Recompute authorization and content before conditional requests; caches must revalidate every use. Errors are never cached.

Controllers

controller_agent_discovery

Serve public agent discovery documents with GET and HEAD. The dispatch option document selects llms , catalog , openapi or help . Rendering uses anonymous…

Dispatch rules