Agent runs
You showed it once. Did the agent do it the way you showed it? Record the run, and the review answers that: what it did, where it deviated, what is worth a second look, and whether somebody should check the result before relying on it.
Recording a run
The recorder attaches to a Playwright page or context your code already has. It drives nothing and, if it cannot attach, your agent carries on: a recorder that can break the agent it watches is not worth installing.
const run = await attach(context, {
apiKey: process.env.SCENERECAP_API_KEY,
runName: "nightly refund run",
agentName: "Ava",
video: "context",
referenceRecordingId, // optional: how a person does it
});
run.logIntent("open the refunds queue"); // optional, as often as you like
// …your agent does its thing…
await run.finish({ outcome: "success" });Video needs a context created with Playwright’s recordVideo, which only the code that creates the context can do, so video: "context" is the only setting there is and the recorder goes where your code creates the context. If your framework makes its own context, create one yourself with recordVideo and hand it over. finish() closes the context, because that is when Playwright writes the video file. The package is not published to npm yet, so it runs from a checkout of the repository; examples/agent-recorder has a runnable version of the above.
No Playwright? Upload the video from the dashboard and tick This is an AI agent run. An uploaded file carries no click trail, so the review reads the screen only and the report says so.
What is recorded, and what never is
- Clicks, as the role and accessible name of the control that was clicked (“clicked Approve”): its label, never the text of whatever happened to be on screen around it.
- Navigations as paths. No query strings, no fragments, no full URLs.
- Console errors and warnings, with every URL’s query stripped out of the text. Pass
console: falseto leave them out altogether. - Failed requests, and the page’s title and heading when it loads.
- Any intent you log, verbatim, so the review can put what it said next to what it did.
- Never typed text. A field the page marks sensitive produces a marker and nothing else, and so does a click inside an editable area, which is the same rule our extension and widget follow.
The review
- A verdict: completed, completed with deviations, failed, or unclear. “Unclear” is a real answer and gets used when the recording does not say.
- Flags worth a second look, each with the second it happened at: a risky action (something submitted, sent, paid, published or deleted), sensitive data on screen, going in circles, a long idle, console and request failures, an unfinished task, or leaving the site.
- A trust note: one sentence on whether a person should check the result.
- The comparison, when you give it a reference recording: which of your steps it matched, skipped, reordered or added. It lines up the two click trails, so the reference needs one of its own; if it has none, the review says that instead of guessing. Skipping a step of the flow you showed it caps the verdict at “with deviations”, whatever else the review found.
Your own verdict sits next to the machine’s. Approve or reject with a comment, and both are shown on the recording and its share page. They are never merged: the feature exists so a person can disagree.
What this is not
- It is not a trace viewer. It reads a recording and an event log, not your agent’s prompts, tool calls or tokens. If you need those, your framework’s own tooling is the right place.
- It does not watch your agent live or stop it. It reviews a run that already happened.
- The flags are grounded in what the recording shows. An agent that did something harmful off-screen, or in another tab we were not attached to, is not something this can see.
- A recording of an agent run is labelled as one everywhere it appears, cannot be re-driven by the Repro Agent, and never enters the public gallery.