The Suggest Reply experiment adds a "Suggest reply" action to the classic Comments admin screen and the Activity widget on the Dashboard. When activated, moderators can generate AI-suggested replies to comments and customize the tone. The ability also automatically applies any site-wide editorial guidelines. The experiment exposes one WordPress Ability (ai/suggest-reply) that can be used from the UI or via REST API.
When enabled, each comment in the Comments list and the Dashboard Activity widget gets an additional Suggest reply action link. Clicking it automatically opens the inline reply editor, generates a context-aware reply, and inserts it into the textarea.
Key Features:
- Adds a "Suggest reply" action to comments in the list table and the Dashboard Activity widget
- Injects in-editor controls for regenerating replies with a different Tone (friendly, professional, casual)
- Uses one shared ability (
ai/suggest-reply) exposed via REST API
The ai/suggest-reply ability accepts:
array(
'type' => 'object',
'properties' => array(
'comment_id' => array(
'type' => 'integer',
'description' => 'The ID of the comment to generate a reply for.',
),
'tone' => array(
'type' => 'string',
'enum' => array( 'professional', 'friendly', 'casual' ),
'default' => 'friendly',
'description' => 'The tone for the reply.',
),
),
'required' => array( 'comment_id' ),
)The ability returns:
array(
'type' => 'string',
'description' => 'The generated reply suggestion.',
)ai/suggest-replyrequirescurrent_user_can( 'moderate_comments' )
POST /wp-json/wp-abilities/v1/abilities/ai/suggest-reply/run
You can authenticate using either:
- Application Password (Recommended)
- Cookie Authentication with Nonce
See TESTING_REST_API.md for detailed authentication instructions.
curl -X POST "https://yoursite.com/wp-json/wp-abilities/v1/abilities/ai/suggest-reply/run" \
-u "username:application-password" \
-H "Content-Type: application/json" \
-d '{
"input": {
"comment_id": 1,
"tone": "professional"
}
}'Response:
"Thank you for your valuable feedback! We appreciate you taking the time to share your thoughts."The ability may return:
missing_comment_id:comment_idwas not providedcomment_not_found: no comment exists for the given IDinsufficient_capabilities: current user lacks moderation permissionspost_not_found: post of the comment is not found
-
Enable the experiment:
- Go to
Settings -> AI - Enable global AI features and toggle Suggest Reply
- Ensure valid AI connector credentials are configured
- Go to
-
Suggest reply:
- Go to
Commentsadmin page. - Hover over a comment and click Suggest reply
- Verify that the inline reply form opens, disables temporarily, and populates with the AI-generated reply
- Use the Tone dropdown to change the tone and Suggest Reply button in the inline reply form to regenerate the reply.
- Go to
-
REST API:
- Call
POST /wp-json/wp-abilities/v1/abilities/ai/suggest-reply/runwith a validcomment_id - Verify response shape and error handling for invalid IDs or insufficient permissions
- Call
- Requires valid AI credentials and text-generation-capable models
- Requires users with comment moderation capabilities for ability access
- Works on the classic comments list and the Dashboard Activity widget (no block-based comments UI integration here)