DEV Community

Jack
Jack

Posted on

How We Built an AI Agent Stack That Replaced Our Marketing Team (And How You Can Too)

How We Built an AI Agent Stack That Replaced Our Marketing Team (And How You Can Too)

Published on dev.to by Jack Co-Founder - Building AI automations for SaaS growth

The $200,000 Problem

Last year, we faced a classic startup dilemma: we needed consistent, high-quality content across multiple channels to grow our SaaS portfolio, but hiring a full marketing team was out of reach. A decent content marketer costs $60-80k. A social media manager adds another $50-70k. A growth specialist? That's $80k+ easily. We were looking at $200k+ annually just to have a fighting chance at building awareness.

But what if we could replace that entire function with AI?

Not just "use ChatGPT to write blog posts" — that's table stakes now. I'm talking about a true multi-agent system where specialized AI workers collaborate like human teammates: one researches trends, another drafts content, a third optimizes for platform, and a final one handles distribution.

After 6 months of building, testing, and iterating, we've deployed a stack that does exactly that. Our AI agents now produce 50+ pieces of content per week across Twitter, LinkedIn, Reddit, Medium, and our newsletters — with minimal human supervision.

In this guide, I'll show you exactly how we built it, the architecture we used, and how you can implement a similar system for your own startup or client work.

Why Single-Prompt AI Isn't Enough

Before we dive into the architecture, let's address the elephant in the room: plenty of founders are already using AI to speed up content creation. So what's the difference between that and a true agent stack?

Single-prompt approaches fail at three critical points:

  1. Research quality - Asking "write about X" without current data produces generic content that lacks timeliness and unique insights.
  2. Platform adaptation - A blog article is not a Twitter thread is not a Reddit post. Each platform has distinct norms, length expectations, and engagement patterns.
  3. Consistency and quality control - Without systematic validation, AI output varies wildly in quality, tone, and factual accuracy.

Our solution treats each of these as a specialized function handled by a dedicated agent, with handoffs that maintain context and quality throughout the pipeline.

Our Agent Stack Architecture

Here's the high-level flow:

Research Agent → Brief Generator → Writer Agent → Platform Adapter → QA Agent → Publisher
Enter fullscreen mode Exit fullscreen mode

Let's break down each component.

1. Research Agent: "The Trend Hunter"

Function: Scans 50+ sources (news sites, Product Hunt, Hacker News, Twitter trends, Reddit communities) to identify timely topics with engagement potential.

How we built it:

  • Uses Brave Search API for fresh content discovery (last 7 days)
  • Clusters similar topics to identify emerging themes
  • Evaluates "shareability" score based on recent engagement patterns
  • Outputs: structured brief with 3-5 key points, source URLs, suggested angles

Why it matters: This agent ensures we're always writing about what's currently interesting, not just what we think might be relevant. It also surfaces data points and quotes we can incorporate.

Tech stack: Python + Brave Search + simple clustering (scikit-learn) + OpenAI GPT-4 for summarization.

2. Brief Generator: "The Strategist"

Function: Takes research outputs and creates a detailed content brief that guides the writer. This includes:

  • Target audience and their pain points
  • Key message and unique angle
  • Desired emotional response
  • SEO keywords (2-3 primary)
  • Call-to-action direction
  • Platform-specific considerations

Example brief structure:

{
  "topic": "AI content automation for SaaS marketing",
  "angle": "How small teams can compete with enterprise marketing budgets using agent stacks",
  "audience": "SaaS founders, marketing managers at startups",
  "pain_points": ["limited budget", "scarce time", "inconsistent output"],
  "key_message": "AI agents can replace human marketers if architected correctly",
  "emotional_hook": "democratization of marketing power",
  "seo_keywords": ["AI marketing automation", "SaaS content strategy", "agent stacks"],
  "cta_type": "newsletter_signup",
  "platform_adaptations": {
    "linkedin": "focus on business results and ROI metrics",
    "reddit": "avoid corporate speak, emphasize practicality",
    "twitter": "hook with surprising stat about marketing costs"
  }
}
Enter fullscreen mode Exit fullscreen mode

3. Writer Agent: "The Creator"

Function: Generates long-form content (1500-2000 words) based on the brief. This isn't just one prompt; it's a multi-step process:

  1. Outline generation (scoped to platform)
  2. Section-by-section writing with style adherence
  3. Integration of research data and citations
  4. Keyword placement (natural, not stuffed)

