WordPress AI Content Workflow System with Multi-Agent Architecture
WP Content Flow is a comprehensive WordPress plugin that integrates AI capabilities directly into the Gutenberg editor. It features a multi-agent architecture with specialized AI agents for content creation, layout design, stock art curation, and AI art generation, all powered by RAG knowledge management for brand consistency.
┌─────────────────────┐ ┌─────────────────────┐ ┌─────────────────────┐
│ WordPress Plugin │ │ Cloud API │ │ Dashboard │
│ (Gutenberg UI) │◄──►│ (Multi-Agent │◄──►│ (Management UI) │
│ │ │ Orchestration) │ │ │
└─────────────────────┘ └─────────────────────┘ └─────────────────────┘
- WordPress Plugin: Gutenberg editor integration with AI Chat panel
- Cloud API: Multi-agent orchestration and AI provider management
- Dashboard: System management and analytics interface
- 4 Specialized AI Agents:
- Content Agent: Copywriting and content generation
- Layout Agent: UX/UI design suggestions
- Stock Art Agent: Image curation and selection
- AI Art Generation Agent: Custom image creation
- Docker & Docker Compose
- Node.js 18+
- WordPress 6.0+
- PHP 8.1+
-
Clone and setup environment:
git clone <repository-url> cd WP_ContentFlow ./scripts/dev-setup.sh
-
Configure API keys: Edit
.envfiles and add your AI provider API keys:OPENAI_API_KEY=your_key_here ANTHROPIC_API_KEY=your_key_here GOOGLE_AI_API_KEY=your_key_here
-
Start development servers:
npm run dev
-
Access services:
- WordPress: http://localhost:8080
- Dashboard: http://localhost:3000
- Cloud API: http://localhost:3001
packages/
├── shared-types/ # TypeScript type definitions
├── cloud-api/ # Node.js API service
│ ├── src/agents/ # AI agent implementations
│ ├── src/services/ # Core services (RAG, Queue, etc.)
│ └── src/routes/ # API endpoints
├── wordpress-plugin/ # WordPress plugin
│ ├── includes/ # PHP backend logic
│ ├── assets/js/ # Gutenberg block scripts
│ └── blocks/ # Custom blocks
└── dashboard/ # Next.js management interface
├── src/components/ # React components
└── src/pages/ # Dashboard pages
- AI Chat Panel: Sidebar panel in Gutenberg editor
- Custom Blocks: AI Text Generator, Content Enhancer
- Block Targeting: Select and modify specific blocks
- Real-time Suggestions: Inline AI-powered improvements
- Agent Coordination: Orchestrated workflow between specialists
- RAG Knowledge: Brand voice, writing guidelines, visual standards
- Queue Management: Redis-based job processing
- Human-in-the-loop: Approval workflows for AI suggestions
- Scalable API: Node.js with TypeScript
- Database: PostgreSQL for cloud data, MySQL for WordPress
- Caching: Redis for performance optimization
- Monitoring: Comprehensive logging and metrics
# Start all services
npm run dev
# Individual services
npm run dev:api # Cloud API only
npm run dev:dashboard # Dashboard only
npm run dev:plugin # WordPress plugin assets only
# Build for production
npm run build
# Run tests
npm run test
# Docker commands
npm run docker:up # Start containers
npm run docker:down # Stop containers
npm run docker:build # Rebuild containersThe Cloud API provides REST endpoints for AI operations:
POST /api/ai/generate- Generate new contentPOST /api/ai/improve- Improve existing contentGET /api/workflows- List available workflowsPOST /api/suggestions/{id}/accept- Accept AI suggestion
Full API documentation available at: http://localhost:3001/docs
-
AI Text Generator Block
- Generate content from prompts
- Select from multiple AI providers
- Confidence scoring
- Workflow selection
-
AI Content Enhancer Block
- Improve existing content
- Grammar, style, clarity enhancements
- SEO optimization
- Engagement improvements
- Workflow Management: Create and configure AI workflows
- API Configuration: Manage AI provider settings
- User Permissions: Role-based access control
- Analytics Dashboard: Usage metrics and performance
The system includes comprehensive testing:
# WordPress plugin tests
cd packages/wordpress-plugin
npm run test
# Cloud API tests
cd packages/cloud-api
npm run test
# Dashboard tests
cd packages/dashboard
npm run test
# End-to-end tests
npm run test:e2eNavigate to Settings → AI Content Flow in WordPress admin:
- API Keys: Configure AI provider credentials
- Workflows: Set up content generation workflows
- User Permissions: Manage access controls
- Performance: Configure caching and rate limiting
Environment variables in packages/cloud-api/.env:
- Database and Redis connections
- AI provider API keys
- Queue processing settings
- Security configurations
npm run build
npm run docker:buildRequired environment variables for production:
OPENAI_API_KEY: OpenAI API accessANTHROPIC_API_KEY: Anthropic Claude accessGOOGLE_AI_API_KEY: Google AI accessJWT_SECRET: JWT signing secretDB_*: Database connection settingsREDIS_URL: Redis connection string
- Fork the repository
- Create a feature branch:
git checkout -b feature/new-feature - Make your changes following the coding standards
- Add tests for new functionality
- Submit a pull request
- PHP: WordPress coding standards
- JavaScript: ESLint with WordPress config
- TypeScript: Strict type checking enabled
- Testing: PHPUnit for PHP, Jest for JavaScript/TypeScript
- Documentation: Full documentation
- Issues: GitHub Issues
- Community: WordPress.org Support Forum
GPL v2 or later. See LICENSE for details.
- Initial release
- Multi-agent AI architecture
- WordPress Gutenberg integration
- RAG knowledge management
- Cloud API with queue processing
- Management dashboard