Read a recorded browser session
observeVideo is how Unsurf turns browser footage into a signal an agent can act on.
The shape
Section titled “The shape”import { observeVideo } from "unsurf/skills/observe-video";
const result = await observeVideo({ video: "./run.webm", question: "Did the dashboard load successfully?",});It returns:
answerconfidenceevidenceFrames
Where it fits
Section titled “Where it fits”Use observeVideo when:
- you recorded a browser run and need a compact answer
- another agent needs to inspect what happened without reading raw footage
- a loop needs a machine-readable success signal
Requirements
Section titled “Requirements”ffmpeg+ffprobe- Workers AI credentials for the default backends
Better questions
Section titled “Better questions”Prefer bounded questions:
| Better | Worse |
|---|---|
| ”Did the page land on the authenticated dashboard?" | "What happened?" |
| "Was the submit button clicked?" | "Summarize everything." |
| "Did an error banner appear?" | "Was it good?” |