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.
Top-Level Method
Section titled “Top-Level Method”const result = await client.replay(projectId, evaluationId);This is a convenience shorthand that delegates to client.evaluations.replay().
Evaluations Namespace
Section titled “Evaluations Namespace”const result = await client.evaluations.replay(projectId, evaluationId);Both calls are equivalent. The top-level replay method exists for convenience.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
projectId |
string |
Project ID |
evaluationId |
string |
ID of the evaluation to replay |
Example
Section titled “Example”import { VBOSClient } from '@vb-os/sdk';
const client = new VBOSClient({ apiKey: process.env.VBOS_API_KEY,});
// List recent evaluationsconst evals = await client.evaluations.list('proj_abc123');
// Replay the first oneconst replay = await client.replay( 'proj_abc123', evals.items[0].id,);
console.log(replay);Related Methods
Section titled “Related Methods”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 |
