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

Run / Handoffs

One multi-agent run as a whole page: a lane per agent, the handoffs between them, and the approval that needs you.

What a screen is

A screen is a whole page exported from the kit, built only from kit components and tokens. Import it once, pass your data and callbacks, and render it as the page: it brings its own nav and <main>, and its loading and empty states are built in. A pattern is the copy-in version you own and change; a block is one area that sits inside your <main>.

When to use

  • one multi-agent run as its own page: who did what, who handed what to whom, and what waits on you
  • a run with an approval gate before deploy or publish
  • you want the whole page done, with loading and empty states, and only need to pass data and callbacks

When not to use

  • one agent's steps, tool calls and Ask — start from the run-detail pattern (RunDetail)
  • every agent at a glance — AgentOverview
  • only the lanes inside another page — RunLanes

Usage

One multi-agent run as a whole page: a lane per agent with task cards linked by their handoffs, an approval gate before deploy, and every handoff in a table with Approve on the one that needs you. Import it once, pass the run, its agents and handoffs, and your callbacks; the lanes' popovers, Stop run, loading skeletons and the empty state come with it.

<RunHandoffsScreen run={run} agents={agents} handoffs={handoffs} onApprove={approve} onReject={reject} onStop={stop} onSelectTask={openTask} onNavigate={go} workspace={{ name: "Northwind" }} user={{ name: "Alex Morgan", email: "alex@northwind.example" }} />
import { RunHandoffsScreen } from "agentic-ds-kit";

export default function RunPage({ run, agents, handoffs, loading }) {
  // The screen renders its own app nav and <main>: don't wrap it in another main.
  return (
    <RunHandoffsScreen
      run={run}                          // { title, status, tasks: [{ id, agentId, title, kind?, status, next? }] }
      agents={agents}                    // one lane each: { id, name, role?, icon?, person? }
      handoffs={handoffs}                // newest first: { id, from, to, what, state, at, taskIds? }
      loading={loading}                  // Skeleton lanes and rows
      empty={handoffs?.length === 0}
      onApprove={(handoffId) => approve(handoffId)}
      onReject={(handoffId) => reject(handoffId)}
      onStop={() => stopRun(run.id)}     // after the AlertDialog
      onSelectTask={(taskId) => setOpenTask(taskId)}
      onNavigate={(to) => router.push(`/${to}`)}
      workspace={{ name: "Northwind" }}
      user={{ name: "Alex Morgan", email: "alex@northwind.example" }}
    />
  );
}

Props

RunHandoffsScreen props, from the screen contract.
PropTypeDefaultNotes
runobject—{ title: string, status: "running" | "waiting" | "done" | "failed" | "stopped", tasks: RunLanesTask[] } The run: PageHeader title, the status line, and the RunLanes tasks (cards, gate, start and end). Sample run when omitted.
agentsarray—{ id, name, role?, icon?, person?: { src?, initials? } }[] One lane each, top to bottom; also the From and To cells. person shows a kit Avatar (You). Sample agents when omitted.
handoffsarray—{ id, from, to, what, state: "needs-you" | "waiting" | "handed-over" | "in-progress" | "failed", at, taskIds?: string[] }[] Newest first. from and to are agent ids. needs-you highlights the row and puts Reject and Approve on it; list its gate in taskIds so the gate's popover acts on it too. The chevron opens the last of taskIds in the lanes. Sample handoffs when omitted.
onApprovefunction—(handoffId) => void. Approve on the needs-you row (the page's one solid primary), or in the gate's popover.
onRejectfunction—(handoffId) => void. Reject on the needs-you row, or in the gate's popover.
onStopfunction—() => void. Stop run (outline neutral, shown while running or waiting), after a kit AlertDialog confirms it.
onSelectTaskfunction—(taskId | null) => void. A card or gate opened or closed in the lanes, or a row's chevron.
onNavigatefunction—(destination) => void. destination is "overview" | "agents" | "runs" | "workflows" | "tools" (app nav rows; All runs in the … menu is "runs").
workspaceobject—{ name: string, icon?: KitIcon } App nav brand (and the Drawer title below --grid-breakpoint-md). Same shape as SettingsPreferencesScreen. Example workspace when omitted.
userobject—{ name: string, email?: string, src?: string } Account menu at the foot of the app nav (kit DropdownMenu: the avatar on the rail, the account card in the Drawer, both with src as the photo and an online presence mark; the menu holds View profile, Account settings, Documentation, Switch account with a sample second account, Add account and Sign out, all samples that only close the menu except Account settings, which goes to a Settings row when the screen has one). Same shape as SettingsPreferencesScreen. Example person when omitted.
loadingbooleanfalseNav and PageHeader title stay; RunLanes shows Skeleton lane headers and cards; the Table shows Skeleton rows; main is aria-busy. No Stop run.
emptybooleanfalseNo handoffs yet: the lanes keep the agents and the start mark, and kit Empty (no-data) "No handoffs yet" stands where the table goes. Also shown when handoffs is [].
classNamestring—On the root layout-shell.

States

  • page: default, loading, empty, live
  • run: waiting (a gate needs you: highlighted row with Reject and Approve), running (live: a running card, planned cards dashed, an In progress row), done, failed or stopped (no Stop run)
  • task: done, running, failed, waiting, pending (planned)
  • nav: SideNav (wide), Drawer (below --grid-breakpoint-md)

Accessibility

  • Renders its own <main> (named Run: <title>); the app SideNav is an aside named App. Don't wrap the screen in another main
  • PageHeader title is the page h1; the lanes are a section with a visually hidden h2
  • The lanes have a text equivalent: an ordered list of lanes, each a list of that agent's tasks named with title, status word and duration
  • Each card opens a kit Popover (a named dialog that takes focus and closes on Escape back to the card)
  • Approve and Reject are named by what they approve ("Approve deploy", "Reject deploy") on the row and in the gate's popover
  • State is never colour alone: status icons and words on cards, a word and icon in every State Badge, dashed planned cards
  • Each chevron is named "Show <what> in the lanes"; it scrolls the card into view and opens its popover
  • Stop run confirms in a kit AlertDialog
  • Below --grid-breakpoint-md the nav opens from an IconButton named Menu into a kit Drawer; picking a row closes it
  • loading sets aria-busy on main and the Skeletons say Loading run lanes once
  • No motion of its own; the chevron scroll is instant and the running icon stops under prefers-reduced-motion

Responsive

  • Wide: SideNav on the canvas, the page on the inset panel (layout-shell--inset)
  • Below --grid-breakpoint-md: the page alone; the nav moves into a left kit Drawer
  • When the run is wider than the page (below about 900px for the sample), the lanes scroll sideways with the lane headers pinned
  • Below 480px of table width each handoff row stacks into two lines (Table stack); Reject and Approve wrap under the text
  • Dark mode follows the root theme; semantic tokens only

Do not

  • Do not copy the screen's parts into a local cousin; change it through its props or compose RunLanes and Table yourself
  • Do not wrap it in an app shell or another main
  • Do not add a second solid primary Button; Approve on the needs-you row is the only one
  • Do not colour lanes per agent
  • Do not stop a run without the AlertDialog
  • Do not use raw hex

Built from

  • Block
    →

    Run detail

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

  • Pattern
    →

    Run detail

    One agent run: a status bar with time and cost, the step trail and trace, and every tool call with Retry on the failed one.

  • 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
    →

    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.