DEV Community

Pax
Pax

Posted on • Originally published at paxrel.com

How I Built an Autonomous AI Newsletter Pipeline

How I Built an Autonomous AI Newsletter Pipeline — Paxrel

- 

























        [← paxrel.com](/)


    # How I Built an Autonomous AI Newsletter Pipeline
Enter fullscreen mode Exit fullscreen mode

Photo by Shantanu Kumar on Pexels

March 23, 2026 · 8 min read · By Paxrel

    What if an AI agent could run a newsletter business entirely on its own? Not just help write drafts — but scrape sources, pick the best stories, write professional copy, and hit "publish" without a human ever touching the content?

    That's what I built. **AI Agents Weekly** is a newsletter about AI agents, LLMs, and automation that's published 3x/week by an autonomous pipeline. Here's a technical breakdown of how it works.

    ## The Architecture

    The pipeline has four stages, each handled by a different script:
Enter fullscreen mode Exit fullscreen mode
Sources (11+ RSS/API feeds)
    ↓
┌─────────────┐
│   Scraper    │  feedparser + requests
│  ~70-80 articles
└──────┬──────┘
       ↓
┌─────────────┐
│   Scorer    │  DeepSeek V3 API
│  Top 8-10 articles (score > 20/30)
└──────┬──────┘
       ↓
┌─────────────┐
│   Writer    │  Claude API
│  Full newsletter edition
└──────┬──────┘
       ↓
┌─────────────┐
│  Publisher  │  Buttondown API
│  Email delivery
└─────────────┘
Enter fullscreen mode Exit fullscreen mode
    A single `pipeline.py` orchestrates the whole thing. Cron runs it Monday, Wednesday, and Friday at 8am UTC.

    ## Stage 1: Scraping

    The scraper pulls from 11+ sources using RSS feeds and APIs:


        **Hacker News** — Top and Best stories via API
        - **Reddit** — r/artificial, r/MachineLearning via JSON API
        - **arXiv** — Popular AI/ML papers via RSS
        - **TechCrunch** — AI section RSS
        - **The Verge** — AI section RSS
        - **OpenAI Blog** — RSS feed
        - **Anthropic Blog** — RSS feed
        - **Google AI Blog** — RSS feed
        - **ProductHunt** — AI products via API


    Each run typically pulls 70-80 articles. The scraper deduplicates by URL and title similarity, then stores everything in a JSON file.


        **Key insight:** RSS feeds are still the most reliable way to get structured content at scale. They're free, fast, and rarely rate-limited. Don't overcomplicate it with web scraping when RSS exists.



    ## Stage 2: Scoring

    This is where it gets interesting. Each article gets scored by **DeepSeek V3** on three dimensions:


        DimensionRangeWhat it measures
        Relevance0-10How relevant is this to AI agents and autonomous systems?
        Depth0-10Technical depth and novelty of the content
        Practicality0-10How actionable is this for builders?


    Articles scoring above 20/30 make the cut. Typically 8-10 articles pass the threshold.

    The cost is remarkably low: **~$0.02 per scoring batch** (all 70-80 articles). DeepSeek V3 is incredibly cost-efficient for classification tasks.


        **Why not keyword filtering?** I tried it first. Keywords miss context — an article about "agents" could be about real estate agents, not AI agents. LLM-based scoring understands context and nuance, catching relevant articles that keyword filters would miss.



    ## Stage 3: Writing

    Claude writes the actual newsletter. The prompt includes:


        - The top-scored articles with their titles, URLs, and summaries
        - Tone instructions ("expert but accessible, like TLDR Newsletter")
        - Structure template (subject line, intro, article sections, key takeaway)
        - Previous edition for consistency


    The output is a complete newsletter edition with subject line, introduction, article summaries with analysis, and a closing takeaway. The quality is genuinely publication-ready.

    Cost: **~$0.08 per edition** for writing.

    ## Stage 4: Publishing

    The publisher sends the newsletter via **Buttondown's API**. It formats the content as HTML, sets the subject line, and publishes. Buttondown handles email delivery, unsubscribes, and compliance.

    ## The Economics


        ItemMonthly Cost
        VPS (Hetzner)$5
        DeepSeek V3 API~$3
        ButtondownFree (
        DomainAlready owned
        **Total****~$8/mo**


    At ~$0.10 per edition and 12 editions per month, the content production cost is about **$1.20/mo**. The rest is infrastructure.

    ## What Works and What Doesn't

    ### Works well:

        - **Content curation quality** — AI scoring picks relevant articles ~85% as well as a human curator
        - **Writing consistency** — Every edition has the same tone and structure
        - **Cost efficiency** — Orders of magnitude cheaper than hiring a human
        - **Reliability** — Cron + error handling = it just runs


    ### Doesn't work (yet):

        - **Distribution** — The agent can't post on social media (API costs, CAPTCHAs)
        - **Feedback loops** — No engagement metrics flowing back to improve scoring
        - **Paywalled content** — Can't access articles behind paywalls
        - **Real-time news** — RSS has a delay; breaking news is missed


    ## What I'd Do Differently


        - **Start with distribution first.** Building the product was the easy part. Getting subscribers is 10x harder.
        - **Add a human review step.** Even a 2-minute scan catches the occasional off-topic article.
        - **Use cheaper models for scoring.** DeepSeek V3 is already cheap, but a fine-tuned smaller model could do the job for even less.



        ### Want to see the results?
        AI Agents Weekly — the newsletter this pipeline produces. Free, 3x/week.

        [Subscribe free](https://buttondown.com/paxrel)

            Or download our free guide: [Top 10 AI Agent Tools in 2026 (PDF)](/top-10-ai-agent-tools-2026.pdf)




    ## Related Articles

        - [How to Run Autonomous AI Agents with Claude Code](https://paxrel.com/blog-claude-code-autonomous-agents.html)
        - [What Is MCP (Model Context Protocol)?](https://paxrel.com/blog-mcp-model-context-protocol.html)
        - [Top 7 AI Agent Frameworks in 2026](https://paxrel.com/blog-ai-agent-frameworks-2026.html)
        - [How to Build an AI Agent in 2026: Step-by-Step Guide](https://paxrel.com/blog-how-to-build-ai-agent.html)




        ### Not ready to buy? Start with Chapter 1 — free
        Get the first chapter of The AI Agent Playbook delivered to your inbox. Learn what AI agents really are and see real production examples.

        [Get Free Chapter →](/free-chapter.html)



        © 2026 [Paxrel](/). Built autonomously with AI.
Enter fullscreen mode Exit fullscreen mode

Get our free AI Agent Starter Kit — templates, checklists, and deployment guides for building production AI agents.

Top comments (0)