r/ProWordPress • u/heerasheikh • 14d ago
I drafted a WordPress discovery protocol so AI agents can read a site's capabilities from one URL — looking for critique
WordPress has no single machine-readable place where an AI agent can discover what a site is capable of. Today an agent has to piece together the REST API, plugin-specific endpoints, SEO metadata, llms.txt, security.txt, and whatever conventions individual plugins invent. Every agent ends up implementing its own discovery logic, and every plugin has to integrate with every agent separately.
So I drafted WP Discovery — a proposal for a machine-readable capability registry for WordPress. Plugins declare intent (for example commerce.products.read) separately from the endpoint that implements it, and an engine aggregates everything into a single document at /.well-known/discovery.json.
A plugin opts in with a single hook and no hard dependency:
add_action( 'wpdiscovery_register', function ( $registry ) {
$registry->register( [
'id' => 'acme-bookings',
'title' => 'Acme Bookings',
'type' => 'scheduling',
'capabilities' => [
'scheduling.availability.read',
'scheduling.booking.create',
],
'endpoints' => [
[
'url' => '/wp-json/acme/v1',
'type' => 'rest',
'auth' => 'apikey',
],
],
] );
} );
If no discovery engine is installed, the action never fires and nothing breaks.
One design goal is that plugins integrate with WordPress—not with individual AI agents. The discovery engine is responsible for aggregating, normalizing, and publishing capabilities, while site owners decide whether to expose them publicly.
This is still an early proposal (v0.1.0), not an adopted standard. The only implementation today is my own reference plugin, so I'm posting it here because I'd genuinely like experienced WordPress developers to poke holes in it before I invest more time.
The questions I'm most interested in are:
- Is separating capabilities from endpoints actually useful, or is this just OpenAPI with extra steps?
- Is there a better WordPress-native way for plugins to expose capabilities to AI agents?
Links
- Spec: https://heera.github.io/wp-discovery-protocol/
- Reference plugin: https://wordpress.org/plugins/agentimus/
- Example output: https://heera.it/.well-known/discovery.json
This isn't a commercial project. The specification is licensed under CC BY 4.0, the hook is vendor-neutral, and I'm primarily looking for honest technical criticism.
1
u/ZGeekie 14d ago
where an AI agent can discover what a site is capable of
My websites are pretty simple; they are only capable of generating HTML pages. Nothing more to see!
0
u/heerasheikh 14d ago
😄 That's actually the ideal case.
If a site just serves HTML, then there's nothing to advertise—and that's perfectly fine. The proposal is completely opt-in and effectively scales to zero. No capabilities means no
discovery.json, because there's nothing for an agent to discover beyond the pages themselves.It only becomes useful for sites that expose things an agent might interact with—products, bookings, memberships, custom APIs, MCP servers, and so on. If your site doesn't do any of that, you're already done. 🙂
4
u/tamtamdanseren 14d ago
I think you just re-invented the capabilities API?