Skip to content

Use with Ollama

Atomic Agent ships with a built-in Ollama preset. Point the agent at your local Ollama server and every model you have pulled becomes available to it. No API key is needed for a local Ollama.

What you need

  • Ollama installed and running (ollama serve starts automatically with the desktop app).
  • At least one model pulled.

Quick start

  1. Pull a model with Ollama:

    Terminal window
    ollama pull qwen3.6
  2. Install Atomic Agent:

    Terminal window
    curl -fsSL https://atomicagent.io/install | sh

    On Windows:

    Terminal window
    irm https://atomicagent.io/install.ps1 | iex
  3. Launch the agent:

    Terminal window
    atomic-agent

    In the first-run setup, choose Cloud models, then pick the Ollama (local) preset. The agent lists the models you have pulled; select one and you are done.

Configure by hand

If you prefer editing config directly, add an Ollama provider to ~/.atomic-agent/config.json:

{
"llm": {
"activeTextProvider": "ollama",
"providers": [
{
"id": "ollama",
"kind": "openai-compatible",
"baseUrl": "http://localhost:11434",
"defaultChatModel": "qwen3.6"
}
]
}
}

Set defaultChatModel to any tag you have pulled. ollama list shows what is available on your machine.

ModelGood forApproximate memory
qwen3.6coding and agentic tool use~24 GB
gemma4general reasoning~16 GB
gemma4:e4blight option for 8 GB machines~4 GB

Any model from ollama.com/search works as long as it fits your hardware. Models with tool-use support give the agent the best results.

Context length

Ollama picks a default context window based on available memory, and on smaller machines that can mean 4k tokens. Agent sessions carry a system prompt, tool definitions, and history, so a short window makes the model silently forget earlier turns.

If answers degrade over a session, raise the context window in Ollama:

  • In the Ollama desktop app: Settings, then Context length.
  • For a manually started server: set the OLLAMA_CONTEXT_LENGTH environment variable before ollama serve, for example OLLAMA_CONTEXT_LENGTH=32768.

A 32k window is a good baseline for agent work if your hardware allows it.

Troubleshooting

  • 404 errors on chat requests. Check that baseUrl has no /v1 suffix.
  • Empty model list. Make sure Ollama is running: ollama list should print your models.
  • The local models wizard appears even though Ollama is configured. Start with atomic-agent tui --skip-llama-setup, or set ATOMIC_AGENT_TUI_SKIP_LLAMA_SETUP=1.

For the full configuration reference, see Configuration.