- Add thumbs-down feedback modal and preference API endpoint - Add AI UGC video platforms research doc - Add ReflectAd Remotion composition with public flow assets - Add gemini-ad-designer and poster-ad-designer pipeline skills - Add research_reflect_v1.1 pipeline script Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
4.5 KiB
Marketing Content Pipeline
This project implements an AI-powered Social Media Content Automation System. Eight specialized agents research, generate, render, and distribute marketing content.
System Architecture
Eight agents running in sequence:
- Trend Scout — trending content monitoring via Tavily
- Marketing Research Agent — deep market research via Tavily
- Script Writer — ad scripts from research output
- Gemini Ad Designer — AI-generated image ads via NanoBanana MCP (Google Gemini)
- Poster Ad Designer — museum-quality poster ads via Playwright HTML-to-PNG
- Video Ad Producer — video ads via Remotion
- Copywriter Agent — platform-specific copy
- Distribution Agent — publish manifest creation (gate-protected)
Folder Structure
assets/— brand images, logos, product shots (mood board)knowledge/— brand identity, platform guidelines, product/campaign infoskills/— all 8 agent skills (each has SKILL.md)outputs/— generated content per campaignremotion-ad/— Remotion video project with compositions
Knowledge Files (READ FIRST)
Every agent MUST read these before generating ANY content:
_knowledge/brand_identity.md— tone, voice, personality, CTA patterns_knowledge/platform_guidelines.md— per-platform specs and formatting_knowledge/product_campaign.md— product details, features, campaign direction
NOTE: The _knowledge/ directory is dynamically written per-pipeline-run with the active app's content. The original knowledge/ directory contains the honeyDue defaults.
Available Tools
Tavily (Web Research)
Use @tavily/core npm package. Write a Node.js script to run searches:
import { tavily } from "@tavily/core";
const client = tavily({ apiKey: process.env.TAVILY_API_KEY });
const result = await client.search("query", { maxResults: 10 });
The TAVILY_API_KEY is available in the environment.
NanoBanana MCP (Image Generation)
Available as MCP tool: mcp__nanobanana__generate_image
Uses Google Gemini to generate images. Call it with a detailed prompt describing the desired image.
The GEMINI_API_KEY is configured in .mcp.json.
Playwright (HTML to PNG)
Use Playwright to render HTML/CSS layouts to pixel-perfect PNG screenshots:
import { chromium } from "playwright";
const browser = await chromium.launch();
const page = await browser.newPage();
await page.setViewportSize({ width: 1080, height: 1080 });
await page.setContent(htmlString);
await page.screenshot({ path: "output.png" });
await browser.close();
Remotion (Video Rendering)
Video project is in remotion-ad/. Compositions are defined in remotion-ad/src/.
To render a video:
cd remotion-ad && npx remotion render src/index.ts CompositionId --output ../outputs/campaign/video/filename.mp4
You can modify or create new compositions in remotion-ad/src/ before rendering.
Pipeline Execution Order
trend-scout → research → script-writer → gemini-ad-designer → poster-ad-designer → video-producer → copywriter → distribution
Each agent reads its SKILL.md from skills/{agent-name}/SKILL.md and follows it exactly.
Output Convention
outputs/{task_name}_{YYYYMMDD}/
├── trend_report.json
├── research_results.json
├── research_brief.md
├── interactive_report.html
├── ads/
│ ├── instagram_feed_*.png (1080x1080)
│ ├── instagram_stories_*.png (1080x1920)
│ ├── nextdoor_spotlight_*.png (1200x1200)
│ ├── nextdoor_display_*.png (1200x628)
│ └── ad_manifest.json
├── scripts/
│ ├── scripts_all.json
│ └── scripts_summary.md
├── video/
│ ├── instagram_reel_*.mp4 (1080x1920)
│ ├── tiktok_ad_*.mp4 (1080x1920)
│ ├── nextdoor_video_*.mp4 (1080x1080)
│ └── scene_plans.json
├── copy/
│ ├── instagram_captions.json
│ ├── tiktok_captions.json
│ ├── nextdoor_posts.json
│ └── copy_matrix.json
└── Publish_manifest.md
File Naming Convention
{platform}_{format}_{hook_variant}_{dimensions}.{ext}
Example: instagram_feed_hook_a_1080x1080.png
Safety Rules
- No live API posting without explicit user approval
- Distribution agent creates a publish manifest — NEVER auto-publishes
- All media files must exist locally before creating the manifest
- Always save outputs to the specified output directory