Skip to content
GitHub (opens in a new tab)

ParallelAttempts

The same task run by several models or approaches, one row each: watch them race, use the best one, and the others fade and fold in place into one line you can open to pick again.

stableOrganismcontracts/parallelattempts.json

Preview

ParallelAttempts

Several models or approaches on one task, one row each. Keep the best one.

Master

Each row shows the live step while it runs, then the result in the same place, with status, progress as text, cost and time. Use this one marks the winner; the other rows fade and fold where they stand into one line you can open to pick again, and Undo takes the pick back.

Summarise the Q3 churn report

  • Opus 5.5

    claude-opus-5-5

    Reading the report

    Running…0%

  • Sonnet 5.5

    claude-sonnet-5-5

    Reading the report

    Running…0%

  • Haiku 5.5

    claude-haiku-5-5

    Reading the report

    Running…0%

Usage

Pass every attempt with its status (running, done or failed); picked is not a status, it comes from picked or defaultPicked. Only done attempts offer Use this one, an outline neutral button, so the page keeps its one solid primary. Progress shows as text beside Running; pass the live step as summary while it runs and the result once it settles. Only live changes move: Running shimmers, a finished check draws, the first to finish gets a quiet First badge (Picked replaces it on the winner), and a pick folds the others. One polite live region says only finished, failed and picked. Translate the words with KitLabelsProvider (useThisOne, attemptPicked, attemptFirst, otherAttempts, discard, undo).

Do's

  • several models or prompts race on one task and a person keeps one result
  • comparing approaches to one agent task as they run, then choosing
  • a pick that must stay reversible: undo or choose another attempt

Don'ts

  • rewinding one run and retrying from a step — AgentCheckpoints
  • agents handing work to each other in one run — RunLanes
  • an A/B test with traffic split and a metric — ExperimentCard
  • choosing the model before a run — ModelPicker
  • an agent asking the person to choose mid-run — DecisionCard
<ParallelAttempts
  title="Summarise the Q3 churn report"
  icon="FileText"
  attempts={attempts}
  picked={picked}
  onPick={setPicked}
  onDiscard={discard}
/>

When to use

  • several models or prompts race on one task and a person keeps one result
  • comparing approaches to one agent task as they run, then choosing
  • a pick that must stay reversible: undo or choose another attempt

When not to use

  • rewinding one run and retrying from a step — AgentCheckpoints
  • agents handing work to each other in one run — RunLanes
  • an A/B test with traffic split and a metric — ExperimentCard
  • choosing the model before a run — ModelPicker
  • an agent asking the person to choose mid-run — DecisionCard

What an agent reads

import { ParallelAttempts } from "agentic-ds-kit";
must
  • section aria-labelledby the h3 title; the attempts are a list, one row each, and each item is labelled by its h4 attempt label
  • status is a word with an icon (Running, Done, Failed from KitLabels running, runDone, runFailed), never colour alone; marks are aria-hidden
  • "Use this one" and Discard are named with their attempt through aria-labelledby, e.g. "Use this one Opus 5.5"
  • the "N other attempts" line is a button with aria-expanded and aria-controls naming the folded rows; a folded row is hidden from the accessibility tree and the tab order
  • after a pick focus moves to the winner's Undo; after Undo it returns to that attempt's "Use this one"
  • one polite role=status live region announces only an attempt finishing ("Opus 5.5: Done"), failing ("…: Failed") and being picked ("…: Picked"), on live changes; never on first load, progress, the first mark or Undo
  • motion only on live changes, never on first load: Running shimmers, a finished attempt draws its check (.strokeDraw), the first to finish gets a quiet First badge (KitLabels attemptFirst) that fades in and gives way to Picked if it wins, and on a pick the winner stays put while the other rows fade to opacity.400 and fold in place with the shared glide. prefers-reduced-motion keeps every state change plain
defaults
Nothing extra in the contract.
stops if
  • Do not invent a local AttemptCard, CompareGrid or model race view; this is the piece
  • Do not make "Use this one" a solid primary; the page keeps its one
  • Do not offer "Use this one" on running or failed attempts
  • Do not show progress as a bar or after an attempt settles
  • Do not colour failed attempts with a fill; danger goes on the mark and word only
  • Do not use raw hex
  • ParallelAttempts has no loading or error prop: while its data loads or fails, render kit Skeleton, LoadError or Empty in its place

From contracts/parallelattempts.json: must is the a11y requirements, defaults the prop defaults, stops if the doNot rules where the agent asks instead of inventing a cousin.

Props

NameTypeRequiredDefaultNotes
titlestringYes—The shared task, e.g. "Summarise the Q3 churn report". The h3 that names the section.
iconKitIconNo—Bare Lucide icon before the title, 8 (space.2) from it. No tile.
attemptsarrayYes—{ id, label, model?, status: "running" | "done" | "failed", progress?, summary?, cost?, duration? }[] in display order, one row each. label is the model or approach; model shows in mono beside it. progress (0–100) shows as text ("62%") beside Running, never a bar. summary is one line: while running pass the live step ("Reading the report"), once settled the result or the error; it changes in place (one line while running, up to two after). cost and duration are caller-formatted strings, in mono after the status on the line under the summary. Picked is not a status: it comes from picked / defaultPicked.
pickedstring | nullNo—Controlled id of the winner; null for none. Only a done attempt counts; any other id shows no pick.
defaultPickedstring | nullNo—Uncontrolled first pick. Default none.
onPickfunctionYes—(id) when "Use this one" (KitLabels useThisOne, outline neutral sm, the main action) is pressed on a done attempt; (null) on Undo (KitLabels undo, ghost neutral sm on the winner). After a pick the winner keeps its row and shows a Picked badge (KitLabels attemptPicked); the other rows fade to opacity.400 and fold where they stand, and a ghost "N other attempts" line (KitLabels otherAttempts, KitLabels showLess when open) opens them again, each keeping "Use this one" to pick again.
onDiscardfunctionNo—(id) => void. Discard (KitLabels discard, ghost neutral sm) on done and failed attempts that are not the winner. The caller removes the attempt. Left out, no Discard shows.
  • Component
    →

    AgentCheckpoints

    A run timeline of checkpoints: rewind to one and start a new attempt; the replaced attempt stays faded under it.

  • Component
    →

    RunLanes

    One multi-agent run as swimlanes: one lane per agent or person, task cards in step columns (done, running, failed, waiting, planned), elbow connectors for every handoff, an approval gate, start and end marks, and a kit Popover per card with badges, duration, agent, description and From / To.

  • 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).

  • Component
    →

    ModelPicker

    Choose which model an agent or chat uses: grouped by vendor, with context window and cost tier, recommended models, and disabled models that keep their reason.