Skip to content
GitHub (opens in a new tab)

AgentTrail

A vertical step list for a running agent task: done steps with durations, the current step with a live timer, then pending steps.

stableOrganismcontracts/agenttrail.json

Preview

AgentTrail

What an agent did and is doing now. Not Timeline. Not ProgressSteps.

Master

Done steps show their duration, the current step a live timer, pending steps wait below.

Implement login rate limit

feat/rate-limit
1/1
  1. Read auth module2s

    Running

Usage

AgentTrail logs one agent run. AgentPlan shows what it intends to do; AgentFleet shows many agents. Approvals go in an ApprovalCard next to the trail, not inside it.

Do's

  • show what an agent already did and is doing now
  • a run log next to a chat or an ApprovalCard
  • a step that waits for approval inside a longer task

Don'ts

  • what the agent intends to do before it runs — AgentPlan
  • a project roadmap of now / next / later — Timeline
  • wizard steps a person fills in — ProgressSteps
  • many agents at once — AgentFleet
<AgentTrail
  title="Implement login rate limit"
  icon="GitPullRequest"
  tag="feat/rate-limit"
  steps={steps}
/>

When to use

  • show what an agent already did and is doing now
  • a run log next to a chat or an ApprovalCard
  • a step that waits for approval inside a longer task

When not to use

  • what the agent intends to do before it runs — AgentPlan
  • a project roadmap of now / next / later — Timeline
  • wizard steps a person fills in — ProgressSteps
  • many agents at once — AgentFleet

What an agent reads

import { AgentTrail } from "agentic-ds-kit";
must
  • section aria-labelledby the h3 title
  • with header={false} there is no h3: the section takes aria-label={title} instead, so it stays named
  • steps are an ordered list
  • the running or approval step has aria-current=step
  • each step names its status for screen readers; icons are aria-hidden
  • counter reads "Step 3 of 5"
  • the running spinner rotates on transform only and stops under prefers-reduced-motion
  • with onSelectStep, each step's label and sublabel are one button with aria-pressed
defaults
  • variant rail
  • header true
stops if
  • Do not invent a local AgentTrail, RunLog, or StepList
  • Do not use Timeline or ProgressSteps for an agent run
  • Do not use raw hex for status colors
  • Do not put actions in the trail; approvals go in ApprovalCard
  • AgentTrail has no loading or error prop: while its data loads or fails, render kit Skeleton, LoadError or Empty in its place

From contracts/agenttrail.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——
stepsarrayYes—{ id, label, status: "done" | "running" | "approval" | "pending" | "failed", duration?, timer?, sublabel? }[]. duration for finished steps, timer for the running or approval step, sublabel for the tool call in mono.
iconKitIconNo—Lucide icon before the title.
tagstringNo—Small neutral mono tag after the title, e.g. a branch.
progressobjectNo—{ current, total } overrides the counter. Default: first unfinished step over the step count. A failed step with a later done step (its retry passed) counts as finished and is not the current step.
selectedStepIdstringNo—Selected step id; its button shows the selected ring and aria-pressed.
onSelectStepfunctionNo—(id | null) => void. Makes each step a button; selecting the selected step again passes null.
variantrail | listNorailrail: steps on a connecting line with the status word under each label. list (RunDetail calls="all"): plain rows 8 inside and 4 apart, no line and no status line; the done time or the status word sits on the right, the counter reads "2 of 4", the selected row fills with a strong hairline, and below 25rem of trail width the tool name hides.
headerbooleanNotruefalse hides the h3 title and the counter, for a trail under a heading of its own (CitedAnswer trail). The section is then named by aria-label={title}.
  • Component
    →

    AgentPlan

    What an agent intends to do, before or during a run.

  • Component
    →

    Timeline

    Vertical sequence of now, next, and later for ordered multi-stage work.

  • Component
    →

    ProgressSteps

    Ordered wizard steps as numbered circles with a connecting line and a status word under each label: Done, Current, Upcoming, Error, or Optional.

  • Component
    →

    CitedAnswer

    An assistant reply with inline citation marks that preview their passage in a hover card, and sources folded into one pill with site icons.