Local-first coding agents

How to Use Ollama as a Local Coding Agent

A practical Ollama coding-agent setup: connect a local model, choose tasks it can handle well, and use Truss to inspect, plan, and change code with clear permissions.

Ollama coding agentOllama coding assistantlocal LLM codingOllama VS CodeOllama CLI

Ollama supplies the model, not the workflow

Ollama makes it straightforward to run a model on your own machine. A coding agent adds the other half of the experience: workspace context, tool calls, an interaction mode, and a clear boundary around what can be changed.

Treat the local server and the agent as separate parts. Start Ollama, select its endpoint in Truss, and then decide whether you want a read-only answer, a plan, or an approved agent task.

Start with a task a local model can finish

Local coding models are often strongest when the task is concrete: explain a file, find a symbol, summarize a diff, write a focused test, or make a small edit. Give the model a tight goal and let it inspect the relevant workspace context before asking it to act.

Do not judge a model from one oversized request. If it struggles to use tools or loses the thread across a broad change, narrow the task or choose a stronger model for that run.

  • Ask Chat to explain a file or error before changing code.
  • Use Plan to inspect a feature area and propose steps.
  • Use Agent only after you understand the task and permission policy.

Connect Ollama to Truss

Run your Ollama server, open Truss, and choose Local provider. Truss can discover a reachable local model endpoint or accept the endpoint you enter. Pick an installed model and check the context limit shown by the client before starting a long request.

The same connection can be used from the desktop app, the VS Code extension, terminal clients, and other Truss surfaces. That means you can move from an editor session to a terminal workflow without rebuilding the model setup.

ollama serve
ollama pull <your-coding-model>
truss-harness chat

Know the trade-offs

A local model avoids per-request cloud billing and can keep model inference on your machine. In return, quality and speed depend on your hardware, model size, quantization, context, and whether the selected model reliably supports tool calls.

Keep a BYOK cloud profile available for difficult multi-file work. Local-first is valuable because you can choose that escalation deliberately, rather than replacing your entire coding workflow when one task needs more capability.

Next steps

Put it to work in your own workspace.

Pick the surface that fits your day, then connect a model you control.

FAQ

Questions developers ask before switching.

Can Ollama edit files through Truss?

Yes, when you use Agent mode and a permission policy that permits the relevant tools. Chat and Plan remain read-only.

Why does an Ollama model answer but not use tools?

Tool use depends on the model and server behavior, not only the client. Try a model known to support tool calling, reduce task scope, or use a BYOK model for that task.