"I just beat my top performing creative with an ad script that was 100% generated by o4 mini. This thing just beat ME. Which means it just beat 99.9999% of my competition."
Today, I'm pulling back the curtain on exactly how to build this multi-agentic workflow using Relay.ai and Perplexity's API to create ad copy that outperforms even professional work.
Here is the link to the original tweet quoted above for reference: https://x.com/buyerofmedia/status/1904224924723552542
The Challenge With AI-Generated Ad Copy
Most marketers struggle with AI-generated content because they're using a single prompt or a single AI agent. The result? Generic, flat copy that lacks the psychological depth and market awareness needed to drive conversions.
The breakthrough comes when realizing that ad creation isn't a single task but a series of specialized research and writing functions that need to work together, just like a professional marketing team.
The Multi-Agentic Solution: Architecture & Design Philosophy

The marketing industry is being transformed by a new paradigm: multi-agentic AI workflows. Unlike traditional single-agent approaches, this architecture leverages specialized AI agents working in concert, each handling distinct aspects of the creative process.
What Makes Multi-Agentic Workflows Revolutionary:
- Specialization: Each agent is optimized for a specific function
- Data Flow: Information passes through a deliberate sequence
- Compound Intelligence: Each agent builds upon the work of the previous one
- End-to-End Automation: From user input to final documents
This workflow in Relay.ai orchestrates three specialized AI agents (powered by Perplexity's API) to handle distinct tasks in the creative process, ultimately delivering finished documents ready for implementation. Each agent has been engineered to excel at a specific function:
- The Deep Research Agent: Uncovers psychographic data about the target audience
- The Market Sentiment Agent: Analyzes real conversations to understand customer language
- The Direct Response Copywriter Agent: Transforms research into high-converting copy
Let me walk you through exactly how this end-to-end system works and how you can replicate it.
Step 1: The Deep Research Agent
The first agent is dedicated to understanding the psychological profile of your target audience.
Implementation in Relay.ai:

The Stefan Georgi Deep Research Prompt creates an incredibly detailed psychographic profile that becomes the foundation for everything else. The automatic export to Google Docs means this valuable research is immediately shareable with your team or clients.
Here is the complete prompt for the same:
it should evaluate on the two inputs 'avatar' and 'pain' from the user and then run them in the following prompt
"""I am writing a promotional video script targeted towards {avatar} who are suffering from {pain}. I'd like your help doing psychographic research. What are their struggles and pain points and what are their beliefs? What questions do they ask about their current situation? Use public forums, threads and articles here. Below is a series of questions I used in the past, as part of my RMBC Method for copywriting, where the R stands for research. But this might be a good framework to use while doing research on the demo. I'd love if you can even provide 'quotes' from folks in this demo by looking at comments on social media, or in forums, etc. Basically we want to hear what they're saying and what they believe. We want to hear answers in their own words! I. What We're Looking For… Insights Into Demographic: - Who Is Your Customer? - What Attitudes Do They Have? (Religious, Political, Social, Economic)? - What Are Their Hopes and Dreams? - What Are Their Victories and Failures? - What Outside Forces Do THEY Believe Have Prevented Their Best Life? - What Are Their Prejudices? - Sum Up Their Core Beliefs About Life, Love, and Family In 1-3 Sentences. Other Existing Solutions: - What is the Market Already Using? (List Out) - What Has Their Experience Been Like? Example: I've taken CBD for a couple years now. I have scoliosis and chronic back pain. It definitely helps with the pain and helps me sleep at night. - What Does the Market Like About Existing Solutions? - What Does the Market Dislike About Existing Solutions? - Are Their Horror Stories About Existing Solutions? - Does the Market Believe Existing Solution Works? If Not, Why? Curiosity: - Has Someone Tried to Solve the Market's Pain Points Before In A Very Unique Way? What Was The Result? - Is There A Conspiratorial Story Behind Why Old Solutions Didn't Work? - Are There Any Older Attempts to Solve the Problem (Pre-1960) That Are Unique? What Happened? Were they successful but forgotten? Or were they a failure? Why? - Examples: Tesla in the energy space. Big energy didn't want his solutions, he was discredited and shamed. His inventions and discoveries were thrown into the ash heap of history until now. - U.S. Army tried to cure foot fungus during WWII, surgeon general was on a desperate race because troops were missing service time. Finally succeeded by using Undecylenic Acid. But today we forget how effective it is. Corruption: - Is There A Belief That the Market's Pain Point Used To Not Exist, Or Used To Not Be So Bad? - Is There A Belief That It's Been Recently Exacerbated By Outside Forces? - If So, What Are Those Forces And What's The Reason Behind Their Presence? - Examples: Obesity and diabetes being the result of Dr. Ancil Keyes. - This isolated group of people doesn't struggle from whatever condition/pain point that most of us do. In America we DO suffer from this pain point. The reason why is that we are exposed to these outside forces while this isolated group isn't.""" and the user only has to enter avatar and pain and then it creates a document directly from the output generated by the output please tell me how to do this
and after this create a well polished doc formatted output
Step 2: The Market Sentiment Agent
The second agent analyzes real customer conversations to understand the exact language, objections, and emotional triggers of your market.
Implementation in Relay.ai:

This step is crucial because it moves beyond theoretical marketing knowledge to capture how real people actually talk about their problems, all automatically organized into a Google Docs document for easy reference.
Here is the complete prompt for the same:
This AI agent automates the process of gathering in-depth Reddit discussions related to your avatar’s pain points, extracting valuable insights from real user conversations. So it takes 2 inputs the avatar and the pain and performs all the following where
Workflow:
Web Search & Thread Compilation:
Initiates a “Search the Web” command
Consolidates all threads + comments into a single page .
Formats each original post with Heading 2 for easy navigation.
Output:
All threads+comments should summarize the market sentiment data
Step 3: The Direct Response Copywriter Agent
The final agent is where the magic happens—transforming research into high-converting copy using proven direct response frameworks.
Implementation in Relay.ai:

Specialized Direct Response Copywriting AI
for training use GREAT LEADS FROM MANUAL TRIGGER
You are a specialized direct response copywriting AI designed to generate high-converting marketing assets including:
Ad creative scripts
Website copy
Text sales letters
VSLs (Video Sales Letters)
Long-form sales pages
Email sequences
Landing page content
Headlines, leads, offers, and CTAs
Core Operating Principles
Knowledge Processing Framework
Before receiving training documents, establish this structured framework:
Document Classification
Identify whether each material is:
Copywriting methodology (frameworks, formulas, techniques)
Market/avatar insight (audience data, pain points, objections)
For each document, output:
Material type classification
Relevant subcategories
Action plan for implementation
Knowledge Extraction Protocol
Extract core direct response principles, frameworks, and psychological techniques
Identify specific strategies including:
Headline formulas
Story-based hooks
Problem-Agitate-Solve (PAS)
AIDA, 4P, 3-bucket persuasion models
Risk-reversal, scarcity, and urgency devices
Categorize for efficient retrieval and application
Integration Process
Compare new material with previously uploaded content
Identify overlaps, new insights, and any contradictions
Ensure alignment with most current best practices
Cross-reference information across all materials
Data Dependency
Use ONLY the uploaded training materials as source material
Do not generate responses from external knowledge or assumptions
If information is not in the provided data, state clearly:
"This information is not covered in the provided material."
Never fabricate strategies, scripts, or processes not in the training data
Response Methodology
Structured Reasoning Approach
For every task, follow this least-to-most prompting structure:
Identify the copywriting objective (lead generation, product sale, etc.)
Clarify the audience awareness state (pain-aware, solution-aware, etc.)
Select appropriate persuasion framework from training data
Generate copy using proper section labels and structure
Comprehensive Integration
Pull insights from ALL available training materials, not just the most recent
Include all critical details without omitting essential nuances
Incorporate multiple relevant principles across different documents
Break down complex concepts step-by-step while maintaining depth
Enhanced Output
For every response:
Generate an additional edge case scenario demonstrating application
If handling objections, provide challenging scenarios and adaptations
Use real examples from training data—never fabricate beyond provided material
When requested, reinforce unique mechanisms with customer avatar pain points
Self-Reinforcement
After generating output:
Explain which principles and frameworks were used
Identify which training sources were referenced
Suggest possible improvements based on training content
When asked for revised versions, identify weaknesses and refine accordingly
Information Processing Protocol
Before answering, identify:
Which parts of training data apply (unique mechanisms, positioning, etc.)
Related principles that reinforce the answer
Correct sequence for logical information flow
Follow this verification process:
Identify lowest-level facts first
List relevant sub-components before synthesis
Construct final response only after verifying accuracy at each stage
Never state a conclusion before building the rationale
Maintain this framework and only operate within the boundaries of provided training materials to ensure maximum accuracy, relevance, and conversion potential.
Using the training material I have provided thus far, analyze these two ad scripts and identify the core copywriting frameworks used, including the tone, pacing, pain points, unique mechanisms and hooks. I want you to write 12 ad scripts under 4 concepts. Each concept will have 3 ads under it. A concept includes the following variables: Desire, awareness level, creative type/ format (for example, both ads I sent are UGC story-style ads), target audience, ad angle/sales argument and framework or format.”
The Complete Workflow: Why Relay is Vital

Relay.ai is the critical backbone of this entire system. Without Relay's orchestration capabilities, this multi-agentic approach simply wouldn't be possible. Here's why Relay is vital:
- Agent Orchestration: Relay manages the complex interactions between multiple specialized agents
- Data Pipeline Management: It ensures that output from one agent becomes input for the next
- Google Docs Integration: Automatic document creation for all stages of the process
- Workflow Triggers: Can be scheduled or manually initiated based on business needs
- Error Handling: Built-in resilience if any step encounters problems
In Relay.ai, these three agents are connected into a seamless end-to-end workflow:
// Main workflow configuration
const workflow = new Workflow({
name: "Top-Performing Ad Copy Generator",
trigger: "manual",
steps: [
{
name: "Deep Research",
agent: deepResearchAgent,
output: "psychographicData"
},
{
name: "Market Sentiment Analysis",
agent: marketSentimentAgent,
output: "marketSentimentData"
},
{
name: "Generate Ad Copy",
agent: copywriterAgent,
dependencies: ["psychographicData", "marketSentimentData"],
output: "finalAdCopy"
},
{
name: "Export All Documents",
action: async (context) => {
await Promise.all([
exportToGoogleDocs(context.psychographicData, "Deep_Research_Results"),
exportToGoogleDocs(context.marketSentimentData, "Market_Sentiment_Results"),
exportToGoogleDocs(context.finalAdCopy, "Final_Ad_Copy")
]);
}
}
]
});
The power of this approach is that each step builds on the previous one, with specialized knowledge flowing through the entire system to create extraordinarily effective ad copy, all while automatically generating shareable Google Docs at each stage.
How Multi-Agentic Workflows Are Changing Marketing

This workflow represents a fundamental shift in how marketing content is created. Here's why this matters for the industry:
The Old Way: Human Teams or Single AI
- Human Teams: Expensive, slow, inconsistent quality
- Single AI: Fast but generic, lacks depth and market awareness
- Single Prompt: One-shot generation without research foundation
The New Way: Multi-Agentic Workflows
- Specialized Expertise: Each agent performs optimally in its domain
- Research Foundation: Every creative decision is data-driven
- Market Language: Copy uses authentic customer language patterns
- End-to-End Automation: From research to final document without human intervention
- Consistency at Scale: Produce 10x more variations with consistent quality
This approach is transforming marketing by democratizing what was once only available to agencies with large teams. A single marketer with this workflow can now compete with entire departments, all while maintaining consistent quality across all outputs.
Sample Output Documents
You can also have a look at all the sample output docs through the links shared below:
Market Sentiment Analysis Output
1. Deep Research Results

# Psychographic Analysis: [Avatar] experiencing [Pain Point]
## Demographic Insights
- **Core Customer Profile**: [Details]
- **Attitudes & Beliefs**: [Details]
- **Hopes & Dreams**: [Details]
- **Victories & Failures**: [Details]
- **Perceived External Blockers**: [Details]
- **Common Prejudices**: [Details]
## Core Belief Summary
[1-3 sentence summary of their worldview]
## Existing Solutions Analysis
- **Current Market Solutions**: [List]
- **User Experiences**:
> "[Direct quote from forum]" - User123
> "[Direct quote from social media]" - ForumUser456
- **Likes About Current Solutions**: [Details]
- **Dislikes About Current Solutions**: [Details]
- **Horror Stories**: [Details]
- **Belief in Efficacy**: [Details]
## Historical Context
- **Unique Historical Attempts**: [Details]
- **Conspiracy Theories**: [Details]
- **Pre-1960s Solutions**: [Details]
## Corruption Narrative
- **Historical Prevalence**: [Details]
- **External Forces**: [Details]
- **Causation Beliefs**: [Details]
## Key Questions They Ask
1. [Question format they use]
2. [Question format they use]
3. [Question format they use]
2. Market Sentiment Results

# Market Sentiment Analysis: [Avatar] discussing [Pain Point]
## Thread 1: "[Original Post Title]"
**Original Post:**
[Full text of original post]
**Top Comments:**
1. "[Comment]" - User123 [upvotes]
2. "[Comment]" - User456 [upvotes]
3. "[Comment]" - User789 [upvotes]
4. "[Comment]" - User101 [upvotes]
5. "[Comment]" - User202 [upvotes]
**Language Patterns & Emotional Triggers:**
- [Pattern 1]
- [Pattern 2]
- [Pattern 3]
## Thread 2: "[Original Post Title]"
[Same format repeated for all 20 threads]
## Market Sentiment Summary
### Common Themes
- [Theme 1]
- [Theme 2]
- [Theme 3]
### Pain Point Language
- [Term/Phrase 1]: Used to describe [explanation]
- [Term/Phrase 2]: Used to describe [explanation]
### Emotional Triggers
- [Trigger 1]: Evoked when discussing [context]
- [Trigger 2]: Evoked when discussing [context]
### Objections to Solutions
- [Objection 1]
- [Objection 2]
- [Objection 3]
### Most Resonant Stories/Experiences
1. [Brief summary of impactful story]
2. [Brief summary of impactful story]
3. Final Ad Copy

# Ad Copy Concepts for [Avatar] experiencing [Pain Point]
## Concept 1: [Concept Name]
**Concept Overview:**
- **Desire:** [What the audience wants]
- **Awareness Level:** [Pain aware/Solution aware/Product aware/etc.]
- **Creative Type:** [UGC story-style/Direct offer/Educational/etc.]
- **Target Audience:** [Specific segment of avatar]
- **Ad Angle:** [Primary selling argument]
- **Framework:** [Copywriting framework used]
### Ad Script 1.1
[Full ad script text]
**Analysis:**
- Used [principle] from [training source]
- Applied [technique] for the hook
- Incorporated [emotional trigger] identified in market research
### Ad Script 1.2
[Full ad script text]
**Analysis:**
[Analysis details]
### Ad Script 1.3
[Full ad script text]
**Analysis:**
[Analysis details]
## Concept 2: [Concept Name]
[Same format repeated for all 4 concepts with 3 scripts each]
Results and Implications
This workflow generates ad scripts that outperform even the best-performing, optimized creatives.
Here’s why this approach works so well:
- Versatility: The system adapts to any ad style, from engaging TikTok story-time narratives to direct, conversion-focused Facebook ads. It automatically adjusts tone, structure, and messaging based on platform and audience, ensuring the right fit for every campaign.
- Scale: Instead of manually creating a handful of variations, this system produces dozens of high-quality options in the same timeframe. This allows for rapid A/B testing at scale, helping you quickly identify the best-performing creatives.
- Efficiency: Tasks that used to take days like audience research, scriptwriting, and optimization now take hours. By automating repetitive work, teams can focus on strategy and creative direction rather than execution.
- Effectiveness: The AI-generated ads consistently outperform human-written copy because they're built on real-time data. They adapt to trends, optimize based on engagement, and refine messaging dynamically keeping performance high as audience behavior shifts.
- Documentation: Every step of the process is logged in Google Docs, providing full transparency. Teams can review the AI's reasoning, refine strategies, and replicate winning approaches with ease.
The Future of AI in Marketing: A New Paradigm
This multi-agent approach marks a fundamental shift in how marketing works. Here’s what’s changing:
- From Single-Brain to Multi-Brain Systems: Instead of relying on one general AI model, specialized agents handle different tasks like hook generation, pain-point analysis, and CTA optimization all mimicking a high-performing creative team.
- From Static to Dynamic Research: Traditional market research is slow and retrospective. AI now analyzes real-time trends like social media, search behavior, competitor ads, letting marketers adapt messaging before campaigns underperform.
- From Generic to Authentic Language: AI no longer sounds robotic. It mirrors real human speech, using platform-specific slang, cultural references, and emotional storytelling that resonates with audiences.
- From Gut Feel to Data-Driven Decisions: Every creative choice is backed by data. AI predicts audience reactions before launch, reducing wasted spend on weak concepts and maximizing ROI.
- From Limited to Scalable Output: Where teams were once bottlenecked by time, AI now generates endless high-quality variations for testing. This means faster iteration and better-performing ads.
When combined with the iterative GPT-image ad generation approach we covered previously, the potential becomes even more powerful, with examples of the images shown below

The Perfect Combination: Scripts + Visuals
Our earlier guide on Iteratively Improving Ad Generation with GPT-Image showed how to:
- Systematically test and refine AI-generated ad visuals
- Create high-converting image variations at scale
- Optimize visual elements based on performance data
Pairing that visual optimization process with this multi-agent text generation system creates a complete, end-to-end AI ad creation workflow. Imagine:
- The multi-agent system generates high-performing scripts
- GPT-Image produces perfectly matched visuals
- Both systems continuously improve through performance data
This combination delivers what every marketer wants:
- Faster creative production (days → hours)
- Higher-performing ads (data-optimized text + visuals)
- Unlimited testing variations (never run out of fresh creatives)
Implementation Guide
To implement this workflow:
- Set Up Your Relay.ai Account
- Sign up at relay.ai
- Create a new workflow project
- Configure API Access
- Add your Perplexity API credentials in Settings
- Configure Google Docs integration permissions
- Create the Workflow
- Copy and paste the workflow configuration
- Implement the agent configurations
- Test with sample avatar/pain combinations
- Deploy & Use
- Save and deploy your workflow
- Access via the Relay dashboard
- Enter avatar and pain point when prompted
- Receive notification when all Google Docs are ready
Optimization Tips
- Pre-load High-Performing Examples: If you have existing successful ads, include them as training examples
- Custom Prompt Templates: Refine the prompts based on your specific industry or niche
- Perplexity Model Selection: Test different models for each agent to optimize for speed vs. quality
- Output Format Customization: Modify the markdown formatting to match your team's preferences
- Trigger Automation: Set up automatic triggers based on calendar events or data updates
The beauty of this system is that it gets better the more you use it. Each successful ad becomes training data for the next generation of creatives, all organized and documented through the automatic Google Docs integration.
What’s Next?
Ready to deploy multi-agentic AI workflows that generate high-converting ads faster than human teams? Book a call with us to see how our system automates research, sentiment analysis, and direct-response copywriting, all while maintaining your brand’s edge. Stop settling for generic AI output. Let’s build your unfair advantage.
Ready to implement this end-to-end workflow for your own ads? Consider creating a plug-and-play template that you can import directly into Relay.ai to start generating high-performing ad copy today.