WordPress as an AI Platform

The Abilities API

Learning objectives

By the end of this lesson, you will be able to:

  • Recall that the Abilities API is a WordPress core feature, available since version 6.9, that maintains a central registry of site capabilities
  • Explain how the Abilities API structures WordPress functionality into self-describing, reusable units called abilities
  • Use the Abilities Explorer to locate and inspect registered abilities on a WordPress site
  • Analyze an ability’s components to determine appropriate permissions and understand how AI systems can discover and invoke it

Whether you are a site owner, administrator, or developer, you have already been benefiting from the Abilities API throughout this course. Every time you clicked Generate Excerpt or Suggest Tags, an ability was being discovered and invoked behind the scenes. This lesson explains how that system works and why it matters for the future of AI in WordPress.

What is the Abilities API?

The Abilities API is a WordPress core API, introduced in version 6.9, that provides a standardized way for plugins, themes, and WordPress core to register what they can do. It acts as a central directory of site capabilities, each one documented in a machine-readable format that AI systems and automation tools can discover and use reliably.

Before the Abilities API existed, there was no consistent way for different parts of WordPress to know what functionality other parts offered. Every integration had to be custom-built. The Abilities API solves this by giving everything a common language.

What is an ability?

An ability is a named, self-describing unit of functionality: a specific action your site can perform, documented in a way that both humans and machines can understand.

Every ability is built from the same set of components:

  • A unique name using the pattern namespace/ability-name, where the namespace typically matches the plugin or component registering it (for example, ai/generate-excerpt or my-plugin/resize-image).
  • A label and description in plain language explaining what the ability does.
  • Input and output definitions that describe exactly what data the ability expects and what it returns. These definitions use JSON Schema, a standard format for describing data structures in a way software can validate and act on.
  • A category that groups the ability with related ones. The AI Plugin uses categories such as site, copy, and images.
  • A permission callback that controls who can execute the ability, enforcing access control at the ability level.
  • An execute callback containing the actual logic that runs when the ability is invoked.

This structure means any system that reads an ability’s definition knows exactly how to call it safely and correctly, whether it is the Abilities Explorer, the REST API, or an external AI agent.

💡 Why this matters for you: Every AI feature in the WordPress AI Plugin is built on registered abilities. Generate Excerpt, Suggest Tags, Moderate Comments: all of these work by discovering and invoking abilities registered by the plugin. The Abilities API is what makes those features consistent, permission-aware, and accessible to other systems without any additional custom integration.

📸 Screenshot placeholder: conceptual diagram showing plugins, themes, and WordPress core all registering abilities into a central registry, which is then read by the Abilities Explorer, the REST API, and the MCP Adapter.

How the registry works

The registry is the central object that holds every registered ability across all plugins, themes, and WordPress core. When a plugin registers an ability, it is added to this registry and becomes available to any system with appropriate permissions.

Registration happens during the wp_abilities_api_init action, which fires after WordPress has fully loaded all plugins. That timing ensures every ability is registered in a fully initialized environment with access to everything it needs.

The same registry powers three different systems on your site:

The Abilities Explorer (Tools > Abilities Explorer) presents all registered abilities in a browsable admin interface.

The REST API endpoints make abilities accessible programmatically, including to JavaScript running in the block editor.

The MCP Adapter reads the registry to expose public abilities to external AI agents. You will learn more about this in Lesson 3: The MCP Adapter.

Exploring abilities in your WordPress admin

You do not need to write code to explore what your site can do. To explore abilities directly in your admin, first enable the Abilities Explorer experiment in Settings > AI > Admin Experiments. Once enabled, navigate to Tools > Abilities Explorer to see a searchable, filterable table of every registered ability on your site. You can inspect each ability’s namespace, schema, and permissions, and invoke abilities directly from the test runner to verify they work as expected before building on them.

As of AI plugin version 1.3.0, five abilities that used to be registered automatically now require an additional step. ai/get-post-details, ai/get-post-terms, core/read-settings, core/read-users, and core/read-content are no longer exposed by default. To see them in the Abilities Explorer, enable the separate Custom Abilities toggle in Settings > AI > Admin Experiments alongside the Abilities Explorer toggle. If you find fewer abilities listed than you expect, check this setting first.

From the Explorer, you can:

  • Browse all registered abilities grouped by category and source (plugin, theme, or core).
  • Inspect ability details including the input and output schemas, the permission level required, and which plugin or component registered it.
  • Test abilities directly using the built-in test runner, which lets you invoke an ability and see its output without writing any code.

This makes the Abilities Explorer a practical tool for any administrator who wants to understand what AI features are actually doing on their site.

📸 Screenshot placeholder: Tools > Abilities Explorer showing the searchable abilities list with category filters, an ability selected, and its schema details visible in a side panel.

For developers: registering an ability

If you are building a plugin or theme and want to expose functionality to AI systems and automation tools, use wp_register_ability() hooked into wp_abilities_api_init. Here is a minimal example:

add_action( 'wp_abilities_api_init', function() {
    wp_register_ability(
        'my-plugin/get-recent-posts',
        array(
            'label'               => __( 'Get Recent Posts', 'my-plugin' ),
            'description'         => __( 'Returns a list of recent post titles.', 'my-plugin' ),
            'output_schema'       => array(
                'type'  => 'array',
                'items' => array( 'type' => 'string' ),
            ),
            'execute_callback'    => 'my_plugin_get_recent_posts',
            'permission_callback' => function() {
                return current_user_can( 'read' );
            },
            'meta'                => array(
                'show_in_rest' => true,
            ),
        )
    );
} );

Once registered, this ability appears in the Abilities Explorer, is accessible via the REST API, and can be exposed to external AI agents through the MCP Adapter if you set meta.public to true. For the full API reference, see the Abilities API documentation [Link — verify URL before publishing] on WordPress Developer Resources.

Key terms

TermDefinition
Abilities APIA WordPress core API, introduced in version 6.9, that provides a central registry for registering and discovering site capabilities as structured, self-describing units
AbilityA named unit of functionality registered in the Abilities API, with defined inputs, outputs, permissions, and an execute callback
RegistryThe central object maintained by the Abilities API that holds all registered abilities across plugins, themes, and WordPress core
NamespaceThe first part of an ability’s name, before the slash (for example, my-plugin in my-plugin/get-recent-posts), typically matching the plugin or component that registered it
JSON SchemaA standard format for describing the structure of data, used by the Abilities API to define what inputs an ability expects and what outputs it produces
Permission callbackA function attached to an ability that determines whether the current user has permission to execute it
Custom AbilitiesAn opt-in Admin Experiment, added in AI plugin 1.3.0, that controls whether the AI Plugin’s custom abilities (such as ai/get-post-details and core/read-content) are exposed externally through the Abilities API and MCP

✅ Check your understanding

  1. Think about the plugins or themes you use on your site. What kinds of actions or capabilities might they expose as abilities, and what permission level would make sense for each one?
  2. Now that you understand how the Abilities API creates a shared vocabulary for what your site can do, how does this change the way you think about what AI systems can discover and interact with on your site?

Up next: Practical: Explore your site’s abilities walks you through finding and testing the abilities already registered on your site.

This is a preview lesson

Please contact the course administrator to take this lesson.

Suggestions

Found a typo, grammar error or outdated screenshot? Contact us.