# Run an AI coding agent with a local model

> SeaShell runs against a local model from Ollama or LM Studio; seashell models --local detects the server and registers its models as a first-class provider.

SeaShell is model-agnostic and runs against a local model as easily as a hosted one. Point it at any local OpenAI-compatible server, Ollama or LM Studio, and run seashell models --local: in 2026 SeaShell detects the running server, lists its chat models, and registers them as a provider you pick like any other. A local model runs on your machine with no per-token API cost, and pairs with offline mode to run fully air-gapped.

## Key takeaways

- SeaShell works with any local OpenAI-compatible server: Ollama or LM Studio.
- seashell models --local detects the server and registers its chat models automatically.
- A local model has no per-token API cost; you bring the model, SeaShell is the agent.
- Pair a local model with offline mode (seashell --offline) to run fully air-gapped.

## Why run a local model

There are 3 reasons developers point an AI coding agent at a local model in 2026: keeping code on their own machine, avoiding per-token API bills, and not depending on a hosted provider's uptime or pricing.

A local model turns the cost of heavy agent use from a metered API bill into the fixed cost of your own hardware, which matters when an agent makes many calls per task. It also keeps the model side of the loop on your machine, so paired with a local code index there is no third-party in the path at all. SeaShell stays model-agnostic either way: you can run local, bring your own hosted keys, or mix them per task.

## Ollama and LM Studio

Run seashell models --local. SeaShell probes the 2 common local servers, Ollama on port 11434 and LM Studio on port 1234, finds whichever is running, and lists its installed chat models.

It then registers those models as a provider in your config, so they appear in the model picker and in seashell models exactly like a hosted provider. There is no config file to hand-edit and no schema to reverse-engineer. If your server runs on a non-default port, set ATLAS_LOCAL_MODEL_URL and SeaShell probes that instead. Embedding-only models are filtered out, so the picker shows only models you can actually chat with.

## Model-agnostic by design

SeaShell resolves the model per message, so you are never locked to 1 provider. Switch between a local model and a hosted one from the picker, or use different models for different work.

That means a local model is not an all-or-nothing commitment: run a small local model for routine edits and switch to a hosted frontier model for the hard problems, without changing tools. Bring your own keys for the hosted providers you already pay for, and SeaShell routes to whichever you pick. The agent, the planning, the diffs, and the permission gating stay the same regardless of which model is behind them.

## Local model plus offline mode

A local model is what makes air-gapped work possible. With a local model selected and offline mode on (seashell --offline), the only network SeaShell touches is your local model server on your own machine.

This is the combination for developers who cannot send code to a cloud at all: the model is local, the code index can use local embeddings, and offline mode blocks every other outbound call. See the offline mode guide for how the network boundary is enforced. You bring the model; SeaShell keeps the rest of the loop on hardware you control.

## FAQ

### Can SeaShell use a local model?

Yes. SeaShell works with any local OpenAI-compatible server, including Ollama and LM Studio. Run seashell models --local to detect it and register its models.

### How do I connect Ollama to SeaShell?

Run seashell models --local. SeaShell detects Ollama on port 11434, lists your installed chat models, and registers them as a provider you can pick.

### Does SeaShell work with LM Studio?

Yes. LM Studio on port 1234 is auto-detected too. For a non-default port, set ATLAS_LOCAL_MODEL_URL and SeaShell probes that endpoint.

### Do I need an API key for a local model?

No. A local model runs on your machine with no per-token cost. You can still bring API keys for hosted models and switch between them.

### Can I run fully offline with a local model?

Yes. Pair a local model with offline mode (seashell --offline) so the only network SeaShell touches is your local model server.

---

Canonical HTML: https://seashell.sh/resources/features/run-atlas-with-a-local-model
Source of truth: aeo_pages row `/resources/features/run-atlas-with-a-local-model` (segment: Platform) (this file is generated from it, never hand-edited).
Licence: SeaShell is proprietary with a free core. It is not open source and there is no public source repository.
