Install
Environment variables
Set the following to connect to ClickHouse:Load traces
UseMantaService to query traces for a run:
TraceRow with summary fields like score, status, cost_usd, duration_ms, and turn_count.
Load spans
Load spans for your traces to access messages, tool calls, and grader results:load_spans_for_traces() returns a dict[str, list[SpanRow]] keyed by trace ID.
Use TraceContext
Wrap a trace and its spans in aTraceContext for typed access:
Build a batch analysis
For running an analysis function across every trace in a run, useMapReduceComputation. Define an output schema, a map function, and optionally a reduce function: