← Back to list

The AI Content Factory I Built With 6 Libraries Ended Up Producing More Articles in a Week Than I…

I originally built this workflow to escape content burnout. Instead, it evolved into a complete AI-powered publishing system that…

Suleman Safdar · 2026-06-15 18:48 · 10 claps · 3.7 min read paywalled
#ai #python #programming #money #freelancing
Open on Medium ↗
Wiki topics: AI · AI · General ECO · Economy · General AIM · AI in Marketing 💻 · Programming 🧠 · Mental Wellness

The AI Content Factory I Built With 6 Libraries Ended Up Producing More Articles in a Week Than I Used to Write in a Month

I originally built this workflow to escape content burnout. Instead, it evolved into a complete AI-powered publishing system that researched topics, generated drafts, created images, optimized SEO, and prepared content for multiple platforms automatically.

Photo by Immo Wegmann on Unsplash

Photo by Immo Wegmann on Unsplash

For years, my content workflow looked the same.

Find an idea.

Research competitors.

Collect sources.

Create an outline.

Write a draft.

Edit everything.

Generate images.

Optimize SEO.

Schedule publishing.

Repeat.

The problem wasn’t writing.

The problem was everything surrounding writing.

Research consumed hours.

Formatting consumed hours.

Repurposing content consumed hours.

Publishing consumed hours.

By the time an article was finished, I was already exhausted before starting the next one.

Then I asked myself a simple question:

What if AI handled the workflow while I focused only on strategy?

That question led me down a rabbit hole of AI libraries, automation frameworks, and agent systems that eventually became my personal content factory.

Why Most AI Content Systems Produce Generic Garbage

The biggest mistake people make with AI content is treating the model like a writer.

That’s backwards.

AI isn’t the writer.

AI is the production team.

Most systems look like this:

Prompt
   ↓
ChatGPT
   ↓
Article

The result is predictable.

Generic.

Repetitive.

Forgettable.

The real breakthrough happens when AI handles:

  • Research
  • Planning
  • Fact collection
  • Content structuring
  • SEO analysis
  • Repurposing
  • Publishing

Instead of simply generating paragraphs.

LangGraph Became the Brain of the Entire Workflow

The first major upgrade happened when I started using LangGraph.

Install:

pip install langgraph langchain openai

Instead of one giant prompt, I created a workflow.

from typing import TypedDict
from langgraph.graph import StateGraph

class ContentState(TypedDict):
    topic: str
    outline: str
    article: str

def create_outline(state):
    return {
        "outline":
        f"Outline for {state['topic']}"
    }

def create_article(state):
    return {
        "article":
        f"Article based on {state['outline']}"
    }

graph = StateGraph(ContentState)

graph.add_node(
    "outline",
    create_outline
)

graph.add_node(
    "article",
    create_article
)

graph.add_edge(
    "outline",
    "article"
)

graph.set_entry_point(
    "outline"
)

workflow = graph.compile()

Now the AI wasn’t generating content.

It was executing a process.

That distinction changed everything.

Firecrawl Eliminated Manual Research

Research was always the slowest part.

I needed something that could collect information from websites automatically.

That’s where Firecrawl became incredibly useful.

Install:

pip install firecrawl-py

Example:

from firecrawl import FirecrawlApp

app = FirecrawlApp(
    api_key="YOUR_KEY"
)

data = app.scrape_url(
    "https://example.com"
)

print(data)

Instead of manually opening twenty tabs, the workflow collected information automatically.

The time savings were ridiculous.

Research that previously required an hour now happened in minutes.

OpenAI Generated Better Outlines Than Most Content Briefs

Most weak articles start with weak structure.

So I stopped generating articles first.

I started generating outlines first.

from openai import OpenAI

client = OpenAI()

outline = client.responses.create(
    model="gpt-5",
    input="""
    Create a detailed article outline.

    Include:
    - Hooks
    - Examples
    - Code sections
    - Monetization ideas
    """
)

print(
    outline.output_text
)

