Loading component…
Loading component…
All your background agent tasks in one calm list – live status tags, filter tabs, and rows that unfold to the last steps with Approve, Reject, Retry or Open
To reuse this local React demo, copy all files from the Code tab into the same folder, then import AgentInbox from ./agent-inbox.
import { AgentInbox } from "@/components/ui/agent-inbox";
export function Tasks() {
return (
<AgentInbox
tasks={[
{
id: "migrate",
title: "Migrate users table",
description: "Split users into accounts and profiles. The dry run on staging passed.",
agent: "Opus 5.5",
status: "waiting",
startedAt: Date.now() - 6 * 60_000,
tools: 14,
sources: 9,
steps: [
{ label: "Dry run on staging – no errors", time: "2m ago" },
{ label: "Wants to run it on production", time: "1m ago" },
],
},
{ id: "notes", title: "Release notes v2.4", agent: "Sonnet 5.5", status: "running", startedAt: Date.now() - 80_000 },
{ id: "digest", title: "Weekly metrics digest", agent: "Haiku 5.5", status: "done", elapsed: 252_000 },
]}
/>
);
}| Name | Type | Default | Description |
|---|---|---|---|
| tasks | AgentTask[] | { id, title, description?, agent, status, startedAt?, elapsed?, tools?, sources?, steps? } – status is "running", "waiting", "done" or "failed"; steps are { label, time? }, oldest first | |
| onApprove | (task: AgentTask) => void | Approve on a waiting task. Without it the task turns running inside the board | |
| onReject | (task: AgentTask) => void | Reject on a waiting task. Without it the task turns failed | |
| onRetry | (task: AgentTask) => void | Retry on a failed task. Without it the task runs again and its clock starts over | |
| onOpen | (task: AgentTask) => void | Shows an Open button on running and done tasks | |
| title | string | "Agent inbox" | Heading on the left of the bar, after "Agents /" |
| action | { label: string; onClick: () => void } | A button in the bar next to the layout switch, e.g. New task | |
| view | "board" \| "list" | Controlled layout | |
| defaultView | "board" \| "list" | "board" | Starting layout when uncontrolled |
| onViewChange | (view: AgentInboxView) => void | Called when Board or List is picked | |
| className | string | Extra class on the root |
Three columns from about 620px; narrower containers always get the list and hide the switch – it works down to 300px
Touch screens: taller cards and buttons
Dark mode built in: switches when an ancestor (usually <html>) has the class dark or data-theme="dark"