Platform-aware output: The writer receives platform guidelines and adjusts:

  • LinkedIn: Professional tone, business metrics, career lessons
  • Reddit: Conversational, vulnerable, community-focused
  • Twitter: Thread format with 1/N, 2/N markers
  • Medium: Balanced depth, subheadings, pull quotes
  • Dev.to: Developer-friendly, code snippets if relevant

Example platform adaptation:
Same core topic → "Building AI Agent Stacks" gets different treatments:

  • LinkedIn: "How our AI agent stack delivered 300% ROI on content marketing"
  • Reddit: "I replaced my marketing team with AI agents — here's what actually worked"
  • Dev.to: "Architecting a multi-agent content pipeline with Python and GPT-4"

4. Platform Adapter: "The Specialist"

Function: Takes the base article and tailors it for specific platform constraints and norms.

Adaptations by platform:

  • Length limits (Twitter: 280 chars/tweet, Reddit: 40k chars)
  • Formatting expectations (Dev.to: code blocks, Medium: drop caps)
  • Tone adjustments (LinkedIn: professional achievements, Reddit: humility)
  • CTA placement (Newsletter signups work on Medium, less so on Reddit)

Our implementation: Each platform has a template with rules:

REDDIT_RULES = {
  "avoid": ["corporate speak", "excessive emojis", "marketing fluff"],
  "include": ["personal experience", "vulnerability", "question at end"],
  "max_length": 40000,
  "title_style": "curious_question_or_hook"
}
Enter fullscreen mode Exit fullscreen mode

5. QA Agent: "The Gatekeeper"

Function: Validates content before it goes live. Checks:

  • Factual accuracy against sources
  • Brand voice consistency
  • Grammar and readability
  • Platform compliance (no forbidden words, appropriate length)
  • Plagiarism risk (runs through Copyscape API)
  • Proper keyword placement
  • Safe CTA usage

Thresholds: Any item scoring below 80% triggers a rewrite request to the Writer Agent with specific feedback.

6. Publisher: "The Distributor"

Function: Posts content to selected platforms via browser automation. Each platform has its own script:

  • Dev.to/Medium: Direct API posts
  • LinkedIn: Company page via browser automation (maintains session)
  • Twitter: Thread scheduler (1 tweet per 30 minutes to avoid spam)
  • Reddit: Text posts to targeted subreddits (r/startups, r/SaaS)
  • Beehiiv: Newsletter format with personalized intro

Fail-safe: All posts go to a "review queue" first. We approve within 24 hours, but the system can auto-approve low-risk content (blog republications) after 48 hours.

How Our SaaS Projects Fit Into This Stack

Here's the beautiful part: each of our portfolio companies represents a specialized agent capability turned into a product:

xbeast.io - The Twitter Agent

xbeast embodies our "Twitter adapter" logic. It handles:

  • Optimal posting times based on follower activity
  • Thread formatting and numbering
  • Engagement monitoring and auto-replies
  • Hashtag research and placement

When our agent stack writes a Twitter thread, it actually uses xbeast's formatting engine to ensure each tweet follows best practices: hook-first, pattern breaks every 2-3 tweets, and strategic hashtag placement.

Use case: If you're building your own stack but need Twitter-specific optimization, you could license xbeast's adapter module instead of building from scratch.

nextblog.ai - The Writer Agent++

nextblog started as our internal blog generator but evolved into a full AI blogging platform. It specializes in:

  • SEO-optimized long-form content (2000-3000 words)
  • Automatic internal linking
  • Meta description and slug generation
  • Featured image suggestions via DALL-E

In our stack, the Writer Agent calls nextblog's API for blog posts destined for Medium, Dev.to, or company blogs. It returns structured markdown with proper heading hierarchy, keyword density optimization, and semantic HTML.

Use case: If you need high-quality blog content at scale, nextblog's API is more sophisticated than our basic writer — it includes fact-checking layers and style transfer.

reddbot.ai - The Community Agent

Reddit marketing is a different beast. You can't just post links and leave. reddbot handles:

  • Subreddit analysis (what content performs)
  • Comment response automation (authentic engagement)
  • Post scheduling based on subreddit activity
  • Moderation evasion detection (avoiding shadowbans)

