Ballmac UI home

Agent Lanes

New

A swimlane timeline for multi-agent runs: one lane per agent, steps coloured by what they are doing, dashed handoffs between lanes, a Now line and a detail panel, all reachable with the arrow keys.

v1.0.0Updated Oct 24, 2026Ships with a test
What changed
PlannerBreaks down the task
ResearcherFinds what already exists
CoderWrites the change
ReviewerChecks the result
  • Planner hands over to Researcher at 0:40
  • Researcher hands over to Coder at 1:46
  • Coder hands over to Reviewer at 3:56
  • Thinking
  • Using a tool
  • Waiting
  • Blocked
  • Done

Fixes a failing testThinking

Coder · 3:08 3:52 · 0:44

Hands over to Reviewer. (diff)

Installation

$ pnpm dlx shadcn@latest add @ballmac/agent-lanes

Usage

import { AgentLanes, formatClock } from "@/components/ballmac/agent-lanes"

The full example is in the Code tab above.

Examples

Waiting and blocked

TriageSorts incoming reports
FixerPrepares a patch
On-call engineerApproves risky changes
  • Triage hands over to Fixer at 0:30
  • Fixer hands over to On-call engineer at 1:40
  • Thinking
  • Using a tool
  • Waiting
  • Blocked
  • Done

Needs write accessBlocked

Fixer · 1:36 2:30 · 0:54

The patch touches the payments module, which this agent is not allowed to change without a person's approval.

API reference

PropTypeDefault
lanes*

One row per agent, each with its steps in time order.

Lane[]—
handoffs

Where one agent hands work to another. Drawn as a dashed connector and listed in words.

Handoff[][]
duration

Length of the run in seconds. The axis ends here. Defaults to the end of the last step.

number—
now

Where the run is now, in seconds. Draws a "Now" line.

number—
selected

The selected step id. Controlled.

string | null—
defaultSelected

The selected step id for uncontrolled use.

string | nullnull
onSelectedChange

Called when a step is selected.

(id: string) => void—
formatTime

Turns seconds into text for the axis and the panel. Defaults to m:ss.

(seconds: number) => stringformatClock
minTrackWidth

Wider values make the chart scroll sideways earlier on small screens. Rem.

number34

Also accepts the standard attributes of its root element.

Accessibility

KeyAction
TabMoves into the chart once, onto one step; the rest are reached with the arrow keys
ArrowRight / ArrowLeftNext or previous step in the same lane (swapped in right-to-left)
ArrowDown / ArrowUpThe closest step in the lane below or above
Home / EndFirst or last step in the lane; with Ctrl, in the whole chart
Enter / SpaceSelects the step and shows its detail in a polite live region
Screen readersEach step reads its label, lane, kind and time range; handoffs are also listed as sentences

Use with AI

lanes is [{ id, name, role?, segments: [{ id, start, end, kind, label, detail? }] }] with times in seconds; kind is thinking | tool | waiting | blocked | done. handoffs is [{ from, to, label? }] using segment ids. Optional duration, now, selected / defaultSelected / onSelectedChange, formatTime. With the shadcn MCP server set up (guide), ask your agent:

Add the Ballmac UI Agent Lanes (@ballmac/agent-lanes) to this project with the shadcn MCP, then use it where it fits.

Use it for

  • Showing what several agents did and when, and who handed work to whom
  • Finding the step where a run waited or got blocked

Not for

  • One agent's linear steps; use trace
  • A plan with checkable steps; use agent-plan
  • A project schedule; use the gantt block

Registry JSON: https://ui.ballmac.com/r/agent-lanes.json

Credits

Free to use in personal and commercial projects.

Ballmac UI Pro

Need the whole screen, not one piece?

150 premium blocks (dashboards, settings, calendars, mail, shops, onboarding), a private shadcn registry and Figma tokens. Blocks that show data come with loading, empty and error states built in.

Not ready? Try three Pro blocks free

Leave your email and the blocks appear right here, ready to copy. Yours to use in any project.