Abilities API

This is part of the AI Building Blocks for WordPress initiative. The main projects are PHP AI Client SDKPHP AI Client SDK A platform-agnostic library providing unified access to LLMs and embedding models from any major AI provider. Developed collaboratively with the PHP community. The WordPress AI Client SDK is the WordPress-specific package that adds REST API endpoints, API key management, and integrations through `AI_Client::prompt()`., Abilities APIAbilities API A core WordPress API (introduced in 6.9) that creates a central registry of capabilities, making WordPress functions discoverable and accessible to AI agents, automation tools, and developers. Transforms WordPress from isolated functions into a unified system., MCP AdapterMCP Adapter Translates WordPress abilities into Model Context Protocol format, allowing AI assistants like Claude and ChatGPT to discover and invoke WordPress capabilities as tools, resources, and prompts., and the AI Experiments PluginAI Experiments Plugin WordPress's AI laboratory bringing all building blocks together. Serves as both a user tool and developer reference implementation. First release (v0.1.0) includes Title Generation experiment..

Introduction

The power of WordPress, derived from its thousands of functions within coreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress., plugins, and themes, is often obscured by its reliance on developer-centric code. The Abilities API (GitHub) addresses this by establishing a shared language, enabling all WordPress components to express their capabilities in a unified manner, comprehensible to both humans and machines.

This APIAPI An API or Application Programming Interface is a software intermediary that allows programs to interact with each other and share data in limited, clearly defined ways. creates a centralized registry where all functionalities can be formally registered with well-defined schemas, comprehensive descriptions, and explicit permissions. By adopting this common language, plugins and themes will empower AI-driven solutions to seamlessly discover, interpret, utilize, and coordinate capabilities throughout the entire WordPress ecosystem.

The Challenge We’re Solving

A typical WordPress site might have dozens of plugins, each adding unique functionality. But there’s no standardized way for these components to express their capabilities. An AI assistant has no systematic way to discover that your backup pluginPlugin A plugin is a piece of software containing a group of functions that can be added to a WordPress website. They can extend functionality or add new features to your WordPress websites. WordPress plugins are written in the PHP programming language and integrate seamlessly with WordPress. These can be free in the WordPress.org Plugin Directory https://wordpress.org/plugins/ or can be cost-based plugin from a third-party can create snapshots, your SEO plugin can analyze content, or your e-commerce solution can generate reports. This fragmentation limits what we can build.

The Abilities API establishes a common pattern the entire ecosystem can adopt. It may look something like this:

// Any plugin can register its abilities with the `init` hook.
wp_register_ability( 'my-seo-plugin/analyze-content-seo', [
    'label'       => __( 'Analyze Content SEO', 'my-seo-plugin' ),
    'description' => __( 'Analyzes post content for SEO improvements.', 
'my-seo-plugin' ),
    'thinking_message' => __('Reviewing your content now!'),
    'success_message' => __('Content reviewed successfully.'),
    'execute_callback'    => [ 'MySEOPlugin', 'analyze_content' ],
    'input_schema'  => [
        'type' => 'object',
        'properties' => [
            'post_id' => [ 'type' => 'integer', 'description' => __( 'The post identifier.', 'my-seo-plugin' ), 'required' => true ],
        ],
        'additional_properties' => false,
    ],
    'output_schema' => ]
        'type' => 'number',
        'description' => __( 'The score for the content in percentage.', 'my-seo-plugin' ),
        'required' => true,
    ],
    'permission_callback'  => 'edit_posts',
] );

When the ecosystem adopts this pattern, WordPress transforms from isolated functionalities into an interconnected system where capabilities can be discovered, composed, and automated. Abilities can be used for AI, but also for things like the Command Palette, Workflows tools, and integrating with UIUI UI is an acronym for User Interface - the layout of the page the user interacts with. Think ‘how are they doing that’ and less about what they are doing. like toolbars, menus, etc.

When used for AI, developers can create impressive systems like automation tools and AI agents (leveraging other building blocks, like the PHP AI Client for a LLM-based orchestrator).

Enabling AI Integration

The Abilities API also allows AI systems such as Claude, ChatGPT, Gemini, and other assistants to discover WordPress capabilities through adapters like the MCP Adapter. Once registered, flagged abilities become accessible to any AI system that supports the relevant protocols.

The API manages registration and permissions, while protocol Adapters translate these into formats external AI systems understand. This establishes a robust connection between WordPress functionality and AI assistants, with the first-party API serving as the definitive source for exposed logic.

Developer Adoption and Distribution

While available as a plugin for experimentation, the Abilities API is designed as a Composer package that developers can include in their plugins today. This serves as the official adoption path before potential WordPress core inclusion. Developers can require the package now, ship plugins with standardized capability declarations, and seamlessly transition when the Abilities API becomes part of WordPress itself.

Getting Involved

The Abilities API needs input from across the WordPress ecosystem. Whether you’re a plugin developer exposing functionality, a theme author registering visual capabilities, or building AI solutions for WordPress, your perspective is crucial.

Join the discussion in #core-ai on SlackSlack Slack is a Collaborative Group Chat Platform https://slack.com/. The WordPress community has its own Slack Channel at https://make.wordpress.org/chat/., explore the early implementation, or share your vision for how WordPress Abilties should work in our future with AI.

#ai-building-blocks