Skip to Content
Components

Agent lanes

Several agents working in parallel, each with its own lane and hand-offs.

Agent lanes show several agents working side by side, each in its own lane and hue — its badge, its step track, its Working tag and its stretch of the relay line that joins the badges. A working lane breathes, shimmers and fills its next step; a handoff opens a line between two lanes and runs a light down the relay line from the sender's badge to the taker's, and the stretch it crossed stays lit. Each lane takes a name, an icon, a tone, a status, the activity it is on, how many steps the track is cut into and how many are done, and an optional log the row opens to.

Preview
3 agents working0:000 of 9 steps

Usage

<!-- include core.css + agent-lanes.css -->
<div class="aln panel" data-c="agent-lanes">
  <div class="aln-h">
    <span class="aln-ic"><!-- users --></span>
    <span class="aln-t">3 agents working</span>
    <span class="aln-m muted num">0:00</span>
    <span class="aln-ct num">0 of 9 steps</span>
    <button class="pill soft sm aln-pause"><!-- pause -->Pause all</button>
  </div>
  <div class="aln-rows"><!-- lanes are built by agent-lanes.js --></div>
</div>

Properties

NameTypeDescription
lanesAgentLane[]The agents, each in its own lane and hue.
titlestringHeader text. Defaults to "N agents working", "All agents paused" or "All N agents finished".
secondsnumberSeconds to show as m:ss. Leave it out to let the header count while agents work.
pausedbooleanWhether every agent is paused. Working lanes then show Paused and the clock stops.
onPausedChange(paused) => voidAdds the Pause all / Resume button, until every lane is done.
handoffAgentHandoffThe hand-off to show. Clear it and its line slides away; the stretch it crossed stays lit.
expandedstring[]Keys of the lanes that are open. Leave it out to let each row toggle itself.
barebooleanSits flat in a chat thread (the default). Set false to give it a card of its own.
lane.namestringThe agent's name, like "Researcher".
lane.iconIconNameThe glyph on the agent's badge.
lane.toneblue | purple | green | orange | red | yellow | pink | tealThe lane's hue. Defaults to blue.
lane.statusqueued | waiting | working | paused | doneworking breathes and fills its next step; done fills the badge with its hue.
lane.activitystringWhat the agent is on, or what it waits for. Crossfades on change and shimmers while working.
lane.stepsnumberHow many steps the track is cut into. Defaults to 3.
lane.donenumberHow many steps are finished. The next one fills while the agent works.
lane.progressnumberHow far through the step in hand, 0 to 1. Leave it out and that step fills part way.
lane.log{ text; time? }[]What the agent did, shown when the lane is opened. New entries slide in.
handoff{ from; to; what }One agent passing work to another down the relay line.

Theming

Works in light and dark (data-theme="dark") and in the Soft style (data-style="soft"). Each lane's hue comes from the theme's agent palette tokens (--dm-pb, --dm-pl, --dm-pm …) with a livelier "mark" variant for its track, line and finished badge, so the lanes stay 3:1 against the surface; in dark mode the agent colours are light already and are used as they are. In the Soft style the lanes are rounder and the tracks are hatched rather than washed.

On this page