Most WordPress plugin data is still awkward for coding agents to work with. The state lives in admin screens, custom post types, post meta, and options tables. Humans can click around that comfortably enough. Agents cannot. They end up reverse-engineering UI state, guessing hidden field shapes, or asking you to paste configuration objects into chat. That is not a serious workflow.
What we have been building in the SleekWP ecosystem is a different pattern: the actual plugin data syncs into the active theme as JSON, and each synced folder gets a generated AGENTS.md file so the instructions and schema sit right beside the data. That turns plugin configuration into something agents can actually reason about in a stable, versioned, first-class way.
This is a much better abstraction than "AI inside a settings screen". It treats agent workflows as a real interface layer, not as a novelty on top of the old one.
The Problem With Database-Only Plugin Data
If a plugin stores all meaningful state only in the database, there is an immediate mismatch between how humans work and how coding agents work.
For a human, the admin UI is enough. You can click through a page group, open a chatbot, adjust a view, hit save, and move on. The visual interface is the product.
For a coding agent, that same setup is opaque. The agent has to infer state indirectly from markup, JavaScript, network requests, or screenshots. It has to guess which fields matter, which ones are derived, what the valid values are, and how the configuration is expected to be structured. That is brittle even for simple forms. Once the configuration becomes nested or relational, the agent is effectively working blind.
This is why so many "AI workflows" still collapse back into copy-pasting JSON into chat or manually transcribing settings. The model may be strong, but the interface between the model and the product is weak.
The Better Pattern: Sync the Data, Compile the Instructions
The pattern we landed on is simple:
- store the actual plugin instance data as JSON files inside the active theme
- keep the plugin-side schema and instructions in the plugin repo itself
- generate an
AGENTS.mdfile into the synced theme folder - let the agent work against those files directly
That means the theme becomes the place where the live instance data sits, while the plugin remains the source of truth for how that data is supposed to look.
In practice, the structure looks like this:
wp-content/themes/your-theme/
└── sleek/
├── ai/
│ ├── chatbots/
│ │ ├── AGENTS.md
│ │ └── support-bot.json
│ ├── agents/
│ │ ├── AGENTS.md
│ │ └── content-writer.json
│ └── agent-modes/
│ ├── AGENTS.md
│ └── seo-audit.json
├── pixel/
│ └── images/
│ ├── AGENTS.md
│ └── launch-banner.json
├── rank/
│ └── page-groups/
│ ├── AGENTS.md
│ └── city-pages.json
└── view/
├── pages/
│ ├── AGENTS.md
│ └── roadmap.json
└── views/
├── AGENTS.md
└── customers.json
Copy
And each JSON file follows a small, explicit wrapper:
{
"sync": {
"key": "7f7cc7d8-2f7e-4f6c-bd66-5f80a7c9fef4",
"updatedAt": "2026-04-23T08:15:00+00:00",
"version": 1
},
"post": {
"title": "City Pages",
"status": "publish"
},
"data": {
"urlPattern": "/services/{slug}/",
"sources": [
{
"type": "json",
"url": "https://example.com/cities.json"
}
]
}
}
Copy
That wrapper is enough to make the data portable and durable without making it noisy.
Why This Is Better for Coding Agents
The important shift here is that the agent no longer has to discover the structure by accident. It gets:
- the real configuration data
- a schema describing the valid shape
- instructions explaining how to edit it
- stable files that live in version control
That is a fundamentally different experience from letting an agent click through a settings UI and hoping it infers the right model of the world.
If you point Claude Code, Codex, or Cursor at a synced folder, the agent can read AGENTS.md, inspect the existing JSON files, and make changes in the format the plugin already expects. It can diff those changes. It can commit them. It can open a pull request around them. It can do all of the things agents are good at because the interface has been shaped for that style of work.
This is the part that matters most: the data and the instructions live side by side.
That sounds small, but it is the difference between an agent performing against implicit context and explicit context. Once the instructions sit in the same folder as the data, the workflow becomes dependable.
Why the Split Matters
One subtle but important design choice is that the theme is not the source of truth for the schema.
The plugin still owns:
instruction.mdschema.json
Those live in the plugin repo, where the actual product logic belongs.
The synced theme folder gets a compiled AGENTS.md generated from those plugin-side files. That gives us the best of both sides:
- plugin authors keep ownership over the valid schema and editing guidance
- agents get one convenient file beside the data they are editing
This is cleaner than duplicating schema files into every theme and hoping they stay in sync. The instructions regenerate when the plugin-side source changes, so the guidance stays current without turning the theme into a second documentation system.
Why Bidirectional Sync Is the Right Trade-Off
The setup would be much less useful if it only went one way.
If files were the only writable source, the WordPress admin would become a read-only shell. That would be technically pure, but it would also be a poor product decision. People still need to work in the UI, especially for quick edits, reviews, and day-to-day management.
So the sync goes both ways:
- edit in the theme, and WordPress imports the change
- edit in WP Admin, and the file is rewritten
That keeps the JSON files authoritative enough for agent workflows, while preserving the normal admin experience for humans.
There are also a couple of defensive choices that make this practical in real projects:
- missing files do not automatically delete database records
- empty
dataobjects do not wipe live records
Those safeguards matter a lot. Branches diverge. Files get renamed. Local environments drift. Agents make mistakes. A sync layer meant for real work has to be conservative around destructive behavior.
What This Looks Like in the SleekWP Suite
The pattern is now available across supported SleekWP post-type driven features:
- SleekAI chatbots
- SleekAI agents
- SleekAI agent modes
- SleekPixel images
- SleekRank page groups
- SleekView pages
- SleekView views
That means a page group, a chatbot, a generated image definition, or a view configuration can all be treated as real files in the theme rather than as data trapped behind an admin interface.
From an engineering perspective, this makes these plugin objects behave much more like code artifacts:
- you can branch them
- you can review them in Git
- you can deploy them through normal pipelines
- you can let agents modify them without building a custom browser automation layer
That last point matters most. If we are serious about agentic workflows, then the products we build should expose stable surfaces for agents to work against. JSON plus a generated AGENTS.md file is a much better surface than "please click around this React settings screen and infer the correct nested object".
This Is What "First-Class" Actually Means
People throw around "AI-native" and "agent-ready" very loosely right now. Usually it means there is a chat panel somewhere in the UI.
That is not enough.
If the underlying product data is still hidden away in opaque admin state, then the agent is still operating through a weak abstraction. The chat panel may be convenient, but it is not first-class.
A first-class agent workflow means the system has been designed so that an agent can:
- find the data
- understand the data shape
- read the instructions for changing it
- modify it safely
- keep those changes portable and reviewable
That is what this pattern does.
It is not about replacing the WordPress admin. It is about giving plugin data a second interface that matches how coding agents actually work.
And once you do that, a lot of things become much simpler.
You can tell an agent to update a family of page groups, refactor several chatbot configurations, or rework multiple image definitions without sending it on a UI archaeology expedition first. You point it at the right folder, and it has both the state and the rules.
That is the kind of detail that sounds minor from the outside, but in practice it changes the quality of the workflow completely.
Where This Goes Next
This pattern is going to matter more, not less.
As coding agents get better, the bottleneck shifts away from pure model capability and toward the surfaces we give them to work against. Products that expose clean, explicit, file-backed state will be easier to automate, easier to review, and easier to trust. Products that keep everything buried behind opaque interface state will feel increasingly clumsy by comparison.
For WordPress specifically, this feels like a good middle ground. We keep the admin experience. We keep the plugin UX. But we also expose a file-based layer that works naturally with the tools developers are already adopting.
If you want the technical details, the Agent Sync documentation covers the folder structure, JSON format, sync behavior, and safeguards in more depth.
That is the larger point behind the feature: if coding agents are going to be part of the workflow, they need a proper interface to the data. Not an improvised one. A real one.