Skip to content

Replay Evaluations with the VB-OS Node.js SDK

Replay re-executes a prior evaluation against its original boundary snapshot and evidence artifact. The result is deterministic: identical inputs produce identical outputs.

const result = await client.replay(projectId, evaluationId);

This is a convenience shorthand that delegates to client.evaluations.replay().

const result = await client.evaluations.replay(projectId, evaluationId);

Both calls are equivalent. The top-level replay method exists for convenience.

Parameter Type Description
projectId string Project ID
evaluationId string ID of the evaluation to replay
import { VBOSClient } from '@vb-os/sdk';
const client = new VBOSClient({
apiKey: process.env.VBOS_API_KEY,
});
// List recent evaluations
const evals = await client.evaluations.list('proj_abc123');
// Replay the first one
const replay = await client.replay(
'proj_abc123',
evals.items[0].id,
);
console.log(replay);

The evaluations namespace provides additional methods for working with evaluation records:

Method Description
list(projectId, opts?) List evaluations with pagination
get(projectId, evaluationId) Get evaluation detail
export(projectId, kwargs) Export evaluation data
share(projectId, evaluationId) Create a share link
getShared(token) Retrieve a shared evaluation