tonytautai home/local-ai/run-local-ai/software/coding/agents/coding-agent

./agent --sandbox

Running a Coding Agent on Your Own Box.

A local ai coding agent is a model served on your machine, a tool loop around it, and a fence. This page is the setup we would actually use, with the parts that disappoint named.

Tony Tautai

local ai coding agent

The appeal is simple. You describe a change, walk away for coffee, and come back to a branch with the change made and the tests green. The reality is closer to a keen intern who needs a very clear brief. This is the hands-on page of the section introduced in back to agents.

The Four Pieces

local ai coding agent

You need a model that supports tool calling, meaning it can emit a structured request such as "read this file" instead of describing it in prose. You need a runner that serves that model over a local HTTP endpoint. You need the agent program itself, which is usually a terminal tool or an editor extension pointed at that endpoint. And you need somewhere safe for it to work.

The last piece is the one people skip. Our rule: the agent runs inside a container with the repository mounted, no access to the home directory, no network, and a git branch that can be thrown away. If a run goes wrong, you delete the branch and nothing else has changed.

A Realistic First Task

Do not start with "refactor the billing module". Start with something you could do in fifteen minutes and can verify instantly: add a unit test for an existing function, rename a parameter across three files, fix a lint warning the tool already points at. Watch the log. You will learn quickly how the model reasons, where it reads files it does not need, and how it reacts when a command fails. That knowledge tells you what size of task to trust it with next.

What Goes Wrong

local ai coding agent

Three things, mostly. The model loops: it edits, the test fails for an unrelated reason, it edits the test instead of the code. The model hallucinates a tool or a file path that does not exist and the controller does not catch it. Or the context fills up with file contents and the model forgets the original task halfway through. Smaller models do all three more often. A larger model on a shared server, with a long context window, behaves noticeably better and is one of the stronger arguments for a team server over individual laptops.

If what you mostly want is completion and a chat panel, and the agent loop is a curiosity, read our guide to self hosted copilot alternative instead. It is a simpler setup with far fewer ways to surprise you.

Our Own Use

We do not sell a coding agent. We mention this page because the pattern, a small model calling tools in a loop with a human reading the log, is exactly how we chain document models on a customer's appliance. The lessons transfer: narrow tasks, a sandbox, and a review of the output every time.

local ai coding agent

ssh [email protected]

Prove it on your documents.

Every engagement starts the same way: we run the system on a sample of your own files, under NDA/DPA, and hand you a written report with the scores, misses included. No commitment.

Test it on my documents Request a diagnostic