Skip to main content

How tracing works

Every agent run is a trace — a record of inputs, outputs, timing, cost, and the steps in between.
  1. VevalSdk.RunAsync starts a trace, runs your agent, then ships the payload to Veval.
  2. Your agent calls ctx.TrackStepAsync for each LLM call or sub-operation.
  3. The trace appears in your dashboard with full step detail.

RunAsync

Wraps a complete agent invocation. Sends a trace on success or error.

VevalExecutionContext

The context object passed into your agent. Do not instantiate directly — Veval creates it for you.

TrackStepAsync

Records a single step within a trace.

StepHandle metadata keys

handle.SetMeta(key, value) accepts these well-known keys, plus any custom string:

Nested steps

Steps can be nested by passing the StepHandle to a child TrackStepAsync call.
Nested steps appear as a tree in the dashboard, letting you see exactly where time and cost are spent.

Trace-level metadata

Attach arbitrary key/value pairs to the whole trace (not a step):