How I Cut My AI Automation Costs to $0/Night (And You Can Too)

Disclosure: This post contains affiliate links. If you sign up for DigitalOcean through my referral link, I earn a small commission at no extra cost to you (and you get $200 in credits). I only recommend services I actually use and believe in.


I used to spend $50-100/month running AI automation. Every morning briefing, every code review, every system health check was eating into my Claude API budget. I’d wake up, check my billing dashboard, and wince at another $3-5 burned overnight.

Then I figured out something that changed everything: you don’t need expensive cloud models for grunt work.

Now I run three AI agents every single night—security audits, content research, infrastructure monitoring—for literally $0. Here’s the breakdown of what I built and how you can copy it.

The Problem: AI Automation Gets Expensive Fast

Here’s what my old setup looked like:

Morning briefing: Pull calendar, check emails, review KANBAN tasks, generate summary
Cost: ~$0.50 per run
Frequency: Daily
Monthly: $15

Code reviews: Scan git commits for security issues, analyze new code
Cost: ~$1.00 per run
Frequency: Daily
Monthly: $30

Health checks: Monitor containers, disk space, error logs
Cost: ~$0.30 per run
Frequency: Multiple times daily
Monthly: $20+

Random research tasks: “Find me blog post ideas”, “Analyze this video transcript”
Cost: $1-5 each
Frequency: Several per week
Monthly: $20-40

Total: $85-105/month just for automation. And that’s before any actual conversations with the AI.

The crazy part? Most of that work doesn’t need GPT-4 or Claude Opus. Reading log files? Checking disk usage? That’s not rocket science.

The Solution: Local LLMs for “Muscles”, Cloud for “Brains”

I learned this from studying how Alex Finn and Matthew Berman run their AI setups. They process billions of tokens by following one simple rule:

Expensive models for reasoning. Free models for execution.

Here’s what that means:

Cloud Models (Claude Opus, GPT-4):

  • Complex decision making
  • Writing that needs personality
  • Anything customer-facing
  • Strategic thinking

Local Models (Ollama):

  • Log analysis
  • Code scanning
  • System monitoring
  • Data processing
  • Research grunt work

The local models run on your own hardware. No API calls. No tokens. No bills.

What I Built: The “Council” System

Instead of one AI doing everything, I created three specialized agents that run every night:

1. Security Council (Granite 3.3 8B)

Schedule: 3:30 AM PST
What it does:

  • Reviews yesterday’s git commits
  • Scans error logs for vulnerabilities
  • Checks container health
  • Monitors disk usage
  • Generates security report

Output: councils/security/reports/2026-03-06.md
Cost: $0.00

2. Content Council (QWen 2.5 Coder 7B)

Schedule: 4:00 AM PST
What it does:

  • Researches trending AI topics
  • Generates 3 blog post ideas
  • Identifies SEO keywords
  • Maps affiliate revenue angles
  • Honesty-checks each idea

Output: councils/content/reports/2026-03-06.md
Cost: $0.00

3. Health Council (Mistral 7B)

Schedule: 4:30 AM PST
What it does:

  • Checks all Docker containers
  • Monitors memory and CPU
  • Verifies service health
  • Tests database connections
  • Flags performance issues

Output: councils/health/reports/2026-03-06.md
Cost: $0.00

Every morning I wake up to three fresh reports. Total cost: $0.00

The Technical Setup (Simpler Than You Think)

You don’t need to be a DevOps expert. Here’s the actual implementation:

Step 1: Install Ollama (5 minutes)

Ollama runs local LLMs on your machine. It’s like Docker for AI models.

# Linux/Mac
curl -fsSL https://ollama.com/install.sh | sh

# Windows (WSL2)
curl -fsSL https://ollama.com/install.sh | sh

# Pull the models
ollama pull granite3.3:8b
ollama pull qwen2.5-coder:7b
ollama pull mistral:latest

These models run entirely on your machine. No internet required once downloaded.

Step 2: Write Simple Bash Scripts

Here’s my actual Security Council script (simplified):

#!/bin/bash
REPORT_FILE="reports/security-$(date +%Y-%m-%d).md"

# Gather data
GIT_LOGS=$(git log --since="24 hours ago")
DISK_USAGE=$(df -h)
CONTAINERS=$(docker ps)

# Build prompt
PROMPT="Analyze this system data for security issues:

Git activity: $GIT_LOGS
Disk usage: $DISK_USAGE
Containers: $CONTAINERS

Generate a security report with:
- Critical issues (if any)
- Warnings
- Recommendations
- Overall status"

