Co-Pilot
Updated a month ago

creative-ad-agent

DDV0x
0.1k
dv0x/creative-ad-agent
80
Agent Score

πŸ’‘ Summary

An AI-driven tool that generates diverse, conversion-focused ads using a hook-first methodology.

🎯 Target Audience

Digital marketers seeking to enhance ad performanceSmall business owners looking for cost-effective advertising solutionsAdvertising agencies aiming to streamline ad creationContent creators wanting to generate engaging promotional materialEntrepreneurs needing quick ad concepts for campaigns

πŸ€– AI Roast: β€œPowerful, but the setup might scare off the impatient.”

Security AnalysisMedium Risk

Risk: Medium. Review: shell/CLI command execution; outbound network access (SSRF, data egress); API keys/tokens handling and storage; dependency pinning and supply-chain risk. Run with least privilege and audit before enabling in production.

Creative Ad Agent

An AI-powered creative advertising agent that generates conversion-focused ads using a hook-first methodology. Built with the Claude Agent SDK, it analyzes brand websites, extracts factual data, and creates 6 diverse ad concepts with AI-generated images.

Features

  • Hook-First Ad Generation - Hooks are mined from research data using proven formulas (hooks = 80% of ad performance)
  • Research-Driven - Extracts real data from brand websites: offers, value props, proof points, testimonials
  • 6 Diverse Concepts - Each concept uses a different emotional trigger (social proof, urgency, curiosity, etc.)
  • AI Image Generation - Creates visuals via fal.ai Nano Banana Pro
  • Session Management - Stateful conversations with forking for A/B testing
  • Dual Deployment - Local development server + Cloudflare Workers production

Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                    ORCHESTRATOR (Main Agent)                 β”‚
β”‚                                                              β”‚
β”‚   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”‚
β”‚   β”‚  research   β”‚ β†’ β”‚ hook-methodology β”‚ β†’ β”‚  art-style  β”‚  β”‚
β”‚   β”‚   (Agent)   β”‚   β”‚     (Skill)      β”‚   β”‚   (Skill)   β”‚  β”‚
β”‚   β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜   β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜   β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β”‚
β”‚          ↓                   ↓                    ↓          β”‚
β”‚   research.md          hook-bank.md         prompts.json    β”‚
β”‚                                                   ↓          β”‚
β”‚                                          β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”‚
β”‚                                          β”‚ nano-banana β”‚    β”‚
β”‚                                          β”‚  (MCP/fal)  β”‚    β”‚
β”‚                                          β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β”‚
β”‚                                                   ↓          β”‚
β”‚                                            6 PNG images      β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Workflow

  1. Parse - Extract URL and brand name from request
  2. Research - Agent fetches homepage, extracts offers/value props/proof points
  3. Hooks - Skill generates 10+ hooks, selects 6 with diversity matrix
  4. Art - Skill creates visual prompts for each hook
  5. Images - MCP generates images via fal.ai
  6. Complete - Returns 6 ad concepts with images

Quick Start

Prerequisites

Installation

# Clone the repository git clone https://github.com/DV0x/creative-ad-agent.git cd creative-ad-agent # Install server dependencies cd server && npm install # Create environment file cp .env.example .env # Edit .env with your API keys

Running Locally

# Start the server cd server npm run dev # Server runs at http://localhost:3001

Generate Ads

curl -X POST http://localhost:3001/generate \ -H "Content-Type: application/json" \ -d '{"prompt": "Create ads for https://example.com"}'

Project Structure

creative-ad-agent/
β”œβ”€β”€ agent/                      # Agent ecosystem
β”‚   └── .claude/
β”‚       β”œβ”€β”€ agents/
β”‚       β”‚   └── research.md     # Data extraction agent
β”‚       └── skills/
β”‚           β”œβ”€β”€ hook-methodology/
β”‚           β”‚   β”œβ”€β”€ SKILL.md    # Hook generation skill
β”‚           β”‚   └── formulas.md # Hook formula reference
β”‚           └── art-style/
β”‚               β”œβ”€β”€ SKILL.md    # Visual prompt skill
β”‚               └── workflows/  # Style-specific workflows
β”‚
β”œβ”€β”€ server/                     # Local Express server
β”‚   β”œβ”€β”€ sdk-server.ts          # Main server
β”‚   └── lib/
β”‚       β”œβ”€β”€ ai-client.ts       # Claude SDK wrapper
β”‚       β”œβ”€β”€ nano-banana-mcp.ts # fal.ai MCP integration
β”‚       β”œβ”€β”€ session-manager.ts # Session handling
β”‚       └── orchestrator-prompt.ts
β”‚
β”œβ”€β”€ client/                     # React frontend
β”‚   └── src/
β”‚       β”œβ”€β”€ App.tsx
β”‚       β”œβ”€β”€ hooks/useGenerate.ts
β”‚       └── components/
β”‚
β”œβ”€β”€ creative-agent-cf/          # Cloudflare Workers deployment
β”‚   β”œβ”€β”€ src/                   # Worker code
β”‚   └── sandbox/               # Container code
β”‚
└── docs/                       # Documentation

