How a 16-Person Vietnamese Agency Uses AI Agents in Its WordPress Development Workflow
In early 2024, one of our senior developers spent three full days building a complex custom post type with 12 ACF field groups, custom Gutenberg block registration, advanced taxonomy setup, and a REST API endpoint — all for a single project ticket. In June 2025, the same developer completed a similar ticket in 4 hours. The difference? AI agents integrated into every stage of our WordPress development workflow.
This isn’t a hype piece about AI replacing developers. It’s a practical, battle-tested account of how our 16-person team at CODE TOT — a Vietnamese WordPress agency — has been using AI agents (Claude, ChatGPT, and custom automation scripts) since late 2023 to accelerate development without sacrificing quality.
“AI doesn’t replace the developer’s judgment. It replaces the 80% of grunt work that didn’t need judgment in the first place.” — Khoi Pro, Founder of CODE TOT
Why AI Agents, Not Just AI Chat
There’s a critical distinction between asking ChatGPT to write a PHP function (ad-hoc AI assistance) and having an AI agent integrated into your CI/CD pipeline that automatically generates boilerplate, runs code reviews, and drafts documentation (AI agent workflow).
An AI agent in our context is a semi-autonomous system that:
- Receives a structured task from our project management system (Notion → Make.com → AI API)
- Executes multi-step operations (analyze requirements → generate code → validate syntax → suggest improvements)
- Reports back with actionable output (diff files, documentation drafts, test results)
- Escalates to a human developer when confidence is below a configurable threshold
We operate three tiers of AI integration:
| Tier | Tool / Model | Application | Time Saved per Project |
|---|---|---|---|
| 1 — Chat Assistance | Claude (Sonnet 4) / ChatGPT-4o | Debugging, ad-hoc code generation, email drafting | ~10-15% |
| 2 — Structured Code Generation | Claude + Custom Prompts + ACF JSON | Custom blocks, CPT registration, API endpoints | ~40-60% |
| 3 — Automated Agent Pipeline | Make.com + GPT-4o + WP-CLI + GitHub Actions | Boilerplate generation, linting, documentation, deployment prep | ~60-80% |
Tier 1: Chat Assistance — The Baseline
Every developer on our team has access to either Claude or ChatGPT. This is the simplest tier: ask a question, get an answer, adapt it. We standardized on Claude (Sonnet 4) for PHP and WordPress work because of its superior understanding of the WordPress coding standards and hook system.
Common use cases:
- Debugging obscure PHP errors: “This foreach loop on line 47 is returning an unexpected array merge — what’s wrong?”
- Writing WP_Query arguments: “Show me a WP_Query that gets the latest 5 posts in category ‘portfolio’, excluding sticky posts, ordered by menu_order.”
- SQL optimization: “Rewrite this slow meta_query as a custom SQL JOIN.”
Example — optimized WP_Query generation:
// Before AI assistance
$args = array( 'post_type' => 'portfolio', 'posts_per_page' => 5, 'category_name' => 'portfolio', 'post__not_in' => get_option('sticky_posts'), 'orderby' => 'menu_order', 'order' => 'ASC', 'no_found_rows' => true, // AI suggested: skip pagination count 'update_post_meta_cache' => false, // AI suggested: skip meta cache 'update_post_term_cache' => false, // AI suggested: skip term cache );
$query = new WP_Query( $args ); The AI didn’t just write the query — it suggested three performance optimizations (no_found_rows, meta_cache, term_cache) that cut database query time from 38ms to 6ms. Source: WordPress WP_Query Developer Handbook
Tier 2: Structured Code Generation with ACF + Custom Blocks
This is where AI saved us the most time. Since we moved from page builders to ACF + custom blocks (documented in our previous article), every new project requires custom block registration. Each block needs:
- A PHP render callback or template file
- block.json registration
- ACF field group JSON export
- Block stylesheet (editor + frontend)
- JavaScript for block attributes and interactivity
Manual creation of these files takes 45-90 minutes per block. With our structured AI workflow, it takes 10-15 minutes.
Our Prompt Template for Block Generation
Generate a WordPress ACF custom block with the following specifications: Block Name: {block_name} Description: {description} ACF Fields: - {field_1_label} (type: {field_type}, required: {yes/no}) - {field_2_label} (type: {field_type}, required: {yes/no}) Category: {category} Supports: align, anchor, customClassName Icon: {dashicon} Output requirements: 1. Complete block.json with all attributes and supports 2. PHP render callback that handles empty states 3. ACF field group JSON (ready for import) 4. Editor CSS (minimal — let theme handle layout) 5. Frontend CSS (only the block's specific styles) Output format: Provide each file in a code block with the filename as a comment. Tier 3: Automated Agent Pipeline
Our most advanced integration. We built a Make.com (formerly Integromat) scenario that listens to a specific Notion database tag. When a ticket is tagged with #ai-generate-block, the pipeline activates:
- Notion → Make.com: Retrieves ticket details (block name, field specifications, design reference)
- Make.com → OpenAI API: Sends structured prompt to GPT-4o with our block generation template
- AI → Make.com: Receives generated code, extracts individual files
- Make.com → GitHub: Creates a new branch with the generated files via GitHub API
- GitHub Actions: Runs PHPCS (WordPress Coding Standards), ESLint, and a syntax check
- GitHub → Notion: Updates the ticket with the branch URL and linting results
- Human Review: Developer reviews the PR, makes adjustments, merges
The key metric: our automated pipeline passes PHPCS on first generation approximately 74% of the time. For the 26% that fail, the AI self-corrects when we feed the linting errors back into the same session.
Real Metrics: Before vs. After AI Integration
| Task Type | Before AI (Hours) | With AI (Hours) | Reduction |
|---|---|---|---|
| Custom post type + taxonomy registration | 3-4 | 0.5-1 | 75-83% |
| ACF custom block (standard) | 1.5 | 0.25 | 83% |
| REST API endpoint with auth | 4-6 | 1-2 | 60-67% |
| Debug + fix PHP fatal error | 2-8 | 0.5-2 | 50-75% |
| Performance audit report | 3-4 | 0.5-1 | 75-83% |
| Client email / technical documentation | 1-2 | 0.25-0.5 | 75% |
Where AI Struggles (and Where Humans Still Win)
Let’s be honest about the limitations. After 18 months of practical use, these are the areas where AI consistently underperforms:
1. Complex Business Logic
If a client has a multi-step conditional pricing engine with 15 variables and edge cases that depend on WooCommerce subscription status, user roles, and coupon stack rules — AI generates plausible-looking code that fails on 40% of edge cases. Human developers catch these every time.
2. Security-Critical Code
AI models are not security-first by default. They’ll happily generate a REST API endpoint without nonce verification, a file upload handler without MIME type validation, or a database query without proper sanitization. Every AI-generated database interaction must be manually audited for SQL injection vectors.
// ❌ What AI tends to generate $wpdb = ->get_results("SELECT * FROM {$wpdb->prefix}posts WHERE post_title = '{}'"); // ✅ What it should be $wpdb = ->get_results(->prepare( "SELECT * FROM {$wpdb->prefix}posts WHERE post_title = %s", sanitize_text_field() )); 3. Plugin Compatibility Analysis
AI cannot test whether a custom block conflicts with a client’s existing plugin stack. We’ve had generated code that worked beautifully in isolation but broke when Advanced Custom Fields PRO was at version 6.3 while the generated code expected 6.4 APIs.
4. Design Intuition
AI can generate CSS that matches a spec, but it cannot look at a design mockup and understand why a specific padding value (24px vs 20px) matters to the visual hierarchy. That’s still a human skill.
Claude vs ChatGPT: A 6-Month Verdict for WordPress Work
| Criterion | Claude (Sonnet 4) | ChatGPT (GPT-4o) |
|---|---|---|
| PHP code quality | Excellent — respects WPCS naturally | Good — needs explicit standards prompting |
| WordPress hooks/knowledge | Deep — understands filter/action chain | Adequate — misses obscure hooks |
| JavaScript/React (blocks) | Good — clean, modern syntax | Excellent — broader training data |
| Context window (long docs) | 200K tokens — entire codebase | 128K tokens — large but smaller |
| Debugging accuracy | Higher — traces through logic | Good — pattern-matches known bugs |
| CSS/design output | Conservative, clean | More creative, occasionally overly complex |
Our team’s consensus: Claude (Sonnet 4) for PHP/WordPress core work, ChatGPT (GPT-4o) for JavaScript/React blocks and CSS design work. Using both costs about 0-60/month per developer in API credits — which pays for itself in the first week of saved time.
AI and Server Performance — A Related Concern
One angle that surprised us: as AI crawlers (GPTBot, ClaudeBot, Google-Extended) increasingly scrape the web for training data, our server load from bot traffic increased ~300% between January and June 2025. If you’re using AI agents in your development workflow, you should also be aware of how AI crawlers impact your production server resources.
We published a detailed guide on this: How to Reduce Server Load from Bot Crawlers — covering Nginx rate limiting, robots.txt strategies, and RunCloud firewall rules specifically for AI crawlers.
Practical Recommendations for WordPress Agencies
If you’re considering integrating AI agents into your workflow, here’s what worked for us:
- Start with Tier 1 (chat assistance) for 2 weeks. Let your team experiment. Identify which tasks AI actually accelerates vs. which ones it complicates.
- Build prompt libraries. Don’t let every developer reinvent prompts. Create a shared Notion database of tested prompts for common tasks: WP_Query generation, CPT registration, block boilerplate, security audits.
- Never trust AI-generated SQL or REST API endpoints without review. This is our #1 rule. AI has no concept of database integrity.
- Invest in the feedback loop. The more you correct AI output (feeding errors back), the better it gets. We maintain a “failure log” of edge cases AI missed.
- Automate the boring parts first. Boilerplate generation, documentation writing, and commit message drafting are low-risk, high-ROI AI use cases. Save complex business logic for human developers.
- Monitor server impact. If your workflow uses AI APIs extensively during development, those API calls happen from your dev environment. But if you deploy AI-powered features (AI content generation for clients, AI search), audit the server load — it’s a different scale of demand.
What’s Next for Us
We’re currently experimenting with WP-CLI-based AI agents that can execute WordPress maintenance tasks autonomously: database optimization, plugin update health checks, and automated 404 monitoring with suggested redirect rules. The WordPress core team’s AI initiative (WP 7.1 AI Client) will make much of this native to WordPress, which we’re watching closely.
We’ve also started building internal tools using Bit Flows for AI agent workflows within WordPress itself — allowing non-technical team members to trigger AI tasks from the WordPress admin without touching a terminal.
The agencies that will win in the next 3-5 years aren’t the ones that replace developers with AI. They’re the ones where every developer has an AI co-pilot that handles the boilerplate, enforces standards, and catches mistakes — freeing humans to focus on architecture, creativity, and client relationships.
This is part of our ongoing series on agency operations at CODE TOT. Previously in this series: Why We Moved from Page Builders to ACF + Custom Blocks and How We Scaled from Freelancer to 16-Person Team.


