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

Run detail

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

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

  • open one run from a list or an overview
  • see why a step failed and retry it
  • stop a running run (confirmed once)
  • approve the run's next action with the full step history in view
  • ask or steer the agent while it runs
  • pause, resume or cancel a run

When not to use

  • many agents at a glance — AgentOverview
  • starting a run — TaskBrief

Usage

The live clock, cost and pending approval lead; beside them sit who started whom and every step. Pick a step anywhere and the strip, the tree, the trail and the tool call all follow it. Pass messages and onSend for the Ask panel, where you ask or steer the agent. It replaces LiveSession. For one agent, leave agents out; calls="all" with a trace gives the run detail screen: a one-row bar, the trail and trace, and every call (see the run-detail pattern).

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

export function RunPage({ run, steps, tree }) {
  return (
    <main className="layout-content">
      <RunDetail
        run={run}                // { name, status, elapsed?, cost?, pendingAction?, … }
        steps={steps}            // AgentMonitor steps + agentId, label?, args?, result?, error?
        agents={tree}            // optional: AgentTree root, who started whom
        // calls="all" stacks every started step's call; trace={spans} replaces the step strip
        onApprove={() => approve(run.id)}
        onDeny={() => deny(run.id)}
        onPause={() => pause(run.id)}
        onResume={() => resume(run.id)}
        onCancel={() => cancel(run.id)}
        onStop={() => stop(run.id)}  // running: Stop run, confirmed once
        onRetry={(stepId) => retry(run.id, stepId)}
        messages={messages}      // Ask panel: Chat messages
        onSend={(text) => askOrSteer(run.id, text)}
      />
    </main>
  );
}

Layout

  • calls="selected": left: AgentMonitor (or the compact trace in place of its strip) over the selected step's ToolCallCard (Empty when none); right: AgentTree (with agents) over AgentTrail over the Ask panel; in layout-split--primary
  • calls="all": the AgentMonitor bar across the top; then layout-split--secondary: AgentTree (with agents), the AgentTrail "Steps" and the compact trace on the left, every started step's ToolCallCard on the right. The block heading is screen-reader only (the page's PageHeader names the run)
  • the block is its own inline-size container; below --grid-breakpoint-md (64rem) of block width the columns stack (trail on top), so Ask ends the page; below --grid-breakpoint-sm (40rem) the trace hides

Props

NameTypeRequiredDefaultNotes
runobjectYes—{ name, meta?, status: AgentMonitor status, headline?, headlineNote?, elapsed?, cost?, axis?, pendingAction?, error?, tag? }. What AgentMonitor shows on top; tag goes on the trail title.
stepsarrayYes—AgentMonitor steps plus { agentId, label?, timer?, args?, result?, resultMeta?, error?, attempt? }; status adds "pending" (planned: in the trail, not in the strip). attempt { n, max } shows "Attempt 1 of 3" beside Retry on a failed step's ToolCallCard.
agentsobjectNo—AgentTree root: the orchestrator and its sub-agents. A step's agentId is a node id. Leave it out for one agent: no AgentTree renders.
callsselected | allNoselectedselected: the selected step's ToolCallCard (Empty when none). all: every started step's ToolCallCard in step order, the failed one open (all fold when the run is done); the monitor is the one-row bar, the trail and trace sit on the left, and Retry shows only on the ToolCallCard. Picking a trail step scrolls to its call. The trail uses AgentTrail variant="list" and the calls ToolCallCard variant="panel". calls="all" doesn't render pendingAction, approve/deny (onApprove, onDeny) or the Ask panel (messages, onSend).
tracearrayNo—TraceWaterfall spans { id, label, kind, startMs, endMs?, cost?, failed? }[]. Renders TraceWaterfall compact ("Run trace") in place of the monitor's step strip; hidden below 40rem of block width (time and cost stay in the monitor).
selectedStepIdstringNo—Controlled selected step; null for none.
defaultSelectedStepIdstringNo—Uncontrolled starting step. Default none.
onSelectStepfunctionNo—(stepId | null) => void. From the strip, the trail or a tree node (that agent's open or latest step).
onApprovefunctionNo—() => void. The pending action: ApprovalCard or the waiting agent in the tree.
onDenyfunctionNo—() => void
onPausefunctionNo—() => void. Running runs.
onResumefunctionNo—() => void. Paused runs.
onCancelfunctionNo—() => void. Paused runs: Cancel run.
onStopfunctionNo—() => void. Running runs: Stop run (sm, outline, danger) beside Pause; a kit AlertDialog confirms it once.
onRetryfunctionNo—(stepId) => void. A failed step, from the run, the tree or the tool call.
messagesarrayNo—Chat messages { id?, role: "user" | "assistant", content, timestamp? }[] for the Ask panel. The panel shows when messages or onSend is set.
onSendfunctionNo—(text) => void. The one Ask or steer box.
thinkingbooleanNofalseThe Ask panel shows the kit thinking state.
titlestringNoRun detail—

Built from

  • Block
    →

    Agent overview

    The first screen of an agent workspace: what needs you, every agent's status, and what changed since your last visit.

  • Component
    →

    TaskBrief

    The brief a person hands an agent before it plans: a goal, one-line "done when" checks, optional spend, time and step limits, allowed tools, model and check-in level.

  • Component
    →

    AgentMonitor

    One agent at work: a live clock and running cost lead; finished steps sit in a time strip you can open.

  • Component
    →

    AgentTrail

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