Skip to content
GitHub (opens in a new tab)
AgentsBlock

Eval suite

Test a candidate agent version against the baseline, case by case, before you ship it.

What a block is

A block is a kit component for a whole area of a screen, built only from other kit components and tokens. You import it like any component; nothing is copied into your app. Put it inside your page’s <main>: it brings no header or nav of its own.

When to use

  • a new prompt, model or tool change must not break cases that passed before
  • a person decides whether to promote a candidate agent version
  • each failing case needs both outputs side by side

When not to use

  • a live traffic split between variants — ExperimentCard
  • reviewing the files an agent changed — ChangeReview
  • one run's steps and metrics — RunDetail

Usage

Pass rate, cost and latency sit side by side and each change says Better or Worse, regressions come first, and each case opens with its input, both outputs as a split diff and the grader's note. Promote stays disabled, with the reason beside it, until every regression is reviewed.

import { EvalSuite } from "agentic-ds-kit";

export function EvalPage({ run }) {
  return (
    <main className="layout-content">
      <EvalSuite
        title="Support agent: v13 vs v12"
        baseline={{ label: "v12", metrics: run.baseline }}   // { passRate, avgCost, p50LatencyMs }
        candidate={{ label: "v13", metrics: run.candidate }}
        cases={run.cases}       // { id, name, tags?, dataset?, input, baseline, candidate, graderNote?, accepted?, flagged? }[]
        status={run.status}     // "running" | "done" | "error"
        progress={run.progress} // 0–1 while running
        onAcceptExpected={(id) => acceptAsExpected(run.id, id)}
        onFlag={(id) => flagCase(run.id, id)}
        onRerun={() => rerun(run.id)}
        onPromote={() => promote(run.candidateId)}
      />
    </main>
  );
}

Layout

  • header with the versions line, then the Scoreboard full width, the view and filters, the cases table and the Promote footer
  • the block is its own inline-size container and takes the full width; the DataTable scrolls sideways inside its frame on narrow screens

Props

NameTypeRequiredDefaultNotes
titlestringNoEval runPass a real title, e.g. "Dunning agent: v3 vs v2"; the default is a fallback.
baselineobjectYes—{ label, metrics: { passRate (0–1), avgCost, p50LatencyMs } }, e.g. label "v12".
candidateobjectYes—Same shape as baseline, e.g. label "v13".
casesarrayYes—{ id, name, tags?, dataset?, input, baseline: { result: "pass" | "fail" | "error", output, score?, cost? }, candidate: same, graderNote?, accepted?, flagged? }[]. A regression passed in baseline and not in candidate; accepted or flagged counts it as reviewed. Rows show Score change as "−0.42 of 1" (scores are 0–1), Cost change in currency and a Review column (To review / Accepted / Flagged) for regressions. Tags filter and show in the Drawer, not as a column.
viewregressions | improvements | allNo—Uncontrolled (starts on regressions) when omitted. Each view label carries its count. Rows sort regressions, errors, improvements, rest.
onViewChangefunctionNo——
onPromotefunctionNo—Promote <candidate>, the one solid primary; disabled while running, after an error or while regressions are unreviewed, with the reason as the footer text beside it ("3 cases that passed in v2 don't pass in v3. Accept the new output or flag each one to promote.").
onRerunfunctionNo—Re-run, outline.
onAcceptExpectedfunctionNo—(id) => void from the case Drawer. Set accepted on the case.
onFlagfunctionNo—(id) => void from the case Drawer. Set flagged on the case.
statusrunning | done | errorNodonerunning shows a Progress with "Running n of N cases"; error a danger Alert.
progressnumberNo00–1 while running.
errorMessagestringNoThe run stopped before every case finished.—
currencystringNoUSD—

Built from

  • Component
    →

    ExperimentCard

    A compact A/B or A/B/n experiment: status in words, the metric and traffic split under each variant's value ("paid within 7 days · 50%"), a confidence note in plain words and one decision (Ship winner, Stop, Extend, Start).

  • Block
    →

    Change review

    Review an agent's change file by file, then accept or reject each file, or the rest at once.

  • Block
    →

    Run detail

    One agent run on one screen: clock, cost, pending approval and every step, all following the step you pick.

  • Component
    →

    Scoreboard

    Metrics strip of kit Scorecards: two to six figures, and the only metric picker.