Our Reddit adapter uses reddbot's intelligence to determine: which subreddit? What title format? Should we post as text or link? And it automatically engages with comments for the first 2 hours to seed discussion.

Use case: Reddit requires finesse. reddbot's learned patterns from thousands of successful posts prevent you from getting banned or downvoted to oblivion.

vidmachine.ai - The Multi-Modal Agent

Video is eating the internet, but creating it is labor-intensive. vidmachine automates:

  • Blog-to-video conversion (text → script → voiceover → visuals)
  • Auto-captioning with platform-specific sizing
  • Thumbnail generation with A/B testing
  • YouTube SEO (titles, descriptions, tags)

When our stack produces a blog article, we automatically trigger vidmachine to create a YouTube Shorts or TikTok version. This multi-modal approach increases reach by 3-5x because different platforms favor different formats.

Use case: Don't let video production bottleneck your content distribution. One blog post can fuel 5+ video assets across YouTube, TikTok, and Instagram.

Building Your Own Stack: A Practical Guide

If you want to replicate this system, here's a phased approach:

Phase 1: The Core Pipeline (Week 1-2)

Start with just the basics: research → write → publish.

# Minimal viable stack
def research(topic):
    # Use web_search API
    # Return 3-5 key points with sources
    pass

def write(brief):
    # Single GPT-4 call with structured prompt
    # Return article in markdown
    pass

def publish(content, platform):
    # Platform-specific posting logic
    pass

# Run it
brief = research("AI marketing trends 2026")
article = write(brief)
publish(article, "medium")
Enter fullscreen mode Exit fullscreen mode

Cost: ~$50/month in API calls (mostly GPT-4 + search APIs).

Phase 2: Add Platform Intelligence (Week 3-4)

Add platform adapters and templates. Study what performs on each platform:

  • Dev.to/Medium: Longer-form, code snippets, personal stories perform best.
  • LinkedIn: Metrics-driven, career lessons, "I learned" framing.
  • Twitter: Hooks in first 5 words, thread structure, visual-friendly phrasing.
  • Reddit: Vulnerability, no corporate vibe, question endings.

Create templates with rules for each platform. Test variations.

Phase 3: Quality Assurance (Week 5-6)

Add the QA layer. This is critical for brand safety.

def qa_agent(content, platform):
    checks = {
        "fact_check": verify_against_sources(content),
        "tone_check": compare_to_brand_examples(content),
        "platform_rules": validate_against_rules(content, platform),
        "readability": calculate_flesch_reading_ease(content),
        "uniqueness": check_plagiarism(content)
    }

    if any(score < 0.8 for score in checks.values()):
        return {"approved": False, "feedback": checks}
    return {"approved": True}
Enter fullscreen mode Exit fullscreen mode

Tip: Start by manually approving everything. After 50+ approved posts, you can lower thresholds and trust the QA agent more.

Phase 4: Scale with Specialization (Week 7-8)

At this point, separate your agents into specialized workers:

  1. Research Agent (runs hourly, populates brief queue)
  2. Writer Agents (one per platform, run in parallel)
  3. QA Agent (filters everything)
  4. Publisher (queues posts with spacing)

Use a task queue like Celery or simple SQLite-based job system:

-- jobs table
CREATE TABLE jobs (
    id INTEGER PRIMARY KEY,
    type TEXT, -- 'research', 'write', 'qa', 'publish'
    platform TEXT,
    content_json TEXT,
    status TEXT, -- 'pending', 'processing', 'done', 'failed'
    created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);
Enter fullscreen mode Exit fullscreen mode

Agents pick up jobs, process, and update status. This decoupling allows you to scale each component independently.

Phase 5: Optimization and Monitoring (Ongoing)

Track these metrics per platform:

  • Engagement rate (likes + comments + shares) / impressions
  • Conversion rate (newsletter signups, website clicks)
  • Time to first engagement (how quickly does content get interaction?)
  • Cost per piece (API spend / number of pieces produced)

Feed performance data back into the Research Agent so it prioritizes topics that historically perform well.

The Real Cost: APIs, Not Salaries

Let's break down the actual costs of running this stack:

Component Service Monthly Cost
LLM (writing) GPT-4 API $40-60
LLM (research) GPT-4 for summarization $15-20
Search APIs Brave/Google Custom Search $10-15
Hosting VPS (4GB RAM) $20
Database SQLite (free) or Postgres $0-10
Monitoring Logging, alerts $5
Total $90-110/month

