Skip to content

ai_assistant_system_prompt

github-actions[bot] edited this page Nov 27, 2026 · 18 revisions

Filters the complete system prompt before the skills summary is appended.

Tool extensions can append instructions for their own tools without coupling those instructions to AI Assistant core.

Auto-generated Example

add_filter(
   'ai_assistant_system_prompt',
    function(
        string $prompt,
        string[] $enabled_tools,
        array $wp_info,
        Settings $settings
    ) {
        // Your code here.
        return $prompt;
    },
    10,
    4
);

Parameters

  • string $prompt System prompt text.
  • string[] $enabled_tools Tool names enabled for the current user.
  • array $wp_info Current WordPress/site context.
  • Settings $settings Settings instance.

Files

apply_filters('ai_assistant_system_prompt', $prompt, $enabled_tools, $wp_info, $this)

← All Hooks

Clone this wiki locally