Skip to content

Read a recorded browser session

observeVideo is how Unsurf turns browser footage into a signal an agent can act on.

import { observeVideo } from "unsurf/skills/observe-video";
const result = await observeVideo({
video: "./run.webm",
question: "Did the dashboard load successfully?",
});

It returns:

  • answer
  • confidence
  • evidenceFrames

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
  • ffmpeg + ffprobe
  • Workers AI credentials for the default backends

Prefer bounded questions:

BetterWorse
”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?”