Local AI agents

How to run AI agents locally on your own computer

Running AI agents locally means the models and the agents work on a computer you control. This guide explains what you need, which models fit your hardware, how to set it up with Ollama and PerkOS Runtime, and when an online agent is the better choice.

What running AI agents locally means

An AI agent takes a goal, plans the steps and does the work. When it runs locally, two things happen on your own computer: the language model that does the thinking, and the app that gives the agent its tasks, tools and memory.

Local models run through a model runtime such as Ollama. The agents then use that model to read, write, plan and check their own work. Nothing has to leave the machine unless you connect an online service.

In short: a local AI agent is an agent whose model and tasks run on hardware you control, so you decide where your data goes.

Why run AI agents on your own computer

Your data stays with you
Drafts, notes and files are processed on your machine, which matters for client work and internal documents.
No per-request bill
Once a model is on your computer, using it more does not add a usage charge.
No API key to manage
Local models through Ollama need no account or key, so a new agent is ready in minutes.
You choose the model
Pick a small fast model for routine work and a larger one for harder tasks, and switch when better models appear.
Work keeps going without a connection
With the model already downloaded, agents can keep drafting and checking work offline.
Mix local and online
Use local models by default and send only the hardest tasks to an online agent you already pay for.

What you need

The pieces of a local AI agent setup
PieceWhat it doesExample
A computerRuns the model and the agentsA recent Mac, Windows or Linux computer
A model runtimeDownloads and serves local modelsOllama
A local modelDoes the reasoning and writingAn open model sized for your memory
An agent appGives agents tasks, tools and reviewPerkOS Runtime, with Sparky coordinating
Online agents, optionalTake the tasks that need more powerClaude Code, Codex or Grok with your account

How much memory local models need

Model size is counted in billions of parameters. Most people run compressed (quantized) versions, which need far less memory. These are rough starting points:

Approximate memory for quantized local models
Model sizeMemory to start withGood for
About 3 to 8 billion8 GB of RAM or moreSummaries, short drafts, quick replies
About 12 to 14 billion16 GB of RAM or moreLonger writing, simple code, research notes
About 30 billion and up32 GB of RAM or moreHarder reasoning and longer tasks

On Apple Silicon Macs the model uses the shared memory of the chip, so total memory is what counts. On Windows and Linux, a graphics card with its own memory makes larger models much faster.

How to run AI agents locally with PerkOS Runtime

  1. Install OllamaDownload Ollama for your system and open it once so it runs in the background.
  2. Download a modelPull a model that fits your memory from the Ollama library. Start small; you can add larger models later.
  3. Install PerkOS RuntimeDownload Runtime for macOS, Windows or Linux and open it. It finds the models Ollama has ready.
  4. Choose a Desk and its agentsPick a Desk, a template for recurring work, and assign a local model to each agent role.
  5. Give Sparky a goalWrite what you need in plain words. Sparky turns it into tasks on the board and assigns them to your agents.
  6. Review the resultsEach result waits for your approval. Approve it, ask for changes or set it aside.

Download it from the PerkOS Runtime page. Downloading Runtime and using it with local models is free.

Local models or online agents?

Local models compared with online agents
Local modelsOnline agents
Where the work runsOn your computerOn the provider's servers
Cost of more useNo usage chargeYour plan with each provider
SetupInstall a model onceSign in with your account
Best forRoutine and private workLong, complex tasks and code

In PerkOS Runtime you can mix both: local models for everyday drafts, and Claude Code, Codex or Grok for the tasks that need more power. Sparky assigns each task to the agent you chose for it.

Limits to plan for

Smaller models do less
Local models handle routine work well; very long or complex tasks still go better with larger or online models.
Hardware sets the pace
More memory and a capable chip or graphics card mean faster answers and room for larger models.
Models need updates
Better open models appear often. Check the library now and then and switch when one fits your work better.

Several computers can share the work. In Runtime you can link other computers you run as nodes, and Sparky spreads the tasks across them.

Frequently asked questions

Can I run AI agents locally for free?

Yes. Ollama and open models are free to download, and PerkOS Runtime is free to use with local models. You only pay for online agents you choose to add, through your own plan with each provider.

Do local AI agents need an internet connection?

Not for the model itself. Once a model is downloaded, local agents can keep working offline. Online agents and downloads need a connection.

How much RAM do I need to run AI agents locally?

About 8 GB is enough for small models, 16 GB for mid-size models and 32 GB or more for large ones. Apple Silicon Macs use their shared memory; a graphics card with its own memory speeds things up on Windows and Linux.

Is running AI agents locally private?

With local models, your prompts and files are processed on your own computer. If you send a task to an online agent, that task goes to its provider under your account.

Which agents does PerkOS Runtime support?

Local models through Ollama, Claude Code, Codex and Grok with your existing accounts, and your own Hermes or OpenClaw agents.

Keep reading