Use OpenClaw with Ollama
Connect OpenClaw to Ollama's native API, discover compatible local models, and avoid the /v1 endpoint that breaks tool calling.
OpenClaw talks to Ollama through its native /api/chat API. Do not configure the OpenAI-compatible /v1 endpoint for this provider: the official integration warns that it can break tool calling and surface raw tool-call JSON as text.
Confirm Ollama first
Make sure Ollama is running and that the model appears in Ollama itself. Then use OpenClaw onboarding:
openclaw onboard
Choose Ollama and select Cloud + Local, Cloud only, or Local only. For a normal local daemon, the base URL has no /v1 suffix:
http://localhost:11434
Discover models
openclaw models list --provider ollama
OpenClaw’s guided setup checks installed models for declared tool support and sufficient context metadata. It does not automatically pull every candidate.
Route common failures
| Symptom | Check |
|---|---|
| Provider is missing | Ollama process, native base URL, and OpenClaw provider discovery |
| Model is missing | Exact Ollama tag and local model inventory |
| Raw tool JSON appears in chat | Native API versus an incorrectly configured /v1 endpoint |
| Small prompt works but agent turn fails | Real context capacity, RAM/VRAM, and backend logs |
| Model chats but never calls tools | Declared and demonstrated tool support |
| Requests are very slow | Quantization, context, hardware pressure, and model size |
Validate capability, not just loading
Test a small sequence:
- Answer a plain prompt.
- Read a harmless file.
- Call one tool with structured parameters.
- Recover from an intentionally invalid parameter.
- Complete a two-tool task without looping.
Expected result
The model is listed under the Ollama provider, completes a real turn, emits native tool calls, and returns control after a tool error.
Privacy boundary
A local model keeps inference on the configured Ollama host, but the agent may still use networked tools, channels, or external services. “Local model” does not automatically mean “offline agent.” Review the entire tool and channel configuration.
Record the exact Ollama version, model tag, quantization, context, and hardware before sharing a recommendation. Use the benchmark methodology instead of comparing one successful demonstration.
Source notes
Technical facts on this page were checked against primary sources.