Loading component…
Loading component…
Where every agent is right now – a live timeline with a lane per agent, tasks growing into “now”, hand-offs drawn between agents and approvals right on the block.
To reuse this local React demo, copy all files from the Code tab into the same folder, then import AgentLanes from ./agent-lanes.
import { AgentLanes, type LaneAgent, type LaneTask } from "@/components/ui/agent-lanes";
const agents: LaneAgent[] = [
{ id: "research", name: "Researcher", model: "Opus 5.5" },
{ id: "writer", name: "Writer", model: "Sonnet 5.5" },
];
export function AgentRoom({ tasks }: { tasks: LaneTask[] }) {
return (
<AgentLanes
agents={agents}
tasks={tasks} // { id, agentId, title, status, start, end?, handoffTo?, ask? }
onApprove={(task) => api.approve(task.id)}
onReject={(task) => api.reject(task.id)}
onOpen={(task) => router.push(`/runs/${task.id}`)}
/>
);
}| Name | Type | Default | Description |
|---|---|---|---|
| agents | LaneAgent[] | One lane each: { id, name, model?, avatar? }. A logo as avatar sits on a white tile; without one the initials show. Free agents get an Idle tag, waiting ones Needs you | |
| span | number | 30 minutes | How much time the lanes show, in ms |
| now | number | A clock you control, e.g. a faster one for a demo. Without it the lanes follow real time, every second | |
| onApprove / onReject | (task: LaneTask) => void | Approve or Reject on a waiting task. Without handlers the lanes change the status themselves | |
| onOpen | (task: LaneTask) => void | Shows an Open link in the tooltip of a block that doesn't wait | |
| title | string | "Agents" | Heading in the bar |
| className | string | Extra class on the root |
Fills its container up to 760px
Below 520px the names column shrinks to the avatars
Dark mode built in: switches when an ancestor (usually <html>) has the class dark or data-theme="dark"