Skip to main content

OpenClaw AI Assistant Setup Summary

Jin Li
Author
Jin Li
Fate lies within the lightcone.
AI Assistant Series - This article is part of a series.
Part 1: This Article

Background
#

After setting up my AI assistant OpenClaw, I’m documenting the entire setup process including configuring online models, local models, testing model performance, and adding skills.

Prerequisites
#

  • A server or local computer
  • Docker and docker-compose installed
  • Network configured (Tailscale VPN)
  • Ollama installed (for running local models)

OpenClaw Overview
#

OpenClaw is an AI assistant framework supporting multiple model providers, including online and local models. Key features:

  • Multiple online model providers (OpenRouter, DeepSeek, etc.)
  • Local models via Ollama
  • Skills system
  • Multi-node deployment

Configuring Online Models
#

OpenRouter
#

Configure OpenRouter as online model provider for access to various open-source and commercial models:

  • openrouter/qwen3.6-plus:free - Free Qwen model
  • openrouter/free - Free model pool
  • deepseek/deepseek-chat - DeepSeek model

Model Configuration
#

In ~/.openclaw/openclaw.json, configure model providers and model lists:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
{
  "models": {
    "providers": {
      "openrouter": {
        "models": ["qwen3.6-plus:free", "free"]
      },
      "deepseek": {
        "models": ["deepseek-chat"]
      }
    }
  }
}

Model Fallback Chain
#

Configure model fallback chain for automatic switching when primary model is unavailable:

  1. openrouter/qwen3.6-plus:free
  2. ollama/qwen3.5-35b-iq2 (local model)
  3. ollama/gemma-4-e4b-q5 (local model)
  4. openrouter/free
  5. deepseek/deepseek-chat

Configuring Local Models
#

Ollama Configuration
#

Ollama runs in Docker container at 100.64.0.3:11434:

1
2
3
4
5
6
7
8
9
services:
  ollama:
    container_name: ollama
    image: ollama/ollama
    ports:
      - "11434:11434"
    volumes:
      - ollama:/root/.ollama
    restart: always

Local Model List
#

qwen3.5-35b-iq2
#

  • Architecture: MoE (Mixture of Experts), 35B total params, ~3B active
  • Quantization: UD-IQ2_XXS, 10.7GB
  • Advantage: Lightweight compute, fits 16GB VRAM
  • Tool calling: Requires RENDERER qwen3.5 + PARSER qwen3.5 in Modelfile

gemma-4-e4b-q5
#

  • Architecture: Dense E4B, 7.5B total, 4.5B effective
  • Quantization: Unsloth Q5_K_M, 6.3GB
  • Advantage: 128K context, native tool calling
  • Note: Requires Ollama v0.20+

Modelfile Configuration
#

Custom GGUF models need RENDERER and PARSER:

1
2
3
FROM ./qwen3.5-35b-iq2.gguf
RENDERER qwen3.5
PARSER qwen3.5

Testing Model Performance
#

Long Context Test
#

Tested gemma-4-e4b-q5 with 128K context:

  • 5/5 needles at 96K tokens
  • Test duration: 51.8s

Reasoning Test
#

Qwen MoE performs better on Einstein riddle, Gemma 4 excels in long context scenarios.

Tool Calling Test
#

  • Qwen 3.5-35b-IQ2: Better structured output and tool use
  • Gemma 4: Good tool calling with long context

Adding Skills
#

deep-read Skill
#

Location: skills/deep-read/

Structured deep reading workflow for books, papers, articles → atomic notes + methods + connections.

cf-fetcher Skill
#

Location: skills/cf-fetcher/

Reduces HTML→Markdown token consumption by 65-80%, best for news sites, blogs, forums.

Browser Automation Skill
#

Location: skills/browser-automation/

For controlling web pages with multi-step flows.

Skill Configuration
#

In ~/.openclaw/openclaw.json, register skills:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
{
  "skills": {
    "deep-read": {
      "location": "skills/deep-read/"
    },
    "cf-fetcher": {
      "location": "skills/cf-fetcher/"
    }
  }
}

Xiaomi MiMo Models
#

Subscribed to Xiaomi token plan ($6/mo, 60M credits):

  • mimo-v2-pro - 1M context, reasoning, credit = 2× token (ctx<256K)
  • mimo-v2-omni - 1M context, multimodal (text+image)
  • mimo-v2-tts - 32K context, TTS, max 1024 tokens

Key Lessons Learned
#

  1. Config source of truth: ~/.openclaw/openclaw.json, NOT ~/.openclaw/agents/main/agent/models.json
  2. MoE models: Key is fitting fully in VRAM, IQ2_XXS acceptable as only ~3B params active
  3. Gemma 4 GGUF: Requires Ollama v0.20+, old versions can’t load
  4. Model fallback: Only triggers on auth failures, rate limits, timeouts, billing errors
  5. Node config: ws:// connections need OPENCLAW_ALLOW_INSECURE_PRIVATE_WS=1
  6. Ollama Modelfile: Custom GGUF must include RENDERER and PARSER

Related Links#

AI Assistant Series - This article is part of a series.
Part 1: This Article