The workflow became:

Topic
  ↓
Research
  ↓
Outline
  ↓
Article

Quality improved immediately.

Because structure drives quality.

ChromaDB Turned Every Article Into Future Knowledge

One frustrating reality of content creation is repetition.

You learn something valuable.

Write about it.

Forget where you stored it.

Repeat the same research months later.

Using ChromaDB:

from chromadb import Client

client = Client()

collection = client.create_collection(
    "content_memory"
)

collection.add(
    documents=[
        "Python automation article",
        "AI agents article",
        "SEO workflow article"
    ],
    ids=["1", "2", "3"]
)

Now every article became part of a searchable knowledge base.

Future content automatically referenced previous work.

The system got smarter with every article published.

CrewAI Allowed Specialized Agents to Work Together

One AI agent is useful.

Multiple specialized agents are powerful.

Using CrewAI:

from crewai import Agent

researcher = Agent(
    role="Research Specialist",
    goal="Gather information"
)

writer = Agent(
    role="Content Writer",
    goal="Create article"
)

editor = Agent(
    role="Technical Editor",
    goal="Improve clarity"
)

seo = Agent(
    role="SEO Strategist",
    goal="Optimize ranking"
)

Workflow:

Research Agent
       ↓
Outline Agent
       ↓
Writing Agent
       ↓
Editing Agent
       ↓
SEO Agent

Instead of one overloaded prompt, each agent focused on a single task.

The quality increase was obvious.

Automatic Image Generation Removed Another Bottleneck

Creating visuals used to interrupt my writing flow.

The solution was integrating image generation directly into the workflow.

image_prompt = f"""
Create a modern illustration
for an article about:

{article_topic}
"""

The pipeline automatically produced:

  • Featured images
  • Social media graphics
  • Blog thumbnails
  • Marketing visuals

Every published article immediately became platform-ready.

Streamlit Turned Scripts Into a Content Dashboard

Eventually the collection of scripts became difficult to manage.

I needed a simple interface.

Streamlit solved that problem.

import streamlit as st

st.title(
    "AI Content Factory"
)

topic = st.text_input(
    "Enter Topic"
)

if st.button(
    "Generate"
):
    article = workflow.invoke({
        "topic": topic
    })

    st.write(article)

Now everything lived in one place.

Research.

Generation.

Editing.

Publishing.

All accessible through a single dashboard.

The Repurposing Engine Created More Value Than Writing

This was the feature that surprised me the most.

After generating an article, the workflow automatically transformed it into:

  • LinkedIn posts
  • X threads
  • Email newsletters
  • Video scripts
  • YouTube descriptions
  • Social captions

Example prompt:

REPURPOSE_PROMPT = """
Convert this article into:

1. LinkedIn post
2. Twitter thread
3. Newsletter
4. Video script

Keep the core message.
"""

One article suddenly became ten pieces of content.

This multiplied output without multiplying effort.

Building a Publishing Pipeline Changed Everything

The final evolution wasn’t better writing.

It was better distribution.

The workflow became:

Research
   ↓
Outline
   ↓
Article
   ↓
Edit
   ↓
SEO
   ↓
Images
   ↓
Repurpose
   ↓
Publish

At that point the system wasn’t helping me write.

It was helping me operate a media business.

That’s a massive difference.


메타데이터
post_id
64c7df2ac2ad
slug
the-ai-content-factory-i-built-with-6-libraries-ended-up-producing-more-articles-in-a-week-than-i-64c7df2ac2ad
url
https://medium.com/@SulemanSafdar/the-ai-content-factory-i-built-with-6-libraries-ended-up-producing-more-articles-in-a-week-than-i-64c7df2ac2ad
canonical_url
https://medium.com/@SulemanSafdar/the-ai-content-factory-i-built-with-6-libraries-ended-up-producing-more-articles-in-a-week-than-i-64c7df2ac2ad
author_url
https://medium.com/@SulemanSafdar
status
ok
fetched_at
2026-06-16 19:09:56