goose with ollama

Learn to run your goose agent with local AI models powered by ollama

plebdevs.com

March 31, 2026 · 5 min read

Use Ollama to Power Goose

Run models with Ollama locally and point Goose at Ollama's local provider. Keep coding prompts on-device and avoid API spend.


Index#


Overview#

Goose supports an Ollama provider for local models running on http://localhost:11434. That lets you keep the same Goose workflow, approvals, extensions, and repo context while running a local model instead of paying for a cloud API on every prompt.

Why Ollama for Goose?


Setup#

1) Start Ollama locally#

ollama --version
ollama serve
ollama pull qwen3.5:4b

Quick checks:

curl http://localhost:11434/api/version
ollama ls

If ollama serve is already managed by the desktop app or a service, you only need to make sure the server is listening on localhost:11434.

2) Configure Goose#

Option A: Goose Desktop

Open Goose, go to provider setup, choose Ollama, leave the host as http://localhost:11434, and select an installed local model such as qwen3.5:4b.

Option B: Goose CLI

Run the interactive setup once:

goose configure

Or launch a session with explicit local-provider environment variables:

export GOOSE_PROVIDER=ollama
export OLLAMA_HOST=http://localhost:11434
export GOOSE_MODEL=qwen3.5:4b
export GOOSE_MODE=approve
goose session --name local-ollama

Goose stores shared Desktop and CLI configuration under ~/.config/goose/config.yaml, so you only need to configure this once per machine.


Beginner usage#

  1. Confirm Ollama is serving: curl http://localhost:11434/api/version
  2. Confirm your model exists: ollama ls
  3. Open your repo and launch Goose Desktop or start a CLI session
  4. Start in approve mode if the repo has write access
  5. Begin with a simple repo question or a small reversible edit request

Quick first run

# Terminal 1
ollama serve

# Terminal 2
cd your-project
goose session --name local-ollama

Inside Goose:


Pro usage#

Persistent CLI config#

If you want Ollama to stay your default Goose provider, keep it in ~/.config/goose/config.yaml:

GOOSE_PROVIDER: ollama
OLLAMA_HOST: http://localhost:11434
GOOSE_MODEL: qwen3.5:4b
GOOSE_MODE: approve

This gives you a durable local default for future Desktop and CLI sessions on the same machine.

Tool shim for non-tool-calling models#

Goose works best with models that support tool calling. If you want to experiment with a model that does not, Goose has an experimental Ollama tool shim:

ollama pull mistral-nemo

export GOOSE_TOOLSHIM=true
export GOOSE_TOOLSHIM_OLLAMA_MODEL=mistral-nemo
goose session --name local-toolshim

If tool use feels unreliable with local models, increase the Ollama server context window before starting Goose:

OLLAMA_CONTEXT_LENGTH=32768 ollama serve

Operational tips#

export GOOSE_INPUT_LIMIT=32000

Cost savings guide#


Privacy guide#


Security guide#


Appendix#

Quick refs

ollama ls
ollama show qwen3.5:4b
curl http://localhost:11434/api/version
goose configure
goose session --name local-ollama

See also:

#agent#ai#document#guide
0

Written by

FREE Adversarial AI Course out now on plebdevs.com 🤝👩‍💻🤝🧑‍💻🤝👨‍💻🤝

plebdevs@plebdevs.com

Comments0

No comments yet. Start the conversation.