Skip to main content

What Veval does

Veval wraps your agent runs and LLM calls to record traces: inputs, outputs, step timing, token counts, and cost. Traces appear in the dashboard. You run scenarios and assertions against them in CI to catch regressions before they reach production. Three SDKs, same concept: C# (Veval.Sdk), Python (veval), Node (@veval/sdk).

Install


Initialize

C#
Python
Node

Core API

RunAsync — wrap a complete agent run

C#
Python
Node
Sends a trace on both success and error. The ctx object is a VevalExecutionContext.

TrackStepAsync — record one LLM call or sub-operation

Simple overload (no metadata):
C#
Python
Node
Handle overload (attach LLM metadata):
C#
Python
Node
StepHandle well-known keys (all SDKs use the same string keys):

Nested steps

Pass the parent handle’s context to nest steps in the dashboard tree:
C#
Python
Node

Trace-level metadata

C#
Python
Node

Replay / Test SDK

VevalTestSdk is a drop-in test double. It mocks LLM step outputs from a recorded trace so no real API calls are made. Throws if a step name isn’t found in the trace (strict mode).
C#
Python
Node

ReplayAsync (lower-level)

C#
Python
Node

Assertions

All assertions implement ITraceAssertion. They return null on pass or a failure string. Built-in factory — all three languages: Custom assertion:
C#
Python
Node

Scenarios

Run your agent against multiple inputs and post pass/fail to the dashboard.
C#
Python
Node
ScenarioItem fields: name (string), input (any), trace_id (string) — provide either input (live LLM) or trace_id (mocked replay), not both. assertions is always an array (can be empty). Pass items: null / omit items to fetch them from the dashboard by scenarioName.

Snapshots

Detect structural regressions by comparing step shape against a pinned golden trace.
C#
Python
Node
SnapshotDiff fields (same names in all SDKs): has_changes (bool), added_steps (string[]), removed_steps (string[]), order_changes (string[]).

Naming convention cheat sheet