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 servestarts automatically with the desktop app). - At least one model pulled.
Quick start
-
Pull a model with Ollama:
Terminal window ollama pull qwen3.6 -
Install Atomic Agent:
Terminal window curl -fsSL https://atomicagent.io/install | shOn Windows:
Terminal window irm https://atomicagent.io/install.ps1 | iex -
Launch the agent:
Terminal window atomic-agentIn 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.
Recommended models
| Model | Good for | Approximate memory |
|---|---|---|
qwen3.6 | coding and agentic tool use | ~24 GB |
gemma4 | general reasoning | ~16 GB |
gemma4:e4b | light 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_LENGTHenvironment variable beforeollama serve, for exampleOLLAMA_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
baseUrlhas no/v1suffix. - Empty model list. Make sure Ollama is running:
ollama listshould print your models. - The local models wizard appears even though Ollama is configured. Start with
atomic-agent tui --skip-llama-setup, or setATOMIC_AGENT_TUI_SKIP_LLAMA_SETUP=1.
For the full configuration reference, see Configuration.