Most “AI agents” you have used are not local. When you type a request, it travels to a data center, a model you do not control runs the reasoning, and the answer, plus a bill metered by the token, comes back. A local AI agent inverts that. The model, the reasoning loop, and the code that actually touches your files run on the machine in front of you.
That is the whole idea. And a local agent is no longer the weaker option: on GAIA Level 1, a 53-task benchmark of real-world work, Atomic Agent solved 37 of 53 tasks for 69.8% against Hermes at 58.5%, both on the same local model and the same hardware. The details are where the definition earns its keep.
- A local agent needs three things on your hardware: the model weights, the decision loop, and the tool execution
- A local chatbot is not a local agent: a chatbot produces text, an agent takes actions and reads the results
- The practical entry point in 2026 is roughly 16 GB of memory, with 24 to 32 GB being the comfortable floor for real work
- Tool call reliability on a quantized model comes from grammar-constrained decoding, not from prompt engineering
- The honest trade is latency: you wait minutes where a cloud agent takes seconds, and in exchange the work stays on your hardware
The three things that have to be local
People use “local” loosely, so it is worth being precise. An agent is genuinely local when all three of these run on your hardware:
- The model. The weights that do the thinking live on your disk and run on your CPU or GPU, commonly through a runtime like llama.cpp. No inference request leaves the machine.
- The agent loop. The part that decides what to do next, read a file, run a command, call a tool, stop, executes locally. It is not a remote service orchestrating your computer from afar.
- Tool execution. When the agent runs a shell command, edits a file, or makes a git commit, that happens directly on your OS, not in someone else’s sandbox. Tools reached over an open protocol such as MCP count as local as long as the server itself runs on your machine.
If any one of those lives in the cloud, you have a cloud agent or a hybrid: useful, but a different thing with a different trust model. The word that matters is local-first: the default is your machine, and the network is opt-in rather than assumed.
The checklist, laid out
Vendors describe all of these as “local,” so it helps to see which piece each arrangement actually keeps on your hardware.
| Setup | Model runs | Loop decides | Tools execute | Actually local? |
|---|---|---|---|---|
| Local-first agent | Your machine | Your machine | Your machine | Yes |
| Desktop app over a cloud API | Vendor servers | Vendor servers | Your machine | No |
| Cloud agent in a hosted sandbox | Vendor servers | Vendor servers | Vendor sandbox | No |
| Local model, cloud orchestrator | Your machine | Vendor servers | Your machine | Hybrid |
| Local chat app (Ollama, LM Studio) | Your machine | No loop | No tools | Local, but not an agent |
The fourth row is the one that catches people out. Running the weights yourself feels like the decisive step, and it is the expensive one, but if a remote service is choosing which tool to call next, your file listings and command output are still crossing the network on every step.
What a local agent is not
A local chatbot is not a local agent. Running a model with Ollama or LM Studio and chatting with it gives you local inference, but a chatbot only produces text. An agent acts: it drives your browser, edits files, runs your shell, and commits to git, then reads the result and decides what to do next. The loop and the tools are what make it an agent. Local just means that loop, and those tools, do not phone home.
It is also not the same as “an app that happens to run on your laptop.” A desktop wrapper around a cloud API is still a cloud agent, because the reasoning is remote. Local-first is about where the thinking happens, not where the icon sits in your dock.
Two more distinctions come up constantly, and both are worth nailing down.
It is not RAG. Retrieval-augmented generation gives a model access to documents you provide: it searches an index, pulls in relevant passages, and answers from them. That is a read operation with a better bibliography. An agent changes state. It writes files, runs commands, and pushes commits, then has to handle what happens when a command fails. Many local agents use retrieval as one tool among several, which is why the two get conflated, but a RAG pipeline with no loop and no write access is a search engine with a nice voice.
It is not workflow automation. A tool like Zapier or n8n executes a graph you drew in advance: if this, then that, in a fixed order. An agent decides the order at runtime. That is the whole difference, and it cuts both ways. Automation is predictable and cheap to debug, because you can point at the step that broke. An agent handles tasks whose shape you could not specify up front, and pays for it with runs that are harder to reproduce. If you can draw the flowchart, you probably want automation.
Why anyone bothers
Running everything locally is more work than calling an API. Three reasons make it worth it:
- Privacy by construction. Your prompts, your source code, and your files stay on the machine as a property of the architecture rather than a policy promise. There is no “we do not train on your data” clause to trust for the inference itself, because the inference is not happening anywhere else. Product telemetry is a separate question, and one you should check on any tool you install, including ours: the claim worth making is about where the work happens, not a blanket promise that no packet ever leaves.
- No token bill. A cloud agent that reads a large codebase or loops for twenty steps can quietly cost real money, and the cost scales with exactly the behavior you want more of. A local agent’s marginal cost is electricity. You can let it run, re-run it when it gets something wrong, and point it at a whole repository without doing arithmetic first.
- It works offline. On a plane, behind a corporate firewall, or in an air-gapped environment, a local agent keeps working because it never needed the network. The full walkthrough for that setup is in running an AI agent offline.
There is a fourth reason that gets less airtime: stability. A cloud model is updated underneath you. A prompt that worked in March can behave differently in June, and you will not get a changelog. A local model is a file on your disk. It changes when you replace it, and not before, which matters if an agent is wired into something you depend on.
The classic objection is that a small local model cannot compete with a frontier cloud model on hard tasks. That is the interesting part.
The capability question
Small models used to be too unreliable to run an agent loop. They would hallucinate a tool call, emit malformed JSON, and the whole chain would fall over. Two things closed most of that gap.
The first is constrained decoding. Instead of hoping the model emits valid JSON, you give it a grammar (GBNF, documented in the llama.cpp repository, is the common format) that makes it structurally impossible to produce an invalid tool call. During sampling, tokens that would break the schema are filtered out, so the model can only pick from what the grammar allows. Reliability stops being a matter of prompt luck and becomes a property of the decoder. The mechanics are covered in GBNF grammar-constrained tool calling.
That change is larger than it sounds, because it reframes what you are asking of a small model. Formatting and tool selection are different skills. A 27B model at 4-bit precision is meaningfully worse than a frontier model at producing perfectly-formed JSON dozens of times in a row, and much closer to it at deciding that the next sensible move is to list a directory. Constrained decoding takes the first job away from the model entirely and leaves it the second.
The second is quantization getting good enough that a model small enough to run on a laptop is still smart enough to plan. Quantization lowers the numerical precision of the weights, which shrinks the file and speeds up inference. It is a real trade rather than a free lunch: a 4-bit build is not identical to the full-precision original, and vendor benchmark tables are almost always measured on full weights rather than on the quant you will actually download. What has changed is the size of the gap. It went from disqualifying to noticeable.
That combination is why local agents crossed from “toy” to “usable” recently rather than years ago.
What a local agent is actually good at
The honest framing is that local agents are not a drop-in replacement for cloud agents on every task. They are clearly better on some, clearly worse on others, and the split is predictable enough to plan around.
Where local wins:
- Work on code and files you cannot upload. Client repositories, medical records, legal documents, unreleased product code. This is the single most common reason people go local, and the constraint is usually contractual rather than technical.
- Long, repetitive, low-glamour jobs. Renaming things across a repository, extracting fields from a folder of documents, batch-editing configuration. These are the tasks where a per-token bill punishes you for volume and a local agent does not care.
- Anything that has to run without a network. Field work, secure facilities, and the plane.
- Work you want to be reproducible. Same weights, same file, same behavior next quarter.
Where cloud still wins:
- Hard reasoning under time pressure. If the task genuinely needs frontier-model intelligence and you need the answer in seconds, a local 27B model is the wrong tool.
- Very large contexts. Local memory is finite in a way a hosted endpoint is not.
- Anything interactive where waiting is intolerable. A local agent composing a single reply can take a minute or more on consumer hardware.
The full side-by-side, including cost math, is in local AI agent vs cloud agent.
The hardware reality
“Runs on your machine” is doing a lot of work in most descriptions, so here are the actual numbers. Memory is the binding constraint, and it is nearly the only one that matters for whether a model runs at all.
| Memory available | What you can realistically run | Suitable for agent work |
|---|---|---|
| 8 GB | 3B to 7B models at 4-bit | No: too weak for a reliable tool loop |
| 16 GB | 7B to 14B at 4-bit, or a tight 27B at 3-bit | Marginal: works, but context is cramped |
| 24 GB | 27B at 4-bit with room for context | Yes: the practical floor |
| 32 GB | 27B at 5-bit to 6-bit | Yes, comfortably |
| 48 GB and up | 27B at 8-bit, or larger models | Yes, with quality close to the source weights |
To make that concrete: Qwen3.8-27B is an open-weight model you download as a file, and at 4-bit it lands around 17 GB, which fits a 24 GB card with context to spare. The full breakdown of running it as an agent is in Qwen3.8 27B as a local agent.
Two things surprise people on their first run.
The first is that an agent needs far more context than a chat client does. The system prompt carries every tool definition before any work starts, so an empty conversation already sits at tens of thousands of tokens. A 16K context window that feels generous in a chat app is roughly a quarter of what an agent loop needs to start.
The second is that tool results accumulate. Every file the agent reads and every command output it sees lands back in the context and stays there. A run that starts comfortably can exhaust memory twenty steps in, which is why the KV cache, not the weights, is what usually kills a long task. Budget headroom on top of the model file rather than sizing to the file alone.
Speed is the part worth setting expectations on. On consumer hardware a dense mid-size model at 4-bit takes tens of seconds per step, and a multi-step task runs for minutes. That is not a bug to be tuned away. It is the current state of running a capable model without a datacenter behind it, and it is the main reason someone would choose a cloud agent despite everything above.
Common misconceptions
“Local means completely disconnected.” Not quite. The inference stays local, but a local agent can still fetch a web page if you give it that tool, and most tools ship some form of update check or telemetry. The meaningful claim is architectural: your prompts and files are not being sent to a model provider. Verify the rest for whichever tool you install rather than assuming either extreme.
“Local models are toys.” This was true and stopped being true recently enough that the reputation is lagging the reality. Open-weight models in the 27B class now post credible numbers on multi-step tool benchmarks. They are not frontier models, and pretending otherwise is how a tool loses trust, but the gap on ordinary agent work is much smaller than the gap on hard reasoning.
“Quantization ruins quality.” Overstated in one direction and understated in the other. A 4-bit build is not the same model as the full-precision original, and anyone claiming no quality loss is selling something. In practice the degradation on structured, tool-driven work is smaller than on open-ended reasoning, particularly once grammars have taken formatting failures off the table.
“You need a graphics card.” Not necessarily. Apple Silicon Macs use unified memory, so a 32 GB MacBook runs models that would need a 24 GB discrete GPU on a PC. What you cannot do is run a mid-size model at usable speed on CPU alone with system RAM: it works, technically, at a pace that makes an agent loop impractical.
“It is free.” Free of a token bill, yes. Not free of hardware, electricity, or the time you spend on setup and on waiting for slower inference. The economics favor local when volume is high or the data cannot leave. They favor cloud for occasional use on a machine you already have.
How to tell if an agent is actually local
If you are evaluating a tool that calls itself local, three questions settle it:
- Does it need an API key to function? If yes, the reasoning is probably remote. A key for an optional web search tool is a different matter from a key without which nothing runs.
- Does it work with the network off? Pull the plug and give it a task. A real local agent shrugs.
- Where do the model weights live? If you can point to the file on your disk and see its size, you are running local inference.
Tools that pass all three still differ in loop design, memory, and which models they support, and those differences are laid out in Atomic Agent vs Hermes vs OpenClaw.
A fourth question is worth adding once the first three pass: what does it send while it works? Watch the network during a run. A local-first tool may still check for updates or report anonymous usage, and knowing which is which is more useful than a marketing claim in either direction.
The short version
A local AI agent is an autonomous system whose model, decision loop, and tool execution all run on your own hardware, so it can drive your computer without sending your prompts and files to a model provider, without an API key, and without a per-token bill. Modern ones stay reliable on multi-step tasks thanks to grammar-constrained tool calling and better quantization, which is why “local” and “actually works” are no longer a contradiction.
The trade is real and worth stating plainly. You give up speed, and on the hardest reasoning tasks you give up some capability. You get work that stays on your hardware, a cost that does not scale with how much you use it, and behavior that does not change without your say-so.
If you want to see one run, the Atomic Agent quickstart gets you from install to a working agent in a few minutes, offline, on your own machine.