Configuration
PhysiClaw reads its settings from one file, ~/.physiclaw/config.toml, and almost
everything has a sane built-in default — the only thing you must set is which model to run.
Edit the file with physiclaw config edit (it’s created from a commented template the first
time), or change one key at a time with physiclaw config set. Changes apply on the next
physiclaw server start.
Settings layer in a fixed order, first match wins:
CLI flag > env var > config.toml > built-in defaultSo a --port flag beats PHYSICLAW_MODEL in the environment, which beats the file, which
beats the shipped default. Delete a key from the file to fall back to the default; an unknown
section or key fails loudly on load (the CLI points you at physiclaw config edit to fix it).
The one you must set: [agent]
Section titled “The one you must set: [agent]”[agent]model = "anthropic/claude-sonnet-4-6"model is a provider/model ref: the first segment picks the engine + provider, the
second is the model id passed to that provider verbatim. There is no universal default — an
empty model means “use the PHYSICLAW_MODEL env var, then fail loudly.” The easiest way to
set it is physiclaw models use <provider/model>, which validates the ref first.
Provider keys: [provider]
Section titled “Provider keys: [provider]”One API key per provider, by id:
[provider]anthropic_api_key = "sk-ant-…"openai_api_key = ""qwen_api_key = ""moonshot_api_key = ""google_api_key = ""deepseek_api_key = ""An empty string means “fall back to the matching env var” — ANTHROPIC_API_KEY,
OPENAI_API_KEY, QWEN_API_KEY, and so on. The env var always wins over the file.
Pointing a provider at a proxy: [providers.<id>]
Section titled “Pointing a provider at a proxy: [providers.<id>]”To send a built-in provider through a proxy or alternate endpoint (e.g. Moonshot’s .ai vs
.cn), set a base_url override:
[providers.moonshot]base_url = "https://api.moonshot.ai/v1"Server: [server]
Section titled “Server: [server]”[server]port = 8048host = "0.0.0.0"save_tool_calls = false # dump every peek/screenshot outputsave_snapshots = false # dump every raw camera framesave_screenshots = false # dump every raw phone-own screenshotport and host are also exposed as physiclaw server --port / --host, and the three
save_* flags as --save-tool-calls and friends — the flag overrides the file for that run.
The save_* options are debugging aids; leave them off in normal use.
Camera: [camera]
Section titled “Camera: [camera]”[camera]width = 1920height = 1080fourcc = "MJPG"The resolution and pixel format PhysiClaw requests from the camera. MJPG matters on Windows:
the default uncompressed mode snaps to 640×480 over USB, and switching to MJPG-compressed is
what lets a single USB cable carry 1080p. Drivers round to their nearest supported mode, so the
actual size is whatever the camera reports on the first frame.
Agent knobs
Section titled “Agent knobs”These tune the built-in agent. The defaults are tuned for real-world use — touch them only if you know why.
[engine]max_turns = 300 # runaway safeguard for one sessionmax_attempts = 3 # retries on a provider errorwait_default_minutes = 15 # default WAIT-then-recheck interval
[memory]default_log_entries = 20 # on-demand read_logs default size (max 200)bootstrap_log_entries = 10 # daily-log lines preloaded at every wake
[retention]trace_days = 7 # purge window for trace logs + cron job history[engine] is the agent’s runaway-safeguard, retry, and pacing budget for its tool-call loop.
[memory] controls how much of the daily log the agent preloads and reads on demand.
[retention] sets how long on-disk trace logs and cron history are kept.
When the model is a claude-code/… ref
Section titled “When the model is a claude-code/… ref”If [agent] model starts with claude-code/, PhysiClaw drives the external claude CLI as a
subprocess, and [claude] applies to it:
[claude]timeout_seconds = 180max_attempts = 3Skills: [skills]
Section titled “Skills: [skills]”[skills]default_source = "" # e.g. "physiclaw/PhysiClaw"The default git source for physiclaw skills install. Empty means you must pass --from each
time. Accepts owner/repo shorthand or a full git URL.
Inspecting the effective config
Section titled “Inspecting the effective config”physiclaw config show # merged config as TOML, keys maskedphysiclaw config get engine.max_turnsshow reflects everything after layering — defaults plus your overrides — so it’s the source
of truth for what the server will actually use.