Loading component…
Loading component…
A shared view of agent activity, hierarchy 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 MissionControl from ./mission-control.
import { MissionControl, type MissionAgent, type MissionEvent } from "@/components/ui/mission-control";
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,
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 <MissionControl 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?, 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 | |
| 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 fleet – update its status in your data | |
| onRetry | (agent: MissionAgent) => void | Retry for a failed agent, from its inbox card or its card in the fleet | |
| onDismiss | (agent: MissionAgent) => void | Dismiss for a failed agent, from its card in the fleet – it then counts as done | |
| title | string | "Mission control" | Heading above it all |
| className | string | Extra class on the root |
Follows its own width: below 860px the inbox goes under the fleet, as tall as it needs
The fleet shows the open lead's sub-agents beside it while there's room, and under it when there isn't
Dark mode built in: switches when an ancestor (usually <html>) has the class dark or data-theme="dark"