cd /news/developer-tools/running-a-local-coding-agent-on-a-ma… · home topics developer-tools article
[ARTICLE · art-35707] src=dev.to ↗ pub= topic=developer-tools verified=true sentiment=· neutral

Running a local coding agent on a Mac Mini — the actual setup

A developer named Vilius Vystartas built a local coding agent on a Mac Mini M4 with 24 GB RAM. The setup uses Pi, a coding agent connected to oMLX, an OpenAI-compatible local LLM server, for file editing and other tasks. Two models are swapped depending on the task: a 9B class model at ~20 tok/s for primary coding and a 4B class model at ~27 tok/s for quick fixes.

read1 min views1 publishedJun 21, 2026

Running a local coding agent on a Mac Mini

By Vilius Vystartas

I have an agent that does my low-stakes coding. File edits, test fixes, build verification. The kind of work you'd normally do yourself but it's faster to delegate. It also writes Playwright tests, reviews code, updates documentation, and runs deploys.

It runs locally — Mac Mini M4, 24 GB. No cloud API calls for the coding part. The orchestration layer still uses a cheap cloud model for planning and routing. The actual file editing is done by Pi, a coding agent that connects to oMLX, an OpenAI-compatible local LLM server.

The same setup can drive Claude Code, Codex, or any coding agent that speaks OpenAI-compatible API. Pi is what I use, but the oMLX server works with anything.

All the model names, config files, and paths are inside the script at the bottom.

I keep two and swap depending on the task. The 24 GB can't hold both at once.

One as good as I can have on this machine — 9B class, ~20 tok/s. Primary coding model.

Another fast — 4B class, ~27 tok/s. File edits, quick fixes, daily tasks.

The swap script moves one out, brings the other in, restarts the server. Takes about 5 seconds.

Anything more complex than a one-liner goes through RPC mode. The orchestration layer writes a prompt, Pi executes, the result comes back. No tmux, no process wrangling.

curl -fsSL https://workswithagents.dev/static/setup-local-llm-pi.sh | sh
── more in #developer-tools 4 stories · sorted by recency
── more on @vilius vystartas 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
Live at https://your-agent.zahid.host
Get free account → Pricing
from €0/mo · no card required
LIVE [news/running-a-local-codi…] indexed:0 read:1min 2026-06-21 ·