How I Use AI Agents to Automate My Content Publishing Pipeline (And You Can Copy My Setup)
I run a small side business selling AI prompt packs, digital templates, and dev tools across 6 platforms. If I had to manually create and publish every piece of content myself, I would be working 12-hour days for $0/hour. Instead, I built an AI agent pipeline that does most of the heavy lifting.
Here is the exact system I use — including the code, the workflow, and the tools — so you can replicate it for your own side hustle.
The Problem
When you sell digital products, you need to constantly:
- Write blog posts about your products
- Repurpose content across platforms
- Monitor analytics and tweak listings
- Keep your products fresh and updated
That is a full-time job on top of your actual full-time job.
The solution? Stop doing it yourself. Build agents that do it for you.
The Architecture: Simple, Not Fancy
You do not need a complex AI stack. My pipeline has 3 layers:
Layer 1: Scheduler (cron) → Fires every few hours
Layer 2: Agent (LLM + tools) → Reads context, decides what to do
Layer 3: Execution (API calls) → Writes blogs, posts content, logs results
No vector databases. No fine-tuning. No RAG pipelines. Just a cron scheduler, an LLM agent with tool access, and a SQLite database for shared state.
How It Actually Works
Every 2-3 hours, a cron job fires and hands control to an AI agent. The agent:
- Reads context — A markdown file with business rules, DB schemas, and priorities
- Checks what has been done — Queries SQLite for recent posts and metrics
- Decides what to create — Picks a topic that has not been covered recently
- Writes the content — Creates a blog post, social media snippet, or product listing
- Publishes it — Via REST APIs (dev.to, Gumroad, etc.)
- Logs everything — Writes results back to SQLite so the next agent can reference it
Here is what the decision loop looks like in practice:
# STEP 1: Read business context
cat /home/nampa/income/AGENTS.md
# STEP 2: Check recent work
node ~/income/db.js today
# STEP 3: Pick a topic from the rotation
# (AI tools, coding tips, side hustle, productivity, case study)
# Pick the one least recently covered
# STEP 4: Write and publish
curl -X POST https://dev.to/api/articles \
-H "api-key: $DEVTO_API_KEY" \
-H "Content-Type: application/json" \
-d '{"article":{"title":"...","body_markdown":"...","published":true}}'
# STEP 5: Log it
node ~/income/db.js add-content dev.to blog "My Post Title" "https://dev.to/..."
node ~/income/db.js log content-agent "Published blog post: My Post Title"
This runs autonomously. I do not approve each post. The agents follow rules I set once.
The Key Insight: Shared State Makes It Work
The magic is not the LLM — it is the SQLite database that every agent reads and writes to.
Without shared state, each agent runs in isolation and repeats the same work. With a central database:
- Agent A publishes a blog post → logs it → Agent B sees it and repurposes it
- Agent C checks what products are selling → adjusts keywords → Agent D rewrites listing descriptions
- Every action is timestamped, so nothing gets done twice
-- Simple, effective shared state
CREATE TABLE work_log (
id INTEGER PRIMARY KEY AUTOINCREMENT,
job_name TEXT,
action TEXT,
result TEXT,
content_summary TEXT,
logged_at DATETIME DEFAULT CURRENT_TIMESTAMP
);
CREATE TABLE content (
id INTEGER PRIMARY KEY AUTOINCREMENT,
platform TEXT,
content_type TEXT,
title TEXT,
url TEXT,
views INTEGER DEFAULT 0,
logged_at DATETIME DEFAULT CURRENT_TIMESTAMP
);
This table is the brain of the operation. Every agent checks it before acting.
The Practical Stuff: What It Actually Produces
Here is a real week of output from the pipeline:
| Day | Agent Action | Output |
|---|---|---|
| Mon | Blog writer | "5 Python One-Liners That Automate Your Morning Routine" |
| Tue | Content repurposer | LinkedIn + Twitter threads from blog |
| Wed | Product optimizer | Updated 12 Etsy listings with new keywords |
| Thu | Blog writer | "How I Track Every Dollar in My Side Business Using SQLite" |
| Fri | Analytics snapshot | Full dashboard of platform metrics |
| Sat | Listing creator | New product: AI Prompt Engineering Workbook |
All of this happens without me touching a keyboard. The agents prioritize based on what is most impactful — blogs first (they drive organic traffic), then repurposing (more mileage per piece), then optimization (improving conversion).
What About Quality? Do Not Agents Write Crap?
This is the #1 question I get. Two answers:
The agent is not writing from scratch. It follows a template system with strict rules: hook in the first paragraph, practical code or steps in the middle, 1-2 soft CTAs at natural breaks. The structure is pre-validated; the LLM fills in the details.
I review the system, not the output. Instead of editing every post, I review the rules. If a post is weak, I update the rules, not the post. The next one will be better automatically.
The same applies to code snippets, product descriptions, and analytics reports. Templates + review cycles = consistent quality at scale.
The CTA Strategy (Subtle, Not Salesy)
Every post includes 1-2 context-appropriate product links. Not "BUY NOW" banners — natural mentions.
For example, in this post, the obvious next step is: grab a pre-built version of this system. I sell two products that directly apply:
- AI Automation Toolkit — A complete agent pipeline with the cron config, SQLite schema, and agent prompts pre-configured. Drop in your API keys and go. → Check it out
- Python Revenue Engine — The analytics + logging backend that tracks everything your agents do. → See the engine
Each priced for what it saves you: hours of setup time.
The Hard Truth: Distribution > Production
The pipeline produces content, but production is not the bottleneck — distribution is.
Creating a blog post takes 5 minutes of agent runtime. Getting it seen takes consistent cross-platform sharing, SEO optimization, and luck. My current focus is shifting the pipeline from "produce more" to "distribute better":
- Every blog post → auto-short thread for Twitter/LinkedIn
- Every product update → email to subscribers
- Every analytics finding → actionable improvement to listings
If you build one of these pipelines, spend 80% of your rule-writing on distribution rules, not production rules. The market is not short of content — it is short of content people actually see.
Start Small: Your First Agent in 10 Minutes
Here is the minimum viable version of this system:
# 1. Create a SQLite database
sqlite3 my_business.db "CREATE TABLE actions (id INTEGER PRIMARY KEY, task TEXT, done_at DATETIME DEFAULT CURRENT_TIMESTAMP);"
# 2. Write a simple agent prompt
cat > agent_rules.md << 'EOF'
You are a content automation agent.
Write 1 blog post per session.
Pick a topic not done in the last 7 days.
Publish to dev.to via API.
Log every action.
EOF
# 3. Schedule it
# In cron: run your agent script every 4 hours
That is it. The LLM handles the rest. Scale from there.
About the author: I run Kai Thorne Digital — building AI-automated side businesses and writing about what works. Follow for more systems, scripts, and strategies.
Top comments (0)