Skip to content

AI Marketing Campaign Post Generator is an **AI-powered marketing campaign generator** that transforms business ideas into professional marketing campaigns using Google's Advanced Development Kit (ADK) Framework and Gemini API.

License

Notifications You must be signed in to change notification settings

jpantsjoha/Agentic-Marketing-Campaign-Generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

AI Marketing Campaign Post Generator πŸš€

Agentic AI Marketing Campaign Manager

Author: JP + 2025-06-28 Version: v1.0.2

Transform your business ideas into professional marketing campaigns using Google's ADK Framework and Gemini API

An open-source, AI-powered marketing campaign generator that demonstrates the power of Agentic AI architecture for complex business workflows. Built for developers, marketers, and AI enthusiasts who want to explore production-ready AI agent implementations.

License: MIT Python 3.9+ React 18 Google ADK


πŸ†• What's New in v1.0.2

  • Settings page for Gemini API key (frontend)
  • Repo hardening: added CI secret scanning via gitleaks

πŸ†• What's New in v1.0.1alpha-blog-post

πŸŽ‰ Google AI Migration & Real Visual Content Generation

  • βœ… Google AI Library Migration: Migrated from deprecated google-generativeai to official google-genai library (v1.23.0+)
  • πŸ–ΌοΈ Real Image Generation: Imagen 3 now generates actual 1.6MB PNG images instead of 8KB blue placeholders
  • 🎬 Video Generation: Implemented Veo 2.0 API for real video content generation (fully functional)
  • πŸ”§ API Response Fixes: Fixed Imagen API response parsing that was causing "no images" errors
  • 🎯 UI Button Integration: Fixed /generate-visuals endpoint to use same working ADK agents
  • πŸ“ Text Avoidance: Added comprehensive "no text overlays" instructions to all visual prompts
  • πŸ“š ADR Commandments: Created "Ten Commandments of VVL Development" from .cursorrules
  • πŸ—οΈ Async Architecture: Built comprehensive async visual content generation system

πŸ“Š Status: Content generation fully working - 80% MVP complete. Missing: Social media publishing integration for production readiness.


πŸ“– Featured Blog Post

🎯 Read the Complete Development Journey:

"Build Your Own Social Marketing AI Campaign Generator with Google ADK, Gemini, Imagen & Veo"

A comprehensive deep-dive into the technical architecture, development challenges, and lessons learned while building this agentic AI solution. Perfect for fellow developers interested in:

  • Agentic AI Architecture: How sequential agent workflows solve complex marketing challenges
  • Google ADK Framework: Real-world implementation patterns and best practices
  • Context Engineering: Why tight data schemas beat "prompt soup" every time
  • Visual Content Pipeline: Integrating Imagen 3 and Veo 2.0 for automated media generation
  • Production Lessons: Battle-tested insights from API migrations, error handling, and system design

Key Takeaways for Developers:

  • Context-Engineering > Prompt-Hacking (pass enriched business objects through every agent)
  • Batch Everything (one Gemini call for five posts vs. five separate calls)
  • Graceful Degradation Wins Demos (fallback logic kept demos alive during quota limits)
  • ADRs as Living Logs (document every grim detour for future developers)

Published on Medium β€’ 9 min read β€’ Technical deep-dive with screenshots and architecture diagrams


πŸ€– About This Agentic AI Solution

AI Marketing Campaign Post Generator showcases a production-ready Agentic AI architecture using Google's Agent Development Kit (ADK). Unlike traditional AI applications that rely on single LLM calls, this system orchestrates multiple specialized AI agents that collaborate to solve complex marketing challenges.

🎯 What Makes This Special

  • 🧠 Multi-Agent Architecture: Specialized agents for analysis, ideation, content creation, and optimization
  • πŸ”„ Sequential Workflows: Agents pass context and build upon each other's outputs
  • πŸ“Š Production-Ready: Comprehensive testing, error handling, and monitoring
  • πŸ› οΈ Developer-Friendly: Clean architecture, extensive documentation, and easy setup
  • πŸš€ Scalable Design: Built for production deployment on Google Cloud

πŸŽͺ Key Capabilities

