Article
How We Connected WP Engine AI Coworker to a Custom WordPress Plugin
WP Engine AI Coworker is an AI assistant that runs inside the WordPress admin. It can search a site’s content, update posts and pages, and carry out other admin tasks, and it asks for approval before changes that affect live content. Out of the box it works with WordPress itself. The harder question for any team with its own plugins is how to let it work with those plugins too.
At the time of writing, Coworker is offered through WP Engine’s customer AI beta program, so features and availability may change. This is our hands-on account of connecting it to one of our own plugins, what we learned, and the safeguards we think matter. It is our experience, not an official WP Engine statement.
This article was created with the help of WP Engine AI Coworker. Reviewed and approved by AZTANDC before publication.
What WP Engine AI Coworker Does
Coworker works from inside the WordPress dashboard. It can:
- Search the site’s published content and answer questions from it
- List, read, and update posts, pages, and custom post types such as service pages
- Check which plugins are installed and active
- Moderate comments and manage categories and tags
- Take you to the right admin screen when a task needs one
- Ask for confirmation before changes that affect live content
Each of those actions is a separate, named tool the assistant can call. In WordPress terms, they are abilities.
Why a Custom Plugin Needs Its Own Abilities
An assistant can only do what it has a tool for. Core WordPress content is covered, but a custom plugin stores its data in its own way, so the assistant cannot see or change it unless the plugin exposes a tool.
BC Code Injector is a custom plugin built by AZTANDC. It places HTML, CSS, and JavaScript in the head or body of specific pages. Coworker could not read or change its snippets at first, because the plugin did not expose any abilities. We modified the plugin to register WordPress abilities, and only after that could Coworker work with it.
How Abilities Work
WordPress has a standard way for plugins to describe what they can do so that AI tools can discover and use it. The WordPress project’s Abilities API repository on GitHub explains the idea. A plugin registers each ability with:
- A name and description the assistant can understand
- An input schema that defines exactly what information the tool accepts
- An output schema that defines what it returns
- A permission check that decides who is allowed to use it
- The code that does the work
Once registered, the ability appears in the assistant’s toolbox alongside the built-in ones. Related efforts, such as the WordPress MCP Adapter on GitHub and the Model Context Protocol documentation, show how the same idea reaches other AI clients.
What We Added to BC Code Injector
We kept the new surface small and per-post. We added five abilities:
| Ability | What it does | Changes anything? |
|---|---|---|
| bc-injector/list-snippets | Lists the posts and pages that have injected code | No |
| bc-injector/get-post-snippets | Returns the head, body-open, and body-close code for one post, including whether each is enabled | No |
| bc-injector/update-post-snippet | Replaces the code in one position on one post | Yes |
| bc-injector/list-snippet-revisions | Lists saved revisions of a post’s snippets | No |
| bc-injector/restore-snippet-revision | Restores an earlier revision | Yes |
Who Enforces What
Injected code runs on the live site, so we separate what software enforces from what depends on people.
Enforced by the plugin
- Admin only. The abilities are restricted to administrators.
- One post at a time. The abilities act on a single post. There is no ability for site-wide snippets.
- A revision before an update. The plugin stores a snapshot of the current snippet before an update changes the code or the enabled setting.
- Empty replacements are rejected. The update ability will not accept an empty code value, so it cannot be used to blank out a snippet. This is a narrow check on empty input. It does not judge whether new code is correct or safe.
Provided by Coworker
- Confirmation before changes. Coworker asks for approval before changes that affect live content. The update ability is flagged as needing confirmation because the saved code is output on the live site.
- Only the tools it has been given. It can act on the plugin only through the abilities we registered.
Manual review practices (not enforced by software)
- Read before write. We read the existing snippet first and compared it with what we expected.
- Check the code against the visible page. For structured data, every question and answer must match the text on the page.
- Review the result after saving.
- Test the live page after purging caches. For structured data, use Google’s Rich Results Test and check for duplicates.
A revision is a safety net, not a guarantee. It lets us restore the previously saved snippet. It cannot undo everything the changed code did while it was live, such as pages that were cached or crawled, or scripts that ran in visitors’ browsers in the meantime.
This follows the same thinking as our article on balancing AI opportunity and compliance responsibility: give the assistant a narrow, well-defined job and keep a person in the approval loop.
A Real Example: Structured Data on a Technical Article
We used the abilities on our visual regression testing guide.
What we asked Coworker
- “check the schema markup here on this post … and edit as needed”
- “Add Article or BlogPosting schema”
Before
- The post’s head snippet held one enabled script containing FAQPage structured data with 7 questions and answers.
- There was no Article or BlogPosting markup in the snippet, and the body positions were empty.
What Coworker checked first
- It read the snippet and confirmed the JSON was well-formed.
- It compared all 7 questions and answers with the visible FAQ on the page, and they matched.
- It confirmed the post body no longer contained a second schema block.
- It made no changes at that stage, because nothing needed fixing.
After the second request
- The head snippet is one script with a combined graph. It holds a BlogPosting entity (headline, URL, image, publish date, and AZTANDC LLC as author and publisher) and the same FAQPage with its 7 questions.
- The plugin saved a revision snapshot before the update and returned no warnings.
Validation
- Before and after saving: read-back of the snippet, a text comparison against the visible FAQ, and a check that the post body contained no duplicate schema.
- On the live page: validation is complete, and the structured data works as expected.
What We Learned
- A plugin has to expose its features first. Coworker could not use BC Code Injector until we added abilities to it. Connecting a custom plugin is development work, not a setting you switch on.
- Start read-only. A read tool shows you what the assistant sees before it changes anything.
- Keep it narrow. One post at a time is easier to review than the whole site.
- Verify the result yourself. After a change, purge caches and test the page. For structured data, use Google’s Rich Results Test and confirm that there are no duplicate blocks.
Frequently Asked Questions
What is WP Engine AI Coworker?
It is an AI assistant that works inside the WordPress admin. It can search site content, update posts and pages, and perform other admin tasks, and it asks for approval before changes that affect live content. WP Engine offers it through its customer AI beta program.
Can it work with a custom WordPress plugin?
Yes, once the plugin exposes its functions as WordPress abilities. Without them, the assistant cannot see or change what the plugin stores.
Is it safe to let an AI assistant edit injected code?
It can be, with limits. Restrict it to one post at a time, control who can use the tools, require explicit approval, save a revision before every change, and verify the live page afterward. A revision restores the saved snippet but cannot reverse every effect of code that already ran.
Do we need a developer to set this up?
For a custom plugin, yes. Someone has to register the abilities and decide on the permissions and safeguards. Once abilities exist, using the assistant with them does not need a developer.
Further Reading
- WP Engine’s customer AI beta page, with the company’s information on the Coworker beta
- WP Engine’s blog, where the company publishes its product announcements
- The AI plugin on WordPress.org
- The WordPress Abilities API repository on GitHub
- The WordPress MCP Adapter on GitHub
- The Model Context Protocol documentation
Connect Your Plugins to AI Tools
If you have custom plugins and want an assistant to work with them safely, AZTANDC can design the abilities, permissions, and approval steps around your workflow. Explore our AI and site automation services and our custom development and integrations, read how we built WP SiteBot to enhance our own website experience, or contact us about your project.