#432 App: AI Content Generator (content_generator)
Description
Edit## Overview
Generate marketing content, blog posts, and social media content using LLM with human review workflow.
## App Metadata
- **App Name:** content_generator
- **Publisher:** platform
- **Version:** 1.0.0
- **Priority:** High
- **Complexity:** Medium
- **Phase:** 2 (Core business value)
## Actions
### 1. generate_blog_post
**Description:** Generate a blog post from topic and guidelines
**Parameters:**
- topic (str, required): Blog post topic
- tone (str, default='professional'): Writing tone (professional|casual|technical|friendly)
- length (str, default='medium'): Post length (short:300w|medium:800w|long:1500w)
- target_audience (str, optional): Audience description
- keywords (list, optional): SEO keywords to include
- outline (list, optional): Specific sections to include
- include_meta (bool, default=True): Generate meta description and title
**Returns:**
{
"title": "...",
"content": "...",
"meta_description": "...",
"word_count": 850,
"keywords_used": ["k1", "k2"],
"sections": ["intro", "section1", ...],
"model_used": "qwen3-vl"
}
### 2. generate_email_campaign
**Description:** Generate marketing email content
**Parameters:**
- campaign_type (str, required): Type (newsletter|promotional|announcement|welcome|followup)
- product_or_topic (str, required): What the email is about
- tone (str, default='friendly'): Email tone
- call_to_action (str, required): Desired CTA
- recipient_segment (str, optional): Target audience segment
- personalization_fields (list, optional): Fields like {{name}}, {{company}}
**Returns:**
{
"subject_lines": ["Option 1", "Option 2", "Option 3"],
"preview_text": "...",
"body_html": "...",
"body_text": "...",
"cta_button_text": "..."
}
### 3. generate_social_posts
**Description:** Generate social media content for multiple platforms
**Parameters:**
- topic (str, required): Content topic
- platforms (list, default=['twitter','linkedin']): Target platforms
- tone (str, default='engaging'): Post tone
- include_hashtags (bool, default=True): Add relevant hashtags
- variations (int, default=3): Number of variations per platform
- link (str, optional): Link to include
**Returns:**
{
"twitter": [{"text": "...", "hashtags": [...], "char_count": 240}, ...],
"linkedin": [{"text": "...", "hashtags": [...]}],
"instagram": [{"caption": "...", "hashtags": [...]}]
}
### 4. review_and_send
**Description:** Send generated content for human review via email
**Parameters:**
- content (dict, required): Generated content to review
- reviewer_email (str, required): Reviewer email
- content_type (str, required): Type of content (blog|email|social)
- approval_required (bool, default=True): Require explicit approval
- edit_link (str, optional): Link to edit the content
**Returns:** {"sent": true, "review_id": "rev_123"}
## Example Workflow - Weekly Blog Post
builder = WorkflowBuilder(name='weekly_blog', version='1.0.0')
builder.task(
task_id='generate_post',
function='apps.platform.content_generator.generate_blog_post',
kwargs={
'topic': '{{topic}}',
'tone': 'professional',
'length': 'medium',
'keywords': ['{{keyword1}}', '{{keyword2}}'],
'target_audience': 'Small business owners'
},
result_key='blog_post'
)
builder.task(
task_id='send_for_review',
function='apps.platform.content_generator.review_and_send',
kwargs={
'content': '{{blog_post}}',
'reviewer_email': 'marketing@example.com',
'content_type': 'blog'
}
)
## LLM Prompt Templates
Store prompts in configuration for easy tuning:
- blog_post_prompt: System prompt for blog generation
- email_campaign_prompt: System prompt for email content
- social_post_prompt: System prompt for social media
## Implementation Notes
- Use existing LLM tool (engine/tools/llm.py)
- Temperature settings: 0.7 for creative, 0.3 for factual
- Implement content length estimation and enforcement
- Add plagiarism/quality checks in future version
- Support multiple LLM providers (Ollama, OpenAI, Anthropic)
## Configuration Schema
{
"llm_model": "qwen3-vl:235b-instruct-cloud",
"default_temperature": 0.7,
"max_retries": 2,
"content_guidelines": "Company style guide text...",
"prohibited_topics": []
}
## Secrets Config
None (LLM config from environment)
## Dependencies
- engine/tools/llm.py
- Email sending (SMTP)
- Optional: approval_chain app for review workflow
Comments
Loading comments...
Context
Loading context...
Audit History
View AllLoading audit history...