Feature Description AI Agent
Business Analysis Analyze URLs and files for business context Analysis Agent
Campaign Strategy Generate comprehensive campaign summaries Summary Agent
Creative Ideation AI-powered campaign concepts and themes Idea Agent
Content Generation Social media posts with hashtags and optimization Content Agent
Visual Content AI-generated images using Google Imagen 3.0 with autonomous validation ADK ImageGenerationAgent
Video Generation Real video creation with Google Veo 2.0 with autonomous validation ADK VideoGenerationAgent
Social Media Publishing OAuth architecture implemented, publishing logic partial Social Media Agent
Campaign Scheduling Schedule and manage multi-platform posting Scheduling Agent
Multi-Format Export JSON, CSV, XLSX export capabilities API Layer

πŸ—οΈ Agentic AI Architecture

High-Level System Design

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                          AI Marketing Campaign Post Generator - AGENTIC AI ARCHITECTURE         β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                                FRONTEND LAYER                                   β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”                 β”‚
β”‚  β”‚   React UI  β”‚    β”‚   Component     β”‚    β”‚     State       β”‚                 β”‚
β”‚  β”‚             β”‚    β”‚    Library      β”‚    β”‚   Management    β”‚                 β”‚
β”‚  β”‚  (TypeScript)β”‚   β”‚  (shadcn-ui)    β”‚    β”‚   (Context)     β”‚                 β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜                 β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                                    β”‚
                                    β”‚ REST API
                                    β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                              API GATEWAY LAYER                                  β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”           β”‚
β”‚  β”‚   FastAPI   β”‚  β”‚    Auth     β”‚  β”‚    Rate     β”‚  β”‚    CORS     β”‚           β”‚
β”‚  β”‚   Gateway   β”‚  β”‚ Middleware  β”‚  β”‚  Limiting   β”‚  β”‚ Middleware  β”‚           β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜           β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                                    β”‚
                                    β”‚ Agent Orchestration
                                    β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                              AGENTIC AI LAYER                                   β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚                        β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”                                 β”‚
β”‚                        β”‚   Marketing         β”‚                                 β”‚
β”‚                        β”‚   Orchestrator      β”‚                                 β”‚
β”‚                        β”‚   (Sequential)      β”‚                                 β”‚
β”‚                        β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜                                 β”‚
β”‚                                    β”‚                                           β”‚
β”‚              β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”                     β”‚
β”‚              β”‚                     β”‚                     β”‚                     β”‚
β”‚              β–Ό                     β–Ό                     β–Ό                     β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”               β”‚
β”‚  β”‚  Summary Agent  β”‚   β”‚   Idea Agent    β”‚   β”‚ Content Agent   β”‚               β”‚
β”‚  β”‚                 β”‚   β”‚                 β”‚   β”‚                 β”‚               β”‚
β”‚  β”‚ β€’ Business      β”‚   β”‚ β€’ Creative      β”‚   β”‚ β€’ Social Posts  β”‚               β”‚
β”‚  β”‚   Analysis      β”‚   β”‚   Concepts      β”‚   β”‚ β€’ Hashtags      β”‚               β”‚
β”‚  β”‚ β€’ Target        β”‚   β”‚ β€’ Themes        β”‚   β”‚ β€’ Optimization  β”‚               β”‚
β”‚  β”‚   Audience      β”‚   β”‚ β€’ Strategies    β”‚   β”‚ β€’ Engagement    β”‚               β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜   β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜   β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜               β”‚
β”‚              β”‚                     β”‚                     β”‚                     β”‚
β”‚              β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜                     β”‚
β”‚                                    β”‚                                           β”‚
β”‚                                    β–Ό                                           β”‚
β”‚              β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”                   β”‚
β”‚              β”‚              AI SERVICES                    β”‚                   β”‚
β”‚              β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€                   β”‚
β”‚              β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”          β”‚                   β”‚
β”‚              β”‚  β”‚   Google    β”‚  β”‚   Google    β”‚          β”‚                   β”‚
β”‚              β”‚  β”‚   Gemini    β”‚  β”‚     Veo     β”‚          β”‚                   β”‚
β”‚              β”‚  β”‚    API      β”‚  β”‚    API      β”‚          β”‚                   β”‚
β”‚              β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜          β”‚                   β”‚
β”‚              β”‚           β”‚              β”‚                 β”‚                   β”‚
β”‚              β”‚           β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜                 β”‚                   β”‚
β”‚              β”‚                    β”‚                       β”‚                   β”‚
β”‚              β”‚           β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”              β”‚                   β”‚
β”‚              β”‚           β”‚  ADK Framework  β”‚              β”‚                   β”‚
β”‚              β”‚           β”‚   (Google)      β”‚              β”‚                   β”‚
β”‚              β”‚           β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜              β”‚                   β”‚
β”‚              β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜                   β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                                    β”‚
                                    β”‚ Data Operations
                                    β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                                DATA LAYER                                       β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”                 β”‚
