Running Wintermolt
Wintermolt is a single Zig binary: an agentic AI CLI (the MIT/open-source lite version of Wintermute, an OpenClaw-like assistant). Multi-backend (Ollama, Claude, OpenAI-compat, local Metal "kernel"), with tools, MCP, and skills.
Build
zig build # → zig-out/bin/wintermolt (silent on success)
Needs system libcurl + sqlite3 (preinstalled on macOS). Zig 0.15.x
(via zigup at ~/.local/share/zigup/). Cross-compile:
zig build -Dtarget=aarch64-linux-gnu (Jetson/Pi) or x86_64-linux-gnu.
Run + verify (the smoke test)
Single-shot — exercises the full agent loop, exits when done:
./zig-out/bin/wintermolt -e "Reply with exactly: WINTERMOLT OK"
Expected: WINTERMOLT OK on stdout. Two benign stderr lines always appear
([config] Run 'wintermolt --setup'... and [mcp-client] No config...) —
not errors.
REPL — drive it by piping commands (it reads stdin line-by-line):
printf '/stats\n/schedule list\n/quit\n' | ./zig-out/bin/wintermolt
Expected: ASCII banner, stats block (backend/model), jobs list, Goodbye.
Backend requirement
Prompts need an AI backend. Default is Ollama at localhost:11434
(check: curl -s http://localhost:11434/api/tags). No Ollama → set
ANTHROPIC_API_KEY and use /model claude, or expect a backend error.
Slash commands (/stats, /help...) work without any backend.
Other modes
--help (full list), --web (web UI), --gateway (OpenAI-compat server,
port WINTERMOLT_GATEWAY_PORT default 8080), --mcp-server, --chat,
--keys (configure API keys). Kernel backend (/model kernel) is
darwin-arm64 only, loads GGUF weights via llama.cpp/Metal.
Gotchas
- Segfault in
tools.getRelevantDefinitions/ near-null fault address: dangling module-global pointer.AgentLoop.initreturns by value, so pointers into its frame die. Globals insrc/agent/tools.zigmust be re-bound fromselfviaAgentLoop.bindTools()(called in main.zig after init and at the top ofprocessInput). If you add a newtools.setX()global, bind it there — never from a local insideinit. - Build is silent on success;
zig build 2>&1 | tailshows errors only. - The REPL prompt contains ANSI color codes — match on content, not
>.
Source: lupin4/wintermolt — distributed by TomeVault.