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.
| Property | Value |
|---|---|
| Label | Run Aimogen Rule |
| Category | automation |
| Permission | manage_options |
show_in_rest | true |
| Annotations | destructive: true, readonly: false |
Aimogen Pro also registers the automation ability category, labelled "Automation and workflow related
abilities".
Input schema#
{
"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:
| Generator | Rule type | Creator |
|---|---|---|
posts | 0 | Keywords/Titles |
youtube | 1 | YouTube |
amazon | 2 | Product roundup |
review | 3 | Product review |
csv | 4 | CSV |
omniblock | 5 | OmniBlocks |
listicle | 6 | Listicles |
forum | 7 | Forum topics |
reply | 8 | Topic replies |
Output schema#
{
"type": "object",
"properties": {
"success": { "type": "boolean" },
"message": { "type": "string" },
"error": { "type": "string" }
}
}Failure cases and their error values:
| Condition | error |
|---|---|
| The plugin is not loaded | Aimogen not available |
| An unrecognised generator | Invalid generator type |
| A rule ID of zero or less | Invalid rule ID |
| The rule failed | Rule execution failed |
| The rule produced nothing | Rule produced no changes |
Invoking it#
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#
| Method | Suits |
|---|---|
| Abilities API | Standards-based discovery by other tools |
| WP-CLI | Shell scripts and system cron |
| REST API | External systems over HTTP |
| Webhook | An external system triggering a workflow |
| Agent tool | An AI agent running a rule |
Related#
Still stuck? Open a support ticket and include the diagnostics from Aimogen Pro › System & Logs › System Info.