Caricamento in corso...
Caricamento in corso...
Last synced: Today, 22:00
Technical reference for the OpenClaw framework. Real-time synchronization with the official documentation engine.
Use this file to discover all available pages before exploring further.
A node is a companion device (macOS/iOS/Android/headless) that connects to the Gateway WebSocket (same port as operators) with
role: "node"canvas.*camera.*device.*notifications.*system.*node.invokeLegacy transport: Bridge protocol (TCP JSONL; historical only for current nodes).
macOS can also run in node mode: the menubar app connects to the Gateway’s WS server and exposes its local canvas/camera commands as a node (so
openclaw nodes …openclaw node runNotes:
WS nodes use device pairing. Nodes present a device identity during
connectrole: nodeQuick CLI:
bashopenclaw devices list openclaw devices approve <requestId> openclaw devices reject <requestId> openclaw nodes status openclaw nodes describe --node <idOrNameOrIp>
If a node retries with changed auth details (role/scopes/public key), the prior pending request is superseded and a new
requestIdopenclaw devices listNotes:
nodes statusnodenode.pair.*openclaw nodes pending/approve/reject/remove/renameconnectopenclaw nodes remove --node <id|name|ip>operator.pairingoperator.pairingoperator.writesystem.runsystem.run.preparesystem.whichoperator.pairingoperator.adminUse a node host when your Gateway runs on one machine and you want commands to execute on another. The model still talks to the gateway; the gateway forwards
exechost=nodesystem.runsystem.which~/.openclaw/exec-approvals.jsonApproval note:
On the node machine:
bashopenclaw node run --host <gateway-host> --port 18789 --display-name "Build Node"
If the Gateway binds to loopback (
gateway.bind=loopbackExample (node host -> gateway host):
bash# Terminal A (keep running): forward local 18790 -> gateway 127.0.0.1:18789 ssh -N -L 18790:127.0.0.1:18789 user@gateway-host # Terminal B: export the gateway token and connect through the tunnel export OPENCLAW_GATEWAY_TOKEN="<gateway-token>" openclaw node run --host 127.0.0.1 --port 18790 --display-name "Build Node"
Notes:
openclaw node runOPENCLAW_GATEWAY_TOKENOPENCLAW_GATEWAY_PASSWORDgateway.auth.tokengateway.auth.passwordgateway.remote.tokengateway.remote.passwordgateway.remote.tokengateway.remote.passwordgateway.auth.*OPENCLAW_GATEWAY_*bashopenclaw node install --host <gateway-host> --port 18789 --display-name "Build Node" openclaw node start openclaw node restart
On the gateway host:
bashopenclaw devices list openclaw devices approve <requestId> openclaw nodes status
If the node retries with changed auth details, re-run
openclaw devices listrequestIdNaming options:
--display-nameopenclaw node runopenclaw node install~/.openclaw/node.jsonopenclaw nodes rename --node <id|name|ip> --name "Build Node"Exec approvals are per node host. Add allowlist entries from the gateway:
bashopenclaw approvals allowlist add --node <id|name|ip> "/usr/bin/uname" openclaw approvals allowlist add --node <id|name|ip> "/usr/bin/sw_vers"
Approvals live on the node host at
~/.openclaw/exec-approvals.jsonConfigure defaults (gateway config):
bashopenclaw config set tools.exec.host node openclaw config set tools.exec.security allowlist openclaw config set tools.exec.node "<id-or-name>"
Or per session:
text/exec host=node security=allowlist node=<id-or-name>
Once set, any
exechost=nodehost=autohost=nodeautotools.exec.host=node/exec host=node ...Related:
Low-level (raw RPC):
bashopenclaw nodes invoke --node <idOrNameOrIp> --command canvas.eval --params '{"javaScript":"location.href"}'
Higher-level helpers exist for the common “give the agent a MEDIA attachment” workflows.
Node commands must pass two gates before they can be invoked:
connect.commandsWindows and macOS companion nodes allow safe declared commands such as
canvas.*camera.listlocation.getscreen.snapshotcamera.snapcamera.clipscreen.recordgateway.nodes.allowCommandsgateway.nodes.denyCommandsPlugin-owned node commands can add a Gateway node-invoke policy. That policy runs after the allowlist check and before forwarding to the node, so raw
node.invokegateway.nodes.allowCommandsAfter a node changes its declared command list, reject the old device pairing and approve the new request so the gateway stores the updated command snapshot.
If the node is showing the Canvas (WebView),
canvas.snapshot{ format, base64 }CLI helper (writes to a temp file and prints
MEDIA:<path>bashopenclaw nodes canvas snapshot --node <idOrNameOrIp> --format png openclaw nodes canvas snapshot --node <idOrNameOrIp> --format jpg --max-width 1200 --quality 0.9
bashopenclaw nodes canvas present --node <idOrNameOrIp> --target https://example.com openclaw nodes canvas hide --node <idOrNameOrIp> openclaw nodes canvas navigate https://example.com --node <idOrNameOrIp> openclaw nodes canvas eval --node <idOrNameOrIp> --js "document.title"
Notes:
canvas present--target--x/--y/--width/--heightcanvas eval--jsbashopenclaw nodes canvas a2ui push --node <idOrNameOrIp> --text "Hello" openclaw nodes canvas a2ui push --node <idOrNameOrIp> --jsonl ./payload.jsonl openclaw nodes canvas a2ui reset --node <idOrNameOrIp>
Notes:
Photos (
jpgbashopenclaw nodes camera list --node <idOrNameOrIp> openclaw nodes camera snap --node <idOrNameOrIp> # default: both facings (2 MEDIA lines) openclaw nodes camera snap --node <idOrNameOrIp> --facing front
Video clips (
mp4bashopenclaw nodes camera clip --node <idOrNameOrIp> --duration 10s openclaw nodes camera clip --node <idOrNameOrIp> --duration 3000 --no-audio
Notes:
canvas.*camera.*NODE_BACKGROUND_UNAVAILABLE<= 60sCAMERARECORD_AUDIO*_PERMISSION_REQUIREDSupported nodes expose
screen.recordbashopenclaw nodes screen record --node <idOrNameOrIp> --duration 10s --fps 10 openclaw nodes screen record --node <idOrNameOrIp> --duration 10s --fps 10 --no-audio
Notes:
screen.record<= 60s--no-audio--screen <index>Nodes expose
location.getCLI helper:
bashopenclaw nodes location get --node <idOrNameOrIp> openclaw nodes location get --node <idOrNameOrIp> --accuracy precise --max-age 15000 --location-timeout 10000
Notes:
Android nodes can expose
sms.sendLow-level invoke:
bashopenclaw nodes invoke --node <idOrNameOrIp> --command sms.send --params '{"to":"+15555550123","message":"Hello from OpenClaw"}'
Notes:
sms.sendAndroid nodes can advertise additional command families when the corresponding capabilities are enabled.
Available families:
device.statusdevice.infodevice.permissionsdevice.healthnotifications.listnotifications.actionsphotos.latestcontacts.searchcontacts.addcalendar.eventscalendar.addcallLog.searchsms.searchmotion.activitymotion.pedometerExample invokes:
bashopenclaw nodes invoke --node <idOrNameOrIp> --command device.status --params '{}' openclaw nodes invoke --node <idOrNameOrIp> --command notifications.list --params '{}' openclaw nodes invoke --node <idOrNameOrIp> --command photos.latest --params '{"limit":1}'
Notes:
The macOS node exposes
system.runsystem.notifysystem.execApprovals.get/setsystem.runsystem.whichsystem.execApprovals.get/setExamples:
bashopenclaw nodes notify --node <idOrNameOrIp> --title "Ping" --body "Gateway ready" openclaw nodes invoke --node <idOrNameOrIp> --command system.which --params '{"name":"git"}'
Notes:
system.runexechost=nodenodesnodes invokesystem.runsystem.run.preparesystemRunPlansystem.notifyplatformdeviceFamilysystem.runsystem.whichgateway.nodes.allowCommandssystem.run--cwd--env KEY=VAL--command-timeout--needs-screen-recordingbash|sh|zsh ... -c/-lc--envTERMLANGLC_*COLORTERMNO_COLORFORCE_COLORenvnicenohupstdbuftimeoutcmd.exe /csystem.notify--priority <passive|active|timeSensitive>--delivery <system|overlay|auto>PATHDYLD_*LD_*NODE_OPTIONSPYTHON*PERL*RUBYOPTSHELLOPTSPS4PATH--envsystem.runSYSTEM_RUN_DENIEDsystem.run~/.openclaw/exec-approvals.jsonWhen multiple nodes are available, you can bind exec to a specific node. This sets the default node for
exec host=nodeGlobal default:
bashopenclaw config set tools.exec.node "node-id-or-name"
Per-agent override:
bashopenclaw config get agents.list openclaw config set agents.list[0].tools.exec.node "node-id-or-name"
Unset to allow any node:
bashopenclaw config unset tools.exec.node openclaw config unset agents.list[0].tools.exec.node
Nodes may include a
permissionsnode.listnode.describescreenRecordingaccessibilitytrueOpenClaw can run a headless node host (no UI) that connects to the Gateway WebSocket and exposes
system.runsystem.whichStart it:
bashopenclaw node run --host <gateway-host> --port 18789
Notes:
~/.openclaw/node.json~/.openclaw/exec-approvals.jsonsystem.runOPENCLAW_NODE_EXEC_HOST=appsystem.runOPENCLAW_NODE_EXEC_FALLBACK=0--tls--tls-fingerprintopenclaw nodes …localhost© 2024 TaskFlow Mirror
Powered by TaskFlow Sync Engine