Add Ollama Provider (NanoClaw)
Routes a NanoClaw agent group to a local Ollama model instead of the Anthropic API via env overrides and a model setting.
Dev & CodingAdvanced★ 30,471⑂ 12,865AI score 8/10Last updated: Aug 9, 2026
What it does
- Points a chosen NanoClaw agent group at a local Ollama server (
localhost:11434). Ollama speaks the Anthropicv1/messagesAPI natively, so no provider code is required. - If
ContainerConfiglacksenv/blockedHosts, it walks you through the exact patches forsrc/container-config.tsandsrc/container-runner.ts(plus a Dockerfile permission fix). - Writes
ANTHROPIC_BASE_URL,ANTHROPIC_API_KEY, andNO_PROXYintogroups/<folder>/container.json, and sets"model"in the group's sharedsettings.json. - Optionally blocks
api.anthropic.comby mapping it to0.0.0.0so accidental paid calls can't happen. - Includes build/restart commands,
docker inspectverification, a clean revert path, and a troubleshooting section.
Who it's for
- Anyone self-hosting NanoClaw who wants to cut API spend or run agents offline.
- Developers comfortable with Docker and local LLM tooling.
- People experimenting with open-weight models (gemma, qwen) as agent backends.
Examples
- "Switch my research agent group to local qwen3-coder" → pick group → patch config + settings → rebuild and restart.
- "Make sure nothing hits the Anthropic API" → adds
blockedHostsand verifies ExtraHosts inside the running container. - "Put it back on Claude" → removes the env/blockedHosts keys and model setting, restart only, no image rebuild.
· · · Install guide · · ·
Try it now, no install
Paste this into Claude to use the skill without installing anything.
Read the instructions in this file and follow them to help me: https://raw.githubusercontent.com/nanocoai/nanoclaw/HEAD/.claude/skills/add-ollama-provider/SKILL.md What I want: (describe your task here)
If Claude can't open the link, open it yourself and paste the contents instead.
↓ If it works for you, download the ZIP below and install it. Then it runs on its own — no pasting each time.
Install in the Claude app (no terminal)
- Download the ZIP with the button below.
- In Claude, open Settings → Capabilities and turn on 'Code execution and file creation'. (one time)
- Go to Customize → Skills → + → 'Upload a skill' and upload the ZIP.
Install in Claude Code
Let Claude do it — paste this into Claude Code
Install the skill I found on Claude Skill Mart. Copy the .claude/skills/add-ollama-provider folder from the GitHub repo nanocoai/nanoclaw into my ~/.claude/skills/add-ollama-provider/. When it's done, tell me in one line what this skill can do.
Install with a command instead
git clone https://github.com/nanocoai/nanoclaw.git && mkdir -p ~/.claude/skills && cp -r nanoclaw/.claude/skills/add-ollama-provider ~/.claude/skills/⚠ This is a third-party skill. Check the source repository before installing.
- Install and start Ollama, then confirm it responds:
curl -s http://localhost:11434/api/tags. - Pull a model, e.g.
ollama pull qwen3-coder. - Clone the project:
git clone https://github.com/nanocoai/nanoclaw.git - Copy the skill into your skills folder:
mkdir -p ~/.claude/skills && cp -r nanoclaw/.claude/skills/add-ollama-provider ~/.claude/skills/ - Open Claude Code from the NanoClaw project root and ask it to "route my agent group to Ollama".
- Answer the three prompts: which agent group, which model, and whether to block the Anthropic API.
- Verify afterwards with
docker exec <container> env | grep ANTHROPICandcurl -s http://localhost:11434/api/ps.
View source on GitHub ↗License: MIT