Screencast Recording
Record agent-browser sessions using WebSocket streaming.
Workflow
- •
Open browser with streaming enabled:
bashAGENT_BROWSER_STREAM_PORT=9223 agent-browser open <url> --headed
- •
Dry run first: Execute all actions without recording to validate the scenario works. Use
agent-browser snapshotto find element refs if needed. - •
Once validated, close browser and reopen fresh for recording.
- •
Start recording (blocking command - maintains WebSocket + ffmpeg pipe):
bashagent-screencast start [output.mp4]
Note: Use Bash tool with
run_in_background: trueto avoid blocking. - •
Perform actions with pauses for natural pacing:
bashagent-browser click "button" sleep 1 agent-browser scroll down sleep 2 agent-browser click "link"
- •
Stop recording:
bashagent-screencast stop
Output saved to ~/share/screencasts/.
Tips
- •Add
sleep 1-3between actions for human-like pacing - •Wait after page loads to show content
- •Pause before important clicks so viewers can follow
- •Scroll to reveal results when relevant: scroll down to show content, then back up before next action
- •Chain commands with
&&for smoother execution:agent-browser fill "e13" "query" && sleep 2 && agent-browser scroll down - •Use
agent-browser fill ref ""to clear input fields before new searches - •Use element refs (e.g.
e13) from snapshot rather than CSS selectors for reliability
Notes
- •Requires
AGENT_BROWSER_STREAM_PORT=9223when launching browser - •
--headedrequired: headless has no visible window to capture - •
agent-screencast startblocks untilstopis called (WebSocket + ffmpeg pipe) - •Uses WebSocket stream + ffmpeg
- •Default resolution: 1280x720
- •Script:
bin/agent-screencast