# Call local Ollama
curl -s http://localhost:11434/api/generate -d "{
  \"model\": \"granite3.3:8b\",
  \"prompt\": \"$PROMPT\",
  \"stream\": false
}" | jq -r '.response' > "$REPORT_FILE"

echo "✅ Security report: $REPORT_FILE"

That’s it. No complex frameworks. Just bash + curl.

Step 3: Schedule with Cron

# Edit crontab
crontab -e

# Add nightly jobs (these times are PST converted to UTC)
30 11 * * * /path/to/security-council.sh
0 12 * * * /path/to/content-council.sh  
30 12 * * * /path/to/health-council.sh

Done. They’ll run every night while you sleep.

The Results: Real Numbers

Before (Cloud Models):

  • Cost: $85-105/month
  • Reliability: Sometimes hit rate limits
  • Speed: API latency (1-3 seconds)

After (Local Models):

  • Cost: $0/month
  • Reliability: 100% (no API dependencies)
  • Speed: Instant (local inference)

Hardware requirements:

  • 16GB RAM (recommended)
  • Decent CPU or GPU
  • ~20GB disk space for models

I run this on a Windows machine with WSL2. Works great. You could also use:

  • A $6/month DigitalOcean Droplet (get $200 credit)
  • An old laptop you’re not using
  • A Raspberry Pi 5 (8GB model)
  • Your main machine (minimal resource usage)

What You Actually Need Claude/GPT For

Don’t get me wrong—I still use Claude. But now I’m strategic:

Use expensive models for:

  • Writing blog posts (like this one)
  • Customer support responses
  • Complex code generation
  • Strategic decisions
  • Anything public-facing

Use local models for:

  • Monitoring and alerts
  • Log analysis
  • Routine reports
  • Data processing
  • Research tasks

My Claude bill went from $100+/month to $20-30/month. And I’m getting MORE automation, not less.

Common Mistakes I Made (So You Don’t Have To)

Mistake 1: Trying to use local models for everything

Local models aren’t great at creative writing or complex reasoning. Don’t force it. Use cloud models where quality matters.

Mistake 2: Over-engineering the automation

My first attempt used a complex agent framework with message queues and state management. Total overkill. Bash scripts work fine.

Mistake 3: Not separating concerns

Running one agent that does everything = expensive and slow. Three focused agents = fast and free.

Mistake 4: Forgetting about prompt injection

If your automation processes external data (emails, webhooks), sanitize it first. Local models are vulnerable to prompt injection too.

Getting Started Today

Here’s your 30-minute quick start:

  1. Install Ollama (5 min)
  2. Pull one model - Start with Mistral: ollama pull mistral (10 min)
  3. Write a simple script - Copy my example above (10 min)
  4. Test it manually - Run the script, check output (5 min)
  5. Schedule it - Add to cron when you’re confident

Don’t try to build everything at once. Start with ONE automation. Get it working. Then add more.

The Bigger Picture: Agents, Not Chatbots

This isn’t just about saving money. It’s about a fundamental shift in how we use AI.

Old way: You ask questions, AI answers
New way: AI works for you 24/7

I don’t talk to my councils. They just run. Every morning I have fresh reports waiting. It’s like having three junior analysts working the night shift.

Security audits? I’d never do them daily manually. Too boring. But my Security Council does it every night, catches issues before they’re problems.

Content research? I’d procrastinate for days. My Content Council hands me three ideas every morning. I just pick one and write.

Infrastructure monitoring? I’d only check when something breaks. My Health Council tells me about problems before users notice.

Next Steps

If you want to build this yourself:

  1. Start simple - One script, one model, one task
  2. Measure before - Track your current API costs
  3. Deploy incrementally - Don’t migrate everything at once
  4. Keep quality checks - Spot-check the local model outputs
  5. Reserve cloud for quality - Use Claude/GPT where it matters

Resources:

Hosting recommendations:

  • DigitalOcean Droplets - starts at $6/month (get $200 credit)
  • Vultr Cloud Compute - similar pricing and features
  • Linode (now Akamai) - great for budget hosting

The Bottom Line

You don’t need to spend $100/month on AI automation. Most of it can run locally for free.

Save the expensive models for where they shine: creative work, complex reasoning, customer-facing content. Use local models for the grunt work.

My three councils run every night. Cost: $0. Value: Priceless.

Your turn.


Questions? Comments? Hit me up on Twitter @justlikepopcorn or join our Discord here.

If you found this helpful, consider using my DigitalOcean referral link to try their VPS hosting. I get a small commission, you get $200 in credits. Win-win.

Built with Hugo
Theme Stack designed by Jimmy