β”‚  β”‚  Campaign   β”‚    β”‚      File       β”‚    β”‚     Export      β”‚                 β”‚
β”‚  β”‚   Storage   β”‚    β”‚   Processing    β”‚    β”‚     Engine      β”‚                 β”‚
β”‚  β”‚             β”‚    β”‚                 β”‚    β”‚                 β”‚                 β”‚
β”‚  β”‚ β€’ CRUD Ops  β”‚    β”‚ β€’ URL Analysis  β”‚    β”‚ β€’ JSON/CSV      β”‚                 β”‚
β”‚  β”‚ β€’ Metadata  β”‚    β”‚ β€’ File Upload   β”‚    β”‚ β€’ XLSX Export   β”‚                 β”‚
β”‚  β”‚ β€’ History   β”‚    β”‚ β€’ Content Ext.  β”‚    β”‚ β€’ Sharing       β”‚                 β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜                 β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

AGENT WORKFLOW PATTERN:
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ User Input β†’ Analysis Agent β†’ Summary Agent β†’ Idea Agent β†’ Content Agent β†’ Outputβ”‚
β”‚                     ↓              ↓            ↓             ↓                  β”‚
β”‚              β€’ URL Analysis  β€’ Campaign    β€’ Creative    β€’ Social Posts          β”‚
β”‚              β€’ File Process  β€’ Strategy    β€’ Concepts    β€’ Hashtags             β”‚
β”‚              β€’ Context       β€’ Audience    β€’ Themes      β€’ Optimization         β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸ€– Agent Workflow

The system implements a Sequential Agent Pattern where each agent specializes in a specific domain:

🎨 ADK Agentic Visual Content Generation (ADR-019)

Revolutionary autonomous visual content generation with validation and self-correction:

graph TD
    A[Visual Content Request] --> B[VisualContentOrchestratorAgent]
    B --> C[Campaign Context Analysis]
    C --> D{Parallel Agent Execution}
    
    D --> E[ImageGenerationAgent]
    D --> F[VideoGenerationAgent]
    
    E --> G[Campaign-Aware Prompt Creation]
    F --> H[Campaign-Aware Prompt Creation]
    
    G --> I[Imagen 3.0 Generation]
    H --> J[Veo 2.0 Generation]
    
    I --> K[Autonomous Quality Validation]
    J --> L[Autonomous Quality Validation]
    
    K --> M{Image Valid?}
    L --> N{Video Valid?}
    
    M -->|No| O[Self-Correction & Refinement]
    N -->|No| P[Self-Correction & Refinement]
    
    O --> I
    P --> J
    
    M -->|Yes| Q[Cache & Return Success]
    N -->|Yes| R[Cache & Return Success]
    
    Q --> S[Enhanced Social Posts]
    R --> S
Loading

Key Features:

  • βœ… True ADK Agents: Proper LlmAgent inheritance with autonomous capabilities
  • 🧠 Campaign Context Integration: System prompts include campaign creative guidance
  • πŸ” Autonomous Validation: Agents validate their own work for quality and relevance
  • πŸ”„ Self-Correction: Agents iterate and improve outputs if validation fails
  • ⚑ Parallel Processing: Image and video agents work concurrently
  • πŸ“Š Quality Metrics: 5-point validation framework with scoring
flowchart TD
    A[User Input] --> B[Analysis Agent]
    B --> C[Summary Agent]
    C --> D[Idea Agent]
    D --> E[Content Agent]
    E --> F[Final Output]
    
    B --> B1[URL Analysis]
    B --> B2[File Processing]
    B --> B3[Business Context]
    
    C --> C1[Campaign Strategy]
    C --> C2[Target Audience]
    C --> C3[Brand Voice]
    
    D --> D1[Creative Concepts]
    D --> D2[Theme Generation]
    D --> D3[Channel Strategy]
    
    E --> E1[Social Posts]
    E --> E2[Hashtag Optimization]
    E --> E3[Engagement Scoring]
