affectUI › Screens › App screens

Agent / Run Detail

One agent run, step by step – thinking, tool calls with their app's logo, sub-agents and failures as tinted bars on one time axis that grow while it runs, live time, cost and tokens on top, and each step on the right with what went in and what came out.

Part of affectUI Pro. Install: npx shadcn@latest add https://www.affectui.com/r/agent-run-detail.json · Import from @/components/ui/agent-run-detail

When to use

  • Showing what an agent did in one run – which steps, in which order, how long each took and what it cost
  • Following a run live as it happens, and stopping it
  • Finding the step that failed or was slow, and seeing exactly what went in and came out

When not to use

  • Every run of an agent over time – use Agent / Activity or Usage
  • Many agents working at once – use Agent / Orchestration
  • A trace as a component on its own – use Trace Waterfall

Usage

import { AgentRunDetailScreen } from "@/components/ui/agent-run-detail";

export default function Page({ run, elapsed }) {
  return (
    <AgentRunDetailScreen
      run={run}                  // the steps with start and duration in seconds
      elapsed={elapsed}          // while it runs: seconds since it started – bars grow, numbers count
      onStop={() => api.stop(run.id)}
      onRerun={() => api.rerun(run.id)}
      onNavigate={(label) => router.push(routes[label])}
    />
  );
}

Props

NameTypeDefaultDescription
run{ id; title; agent: { id; name; color }; model; startedAt; total?; steps: { id; label; kind: "llm" | "tool" | "agent"; start; duration?; depth?; app?; agent?; failed?; error?; tokens?: { in; out }; cost?; input?; output? }[] }The run. start and duration are seconds from the start; a step without a duration is still running. app shows its logo before a tool call, agent the sub-agent's pixel mark; depth 1 puts a step under the sub-agent that took it. total is how long the whole run took – leave it out while it runs
elapsednumberSeconds since the run started – pass it while the run is live: steps appear as they begin, running bars grow with a sheen, a blue line marks now and the numbers count. Without it the run is shown as finished
defaultOpenstring | null"write"The step open on the right when the screen starts
onStop() => voidCalled with Stop while the run is live
onRerun() => voidCalled with Rerun once it is done
loadingbooleanGray rows and bars under the real axis, and the panel as gray lines in its own layout
emptybooleanA run without any steps yet
onNavigate(label: string) => voidCalled with the label of a sidebar item
classNamestringExtra class on the root

Keyboard

  • J / K / ↑ / ↓: From step to step
  • Enter: Open the step on the right

Accessibility

  • Each step is a button named with what it was, its kind, its app and how long it took – or that it runs or failed
  • A polite live region says whether the run is running and how many steps it has
  • Input and output keep their line breaks and can be copied; rings show for the keyboard only

Responsive

  • The trace uses the full width; the axis picks a round step for runs of any length, and a time near the right edge moves before its bar
  • Below 640px the label column narrows and the four numbers sit two by two; below 480px each step's name sits over its bar
  • Dark mode built in: switches when an ancestor (usually <html>) has the class dark or data-theme="dark"

Requirements

  • React 19
  • @hugeicons/react
  • @hugeicons/core-free-icons
  • App Shell (installed with it)

Related

  • Trace Waterfall – Where the time and money of an agent run go – every LLM call, tool call and sub-agent as a bar on a live timeline, with tokens and cost per step, the slowest call marked and branches that fold into their parent
  • Agent / Agents – Your team of agents in one place – calm cards with each agent's pixel mark, role, status tag and the apps it may use, its model, runs and spend; an agent opens on the right with its runs, instructions, skills, apps and recent tasks, and New agent draws the mark as you type
  • Agent / Inbox Board – Every background task your agents work on, as a board – Needs you, Running, Done – with cards that open on the right to approve, retry or open, and glide to their new column when their state changes
  • Agent / Activity – What your agent did – every step as a sentence with its app's logo, the task and who let it (on its own or you approved), grouped by day; Undo while it can be taken back draws a line through it, and each step says why it could and what Undo does