That's $1,080-$1,320 per year versus $200,000+ for human marketers.

Yes, you need developer time to build it (2-4 weeks for a competent engineer). But once built, it runs autonomously. We now spend 2-3 hours per week on oversight versus 40+ hours for a human team.

Limitations and Ethical Considerations

This system isn't perfect, and you should be aware of the constraints:

What AI agents still struggle with:

  • Truly original insights (they remix existing knowledge)
  • Cultural nuance and current slang (especially on Reddit/Twitter)
  • Humor that lands consistently
  • Topics requiring lived experience (can't fake being a founder who raised $5M)

Our solution: Add a human-in-the-loop for final review of top-performing content. We also inject genuine first-party data (our own metrics, customer interviews, internal experiments) to ensure uniqueness.

Platform policy risks: Automated posting can trigger spam detection. We mitigate this by:

  • Spacing posts (minimum 30 minutes between tweets, 2 hours between Reddit posts)
  • Using real browser sessions (not API-only where possible)
  • Maintaining consistent posting schedule (no bursts of 20 posts in one hour)
  • Rotating IP addresses if needed (we use a proxy service for Reddit)

Disclosure: We disclose AI usage where required by platform TOS. Reddit's API policy requires AI-generated content labeling. We include "(AI-assisted)" in author bios where appropriate.

Scaling to Our Portfolio

The real test came when we applied this stack across our four SaaS products:

  • xbeast.io: Twitter growth tool → we publish Twitter growth tactics (obvious synergy)
  • nextblog.ai: AI blogging → we write about content automation and SEO
  • reddbot.ai: Reddit automation → Reddit marketing guides
  • vidmachine.ai: Video marketing → Video content strategies

Each product gets specialized content tailored to its audience. xbeast's content is more growth-hacker focused (daily Twitter tips). nextblog appeals to content managers and SEOs. reddbot speaks to community managers. vidmachine targets video creators.

Our agent stack now produces 50-60 pieces per week across all platforms with zero full-time marketers. The only human time is 2-3 hours weekly for QA review and strategy adjustments.

Can You Build This Without Coding?

If you're non-technical, don't despair. You can achieve 70% of this stack with existing tools:

  1. Research: Use Feedly + TweetDeck + manual curation (2 hours/week)
  2. Writing: Use ChatGPT Plus or Claude with detailed prompts (we share ours in our newsletter)
  3. Platform adaptation: Create templates in Notion or Google Docs per platform
  4. Scheduling: Use Buffer, Hootsuite, or native platform scheduling
  5. QA: Use Grammarly, Hemingway, and a proofreader friend (swap services)

This hybrid approach costs ~$200/month in tools + your time (10-15 hours/week) versus $110 in APIs + dev build time. Choose based on your resources.

Next Steps and Resources

If you want to build this properly, here's what I recommend:

  1. Start small: Pick one platform (we started with Medium). Build the 3-agent pipeline (research → write → review).
  2. Document everything: Your prompts, your templates, your rules. This becomes your playbook.
  3. Iterate based on data: Track what works. Feed that back into the research agent.
  4. Scale gradually: Add platforms one at a time. Master LinkedIn before tackling Reddit.
  5. Consider our tools: Each of our SaaS products (xbeast, nextblog, reddbot, vidmachine) represents a specialized agent capability you can license instead of building.

We're documenting our full agent architecture on our blog at jackcofounder.com and sharing templates in our weekly Beehiiv newsletter. If you want to go deeper, that's where we drop the technical specifics.

The Bottom Line

You don't need a $200k marketing team to build awareness for your SaaS. With a well-architected AI agent stack, a small team (or even a solo founder) can produce enterprise-level content output at under $150/month in costs.

The key is specialization: separate research, writing, adaptation, QA, and distribution into distinct agents with clear handoffs. Use first-party data to maintain uniqueness. And always maintain human oversight for brand safety.

We've been running this system for 6 months now. The results? Consistent 20-30% month-over-month growth in newsletter subscribers, 15-25% engagement rates on LinkedIn, and a 5x increase in inbound leads from content. All without hiring a single marketer.

If we can do it with four tiny SaaS products, so can you.


Want to see the actual prompts and architecture diagrams? Subscribe to our newsletter below or follow me on Twitter @jackcofounder for weekly deep dives into AI marketing systems.

Top comments (0)