Loading

πŸ”§ Technology Stack

Agentic AI Framework:

  • Google ADK Framework 1.0.0+ - Agent orchestration and management
  • Google GenAI 1.16.1+ - Modern Python SDK for Gemini API
  • Sequential Agent Pattern - Workflow orchestration
  • Context Passing - Inter-agent communication

Backend Infrastructure:

  • Python 3.9+ with FastAPI - High-performance API framework
  • Pydantic 2.0+ - Data validation and serialization
  • Pytest 7.4+ - Comprehensive testing framework (52 tests)
  • SQLite/PostgreSQL - Local database for MVP (scalable to cloud)

Frontend Experience:

  • React 18.2+ with TypeScript 5.0+ - Modern UI framework with type safety
  • Vite 4.0+ - Lightning-fast build tooling
  • Tailwind CSS 3.3+ - Utility-first CSS framework
  • Axios 1.6+ - HTTP client for API communication

Development & Deployment:

  • 3 Musketeers Pattern - Consistent development workflow
  • Docker Support - Containerized deployment
  • Local Production Setup - Self-contained MVP deployment
  • Google Cloud Ready - Production deployment architecture

πŸ“Š Technical Specifications

Current Solution Maturity: 90% (MVP-Ready with Visual Content Integration)

Component Status Completeness Quality
Architecture & Design βœ… Complete 95% Excellent
Frontend UI/UX βœ… Complete 95% Excellent
Backend API Services βœ… Complete 100% Excellent
Database Infrastructure βœ… Complete 95% Excellent
ADK Agent Implementation βœ… Core Complete 85% Excellent
Visual Content Generation βœ… Complete 100% Excellent
Layout & Text Wrapping βœ… Complete 100% Excellent
Environment Configuration βœ… Standardized 100% Excellent
Testing Framework βœ… Complete 95% Excellent
Documentation βœ… Updated 95% Excellent
Production Deployment ⚠️ Local Ready 70% Good

Agent Architecture:

# Sophisticated agent hierarchy implemented (85% complete)
CampaignOrchestratorAgent (Root Sequential Agent) βœ…
β”œβ”€β”€ BusinessAnalysisAgent (Sequential Agent) βœ…
β”‚   β”œβ”€β”€ URLScrapingAgent (LLM Agent) βœ…
β”‚   β”œβ”€β”€ FileAnalysisAgent (LLM Agent - Multimodal) βœ…
β”‚   └── BusinessContextAgent (LLM Agent) βœ…
β”œβ”€β”€ ContentGenerationAgent (Sequential Agent) βœ…
β”‚   β”œβ”€β”€ TextGenerationAgent (LLM Agent) βœ…
β”‚   β”œβ”€β”€ SocialContentAgent (LLM Agent) βœ…
β”‚   └── HashtagOptimizationAgent (LLM Agent) βœ…
β”œβ”€β”€ VisualContentOrchestratorAgent (Sequential Agent) βœ… ADK AGENTIC!
β”‚   β”œβ”€β”€ ImageGenerationAgent (ADK LLM Agent) βœ… AUTONOMOUS VALIDATION
β”‚   β”œβ”€β”€ VideoGenerationAgent (ADK LLM Agent) βœ… AUTONOMOUS VALIDATION
β”‚   └── VisualContentValidationTool βœ… SELF-CORRECTION
β”œβ”€β”€ SocialMediaAgent (Sequential Agent) βœ… IMPLEMENTED
β”‚   β”œβ”€β”€ PlatformOptimizationAgent βœ…
β”‚   └── EngagementPredictionAgent ❌
β”œβ”€β”€ SchedulingAgent (Sequential Agent) βœ… IMPLEMENTED
β”‚   β”œβ”€β”€ SchedulingOptimizationAgent βœ…
β”‚   └── PlatformIntegrationAgent βœ…
└── MonitoringAgent (LLM Agent) ❌ MISSING

API Endpoints:

