Loading component…
Loading component…
This component has not been implemented locally yet.
To reuse this local React demo, copy all files from the Code tab into the same folder, then import AgentRun/Handoffs from ./agent-handoffs.
import { AgentHandoffsScreen } from "@/components/ui/agent-handoffs";
export default function Page() {
return (
<AgentHandoffsScreen
title="Ship the billing fix"
runId="1284"
lanes={lanes} // [{ id, name, kind?: "person" | "agent" | "tool", role?, logo?, color?, description? }]
tasks={tasks} // [{ id, lane, title, kind?, after?, status?, duration?, detail?, output?, at? }]
step={currentStep}
onApprove={(task) => approve(task.id)}
onReject={(task) => reject(task.id)}
onStop={() => stopRun()}
/>
);
}| Name | Type | Default | Description |
|---|---|---|---|
| title | string | "Ship the billing fix" | The run's name in the head |
| runId | string | Its number, in the breadcrumb and the menu | |
| lanes | SwimLane[] | A lane per person, agent and tool – see Handoff Swimlanes | |
| tasks | ArhTask[] | The tasks in order – a Swimlanes task plus output (what the next one gets, shown as what changed hands) and at (when it started) | |
| steps | { done; active; waiting? }[] | The run step by step, as lists of task ids – the sample plays them and holds at an approval | |
| step | number | Pins the run to one step instead of playing it – pass your live state here | |
| onApprove / onReject | (task) => void | An approval decided – from the flagged row in the history or the diamond's card | |
| onStop | () => void | Stop run | |
| loading | boolean | Gray head, lanes and rows | |
| empty | boolean | The run hasn't started – a note in place of the diagram | |
| workspace | string | "Northwind" | The workspace in the sidebar |
| onNavigate | (label: string) => void | Called with the label of a sidebar item | |
| className | string | Extra class on the root |
The diagram shows whole and the handoffs fill the rest of the page; drag the line between them to give the handoffs more room – the lanes then scroll inside
The table drops its state column on narrower screens, and what changed hands on phones; an opened row stacks its two sides
On phones a flagged row's Approve and Reject go full width; the diagram scales down to fit its card
Dark mode built in: switches when an ancestor (usually <html>) has the class dark or data-theme="dark"