- Agent steps
- Traces and evals
Agent steps
Traces and evals
See what an agent did in a step, and score its output on every run.
Every agent call leaves a trace: each turn, each tool call, the tokens used. An evaluation adds quality scores to the step’s output. Both appear on the step in the UI.
Trace
| In a trace | Contains |
|---|---|
| Summary | Status, model, duration, token usage, cost when known, number of turns and tool calls |
| Turn | The model’s message, its reasoning when the runtime exposes it, and its tool calls |
| Tool call | Name, arguments, result or error, duration |
In the UI
Select a run, then the agent step, then the Trace tab. While the step is running, turns and tool calls appear live.

A finished agent step: model, tokens, cost, and each turn with its code and tool calls.
In code
The same trace comes back from the call:
result = await agent(text=text)
header = result.trace.header
print(header.status, header.model, header.turn_count, header.tool_call_count)
for turn in result.trace.turns:
print(turn.index, turn.message, [call.name for call in turn.tool_calls])
Evaluations
An evaluation asks questions about the agent’s output after the step succeeds. Each question is a classifier question, so the answer is a probability or a score, not prose. Evaluations only observe: they never change the output or fail the run.
quality = ava.Evaluations(
metrics={
"clear": ava.Metric(
state=lambda ctx: ctx.output.summary,
question={
"type": "score",
"instructions": "How understandable is this summary?",
"criteria": ["Confusing", "Mostly clear", "Clear throughout"],
},
),
"grounded": ava.Metric(
state=lambda ctx: {"document": ctx.inputs.document, "summary": ctx.output.summary},
question={
"type": "noul",
"instructions": "Is every claim in the summary supported by the document?",
},
),
},
)
@ava.agent_step(Summarize, evaluations=quality)
async def summarize(document: str, *, agent: ava.Agent) -> str:
return (await agent(document=document)).outputs.summary
| Part | Meaning |
|---|---|
ava.Metric(state=..., question=...) | state picks what to judge; question is how to judge it. |
ctx.inputs, ctx.output, ctx.trace | What a metric can look at: the agent’s inputs, its outputs, its trace. |
composites={...} | Optional formulas that combine several metrics into one number. |
In the UI
Select a run and the agent step, then the Evaluations tab: one answer per metric.

The 'grounded' metric of this run: 83% likely to be true.
