Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.nusomi.com/llms.txt

Use this file to discover all available pages before exploring further.

Once a session is sealed, you can replay it. Replay re-runs the sequence of events on a fresh state, in one of three modes.

Modes

ModeWhat it doesWhen to use
exactRe-applies every event verbatim — same selectors, same coordinates, same payloads.The UI hasn’t changed. Cheapest, fastest, deterministic.
guidedLLM drives a computer-use loop with the original frames as the goal. Adapts when the UI shifted.The app updated, button moved, copy changed.
partialResumes from a specific frame. Earlier state is restored from the recording.Recovery, training-data verification, branching off a prior run.

Exact replay

const replay = await nusomi.replay.exact(sessionId);
await replay.run();
console.log(replay.status); // "completed" | "diverged" | "failed"
If the underlying UI changed and the replay can’t find the original target, it will mark diverged and stop — it will not silently click the wrong thing.

Guided replay

Guided replay hands the recording to a computer-use model and lets it complete the workflow against the current UI. The recording acts as the goal description and the example of what success looks like.
const replay = await nusomi.replay.guided(sessionId, {
  model: "claude-opus-4-7",
  budget_ms: 5 * 60_000,
  on_step: (step) => console.log(step.action, step.frame_id),
});

await replay.run();
The default model is whatever’s configured for your workspace. You can pass any model that supports computer-use tool calling.

Partial replay

Resume from a specific frame:
// Frame just before the validation error
const failureFrame = (await nusomi.events.query(sessionId, {
  type: "validation_error",
}))[0].frame_id;

const replay = await nusomi.replay.partial(sessionId, {
  from_frame: failureFrame,
  mode: "guided", // or "exact"
});

await replay.run();
Partial replay is the foundation of recovery.

Sandboxes

By default, replay runs in a dry sandbox — the UI is rendered but no network requests escape. To run replay against real systems:
const replay = await nusomi.replay.exact(sessionId, {
  sandbox: "live", // "dry" | "live" | "staging:my-env"
});
live requires the workspace to have replay:live scope on the API key. See scopes.

Replay status

A replay produces a session of its own (call it the replay session) with the same frame/event shape as a regular recording. You can query, replay, or train on replay sessions just like originals — they’re the loop that lets you iterate on a workflow without re-doing it by hand.
const result = await replay.run();
console.log(result.replay_session_id);
const newEvents = await nusomi.events.query(result.replay_session_id);