AI-22AINew, October 21, 2026
AI Agent Lanes
A lead agent hands work to sub-agents that run side by side. Each gets a lane of tool calls, and you can scrub through the whole run.
Usage
With no props it plays the demo run, with Play and a scrubber. Pass elapsed (seconds since your run started) and it draws the run as it stands instead: no playback controls, each lane's bars growing to the playhead. Leave end off a step while it's running and it pulses until you set it. The answer shows as you pass it, so you can stream it straight in.
"use client";
import { useEffect, useState } from "react";
import AIAgentLanes, { type AgentLane } from "@/components/kokonutui/ai-agent-lanes";
export function RunView({
startedAt,
lanes,
answer,
}: {
/** When the run began, from Date.now(). */
startedAt: number;
/** Your run's lanes; a step has no `end` until it finishes. */
lanes: AgentLane[];
answer: string;
}) {
const [elapsed, setElapsed] = useState(0);
useEffect(() => {
const tick = setInterval(() => setElapsed((Date.now() - startedAt) / 1000), 100);
return () => clearInterval(tick);
}, [startedAt]);
return <AIAgentLanes answer={answer} elapsed={elapsed} lanes={lanes} task="Why do we hit the rate limit?" />;
}With the AI SDK, each sub-agent is usually a tool call: open a step when its part reaches input-available and close it at output-available, using the seconds since the run began.
Here it's fed a run second by second:
PROSlash Command Menu and more like it are in Kokonut UI Pro
Installation
AI Agent Lanes is a free, open-source React component in the Kokonut UI AI collection. Add it with the shadcn CLI, which copies the source into components/kokonutui/ai-agent-lanes.tsx, so the code is yours to change.
npx shadcn@latest add @kokonutui/ai-agent-lanesOr add it by hand: install its packages, then copy the source from Copy code above into components/kokonutui/ai-agent-lanes.tsx.
npm install lucide-react motionProps
taskstringDefault "Where should our 30-person team meet for a May…lanesAgentLane[]Default demo dataThe first lane is the lead; the others are sub-agents it starts.
answerstringDefault demo dataThe lead's final answer. Played back, it types out as the lead's last step runs; live, it shows as you pass it, so stream it straight in.
elapsednumberSeconds since the run started, from your own clock. Pass it to draw a run as it happens; leave it out and the lanes play back on their own.
classNamestringExtra classes for the root element.
AgentLane
idrequiredstringnamerequiredstringstepsrequiredAgentStep[]summarystringOne line the sub-agent hands back to the lead.
AgentStep
toolrequiredToolKindlabelrequiredstringstartrequirednumberSeconds from the start of the run.
endnumberLeave it out while the step is still running.
resultstringWhat came back, shown once the step is done.
ToolKind
type ToolKind = "think" | "search" | "read" | "write";Dependencies
| Needs | Version | Comes from |
|---|---|---|
lucide-react | ^0.556.0 | npm, installed by the CLI |
motion | ^12.23.25 | npm, installed by the CLI |
cn from lib/utils.ts | shadcn init | |
| React | 19 | Your app |
| Tailwind CSS | 4 | Your app |
No provider, font or global CSS to set up: the file works as soon as it lands.

