DEV Community

Cristian Tala
Cristian Tala

Posted on

I Built a WordPress Plugin with a Team of 6 AI Agents (It Processes 16,000 Posts in 90 Seconds)

I have a problem that no WordPress plugin solves well at scale.

ecosistemastartup.com publishes ~100 posts per day. It has over 16,000 articles, 500+ glossary terms, 500+ startup ecosystem actors — and all of it needs automatic internal linking. The plugins I tested — Link Whisper, Internal Link Juicer, Rank Math — all degrade performance when you scale to thousands of linking rules.

So I decided to build my own. Not alone. With a team of 6 AI agents using Claude Code's Agent Teams feature.

(Quick context: I sold my fintech startup for ~$23M, now I invest in startups and build with AI agents.)

The Pain: Internal Linking at Scale Doesn't Work

If you have a blog with 50 posts, any internal linking plugin works fine. The problem shows up when you scale:

  • Internal Link Juicer processed links on every page load. With 500+ rules, TTFB went through the roof.
  • Link Whisper requires manual approval for each suggestion. At 100 posts/day, that's unmanageable.
  • Rank Math has auto-linking but it's limited: no API, no custom entity support, can't automate at scale.

What I needed was simple in concept but complex in execution:

  1. Zero frontend impact — 0 additional queries when a user visits the site
  2. Async processing — links inserted in the background, never blocking saves or page loads
  3. API-first — create rules, bulk import, and monitor everything programmatically
  4. Automatic compliance — affiliate links get rel="sponsored nofollow" without thinking about it

The Decision: Claude Code Agent Teams

I could have coded this line by line. But I wanted to test something different: design the complete plugin as an Agent Teams project, where multiple AI agents work in parallel with specialized roles.

The key isn't "use AI to write code." The key is how you design the prompts so the team operates autonomously.

The Autonomy Rules (This Changed Everything)

The most common mistake with AI agents is letting them ask too many questions. Every interruption breaks the flow. So I defined explicit rules:

The lead agent NEVER asks the user about:
- Creating, editing, or deleting files
- Folder structure decisions
- Choosing between equivalent technical implementations
- Writing READMEs, comments, or documentation
- Writing tests or test cases

Only interrupt if:
- A decision changes the MVP scope
- Ambiguity with opposite-impact outcomes
- External credentials or access are needed
- Technical blocker with no way forward
Enter fullscreen mode Exit fullscreen mode

Result: the team worked for hours without interrupting me once.

The Team: 6 Agents, Each with a Clear Role

This isn't "one agent that does everything." Each has a specific role and explicit constraints:

1. 🧭 Strategist

The guardian of the absolute principle: never impact performance. Every technical decision passes through this filter. If something makes the plugin heavier without demonstrable SEO benefit, it gets rejected.

2. 🔬 Research Agent

Before writing a single line of code, this agent investigated all competitors:

  • Link Whisper, Yoast SEO, Rank Math, Internal Link Juicer, Internal Links Manager, SEOKEY
  • Documented performance problems with evidence from wordpress.org reviews
  • Delivered a report with comparison table, anti-patterns, and technical recommendation

Key finding: async on-save insertion with cache — not on-render. That's what kills performance in other plugins — they process on every page load.

3. 📊 SEO Engineer

Defined the matching algorithm: which terms to link, how many links per post, how to handle affiliates (rel="sponsored nofollow" always), which HTML elements to never touch (headings, code blocks, existing links).

4. ⚡ Performance Agent

The most critical role. Defined metrics before any code existed:

Metric Limit
TTFB with plugin active vs inactive < 5ms difference
save_post overhead < 50ms
Frontend queries 0
Bulk 15,000 posts < 4 hours
Engine with 1,000 rules < 500ms/post

Has veto power. If any implementation degrades the metrics, everything stops.

5. 🏗️ Architect / Dev

Implements everything: DB schema, REST API (17 endpoints), matching engine, queue with Action Scheduler, admin UI, WP-CLI commands. All with PHP 8.1+, strict types, wordpress.org standards from day one.

6. 🔍 QA

Endpoint checklists (auth, capabilities, sanitization), engine tests (no linking inside headings/code/existing links), performance validation against the Performance Agent's benchmarks.

The Process: From Research to Plugin in One Day

The flow was strict and sequential:

Phase 0 — Research: Research Agent delivers report. Performance Agent defines metrics. SEO Engineer defines algorithm. Strategist decides timing.

Phase 1 — Foundation: DB schema, openapi.yaml, working Docker setup.

Phase 2 — Core Engine: RuleMatcherEngine, ContentParser, LinkBuilder. The heart of the plugin.

Phase 3 — Queue & Processing: Action Scheduler with 3 parallel jobs, batches of 100 posts.

Phase 4 — API & Admin: 17 REST endpoints, admin UI with 5 tabs, import/export.

Phase 5 — Benchmarks and release.

Real Numbers (In Production Today)

LeanAutoLinks is running live on ecosistemastartup.com. These are the actual migration numbers:

Metric Result
Posts processed 16,793
Processing time 90.5 seconds
Throughput 668,009 posts/hour
Active keywords 736
Frontend queries 0
Rules migrated from ILJ 492

For context: Internal Link Juicer took minutes for partial rebuilds. LeanAutoLinks processed the entire site in 90 seconds.

Lessons from Building in Public with Agent Teams

What worked

  • Clear roles > generic agent. The Performance Agent vetoing the Architect was more valuable than one agent doing everything.
  • Research first. Without the Research Agent's report, we'd have repeated competitors' mistakes.
  • Metrics before code. Defining benchmarks before implementation forces you to design for performance.
  • Explicit autonomy rules. The team didn't interrupt me once. That's real productivity.

What I learned

  • Agent Teams don't replace a founder who knows what they want. The initial 3,000-word prompt was the most important investment of the project.
  • The prompt IS the product. If your prompt is vague, your software is vague.
  • Building in public with AI is more powerful than building alone — you can show the process AND the framework for others to replicate.

The Plugin Is Open Source

LeanAutoLinks is on GitHub: github.com/ctala/Wordpress-Lean-Auto-Links

  • 17 REST endpoints with OpenAPI spec
  • Background processing with Action Scheduler
  • 3 cache layers (object cache, partitioned transients, content cache)
  • Unicode-aware (Spanish, Portuguese, diacritics)
  • WP-CLI for bulk operations
  • AI agent documentation (AGENTS.md)

If you run a site with thousands of posts and internal linking plugins are killing your performance, give it a try.

Want to See More Builds Like This?

I document everything I build with AI — from WordPress plugins to n8n automations, content workflows, and monetization strategies.

Join my community of founders at Cágala, Aprende, Repite — we share real builds, not theory.


Are you building with Agent Teams or AI agents? Tell me about your experience — I'd love to know what frameworks other builders are using.


📝 Originally published in Spanish at cristiantala.com

Top comments (0)