add-ollama-provider

Route a NanoClaw agent group to a local Ollama model via env overrides and settings.

1|Updated May 22, 2026
One-click install
npx skills add https://github.com/roseDwayane/LocalizeAgenticSys --skill add-ollama-provider-rosedwayane
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: add-ollama-provider
Source: https://github.com/roseDwayane/LocalizeAgenticSys/tree/main/nanoclaw/.claude/skills/add-ollama-provider
Command: npx skills add https://github.com/roseDwayane/LocalizeAgenticSys --skill add-ollama-provider-rosedwayane

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Running NanoClaw agents against the Anthropic API incurs per-token costs and requires network access. This Skill reconfigures an existing agent group to use a locally running Ollama model instead, cutting API spend and enabling experimentation with open-weight models without changing provider code. ## Core Features & Use Cases - Env-based rerouting: Sets ANTHROPIC_BASE_URL, ANTHROPIC_API_KEY, and NO_PROXY in the group's container.json so the Anthropic SDK talks to Ollama's native v1/messages endpoint. - Source wiring when missing: Adds env and blockedHosts fields to ContainerConfig and container-runner.ts if the codebase lacks them, including Docker --add-host blocking of api.anthropic.com. - Model configuration and verification: Writes the model name into the group's shared Claude settings.json, rebuilds and restarts the service, and verifies via Ollama and Docker inspection commands. - Use Case: You want your Telegram-facing agent to run on a local gemma4 model with zero Anthropic spend; the Skill configures the group, blocks api.anthropic.com as a safeguard, and confirms the model is active. ## Quick Start Ask the assistant to switch a specific NanoClaw agent group to a local Ollama model such as gemma4 and block the Anthropic API.

Frequently Asked Questions about add-ollama-provider

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I run a NanoClaw agent on a local Ollama model?

Set ANTHROPIC_BASE_URL to http://host.docker.internal:11434 and ANTHROPIC_API_KEY to ollama in the group's container.json env block, then add the model name to the group's shared Claude settings.json. Rebuild, restart the service, and verify with the Ollama API.

Does Ollama support the Anthropic API for Claude Code agents?

Ollama speaks the Anthropic API natively at the v1/messages endpoint, so no provider code changes are needed. Redirecting the Anthropic SDK via ANTHROPIC_BASE_URL is sufficient to route requests to the local model.

How do I block the Anthropic API inside a Docker container?

Add api.anthropic.com to the blockedHosts array in container.json. The container runner maps each blocked host to 0.0.0.0 via Docker's --add-host flag, making it unreachable and preventing accidental API spend.

Why does my Ollama agent hang without responding?

Ollama may be loading the model cold, which takes 10-30 seconds for large models. Watch the Ollama process list endpoint; the model appears there once loaded and the agent then responds.

How do I switch an agent group back from Ollama to Claude?

Remove the env and blockedHosts keys from the group's container.json and delete the model key from the shared settings.json, then restart the service. No rebuild is needed since both files are read at container spawn time.