Loading component…
Loading component…
A live timeline of agent activity, recent events and work that needs your attention.
To reuse this local React demo, copy all files from the Code tab into the same folder, then import MissionTimeline from ./mission-timeline.
import { MissionTimeline, type MissionAgent, type MissionEvent } from "@/components/ui/mission-timeline";
const agents: MissionAgent[] = [
{
id: "support", name: "Support lead", model: "Sonnet 5.5", status: "running", task: "Answer the open tickets",
started: Date.now() - 29 * 60_000, tasks: [{ id: "queue", title: "Answer 38 tickets", status: "running", start: Date.now() - 29 * 60_000 }],
children: [
{ id: "billing", name: "Billing", status: "failed", task: "Refund $240 to Acme Corp", error: "The card on file expired" },
],
},
];
const events: MissionEvent[] = [
{ id: "e1", agent: "billing", at: Date.now() - 3 * 3_600_000, kind: "failed", title: "Refund to Acme Corp" },
];
export function Home() {
return <MissionTimeline agents={agents} events={events} since={Date.now() - 8 * 3_600_000} onRetry={(agent) => retry(agent.id)} />;
}| Name | Type | Default | Description |
|---|---|---|---|
| agents | MissionAgent[] | The agents and their sub-agents – each { id, name, model?, avatar?, status, task, ask?, error?, cost?, started?, ended?, tools?, tasks?, children? }. A waiting agent's ask and a failed agent's error land in the inbox | |
| since | number | When you last looked (epoch ms) – the curve on top starts here | |
| now | number | The clock for running times and the end of the curve – defaults to now | |
| span | number | 30 minutes | How far back the lanes reach, ms |
| filter | "all" \| "running" \| "waiting" \| "failed" | Controlled filter – picks agents by status (Needs you counts the agents that ask and the ones that failed); the curve, the middle and the inbox show only them | |
| defaultFilter | MissionFilter | "all" | Uncontrolled start |
| onFilterChange | (filter: MissionFilter) => void | Called when another filter is picked | |
| onApprove / onReject | (agent: MissionAgent) => void | An answer to a waiting agent, from its inbox card or its card in the lanes – update its status in your data | |
| onRetry | (agent: MissionAgent) => void | Retry for a failed agent, from its inbox card | |
| title | string | "Mission timeline" | Heading above it all |
| className | string | Extra class on the root |
Follows its own width: below 860px the inbox goes under the lanes, as tall as it needs
The lanes keep one clock for all agents – names sit in a fixed column, the blocks on the time axis beside them
Dark mode built in: switches when an ancestor (usually <html>) has the class dark or data-theme="dark"