Documentation Index
Fetch the complete documentation index at: https://docs.veval.dev/llms.txt
Use this file to discover all available pages before exploring further.
How tracing works
Every agent run is a trace — a record of inputs, outputs, timing, cost, and the steps in between.VevalSdk.RunAsyncstarts a trace, runs your agent, then ships the payload to Veval.- Your agent calls
ctx.TrackStepAsyncfor each LLM call or sub-operation. - The trace appears in your dashboard with full step detail.
RunAsync
Wraps a complete agent invocation. Sends a trace on success or error.| Parameter | Type | Description |
|---|---|---|
agentName | string | Identifies the agent in the dashboard |
callback | Func<VevalExecutionContext, Task<T>> | Your agent logic |
input | object? | Arbitrary input stored on the trace |
VevalExecutionContext
The context object passed into your agent. Do not instantiate directly — Veval creates it for you.| Member | Description |
|---|---|
TraceId | Unique ID for this run (tr_...) |
Input | The input passed to RunAsync |
TrackStepAsync(...) | Records a step |
SetMetadata(key, value) | Attaches trace-level metadata |
TrackStepAsync
Records a single step within a trace.StepHandle metadata keys
handle.SetMeta(key, value) accepts these well-known keys, plus any custom string:
| Key | Type | Description |
|---|---|---|
model | string | Model name (e.g. claude-sonnet-4-6) |
tokens_in | int | Input token count |
tokens_out | int | Output token count |
cost_usd | decimal | Cost in USD |
type | string | Step type — use "tool" for tool calls |
| (custom) | object | Any other key stored in step metadata |
Nested steps
Steps can be nested by passing theStepHandle to a child TrackStepAsync call.
Nested steps appear as a tree in the dashboard, letting you see exactly where time and cost are spent.