# Comprehensive FastAPI backend (Updated 2025-06-16)
GET  /                              # API information & health
GET  /health                        # Detailed health check
GET  /api/v1/agent/status          # Agent status & configuration

# Campaign Management
POST /api/v1/campaigns/create       # Campaign creation with file upload
GET  /api/v1/campaigns/             # List campaigns (paginated)
GET  /api/v1/campaigns/{id}         # Campaign retrieval
PUT  /api/v1/campaigns/{id}         # Campaign updates
DELETE /api/v1/campaigns/{id}       # Campaign deletion

# Content Generation (NEW!)
POST /api/v1/content/generate       # AI content generation
POST /api/v1/content/regenerate     # Content regeneration
POST /api/v1/content/generate-visuals # ADK Agentic visual content generation βœ… NEW!

# Analysis Services
POST /api/v1/analysis/url           # URL analysis & scraping
POST /api/v1/analysis/files         # File analysis (multimodal)

# Social Media Integration ✨ NEW!
POST /api/v1/auth/social/initiate   # Start OAuth flow
GET  /api/v1/auth/social/callback   # OAuth callback handler
GET  /api/v1/auth/social/status     # Platform connection status
POST /api/v1/posts/schedule         # Schedule social media posts
GET  /api/v1/posts/scheduled/{id}   # Get scheduled posts

Database Schema (Implemented - v1.1.0):

-- Production-ready SQLite with 40+ performance indexes
-- Schema v1.1.0 - Social Media Integration Complete

Users: id, email, username, full_name, profile_data, timestamps
Campaigns: id, user_id, name, description, objectives, ai_analysis, timestamps
Generated_Content: id, campaign_id, content_type, platform, ai_metadata, timestamps
Uploaded_Files: id, campaign_id, file_path, analysis_results, timestamps
Campaign_Templates: id, name, category, template_data, default_settings
User_Sessions: id, user_id, session_token, expires_at, timestamps

-- Social Media Integration ✨ NEW!
Social_Media_Connections: id, user_id, platform, access_token (encrypted), timestamps
Scheduled_Posts: id, campaign_id, platform, post_content, scheduled_time, status
Campaign_Chat_History: id, campaign_id, conversation_history, timestamps

-- Analytics Views (3 implemented)
Campaign_Summary: Aggregated campaign metrics with user information
User_Activity_Summary: User engagement and campaign statistics
Content_Performance: Content analytics with engagement scoring

πŸš€ How to Get Started

πŸ“‹ Prerequisites

Before you begin, ensure you have:

  • Node.js 18+ or Bun (for frontend development)
  • Python 3.9+ (for backend and AI agents)
  • Google Gemini API Key (Get one here)
  • Git (for version control)

⚑ Quick Start (5 minutes)

  1. Clone and Navigate

    git clone https://github.com/jpantsjoha/Agentic-Marketing-Campaign-Generator.git
    cd Agentic-Marketing-Campaign-Generator
  2. One-Command Setup

    make install-all
  3. Configure Your API Key

    # The system will create a .env file automatically
    # Just add your Gemini API key:
    echo "GEMINI_API_KEY=your_actual_api_key_here" > backend/.env
  4. Launch the Application with DEBUG Logging

    make launch-all
  5. Access Your Application

  6. Monitor Debug Logs (Optional)

    # In a separate terminal - live tail all logs
    make view-all-logs

πŸ› οΈ Development Workflow

Essential Commands

# πŸš€ Development
make launch-all            # Full stack with DEBUG logging
make dev-with-env          # Start both frontend + backend with environment
make dev-frontend          # Frontend only (React + Vite)
make dev-backend           # Backend only (FastAPI + ADK agents)

# πŸ“¦ Installation
make install-all           # Install all dependencies
make install-frontend      # Frontend dependencies (npm/bun)
make install-backend       # Backend dependencies (pip)

# πŸ§ͺ Testing
make test-api             # Run all 52 API tests
make test-api-regression  # Quick regression suite
make test-api-coverage    # Coverage reporting
make test-backend         # Test ADK agents

# πŸ”§ Utilities
make status              # System health check
make clean              # Clean build artifacts
make release            # Generate release documentation

