WordPress Abilities API

The ability Aimogen Pro registers with the WordPress 6.9 Abilities API, its input and output schema, and how to invoke it.

WordPress 6.9 introduced the Abilities API: a registry of named capabilities with schemas, discoverable by other code and by AI tooling. Aimogen Pro registers one ability.

Added in 2.7.1.

The ability#

aimogen/run-rule — runs a configured Aimogen automation rule using a specific generator.

PropertyValue
LabelRun Aimogen Rule
Categoryautomation
Permissionmanage_options
show_in_resttrue
Annotationsdestructive: true, readonly: false

Aimogen Pro also registers the automation ability category, labelled "Automation and workflow related abilities".

Input schema#

json
{
  "type": "object",
  "required": ["rule_id", "generator"],
  "properties": {
    "rule_id":   { "type": "integer", "description": "Rule index / ID" },
    "generator": {
      "type": "string",
      "enum": ["posts", "youtube", "amazon", "review", "csv",
               "omniblock", "listicle", "forum", "reply"]
    }
  }
}

The generator names map to the internal rule types:

GeneratorRule typeCreator
posts0Keywords/Titles
youtube1YouTube
amazon2Product roundup
review3Product review
csv4CSV
omniblock5OmniBlocks
listicle6Listicles
forum7Forum topics
reply8Topic replies

Output schema#

json
{
  "type": "object",
  "properties": {
    "success": { "type": "boolean" },
    "message": { "type": "string" },
    "error":   { "type": "string" }
  }
}

Failure cases and their error values:

Conditionerror
The plugin is not loadedAimogen not available
An unrecognised generatorInvalid generator type
A rule ID of zero or lessInvalid rule ID
The rule failedRule execution failed
The rule produced nothingRule produced no changes

Invoking it#

php
if ( function_exists( 'wp_get_ability' ) ) {
    $ability = wp_get_ability( 'aimogen/run-rule' );

    if ( $ability ) {
        $result = $ability->execute( array(
            'rule_id'   => 3,
            'generator' => 'posts',
        ) );

        if ( ! empty( $result['success'] ) ) {
            error_log( $result['message'] );
        }
    }
}

Because show_in_rest is true, the ability is also reachable through the WordPress abilities REST surface, subject to the manage_options permission check.

Why this matters#

The Abilities API is how WordPress is standardising machine-discoverable actions. An AI agent, an automation plugin or another tool can discover aimogen/run-rule, read its schema, and invoke it — without knowing anything about Aimogen Pro.

The destructive: true annotation is a signal to such callers that this ability changes site state and should not be invoked speculatively.

Security#

The permission callback requires manage_options. That is deliberately strict: running a rule creates content and spends API budget.

Alternatives#

MethodSuits
Abilities APIStandards-based discovery by other tools
WP-CLIShell scripts and system cron
REST APIExternal systems over HTTP
WebhookAn external system triggering a workflow
Agent toolAn AI agent running a rule

Still stuck? Open a support ticket and include the diagnostics from Aimogen Pro › System & Logs › System Info.