API Endpoints

| Endpoint | Method | Description | |----------|--------|-------------| | /generate | POST | Generate ad campaign | | /health | GET | Health check | | /sessions | GET | List active sessions | | /sessions/:id | GET | Get session info | | /sessions/:id/continue | POST | Resume session | | /sessions/:id/fork | POST | Fork for A/B testing | | /images/:session/:file | GET | Serve generated image |

Hook Methodology

The system uses a research-first approach where every hook is traceable to specific data:

| Hook Type | Emotional Trigger | Example | |-----------|------------------|---------| | Stat/Data | Social Proof | "847 homeowners saved $12,340 last year" | | Story/Result | Empathy + Relief | "Sarah was paying $2,100/mo. Now she pays $1,650" | | FOMO/Urgency | Loss Aversion | "Rates just dropped 0.5%. Lock yours before Friday" | | Curiosity | Intrigue | "The 3-minute check that saved Mark $347/month" | | Call-out | Recognition | "Toronto renters paying $2,500+: You could own for less" | | Contrast/Enemy | Differentiation | "Banks want you confused. We want you approved" |

Art Styles

The default style is Soft Brutalism Clay - neo-brutalist borders with warm clay textures. Additional workflows available:

  • soft-brutalism-clay.md - Default
  • anderson-clay-diorama.md - Wes Anderson-inspired theatrical scenes

Cloudflare Deployment

cd creative-agent-cf # Set secrets wrangler secret put ANTHROPIC_API_KEY wrangler secret put FAL_KEY # Deploy npm run deploy

See docs/cloudflare-deployment-plan.md for detailed instructions.

React Client

cd client npm install npm run dev # Opens at http://localhost:5173

Features:

  • Real-time SSE streaming
  • Phase progress indicators
  • Terminal-style log output
  • Image gallery with lightbox

Configuration

| Variable | Required | Description | |----------|----------|-------------| | ANTHROPIC_API_KEY | Yes | Claude API key | | FAL_KEY | Yes | fal.ai image generation key | | PORT | No | Server port (default: 3001) | | CLAUDE_CODE_MAX_OUTPUT_TOKENS | No | Token limit (default: 16384) |

Documentation

Tech Stack

  • Runtime: Node.js, TypeScript
  • AI: Claude Agent SDK, Claude Opus 4.5
  • Images: fal.ai Nano Banana Pro
  • Server: Express.js
  • Client: React, Zustand, Vite, Tailwind CSS
  • Production: Cloudflare Workers + Sandbox

Contributing

Contributions are welcome! Please read the existing code patterns and ensure your changes follow the hook-first methodology philosophy.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

License

MIT License - see LICENSE for details.

Acknowledgments

  • Built with Claude Agent SDK
  • Image generation by fal.ai
  • Hook methodology inspired by conversion copywriting principles
5-Dim Analysis
Clarity8/10
Novelty8/10
Utility9/10
Completeness8/10
Maintainability7/10
Pros & Cons

Pros

  • Utilizes a research-driven approach for ad creation
  • Generates diverse ad concepts to appeal to various emotions
  • Integrates AI for image generation, enhancing visual appeal
  • Supports both local and cloud deployment options

Cons

  • Requires API keys for functionality, which may be a barrier
  • Complex setup process for new users
  • Dependence on external services for image generation
  • Limited documentation on advanced features

Related Skills

pytorch

S
toolCode Lib
92/ 100

β€œIt's the Swiss Army knife of deep learning, but good luck figuring out which of the 47 installation methods is the one that won't break your system.”

agno

S
toolCode Lib
90/ 100

β€œIt promises to be the Kubernetes for agents, but let's see if developers have the patience to learn yet another orchestration layer.”

nuxt-skills

S
toolCo-Pilot
90/ 100

β€œIt's essentially a well-organized cheat sheet that turns your AI assistant into a Nuxt framework parrot.”

Disclaimer: This content is sourced from GitHub open source projects for display and rating purposes only.

Copyright belongs to the original author DV0x.