Content Generation Engine
Relevant source files
The following files were used as context for generating this wiki page:
- agent/modules/marketing_content_generation_agent.py
- agent/modules/content/visual_content_generation_agent.py
- agents/mcp/voice_media_video_agent.py
- agent/wordpress/content_generator.py
- agent/modules/backend/advanced_code_generation_agent.py
- config/agents/content_publisher.json
- agent/wordpress/seo_optimizer.py
- LUXURY_FASHION_AUTOMATION.md
The Content Generation Engine is a multi-faceted system within the DevSkyy platform responsible for the automated creation of a wide array of digital assets. Its scope extends beyond simple text to include visual media, marketing campaigns, and even entire full-stack software applications. The engine is composed of several specialized AI agents that can be orchestrated to perform complex, multi-step content creation workflows, such as launching a new product or an entire fashion brand.
This system is designed to be highly modular, with distinct agents for textual, visual, and code-based generation. These agents leverage various AI models and services, including Anthropic's Claude, OpenAI, DALL-E 3, and Stable Diffusion, to produce high-quality, brand-aware content. The engine's capabilities are exposed through API endpoints and can be configured and triggered via JSON-based definitions, enabling sophisticated automation pipelines.
Architecture Overview
The Content Generation Engine is not a single monolithic service but a collection of specialized agents that work in concert. The architecture allows for flexible orchestration, where different agents can be chained together in workflows to produce complex outputs.
The following diagram illustrates the high-level components of the engine and the types of content they produce.
This diagram shows the main categories of content generation managed by a central orchestrator.
Sources: agent/wordpress/content_generator.py, agent/modules/content/visual_content_generation_agent.py, agent/modules/backend/advanced_code_generation_agent.py, agent/wordpress/seo_optimizer.py
Textual Content Generation
This component focuses on creating written content for various platforms, primarily WordPress and marketing channels. It is powered by large language models like Anthropic's Claude.
Sources: agent/wordpress/content_generator.py, agent/modules/marketing_content_generation_agent.py
WordPress Content
The ContentGenerator class is the core of WordPress content creation. It can generate entire blog posts and standard pages like "About Us," "Contact," and "FAQ."
This diagram shows the structure of the ContentGenerator class, responsible for creating WordPress content.
Sources: agent/wordpress/content_generator.py:19-423
Key Functions
generate_blog_post(): Creates a complete, SEO-optimized blog post from a topic, keywords, and desired tone. It returns a dictionary containing the title, HTML content, meta description, and word count. If no API key is provided, it returns a mock response.
Sources: agent/wordpress/content_generator.py:30-91generate_page_content(): A factory method that routes requests to specialized functions for generating content for different page types (e.g.,_generate_about_page,_generate_contact_page). The content is pre-formatted with HTML and includes placeholders for elements like contact forms.
Sources: agent/wordpress/content_generator.py:93-120rewrite_content(): Takes existing text and rewrites it in a specified style (e.g., professional, casual, luxury) using the Claude AI model.
Sources: agent/wordpress/content_generator.py:400-420
Marketing Content
The MarketingContentGenerationAgent is responsible for creating content for marketing campaigns, including social media, email, and web content.
Sources: agent/modules/marketing_content_generation_agent.py, agent/modules/backend/advanced_code_generation_agent.py:255-308
Capabilities
- Social Media Content: Generates posts for various platforms.
- Email Campaigns: Creates content for email marketing.
- Web Content: Produces copy for landing pages and advertisements.
- Brand Messaging: Develops a consistent brand voice.
- Content Calendar: Generates a schedule for content publication.
Sources: agent/modules/backend/advanced_code_generation_agent.py:269-292
Visual & Media Content Generation
This part of the engine creates visual assets, including images, videos, and voice content, tailored for luxury fashion brands.
Sources: agent/modules/content/visual_content_generation_agent.py, agents/mcp/voice_media_video_agent.py, LUXURY_FASHION_AUTOMATION.md
Visual Content (Images)
The VisualContentGenerationAgent supports multiple AI image providers and automatically selects the best one based on quality, cost, and performance.
Provider Selection Logic
The system uses a strategy pattern to choose the optimal provider for a given request.
This flowchart illustrates the process of selecting an image generation provider and processing the output.
Sources: LUXURY_FASHION_AUTOMATION.md (Section: Visual Content Generation Agent)
Provider Details
| Provider | Quality Score | Cost per Image | Max Resolution | Use Case |
|---|---|---|---|---|
| DALL-E 3 | 9.0/10 | $0.04 | 1024x1024 | Product photos, lifestyle images |
| Stable Diffusion XL | 8.5/10 | $0.00 (local) | 1024x1024 | High-volume generation |
| Midjourney | 9.5/10 | $0.10 | 2048x2048 | Fashion lookbooks, artistic content |
| Claude Artifacts | 8.0/10 | $0.02 | N/A | Design mockups, UI/UX |
Sources: LUXURY_FASHION_AUTOMATION.md (Section: Visual Content Generation Agent)
Voice, Media, and Video
The VoiceMediaVideoAgent handles multimedia generation, including speech-to-text, text-to-speech, voice cloning, and video creation. It is a key component of the "Visual Foundry" and "Voice/Media/Video Elite" agent teams.
Sources: agents/mcp/voice_media_video_agent.py, QUICKSTART.md
Key Capabilities:
- Speech-to-Text & Text-to-Speech: Core audio processing.
- Voice Cloning: Can achieve high similarity (e.g., 92%) for consistent brand narration.
- Video Generation: Capable of creating short videos (e.g., 10-second clips) as part of a complete workflow.
Sources: agents/mcp/voice_media_video_agent.py, QUICKSTART.md (Section: Step 2: Test Voice/Media/Video Agent)
Code & Application Generation
A highly advanced capability of the engine is the autonomous generation of code, ranging from individual components to complete full-stack applications and WordPress themes. This is primarily handled by the AdvancedCodeGenerationAgent.
Sources: agent/modules/backend/advanced_code_generation_agent.py
This diagram outlines the main methods of the AdvancedCodeGenerationAgent, showcasing its broad generation capabilities.
Sources: agent/modules/backend/advanced_code_generation_agent.py:19-335
Generation Types
- Full-Stack Websites: Generates frontend (React), backend (FastAPI), database schema, documentation, and deployment configurations based on a set of requirements.
Sources: agent/modules/backend/advanced_code_generation_agent.py:46-88 - Luxury React Components: Creates React components styled with a luxury aesthetic, including Framer Motion animations, tests, and documentation.
Sources: agent/modules/backend/advanced_code_generation_agent.py:90-137 - FastAPI Microservices: Builds a complete microservice including the main application, Pydantic models, API endpoints, authentication, and Docker configuration.
Sources: agent/modules/backend/advanced_code_generation_agent.py:139-188 - WordPress Themes: Generates a full WordPress theme with Divi compatibility, including all necessary PHP files, CSS, and customizer options.
Sources: agent/modules/backend/advanced_code_generation_agent.py:190-253
Content Optimization
The engine includes capabilities for optimizing content, primarily for Search Engine Optimization (SEO), handled by the WordPressSEOOptimizer and ContentGenerator agents.
Sources: agent/wordpress/seo_optimizer.py, agent/wordpress/content_generator.py
SEO Analysis and Scoring
The WordPressSEOOptimizer performs a comprehensive on-page SEO audit, calculating a score from 0-100 based on a weighted set of best practices.
SEO Best Practices & Weights
| Check | Criteria | Weight |
|---|---|---|
| Title Length | 30-60 chars | 10 |
| Meta Description Length | 120-155 chars | 10 |
| H1 Count | Exactly 1 | 8 |
| Image Alt Text | Required | 7 |
| Internal Links | Min 2 | 6 |
| External Links | Min 1 | 4 |
| Content Length | Min 300 words | 8 |
| Keyword Density | 1.0% - 3.0% | 7 |
| HTTPS | Required | 10 |
| Mobile Friendly | Required | 10 |
Sources: agent/wordpress/seo_optimizer.py:22-35
Key Optimization Functions
optimize_page(): The main function that orchestrates analysis, generates recommendations, creates schema markup, and calculates the final SEO score for a given URL.
Sources: agent/wordpress/seo_optimizer.py:37-67generate_schema_markup(): Creates structured data (JSON-LD) for different content types like articles, products, and organizations to improve search engine visibility.
Sources: agent/wordpress/seo_optimizer.py:255-271generate_sitemap(): Produces an XML sitemap from a list of site pages.
Sources: agent/wordpress/seo_optimizer.py:339-366
Configuration and Workflows
Content generation tasks can be defined and automated through JSON configurations. The content_publisher.json file provides a blueprint for an automated content publishing agent.
Sources: config/agents/content_publisher.json
Example Workflow: AI Content Publisher
This workflow defines an automated process for generating and publishing content to WordPress.
This diagram shows the automated steps for the AI Content Publisher workflow.
Sources: config/agents/content_publisher.json:62-68
Key Configuration Elements
capabilities: Defines what the agent can do, mapping keywords to specific services and methods (e.g., "generate" keyword maps toContentGenerator.generate_blog_post).
Sources: config/agents/content_publisher.json:11-53workflow: Specifies the trigger types (schedule, manual, API) and the sequence of steps to execute.
Sources: config/agents/content_publisher.json:60-68integrations: Details the external services used, such as OpenAI, Anthropic, WordPress, and Pexels, including preferred models and authentication methods.
Sources: config/agents/content_publisher.json:69-105anti_detection: Includes features like random delays to mimic human-like posting behavior.
Sources: config/agents/content_publisher.json:117-122
Conclusion
The Content Generation Engine is a powerful and versatile system at the heart of the DevSkyy platform's automation capabilities. By integrating multiple specialized agents for text, visuals, and code, it can automate a vast range of creative and technical tasks. Its modular architecture, combined with configurable workflows and a multi-provider strategy, allows for the production of high-quality, brand-aligned digital assets at scale, from SEO-optimized blog posts to complete, production-ready WordPress themes and e-commerce websites.