Real-World Vision: Camera Capture for Your OpenClaw Agents
I have often hit a wall when trying to give an agent “eyes.” It is one thing for an agent to process text or logs, but getting it to see what is happening in the physical world usually involves a mess of custom scripts and permission headaches. I want my agent to just see a room or a document without me building a bridge from scratch every time.
OpenClaw makes this simple by treating the camera as a standard node command. Whether you are using a phone or a laptop, you can pull photos and video clips directly into your workflow.
What You’ll Need
Section titled “What You’ll Need”- An iOS node, Android node, or macOS app paired via Gateway.
- OpenClaw CLI installed on your machine.
- Active foreground access (the app must be open and visible on the device).
- Camera permissions granted in the device settings.
Quick Start
Section titled “Quick Start”The fastest way to get media is through the CLI helper. It handles the heavy lifting of decoding the data and saving it to a file you can actually use.
1. Check your settings
Section titled “1. Check your settings”Before running commands, make sure the camera is enabled in the app settings.
- iOS/Android: These are usually on by default.
- macOS: This is off by default. Go to Settings → General → Allow Camera to toggle it on.
2. Snap a photo
Section titled “2. Snap a photo”I recommend using the CLI helper because it automatically saves the image to a temporary path. On iOS, the default command captures both front and back cameras so your agent gets a full view of the environment.
# Capture from both cameras (iOS default)openclaw nodes camera snap --node <id>
# Capture a specific sideopenclaw nodes camera snap --node <id> --facing front
# Capture on macOS with a delay for focusopenclaw nodes camera snap --node <id> --delay-ms 20003. Record a video clip
Section titled “3. Record a video clip”If a still image isn’t enough, you can grab a short MP4. The system caps these at 60 seconds to keep the file size manageable.
# Record a 3-second clip with audioopenclaw nodes camera clip --node <id> --duration 3000
# Record without audioopenclaw nodes camera clip --node <id> --no-audio4. Record the macOS screen
Section titled “4. Record the macOS screen”If your agent needs to see what is happening on the desktop rather than through the lens, use the screen recording command. This requires the macOS Screen Recording permission.
openclaw nodes screen record --node <id> --duration 10s --fps 15Troubleshooting
Section titled “Troubleshooting”If things aren’t working, it is usually a permission or focus issue. Here are the errors you might see:
CAMERA_DISABLED: The user has toggled the camera off in the OpenClaw settings tab.NODE_BACKGROUND_UNAVAILABLE: The app is in the background. OpenClaw only allows camera access when the app is in the foreground.*_PERMISSION_REQUIRED: On Android, you must accept the system-level OS prompts forCAMERAorRECORD_AUDIO.- Payload limits: If you are building a custom integration, remember that photos are recompressed to stay under 5 MB.
If you need help setting up your specific environment, check out the AI Setup Assistant.
What’s Next
Section titled “What’s Next”OpenClaw Expert
Still stuck?
If this page didn't answer your case, ask OpenClaw Expert for step-by-step guidance.