How I Built an AI Assistant on a Mac Mini M4
Source: Dev.to
The Setup
I run a Mac Mini M4 Pro as a 24/7 AI workstation. It sits on my desk, never sleeps, and runs an AI agent called Caper that handles everything from content creation to code generation to business automation.
Here is exactly how I set it up, what it costs, and what it actually does.
Hardware
- Mac Mini M4 Pro – 24 GB RAM, 512 GB SSD ($599 base, upgraded RAM)
- External SSD – 2 TB for storing projects, logs, and media
- Always‑on internet – Ethernet (more reliable than Wi‑Fi)
Total hardware cost: ~$800.
Runs 24/7 at about $3/month in electricity.
The Stack
Local LLMs
I run Ollama with several models pulled locally:
llama3.2 # fast general tasks
codellama # code generation
mistral # creative writing
These run entirely on‑device using the M4 Neural Engine, so there are no API costs for local inference.
Cloud APIs (When Needed)
For heavy lifting, Caper calls:
- Claude API – complex reasoning, long documents, code review
- OpenAI Whisper – audio transcription
Cost: ~$5–15 /month depending on usage.
Python Automation Layer
The glue holding everything together:
- Cron jobs for scheduled tasks (content publishing, monitoring, backups)
- Playwright for browser automation when APIs are not available
- FFmpeg for video/audio processing
- yt‑dlp for media downloads and analysis
What It Actually Does
Content Creation
Caper writes articles, generates social media posts, and creates digital products. It handles the first draft; I review and publish.
Business Automation
- Monitors competitor pricing
- Tracks analytics across platforms
- Generates reports on content performance
- Manages a task queue with priorities
Code Generation
When I need a script, I describe what I want. Caper writes it, tests it, and saves it to the scripts directory. If it fails, it debugs itself.
Research
Give it a topic, it searches the web, reads documentation, cross‑references sources, and delivers a summary with citations.
The Economics
| Item | Monthly Cost |
|---|---|
| Electricity | $3 |
| Cloud APIs | $5–15 |
| Internet (shared) | $0 |
| Total | $8–18 |
Compare that to hiring a virtual assistant ($500–2000 /month) or subscribing to multiple SaaS tools ($100+/month). The Mac Mini pays for itself in the first month.
Lessons Learned
- Local models are good enough for 80 % of tasks. Save cloud API calls for the complex stuff.
- Cron is underrated. Scheduled automation is more reliable than event‑driven for most business tasks.
- Always log everything. Every API call, every token spent, every task completed. You cannot optimize what you do not measure.
- Start with one workflow, then expand. I began with content generation, then added research, automation, and monitoring.
Get Started
You do not need a Mac Mini; any always‑on computer works. The key ingredients:
- A machine that stays on 24/7
- Python + cron for automation
- Ollama for local LLMs
- One or two cloud APIs for heavy tasks
Total setup time: one weekend.
ROI: immediate.