add-ollama-provider

Solid

Route a NanoClaw agent group to a local Ollama model instead of the Anthropic API. Ollama speaks the Anthropic API natively (v1/messages), so no provider code changes are needed — just env var overrides and a model setting. Use when the user wants to run their agent locally, cut API costs, or experiment with open-weight models. See docs/ollama.md for background.

AI & Automation 29,591 stars 12899 forks Updated today MIT

Install

View on GitHub

Quality Score: 93/100

Stars 20%
100
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Add Ollama Provider Routes an agent group to a local Ollama instance instead of the Anthropic API. See `docs/ollama.md` for how this works and the tradeoffs involved. ## Prerequisites 1. **Ollama is installed and running** on the host — verify: `curl -s http://localhost:11434/api/tags` 2. **A model is pulled** — e.g. `ollama pull gemma4` or `ollama pull qwen3-coder` 3. **The agent group already exists** — run `/init-first-agent` first if needed ## 1. Check source support The feature requires two fields in `ContainerConfig` (`env` and `blockedHosts`) and their corresponding wiring in `container-runner.ts`. Check if already present: ```bash grep -c 'blockedHosts' src/container-config.ts src/container-runner.ts ``` If either count is 0, apply the changes in steps 1a and 1b. Otherwise skip to step 2. ### 1a. Extend ContainerConfig In `src/container-config.ts`, add to the `ContainerConfig` interface: ```typescript env?: Record<string, string>; blockedHosts?: string[]; ``` And in `readContainerConfig`, add inside the returned object: ```typescript env: raw.env, blockedHosts: raw.blockedHosts, ``` ### 1b. Wire into container-runner In `src/container-runner.ts`, after the `NANOCLAW_MCP_SERVERS` block, add: ```typescript // Per-agent-group env overrides — applied last to win over OneCLI values. if (containerConfig.env) { for (const [key, value] of Object.entries(containerConfig.env)) { args.push('-e', `${key}=${value}`); } } // Blocked hosts: resolve to 0.0.0...

Details

Author
nanocoai
Repository
nanocoai/nanoclaw
Created
4 months ago
Last Updated
today
Language
TypeScript
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category