# πŸ“„ Debugging & Logging
make setup-logging       # Initialize DEBUG log files
make view-all-logs       # Live tail all debug logs
make view-backend-logs   # Live tail backend logs only
make view-frontend-logs  # Live tail frontend logs only
make clean-logs          # Clean all log files

Project Structure

Agentic-Marketing-Campaign-Generator/
β”œβ”€β”€ 🎨 Frontend (React + TypeScript)
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ components/      # Reusable UI components
β”‚   β”‚   β”œβ”€β”€ pages/          # Application pages
β”‚   β”‚   β”œβ”€β”€ lib/            # API client and utilities
β”‚   β”‚   └── data/           # Static data and types
β”‚   └── package.json
β”œβ”€β”€ πŸ€– Backend (Python + ADK)
β”‚   β”œβ”€β”€ api/                # FastAPI application
β”‚   β”‚   β”œβ”€β”€ main.py         # API entry point
β”‚   β”‚   └── routes/         # API route definitions
β”‚   β”œβ”€β”€ agents/             # ADK agent implementations
β”‚   β”‚   β”œβ”€β”€ marketing_orchestrator.py  # Main orchestrator
β”‚   β”‚   └── specialized_agents/        # Individual agents
β”‚   β”œβ”€β”€ tests/              # 52 comprehensive tests
β”‚   └── requirements.txt
β”œβ”€β”€ πŸ“š Documentation
β”‚   β”œβ”€β”€ docs/               # Technical documentation
β”‚   β”œβ”€β”€ README.md           # This file
β”‚   └── ARCHITECTURE.md     # Detailed architecture
└── πŸ› οΈ Development Tools
    β”œβ”€β”€ Makefile           # Development workflow
    β”œβ”€β”€ docker-compose.yml # Container orchestration
    └── .github/           # CI/CD workflows

πŸ§ͺ Testing & Quality Assurance

The project includes a comprehensive testing framework with 60+ tests across multiple categories:

# Run all tests
make test-comprehensive

# Test results overview (Updated 2025-06-16):
# βœ… Database Integration: 14/14 tests passing (100% success rate) πŸŽ‰
# βœ… Campaign API: 15/16 tests passing (93.75% success rate)
# βœ… Content API: 18/18 tests passing (100% success rate) πŸŽ‰ NEW!
# βœ… Visual Content Agent: 100% tests passing
# βœ… Environment Variables: 100% tests passing
# βœ… Schema v1.0.1: All constraints and indexes verified
# βœ… Layout & Visual Content: Professional display with proper text wrapping πŸŽ‰ NEW!
# πŸ”„ Analysis API: Response format standardization in progress

Test Categories:

  • Unit Tests: Individual component testing (agents, utilities)
  • Integration Tests: API endpoint workflows, database operations
  • Database Tests: SQLite schema, CRUD operations, data integrity
  • Agent Tests: ADK agent functionality, visual content generation
  • Regression Tests: Prevent breaking changes, schema validation
  • Environment Tests: Configuration validation, API key handling

Testing Commands:

make test-database          # Database integration tests
make test-api-endpoints     # API endpoint tests
make test-gemini           # Gemini integration tests
make test-comprehensive    # Complete test suite
make test-quick           # Essential tests for rapid feedback
make test-coverage-db     # Database coverage reporting

🎯 Use Cases & Examples

🏒 For Businesses

  • Startup Marketing: Generate launch campaigns for new products
  • Content Marketing: Create consistent social media presence
  • Campaign Optimization: A/B test different creative approaches

πŸ‘¨β€πŸ’» For Developers

  • Agentic AI Learning: Understand production AI agent patterns
  • ADK Framework: Explore Google's agent development toolkit
  • API Integration: Learn modern FastAPI + React patterns

πŸŽ“ For Researchers

  • Multi-Agent Systems: Study agent collaboration patterns
  • AI Workflow Orchestration: Analyze sequential processing
  • Production AI: Examine real-world AI application architecture

πŸ“Š Current Status & Roadmap

βœ… Completed (90% MVP-Ready with Layout & Visual Content Integration)

