Agentic Orchestration of Multi-Modal Pipelines: Solving Product Drift in Automated Ad Creative Generation via Claude Code
In the current landscape of generative AI, the bottleneck for scaling creative production is no longer the ability to generate a single high-quality image; rather, it is the orchestration of multi-modal assets into a cohesive, brand-consistent campaign. The primary technical challenge in automated creative pipelines is "product drift"—the phenomenon where generative models subtly alter the identifiable features of a reference object across successive iterations.
This post explores a sophisticated implementation of an agentic workflow using Claude Code as a central orchestrator to transform a single product photograph into a full-scale advertising campaign, encompassing high-fidelity product shots and short-form video assets, while maintaining strict visual identity through structured Markdown-based "skills."
The Architecture of Orchestration: Markdown-Driven Skills
The core of this pipeline is not found in a monolithic prompt, but in a modular architecture of specialized instructions. By utilizing Claude Code, we can implement an agentic workflow that treats specific tasks as discrete "skills" defined via Markdown files. This approach allows for high modularity and reduces the cognitive load on the LLM by providing structured context rather than massive, unstructured prompts.
The Master Playbook: claude.md
The orchestration begins with a master configuration file, claude.md. This serves as the global state controller and logic layer. It defines:
- Workflow Topology: The sequential steps from initial image generation to final video assembly.
- Skill Loading: Instructions on which sub-modules (skills) the agent must invoke at specific stages.
- Constraint Enforcement: Hard rules that prevent the agent from deviating from the established brand guidelines or technical parameters.
- Branching Logic: The ability to switch between a fully automated pipeline and an AI-assisted hybrid workflow.
Solving Product Drift with the Consistency Skill
The most critical component of this architecture is the product consistency skill. To prevent the degradation of product identity, the agent does not simply rely on text descriptions. Instead, it implements a validation loop:
- Reference Attachment: The agent is instructed to attach original reference photos as context for every generation request.
- Single-Image Validation: Before proceeding to batch generations, the pipeline validates a single "hero" image against the source material.
- Iterative Quality Checks (QC): A dedicated QC stage runs after each generation phase to ensure that features like texture, logo placement, and geometry remain invariant across different environments and lighting conditions.
The Multi-Modal Pipeline Execution
The pipeline operates through a series of interconnected stages, leveraging specialized APIs for image synthesis, motion, and audio.
Stage 1: High-Fidelity Image Synthesis
Using Fail.ai, the agent generates five distinct product shots. By utilizing the consistency skill, we can keep prompts focused on environmental changes (e.g., "studio lighting," "outdoor lifestyle setting") while keeping the product parameters static. The cost efficiency of this approach is significant, with generation costs averaging approximately $0.025 per image.
Stage 2: Motion Synthesis and Audio Generation
Once the static assets are validated, the pipeline transitions from 2D to temporal dimensions:
- Animation: Using SitDance, the agent animates the generated product shots into vertical, short-form video clips suitable for TikTok or Meta Ads.
- Voiceover (TTS): The workflow integrates ElevenLabs via API to generate high-fidelity voiceovers. This is driven by a
script_scenes.mdfile—a storyboard and script generated by Claude that provides the narrative structure for the audio.
Stage 3: Automated Assembly vs. Human-in-the-Loop
The pipeline supports two distinct deployment modes:
-
Fully Automated (HyperFlow Frames): Using Adobe MCP tools, combined with automated HTML/CSS rendering, the agent can assemble finished ad creatives without human intervention. This is ideal for high-volume, low-complexity "always-on" campaigns.
-
AI-Assisted Hybrid: The agent handles the 80% of repetitive work (generation, animation, voiceover), but delivers the assets to a professional editor using CapCut or Premiere Pro for final creative direction and branding polish.
Technical Implementation and Environment Setup
The implementation relies on a standard .env configuration for managing API credentials for Fail.ai and ElevenLabs. The orchestration logic is further modularized into add_pipeline_utils.py, which manages the roadmap of execution, ensuring that each stage (from hero image to final video) follows the predefined sequence.
By packaging setup instructions into reusable Markdown files (11labs_setup.md, fail_ai_setup.md), the workflow becomes highly portable and reproducible across different projects.
Conclusion: The Shift in Creative Economics
The transition from manual production to agentic orchestration represents a fundamental shift in creative economics. We are moving away from paying for "production" (the repetitive task of creating assets) toward paying for "direction" (the high-value task of deciding which assets will drive performance). By automating the 80% of the workflow that is computationally expensive and time-consuming, businesses can reallocate their budgets from production costs to media spend, maximizing the ROI of every campaign.