DEV Community

Wolfgang Katz
Wolfgang Katz

Posted on

I Built a 24/7 AI Agent That Runs My Business From a Mac Mini — Here's Exactly How

I Built a 24/7 AI Agent That Runs My Business From a Mac Mini — Here's Exactly How

Two weeks ago, I set up an AI agent on a Mac Mini sitting in my closet. It now runs 24/7, handling tasks that used to eat up hours of my day.

This isn't a chatbot. It's an operator — a persistent system with memory, tools, and autonomy that works while I sleep.

Here's exactly what it does, how I built it, and what I learned.

What My Agent Handles

  • Email triage — Monitors Gmail, flags urgent messages, drafts responses
  • Calendar management — Tracks upcoming events, sends me reminders
  • Website monitoring — Uptime checks on 5 sites every 4 hours
  • Competitor analysis — Weekly automated scans of competitor pricing and products
  • WooCommerce monitoring — Order tracking and inventory alerts
  • Social media scheduling — Posts to Bluesky on a daily cron
  • Cron jobs — Recurring tasks that run without me touching anything

The Stack

Hardware: Mac Mini M4, sleep disabled, always on. Sits in a closet connected to power and ethernet.

Software:

  • OpenClaw — The agent framework (Node.js, runs as a LaunchAgent)
  • Anthropic Claude Opus — Primary AI model
  • OpenAI GPT-5.2 + GPT-4.1 — Failover models (auto-rotates if Anthropic goes down)
  • n8n — Workflow automation for complex multi-step processes
  • Telegram — Bot interface so I can chat with my agent from my phone

5 Hard-Won Lessons

1. Model Failover Is Non-Negotiable

On day 3, Anthropic's API went down at midnight. My agent sat there retrying the same dead endpoint for 30 minutes. Dead silence. No responses.

The fix: Set up a failover chain across multiple providers:

  • Primary: Claude Opus (Anthropic)
  • Fallback 1: Claude Sonnet (Anthropic — lighter model, same provider)
  • Fallback 2: GPT-5.2 (OpenAI — different provider entirely)
  • Fallback 3: GPT-4.1 (OpenAI — last resort)

If one provider goes down, the system auto-rotates to the next model in seconds. Two providers minimum. Four models deep.

2. OAuth > API Keys (If You Already Pay for a Subscription)

I was burning through API credits until I realized — I already pay for Claude Max and ChatGPT Plus. Both support OAuth/subscription auth, which lets your agent use those subscriptions instead of per-token API billing.

Same models. Already paid for. Monthly cost dropped to basically $0.

3. Sub-Agents Beat One Mega-Agent

Don't try to make one agent do everything. My main agent delegates:

  • Coding tasks → Claude Code (sub-agent)
  • Research → Lighter model (saves cost)
  • Complex decisions → Opus (the heavy thinker)

Each sub-agent is specialized and disposable. The main agent orchestrates.

4. Heartbeats Keep It Alive

Instead of waiting for me to ask "check my email," my agent proactively monitors on a schedule:

  • Email checks every hour
  • Site uptime every 4 hours
  • Calendar review every morning
  • Competitor scan weekly

Heartbeat = periodic pulse check. If nothing needs attention, it stays quiet. If something's urgent, it pings me on Telegram.

5. Memory Files > Conversation History

AI agents forget everything between sessions. Every restart, every crash — blank slate.

The fix: File-based memory.

  • memory/2026-04-01.md — Daily notes (raw log of what happened)
  • MEMORY.md — Curated long-term memory (decisions, preferences, lessons)

On startup, the agent reads its memory files and picks up where it left off. It knows what happened yesterday, what's pending, and what matters.

The Cost

Item Cost
Mac Mini Already owned
Claude Max subscription $100/mo (already paying)
ChatGPT Plus $20/mo (already paying)
OpenClaw Free / open source
Additional API costs ~$0 (using subscription auth)

Total additional cost: $0/month

Getting Started

If this interests you, I wrote a complete playbook that covers the full setup — from installation to configuring models, memory, heartbeats, sub-agents, and everything I learned in the first two weeks.

👉 Bootstrap Your Agent

It covers:

  • Installation and configuration
  • Model selection and failover setup
  • Memory system design
  • Heartbeat and cron automation
  • Sub-agent architecture
  • Real-world use cases

Questions?

Happy to answer anything about the setup. Drop a comment below or find me on Bluesky.

Top comments (0)