WordPress 6.9 Abilities API provides standardized capability discovery and execution for Data Machine operations. All REST API, CLI, and Chat tool operations delegate to registered abilities.
Overview The Abilities API in inc/Abilities/ provides a unified interface for Data Machine operations. Each ability implements execute_callback with permission_callback for consistent access control across REST API, CLI commands, and Chat tools.
Total registered abilities : 167
Multi-Agent Scoping All abilities support agent_id and user_id parameters for multi-agent scoping. The PermissionHelper class resolves scoped agent and user IDs, enforces ownership checks via owns_resource() and owns_agent_resource(), and controls access grants via can_access_agent().
Registered Abilities Pipeline Management (7 abilities) Ability Description Location datamachine/get-pipelinesList pipelines with pagination, or get single by ID Pipeline/GetPipelinesAbility.phpdatamachine/create-pipelineCreate new pipeline Pipeline/CreatePipelineAbility.phpdatamachine/update-pipelineUpdate pipeline properties Pipeline/UpdatePipelineAbility.phpdatamachine/delete-pipelineDelete pipeline and associated flows Pipeline/DeletePipelineAbility.phpdatamachine/duplicate-pipelineDuplicate pipeline with flows Pipeline/DuplicatePipelineAbility.phpdatamachine/import-pipelinesImport pipelines from JSON Pipeline/ImportExportAbility.phpdatamachine/export-pipelinesExport pipelines to JSON Pipeline/ImportExportAbility.php
Pipeline Steps (5 abilities) Ability Description Location datamachine/get-pipeline-stepsList steps for a pipeline, or get single by ID PipelineStepAbilities.phpdatamachine/add-pipeline-stepAdd step to pipeline (auto-syncs to all flows) PipelineStepAbilities.phpdatamachine/update-pipeline-stepUpdate pipeline step config (system prompt, provider, model, tools) PipelineStepAbilities.phpdatamachine/delete-pipeline-stepRemove step from pipeline (removes from all flows) PipelineStepAbilities.phpdatamachine/reorder-pipeline-stepsReorder pipeline steps PipelineStepAbilities.php
Flow Management (5 abilities) Ability Description Location datamachine/get-flowsList flows with filtering, or get single by ID Flow/GetFlowsAbility.phpdatamachine/create-flowCreate new flow from pipeline Flow/CreateFlowAbility.phpdatamachine/update-flowUpdate flow properties Flow/UpdateFlowAbility.phpdatamachine/delete-flowDelete flow and associated jobs Flow/DeleteFlowAbility.phpdatamachine/duplicate-flowDuplicate flow within pipeline Flow/DuplicateFlowAbility.php
Flow Steps (4 abilities) Ability Description Location datamachine/get-flow-stepsList steps for a flow, or get single by ID FlowStep/GetFlowStepsAbility.phpdatamachine/update-flow-stepUpdate flow step config FlowStep/UpdateFlowStepAbility.phpdatamachine/configure-flow-stepsBulk configure flow steps FlowStep/ConfigureFlowStepsAbility.phpdatamachine/validate-flow-steps-configValidate flow steps configuration FlowStep/ValidateFlowStepsConfigAbility.php
Queue Management (7 abilities) Ability Description Location datamachine/queue-addAdd item to flow queue Flow/QueueAbility.phpdatamachine/queue-listList queue entries Flow/QueueAbility.phpdatamachine/queue-clearClear queue Flow/QueueAbility.phpdatamachine/queue-removeRemove item from queue Flow/QueueAbility.phpdatamachine/queue-updateUpdate queue item Flow/QueueAbility.phpdatamachine/queue-moveReorder queue item Flow/QueueAbility.phpdatamachine/queue-settingsGet/set queue settings Flow/QueueAbility.php
Webhook Triggers (5 abilities) Ability Description Location datamachine/webhook-trigger-enableEnable webhook trigger for a flow and generate Bearer token Flow/WebhookTriggerAbility.phpdatamachine/webhook-trigger-disableDisable webhook trigger, revoke token Flow/WebhookTriggerAbility.phpdatamachine/webhook-trigger-regenerateRegenerate webhook token (old token immediately invalidated) Flow/WebhookTriggerAbility.phpdatamachine/webhook-trigger-rate-limitSet rate limiting for flow webhook trigger Flow/WebhookTriggerAbility.phpdatamachine/webhook-trigger-statusGet webhook trigger status for a flow Flow/WebhookTriggerAbility.php
Job Execution (9 abilities) Ability Description Location datamachine/get-jobsList jobs with filtering, or get single by ID Job/GetJobsAbility.phpdatamachine/get-jobs-summaryGet job status summary counts Job/JobsSummaryAbility.phpdatamachine/delete-jobsDelete jobs by criteria Job/DeleteJobsAbility.phpdatamachine/execute-workflowExecute workflow Job/ExecuteWorkflowAbility.phpdatamachine/get-flow-healthGet flow health metrics Job/FlowHealthAbility.phpdatamachine/get-problem-flowsList flows exceeding failure threshold Job/ProblemFlowsAbility.phpdatamachine/recover-stuck-jobsRecover jobs stuck in processing state Job/RecoverStuckJobsAbility.phpdatamachine/retry-jobRetry a failed job Job/RetryJobAbility.phpdatamachine/fail-jobManually fail a processing job Job/FailJobAbility.php
Engine (4 abilities) Internal abilities for the pipeline execution engine.
Ability Description Location datamachine/run-flowRun a flow Engine/RunFlowAbility.phpdatamachine/execute-stepExecute a pipeline step Engine/ExecuteStepAbility.phpdatamachine/schedule-next-stepSchedule the next step in pipeline execution Engine/ScheduleNextStepAbility.phpdatamachine/schedule-flowSchedule a flow for execution Engine/ScheduleFlowAbility.php
Agent Management (6 abilities) Ability Description Location datamachine/list-agentsList all registered agent identities AgentAbilities.phpdatamachine/create-agentCreate a new agent identity with filesystem directory and owner access AgentAbilities.phpdatamachine/get-agentRetrieve a single agent by slug or ID with access grants AgentAbilities.phpdatamachine/update-agentUpdate an agent’s mutable fields (name, config, status) AgentAbilities.phpdatamachine/delete-agentDelete an agent record and access grants, optionally remove filesystem AgentAbilities.phpdatamachine/rename-agentRename an agent slug — updates database and moves filesystem directory AgentAbilities.php
Agent Memory (4 abilities) Ability Description Location datamachine/get-agent-memoryRead agent memory content — full file or a specific section AgentMemoryAbilities.phpdatamachine/update-agent-memoryWrite to a specific section of agent memory — set (replace) or append AgentMemoryAbilities.phpdatamachine/search-agent-memorySearch across agent memory content, returns matching lines with context AgentMemoryAbilities.phpdatamachine/list-agent-memory-sectionsList all section headers in agent memory AgentMemoryAbilities.php
Daily Memory (5 abilities) Ability Description Location datamachine/daily-memory-readRead a daily memory file by date (defaults to today) DailyMemoryAbilities.phpdatamachine/daily-memory-writeWrite or append to a daily memory file DailyMemoryAbilities.phpdatamachine/daily-memory-listList all daily memory files grouped by month DailyMemoryAbilities.phpdatamachine/search-daily-memorySearch across daily memory files with optional date range DailyMemoryAbilities.phpdatamachine/daily-memory-deleteDelete a daily memory file by date DailyMemoryAbilities.php
Agent Files (5 abilities) Ability Description Location datamachine/list-agent-filesList memory files from agent identity and user layers File/AgentFileAbilities.phpdatamachine/get-agent-fileGet a single agent memory file with content File/AgentFileAbilities.phpdatamachine/write-agent-fileWrite or update content for an agent memory file File/AgentFileAbilities.phpdatamachine/delete-agent-fileDelete an agent memory file (protected files cannot be deleted) File/AgentFileAbilities.phpdatamachine/upload-agent-fileUpload a file to the agent memory directory File/AgentFileAbilities.php
Flow Files (5 abilities) Ability Description Location datamachine/list-flow-filesList uploaded files for a flow step File/FlowFileAbilities.phpdatamachine/get-flow-fileGet metadata for a single flow file File/FlowFileAbilities.phpdatamachine/delete-flow-fileDelete an uploaded file from a flow step File/FlowFileAbilities.phpdatamachine/upload-flow-fileUpload a file to a flow step File/FlowFileAbilities.phpdatamachine/cleanup-flow-filesCleanup data packets and temporary files for a job or flow File/FlowFileAbilities.php
Workspace (16 abilities) Ability Description Location datamachine/workspace-pathGet the agent workspace directory path WorkspaceAbilities.phpdatamachine/workspace-listList repositories in the agent workspace WorkspaceAbilities.phpdatamachine/workspace-showShow detailed repo info (branch, remote, latest commit, dirty status) WorkspaceAbilities.phpdatamachine/workspace-readRead a text file from a workspace repository WorkspaceAbilities.phpdatamachine/workspace-lsList directory contents within a workspace repository WorkspaceAbilities.phpdatamachine/workspace-cloneClone a git repository into the workspace WorkspaceAbilities.phpdatamachine/workspace-removeRemove a repository from the workspace WorkspaceAbilities.phpdatamachine/workspace-writeCreate or overwrite a file in a workspace repository WorkspaceAbilities.phpdatamachine/workspace-editFind-and-replace text in a workspace repository file WorkspaceAbilities.phpdatamachine/workspace-git-statusGet git status for a workspace repository WorkspaceAbilities.phpdatamachine/workspace-git-logRead git log entries WorkspaceAbilities.phpdatamachine/workspace-git-diffRead git diff output WorkspaceAbilities.phpdatamachine/workspace-git-pullRun git pull –ff-only WorkspaceAbilities.phpdatamachine/workspace-git-addStage repository paths with git add WorkspaceAbilities.phpdatamachine/workspace-git-commitCommit staged changes WorkspaceAbilities.phpdatamachine/workspace-git-pushPush commits WorkspaceAbilities.php
Chat Sessions (4 abilities) Ability Description Location datamachine/create-chat-sessionCreate a new chat session for a user Chat/CreateChatSessionAbility.phpdatamachine/list-chat-sessionsList chat sessions with pagination and context filtering Chat/ListChatSessionsAbility.phpdatamachine/get-chat-sessionRetrieve a chat session with conversation and metadata Chat/GetChatSessionAbility.phpdatamachine/delete-chat-sessionDelete a chat session after verifying ownership Chat/DeleteChatSessionAbility.php
GitHub (6 abilities) Ability Description Location datamachine/list-github-issuesList issues from a GitHub repository with optional filters Fetch/GitHubAbilities.phpdatamachine/get-github-issueGet a single GitHub issue with full details Fetch/GitHubAbilities.phpdatamachine/update-github-issueUpdate a GitHub issue (title, body, labels, assignees, state) Fetch/GitHubAbilities.phpdatamachine/comment-github-issueAdd a comment to a GitHub issue Fetch/GitHubAbilities.phpdatamachine/list-github-pullsList pull requests from a GitHub repository Fetch/GitHubAbilities.phpdatamachine/list-github-reposList repositories for a user or organization Fetch/GitHubAbilities.php
Handler Execution (9 abilities) Ability Description Location datamachine/fetch-rssFetch items from RSS/Atom feeds Fetch/FetchRssAbility.phpdatamachine/fetch-filesProcess uploaded files Fetch/FetchFilesAbility.phpdatamachine/fetch-wordpress-apiFetch posts from WordPress REST API Fetch/FetchWordPressApiAbility.phpdatamachine/fetch-wordpress-mediaQuery WordPress media library Fetch/FetchWordPressMediaAbility.phpdatamachine/get-wordpress-postRetrieve single WordPress post by ID/URL Fetch/GetWordPressPostAbility.phpdatamachine/query-wordpress-postsQuery WordPress posts with filters Fetch/QueryWordPressPostsAbility.phpdatamachine/publish-wordpressCreate WordPress posts Publish/PublishWordPressAbility.phpdatamachine/update-wordpressUpdate existing WordPress posts Update/UpdateWordPressAbility.phpdatamachine/fetch-redditFetch posts from Reddit API Fetch/FetchRedditAbility.php
Duplicate Check (2 abilities) Ability Description Location datamachine/check-duplicateCheck if similar content exists as published post or in queue DuplicateCheck/DuplicateCheckAbility.phpdatamachine/titles-matchCompare two titles for semantic equivalence using similarity engine DuplicateCheck/DuplicateCheckAbility.php
Post Query (2 abilities) Ability Description Location datamachine/query-postsFind posts created by Data Machine, filtered by handler/flow/pipeline PostQueryAbilities.phpdatamachine/list-postsList Data Machine posts with combinable filters PostQueryAbilities.php
Content / Block Editing (3 abilities) Ability Description Location datamachine/get-post-blocksGet Gutenberg blocks from a post Content/GetPostBlocksAbility.phpdatamachine/edit-post-blocksUpdate Gutenberg blocks in a post Content/EditPostBlocksAbility.phpdatamachine/replace-post-blocksReplace specific blocks in a post Content/ReplacePostBlocksAbility.php
Ability Description Location datamachine/generate-alt-textQueue system agent generation of alt text for images Media/AltTextAbilities.phpdatamachine/diagnose-alt-textReport alt text coverage for image attachments Media/AltTextAbilities.phpdatamachine/generate-imageGenerate images using AI models via Replicate API Media/ImageGenerationAbilities.phpdatamachine/upload-mediaUpload or fetch a media file (image/video), store in repository Media/MediaAbilities.phpdatamachine/validate-mediaValidate a media file against platform-specific constraints Media/MediaAbilities.phpdatamachine/video-metadataExtract video metadata (duration, resolution, codec) via ffprobe Media/MediaAbilities.phpdatamachine/render-image-templateGenerate branded graphics from registered GD templates Media/ImageTemplateAbilities.php
Image Templates (1 ability) Ability Description Location datamachine/list-image-templatesList all registered image generation templates Media/ImageTemplateAbilities.php
Image Optimization (2 abilities) Ability Description Location datamachine/diagnose-imagesScan media library for oversized images, missing WebP, missing thumbnails Media/ImageOptimizationAbilities.phpdatamachine/optimize-imagesCompress oversized images and generate WebP variants Media/ImageOptimizationAbilities.php
Internal Linking (6 abilities) Ability Description Location datamachine/internal-linkingQueue system agent insertion of semantic internal links InternalLinkingAbilities.phpdatamachine/diagnose-internal-linksReport internal link coverage across published posts InternalLinkingAbilities.phpdatamachine/audit-internal-linksScan post content for internal links, build link graph InternalLinkingAbilities.phpdatamachine/get-orphaned-postsReturn posts with zero inbound internal links InternalLinkingAbilities.phpdatamachine/check-broken-linksHTTP HEAD check links to find broken URLs InternalLinkingAbilities.phpdatamachine/inject-category-linksDeterministic keyword-matching link injection (no AI) InternalLinkingAbilities.php
Ability Description Location datamachine/generate-meta-descriptionQueue system agent generation of meta descriptions SEO/MetaDescriptionAbilities.phpdatamachine/diagnose-meta-descriptionsReport post excerpt (meta description) coverage SEO/MetaDescriptionAbilities.php
SEO — IndexNow (4 abilities) Ability Description Location datamachine/indexnow-submitSubmit URLs to IndexNow for instant search engine indexing SEO/IndexNowAbilities.phpdatamachine/indexnow-statusGet IndexNow integration status (enabled, API key, endpoint) SEO/IndexNowAbilities.phpdatamachine/indexnow-generate-keyGenerate a new IndexNow API key SEO/IndexNowAbilities.phpdatamachine/indexnow-verify-keyVerify that the IndexNow key file is accessible SEO/IndexNowAbilities.php
Analytics (4 abilities) Ability Description Location datamachine/bing-webmasterFetch search analytics from Bing Webmaster Tools API Analytics/BingWebmasterAbilities.phpdatamachine/google-search-consoleFetch search analytics from Google Search Console API Analytics/GoogleSearchConsoleAbilities.phpdatamachine/google-analyticsFetch visitor analytics from Google Analytics (GA4) Data API Analytics/GoogleAnalyticsAbilities.phpdatamachine/pagespeedRun Lighthouse audits via PageSpeed Insights API Analytics/PageSpeedAbilities.php
Taxonomy (5 abilities) Ability Description Location datamachine/get-taxonomy-termsList taxonomy terms Taxonomy/GetTaxonomyTermsAbility.phpdatamachine/create-taxonomy-termCreate a taxonomy term Taxonomy/CreateTaxonomyTermAbility.phpdatamachine/update-taxonomy-termUpdate a taxonomy term Taxonomy/UpdateTaxonomyTermAbility.phpdatamachine/delete-taxonomy-termDelete a taxonomy term Taxonomy/DeleteTaxonomyTermAbility.phpdatamachine/resolve-termResolve a term by name or slug Taxonomy/ResolveTermAbility.php
Settings (7 abilities) Ability Description Location datamachine/get-settingsGet plugin settings including AI settings and masked API keys SettingsAbilities.phpdatamachine/update-settingsPartial update of plugin settings SettingsAbilities.phpdatamachine/get-scheduling-intervalsGet available scheduling intervals SettingsAbilities.phpdatamachine/get-tool-configGet AI tool configuration with fields and current values SettingsAbilities.phpdatamachine/save-tool-configSave AI tool configuration SettingsAbilities.phpdatamachine/get-handler-defaultsGet handler default settings grouped by step type SettingsAbilities.phpdatamachine/update-handler-defaultsUpdate defaults for a specific handler SettingsAbilities.php
Authentication (3 abilities) Ability Description Location datamachine/get-auth-statusGet OAuth connection status AuthAbilities.phpdatamachine/disconnect-authDisconnect OAuth provider AuthAbilities.phpdatamachine/save-auth-configSave OAuth API configuration AuthAbilities.php
Logging (5 abilities) Ability Description Location datamachine/write-to-logWrite log entry with level routing LogAbilities.phpdatamachine/clear-logsClear logs by agent type LogAbilities.phpdatamachine/read-logsRead logs with filtering and pagination LogAbilities.phpdatamachine/get-log-metadataGet log entry counts and time range LogAbilities.phpdatamachine/read-debug-logRead PHP debug.log entries LogAbilities.php
Local Search (1 ability) Ability Description Location datamachine/local-searchSearch WordPress site for posts by title or content LocalSearchAbilities.php
Handler Discovery (5 abilities) Ability Description Location datamachine/get-handlersList available handlers, or get single by slug HandlerAbilities.phpdatamachine/validate-handlerValidate handler configuration HandlerAbilities.phpdatamachine/get-handler-config-fieldsGet handler configuration fields HandlerAbilities.phpdatamachine/apply-handler-defaultsApply default settings to handler HandlerAbilities.phpdatamachine/get-handler-site-defaultsGet site-wide handler defaults HandlerAbilities.php
Step Types (2 abilities) Ability Description Location datamachine/get-step-typesList available step types, or get single by slug StepTypeAbilities.phpdatamachine/validate-step-typeValidate step type configuration StepTypeAbilities.php
Processed Items (3 abilities) Ability Description Location datamachine/clear-processed-itemsClear processed items for flow (resets deduplication) ProcessedItemsAbilities.phpdatamachine/check-processed-itemCheck if item was processed ProcessedItemsAbilities.phpdatamachine/has-processed-historyCheck if flow has processed history ProcessedItemsAbilities.php
Agent Ping (1 ability) Ability Description Location datamachine/send-pingSend agent ping notification AgentPing/SendPingAbility.php
System Infrastructure (4 abilities) Ability Description Location datamachine/generate-session-titleGenerate AI-powered title for chat session SystemAbilities.phpdatamachine/system-health-checkUnified health diagnostics for Data Machine and extensions SystemAbilities.phpdatamachine/create-github-issueCreate GitHub issues programmatically SystemAbilities.phpdatamachine/run-taskManually trigger a registered system task for immediate execution SystemAbilities.php
Category Registration The datamachine category is registered via wp_register_ability_category() on the wp_abilities_api_categories_init hook:
wp_register_ability_category(
'datamachine',
array(
'label' => 'Data Machine',
'description' => 'Data Machine flow and pipeline operations',
)
);Permission Model All abilities support both WordPress admin and WP-CLI contexts via the shared PermissionHelper:
// Standard permission check
PermissionHelper::can_manage(); // WP-CLI always returns true; web requires manage_options
// Multi-agent scoped permission check
PermissionHelper::can_access_agent($agent_id);
PermissionHelper::owns_resource($resource_user_id);
PermissionHelper::resolve_scoped_agent_id($params);
PermissionHelper::resolve_scoped_user_id($params);Architecture Delegation Pattern REST API endpoints, CLI commands, and Chat tools delegate to abilities for business logic. Abilities are the canonical, public-facing primitive; service classes are considered an internal implementation detail and are being phased out as abilities become fully self-contained.
REST API Endpoint → Ability → (Service layer used during migration) → Database
CLI Command → Ability → (Service layer used during migration) → Database
Chat Tool → Ability → (Service layer used during migration) → DatabaseNote: many ability implementations are already self-contained and do not call service managers. Where services remain, they are transitional and will be migrated into abilities per the migration plan.
Facade Pattern Several top-level ability classes serve as facades that instantiate sub-ability classes from subdirectories:
ChatAbilities.php → Chat/CreateChatSessionAbility.php, etc.EngineAbilities.php → Engine/RunFlowAbility.php, etc.FlowAbilities.php → Flow/QueueAbility.php, Flow/WebhookTriggerAbility.php, etc.Ability Registration Each abilities class registers abilities on the wp_abilities_api_init hook:
public function register(): void {
add_action( 'wp_abilities_api_init', array( $this, 'register_abilities' ) );
}Testing Unit tests in tests/Unit/Abilities/ verify ability registration, schema validation, permission checks, and execution logic:
AuthAbilitiesTest.php – Authentication abilitiesFileAbilitiesTest.php – File management abilitiesFlowAbilitiesTest.php – Flow CRUD abilitiesFlowStepAbilitiesTest.php – Flow step abilitiesJobAbilitiesTest.php – Job execution abilitiesLogAbilitiesTest.php – Logging abilitiesPipelineAbilitiesTest.php – Pipeline CRUD abilitiesPipelineStepAbilitiesTest.php – Pipeline step abilitiesPostQueryAbilitiesTest.php – Post query abilitiesProcessedItemsAbilitiesTest.php – Processed items abilitiesSettingsAbilitiesTest.php – Settings abilitiesWP-CLI Integration CLI commands execute abilities directly. See individual command files in inc/Cli/Commands/ for available commands.
Post Tracking The PostTracking class in inc/Core/WordPress/PostTracking.php provides post tracking functionality for handlers creating WordPress posts.
Meta Keys :
_datamachine_post_handler: Handler slug that created the post_datamachine_post_flow_id: Flow ID associated with the post_datamachine_post_pipeline_id: Pipeline ID associated with the postUsage :
use DataMachineCoreWordPressPostTracking;
// After creating a post
$this->storePostTrackingMeta($post_id, $handler_config);