πŸ€– Agentic AI Core:

  • βœ… Multi-agent architecture with ADK Framework (70% complete)
  • βœ… Sequential workflow orchestration (CampaignOrchestratorAgent)
  • βœ… Business Analysis Agent with URL/file/context sub-agents
  • βœ… Content Generation Agent with social/hashtag optimization
  • βœ… Visual Content Agent - Image & Video generation ✨ NEW!
  • βœ… Social Media OAuth Integration - Complete authentication system ✨ NEW!
  • βœ… Context passing between agents
  • βœ… Error handling and recovery with mock fallbacks
  • βœ… Environment variable standardization (ADR-004)

πŸ”§ Backend Infrastructure:

  • βœ… FastAPI with comprehensive testing (60+ tests)
  • βœ… Campaign API (15/16 tests passing - 93.75% success rate)
  • βœ… Visual Content Generation API - New endpoint ✨ NEW!
  • βœ… Social Media OAuth API - Complete authentication & publishing ✨ NEW!
  • βœ… Database integration testing framework
  • βœ… Content generation and analysis endpoints
  • βœ… File upload and multipart form data support
  • βœ… CORS middleware and error handling
  • βœ… ADK Marketing Orchestrator Agent integration

🎨 Frontend Experience:

  • βœ… Complete UI flow (Dashboard β†’ Campaign β†’ Ideation β†’ Proposals)
  • βœ… VVL Design System with glassmorphism theme
  • βœ… Professional React + TypeScript implementation
  • βœ… Responsive design with Tailwind CSS
  • βœ… API client infrastructure (src/lib/api.ts)

πŸ“š Documentation & Architecture:

  • βœ… World-class documentation (39KB+ technical docs)
  • βœ… Architecture Decision Records (ADR) process
  • βœ… Comprehensive solution intent and user journey mapping
  • βœ… Lessons learned tracking with bug resolutions

πŸ”„ In Progress (Phase 1 - Critical)

EPIC 9: Frontend-Backend Integration

  • Replace Mock Functions: Connect UI to real ADK agents
  • Loading States & UX: Visual feedback for AI generation
  • Real AI Integration: Enable Gemini API calls end-to-end
  • Error Handling: User-friendly error messages and retry logic

EPIC 10: Local Data Persistence

  • Local Database Setup: SQLite for self-contained MVP
  • Data Layer Implementation: Campaign CRUD with persistence
  • User Management: Simple local authentication and sessions

πŸš€ Upcoming Features (Phase 2-3)

Phase 2: Production Readiness

  • Testing & Quality Assurance: Fix API response formats, add E2E tests
  • Local Production Setup: Docker configuration, security hardening
  • Performance Optimization: Load testing, frontend optimization

Phase 3: Advanced Features

  • Video Generation: Integration with Google Veo API
  • Advanced Analytics: Campaign performance tracking
  • Multi-language Support: International content generation
  • Cloud Deployment: Google Cloud production setup

🎯 MVP Timeline

  • Phase 1 (2-3 weeks): Frontend-Backend Integration + Local Database
  • Phase 2 (2-3 weeks): Testing, Security, Production Setup
  • Phase 3 (3-4 weeks): Video Generation, Advanced Features

🀝 Contributing

We welcome contributions from the developer community! Here's how to get involved:

πŸ› Found a Bug?

  1. Check existing issues
  2. Create a detailed bug report
  3. Include steps to reproduce

πŸ’‘ Have an Idea?

  1. Review the project roadmap
  2. Open a feature request
  3. Discuss implementation approach

πŸ”§ Want to Code?

  1. Fork the repository
  2. Create a feature branch
  3. Run tests: make test-api
  4. Submit a pull request

πŸ“š Improve Documentation?

  1. Check documentation issues
  2. Update relevant .md files
  3. Test with make docs-build

πŸ“„ License & Attribution

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ™ Acknowledgments

  • Google ADK Team - For the excellent Agent Development Kit
  • FastAPI Community - For the amazing web framework
  • React Team - For the powerful UI library
  • Open Source Community - For inspiration and best practices

πŸ”— Links & Resources


Built with ❀️ by the developer community using Google ADK Framework, React, and modern web technologies.

Ready to explore the future of Agentic AI? Star this repo and let's build something amazing together! ⭐

About

AI Marketing Campaign Post Generator is an **AI-powered marketing campaign generator** that transforms business ideas into professional marketing campaigns using Google's Advanced Development Kit (ADK) Framework and Gemini API.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •