Camera capture (agent)
Clawdbot supports camera capture for agent workflows:- iOS node (paired via Gateway): capture a photo (
jpg) or short video clip (mp4, with optional audio) vianode.invoke. - Android node (paired via Gateway): capture a photo (
jpg) or short video clip (mp4, with optional audio) vianode.invoke. - macOS app (node via Gateway): capture a photo (
jpg) or short video clip (mp4, with optional audio) vianode.invoke.
iOS node
User setting (default on)
- iOS Settings tab → Camera → Allow Camera (
camera.enabled)- Default: on (missing key is treated as enabled).
- When off:
camera.*commands returnCAMERA_DISABLED.
Commands (via Gateway node.invoke)
-
camera.list- Response payload:
devices: array of{ id, name, position, deviceType }
- Response payload:
-
camera.snap- Params:
facing:front|back(default:front)maxWidth: number (optional; default1600on the iOS node)quality:0..1(optional; default0.9)format: currentlyjpgdelayMs: number (optional; default0)deviceId: string (optional; fromcamera.list)
- Response payload:
format: "jpg"base64: "<...>"width,height
- Payload guard: photos are recompressed to keep the base64 payload under 5 MB.
- Params:
-
camera.clip- Params:
facing:front|back(default:front)durationMs: number (default3000, clamped to a max of60000)includeAudio: boolean (defaulttrue)format: currentlymp4deviceId: string (optional; fromcamera.list)
- Response payload:
format: "mp4"base64: "<...>"durationMshasAudio
- Params:
Foreground requirement
Likecanvas.*, the iOS node only allows camera.* commands in the foreground. Background invocations return NODE_BACKGROUND_UNAVAILABLE.
CLI helper (temp files + MEDIA)
The easiest way to get attachments is via the CLI helper, which writes decoded media to a temp file and printsMEDIA:<path>.
Examples:
nodes camera snapdefaults to both facings to give the agent both views.- Output files are temporary (in the OS temp directory) unless you build your own wrapper.
Android node
User setting (default on)
- Android Settings sheet → Camera → Allow Camera (
camera.enabled)- Default: on (missing key is treated as enabled).
- When off:
camera.*commands returnCAMERA_DISABLED.
Permissions
- Android requires runtime permissions:
CAMERAfor bothcamera.snapandcamera.clip.RECORD_AUDIOforcamera.clipwhenincludeAudio=true.
camera.* requests fail with a
*_PERMISSION_REQUIRED error.
Foreground requirement
Likecanvas.*, the Android node only allows camera.* commands in the foreground. Background invocations return NODE_BACKGROUND_UNAVAILABLE.
Payload guard
Photos are recompressed to keep the base64 payload under 5 MB.macOS app
User setting (default off)
The macOS companion app exposes a checkbox:- Settings → General → Allow Camera (
clawdbot.cameraEnabled)- Default: off
- When off: camera requests return “Camera disabled by user”.
CLI helper (node invoke)
Use the mainclawdbot CLI to invoke camera commands on the macOS node.
Examples:
clawdbot nodes camera snapdefaults tomaxWidth=1600unless overridden.- On macOS,
camera.snapwaitsdelayMs(default 2000ms) after warm-up/exposure settle before capturing. - Photo payloads are recompressed to keep base64 under 5 MB.
Safety + practical limits
- Camera and microphone access trigger the usual OS permission prompts (and require usage strings in Info.plist).
- Video clips are capped (currently
<= 60s) to avoid oversized bridge payloads (base64 overhead + message limits).
macOS screen video (OS-level)
For screen video (not camera), use the macOS companion:- Requires macOS Screen Recording permission (TCC).