CrewPress AI
A multi-agent SaaS platform that writes, optimizes, and maintains WordPress sites — seven specialized AI agents, per-site licensing, and a "thin client, smart server" architecture built entirely in PHP.
Overview
I built CrewPress AI as both founder and sole engineer — product, architecture, and every line of code. The premise is straightforward: WordPress site owners shouldn’t need to know prompt engineering. They should be able to say “write me an SEO post about sleep hygiene in Slovenian” and get a publish-ready draft. The platform runs seven specialist AI agents behind a single chat interface embedded directly in the WordPress admin panel.
The architecture evolved through several iterations before landing on what I now call “thin client, smart server.” The WordPress plugin is purely a communication layer — it validates a license key, streams a request to the SaaS broker, and renders the response. All agent logic, LLM routing, workflow orchestration, and usage enforcement live on the server. That constraint let me cut the plugin from nearly 20 000 lines to under 6 000 while simultaneously improving memory usage by 50 % and response time by the same margin. The SaaS side handles seven agents — Content Generator, SEO Optimizer, Developer Assistant, Maintenance Assistant, Analytics Assistant, Image Generator (DALL-E 3), and an Emergency Recovery agent for broken-site troubleshooting — each backed by an appropriate LLM: Claude for code and complex reasoning, GPT-4o for conversation and creative content, Gemini for analytics.
Revenue comes through four Stripe subscription tiers ($19 / $49 / $99 / $199 per month) gated by per-site license keys. Each plan enforces per-agent access, per-model token quotas, and WordPress execution permissions (which agents can publish, which can modify themes, and so on). The SmartUsageManager tracks all of this in real time, falls back gracefully on quota exhaustion, and nudges users toward appropriate upgrades — without ever dropping a request mid-flight.
Architecture
Reading the diagram: Each WordPress site installs a lightweight plugin (thin client) that holds only a license key and a chat UI. Every request is authenticated against the SaaS broker, which detects intent, selects agents, and routes to the right LLM provider — Claude for code and complex recovery, GPT-4o for content and conversation, DALL-E 3 for image generation, Gemini for analytics. Seven agents are orchestrated server-side; the plugin just renders the result. MySQL tracks licenses, per-site usage, and subscription state. Stripe handles recurring billing across four plan tiers.
Six things shipped,
three hard ones solved.
Key contributions
- Designed the full two-repo architecture: a WordPress plugin (thin client) and a PHP SaaS broker that hosts all agent logic, billing, and usage enforcement.
- Built seven specialist AI agents — Content Generator, SEO Optimizer, Developer Assistant, Maintenance Assistant, Analytics Assistant, Image Generator (DALL-E 3), and Emergency Recovery — each with configurable LLM provider per plan tier.
- Implemented the SaaS licensing layer: per-site license keys, Stripe subscriptions (Starter $19 / Pro $49 / Business $99 / Enterprise $199), webhook handlers, and usage tracking with per-model token quotas.
- Architected "thin client, smart server" — reduced plugin from 19 783 to 5 670 lines of code (71.3 %) by moving all AI orchestration server-side, cutting memory usage 50 % and DB queries 60 %.
- Shipped multi-agent workflow detection: the conversation assistant analyses intent and routes to single-agent or parallel multi-agent execution depending on what the task actually needs.
- Built the SaaS web portal (Vite + Tailwind + PHP, cPanel-compatible) covering auth, dashboard, billing, and a plugin-facing REST API for license validation, usage logging, and permission checking.
Challenges solved
- Keeping the WordPress plugin truly thin while still delivering a rich real-time agent UI — the answer was streaming JSON from the SaaS and driving the UI entirely from server-sent events.
- Per-model token economics across three LLM providers: building the SmartUsageManager that enforces plan-level model-mix limits (e.g. 20 % GPT-4o on Starter, unlimited on Business) without slowing requests.
- First-iteration code grew to ~20 000 lines before I enforced the "thin client" constraint — rewriting to 5 670 lines across three optimization phases was the most impactful architectural decision of the project.
Seven agents, three LLM providers, four pricing tiers — the hardest part wasn't the AI. It was knowing when not to call an agent at all. Fifty percent cost savings come from that single discipline.
What's under the hood.
¿Listo para arreglar, construir
o escalar?
30 minutos, conmigo personalmente. Leo tu sistema como un archivo de logs y te digo qué haría primero. Sin presentaciones, sin embudo de ventas.
— Davor Majc, fundador, Numen