Skip to main content
Every run - from the playground, the API, a schedule, a channel, or an eval - is persisted with its inputs, its output, and the ordered sequence of tool calls and results that produced it.

Traces

A trace is the run’s steps in order: each tool call with its arguments, and the result that came back. It is the same data live and after the fact, so a run you watched stream is replayable later without extra instrumentation.
In the dashboard this is AI Monitoring.

Model calls

Each call the agent makes to its model is recorded too: the model, the graph node that made it, input and output tokens, cost when the provider reports it, how long it took and the time to the first token. A run that loops through four tool calls usually shows five model calls, one per turn. The run detail page in AI Monitoring lists them between the tool calls. Over the API they are llm_call steps, left out unless you ask for them, so clients written before they existed keep working:
A call that failed has result.error instead of usage.

Export to OpenTelemetry

Any run can be exported as an OpenTelemetry trace (OTLP/JSON, GenAI semantic conventions): View OTel or Export OTel on the run page, GET /v1/runs/{id}/otel, or cruqai trace <run-id> --otel. See OpenTelemetry.

Metering

Each run records prompt tokens, completion tokens, total tokens, cost in USD, and wall-clock duration, taken from the provider’s own usage block.
Cost is exact decimal and is carried as a string on the wire - JSON floats cannot represent it faithfully. Every metering field is nullable, and null means unknown. Some providers report no usage block; that is not the same as a run that cost nothing. The CLI prints - rather than $0 so the two cannot be confused, and anything summing these values can tell them apart.
Eval runs carry source = "eval" and are excluded from AI Monitoring and cruqai runs by default. A single model comparison can add hundreds of rows, which would otherwise bury real traffic.

Over the API

Usage is nested under usage on each run: