Extreme Thinking
nullclaw

2026-04-14


做一下筆記安裝 nullclaw 過程

不要抓線上的 exe ,那會有權限問題,且有 bug,搞了權限後,ollama 不能 work ……

我用 win11 ,自己編譯 ,安裝 git , zig(0.15.2),要設定好 path 任何地方都可呼叫的到。

cd D:\zig-x86_64-windows-0.15.2
git clone https://github.com/nullclaw/nullclaw.git
cd nullclaw
zig build -Doptimize=ReleaseSmall
zig build test --summary all

裝好複製出 D:\zig-x86_64-windows-0.15.2\nullclaw\zig-out\bin\nullclaw.exe

我用 nullclaw onboard –interactive

選 ollama 貼上 gemma4:e2b

選 channel 的 TG , 貼上 bot 及自己ID 及房間號

啟動測試 nullclaw agent ,然後問問題,看工作管理員的 記憶體是否有被吃了,就知道是否有呼叫 模型

寫 winsw 的 XML

<service>
  <id>nullclaw-gateway</id>
  <name>NullClaw Gateway</name>
  <description>NullClaw AI Agent Gateway Service</description>

  <executable>C:\nullclaw\nullclaw.exe</executable>
  <arguments>gateway</arguments>

  <workingdirectory>C:\nullclaw</workingdirectory>

  <!-- 告訴 nullclaw 去哪裡找 config -->
  <env name="USERPROFILE" value="C:\Users\echochio"/>
  <env name="HOME" value="C:\Users\echochio"/>

  <logmode>rotate</logmode>
  <log mode="roll-by-size">
    <sizeThreshold>10240</sizeThreshold>
    <keepFiles>5</keepFiles>
  </log>

  <startmode>Automatic</startmode>
  <delayedAutoStart>true</delayedAutoStart>

  <onfailure action="restart" delay="10 sec"/>
  <onfailure action="restart" delay="30 sec"/>
  <onfailure action="none"/>

  <resetfailure>1 hour</resetfailure>
</service>

啟動看 log 沒問題去 TG 測試,這個 gemma4:e2b 沒 tools 別問需要 tools 的工作

可以回貼圖問問題,文字問題。 debug 就看記憶體是否有吃,基本上感覺很滿意。

我也加了 group_allow_from

          "allow_from": [
            "614572543",
            "8415476452",
            "-4721338359",
            "-5127732671"
          ],
          "group_allow_from": [
            "614572543",
            "8415476452",
            "-4721338359",
            "-5127732671"
          ],

網頁搜尋加了

  "http_request": {
    "enabled": true,
    "max_response_size": 1000000,
    "timeout_secs": 30,
    "allowed_domains": [],
    "proxy": null,
    "search_base_url": null,
    "search_provider": "duckduckgo",
    "search_fallback_providers": []
  },

換了下模型發現還是 google 好用

  "agents": {
    "defaults": {
      "model": {
        "primary": "ollama/gemma4:e2b"
      },

      "routing": {
        "vision": "ollama/gemma4:e2b",
        "browser": "ollama/gemma4:e2b",
        "tools": "ollama/gemma4:e2b"
      },

      "tools": true,
      "browser": true,
      "vision": true
    }
  },

記憶體夠CPU 慢不會timeout 這是極大的優點