AI Interface Components

Agent Relay Workspaces

Agent workspaces take turns flipping in with 3D rotation, each running a mock task and handing its output to the next, ending in a combined result.

This is a WebberUI Pro component

The install command below needs a licence to run; without one it returns 401.

How to install Pro components →See the plans →

Stage a multi-agent workflow as a relay race. Across the top is the relay track: the current agent is highlighted and finished agents get a check. The center stage shows the current agent's workspace, with its step log typed out line by line and a progress ring filling on the right. When it finishes, the stage flips in 3D to the next agent while an "output capsule" flies from the old card to the next avatar on the track, then drops into the new card's input slot. After the last leg, a summary card flips in and collects everyone's output. Useful on product pages that explain how a task is split up and who picks up which part.

Bring this into your project

Run this command in your project folder. The CLI adds the source and dependencies; then follow the usage example below.

npx webberui@latest add "https://webberui.com/r/agent-relay-workspaces.en.json?t=<install token>"

New project or installation trouble? Start here →

Playground

Tune the props live — the code snippet updates as you go, so you can dial in the look you want before copying it.

450
600
Active edited usageDefault props
<AgentRelayWorkspaces/>

The complete example includes the preview layout and data. Install the component first, then paste this file into your project.

Installation

npx webberui@latest add "https://webberui.com/r/agent-relay-workspaces.en.json?t=<install token>"

Or, once registries are configured in components.json, install it as @webberui/agent-relay-workspaces.

Usage

import {
  AgentRelayWorkspaces,
  type RelayAgent,
} from "@/components/ui/agent-relay-workspaces";

const agents: RelayAgent[] = [
  {
    id: "collector",
    name: "Collector",
    role: "Data gathering",
    steps: ["Reading transactions from 3 accounts…", "Merging October line items", "Exporting the transaction sheet"],
    output: "286 transactions",
  },
  {
    id: "analyst",
    name: "Analyst",
    role: "Analysis",
    steps: ["Computing revenue and margin", "Comparing with last month", "Producing 2 charts"],
    output: "Revenue analysis + 2 charts",
  },
];

<AgentRelayWorkspaces
  agents={agents}
  result={<p>Month-end report ready: 4 pages, 2 charts</p>}
  onComplete={() => console.log("Relay finished")}
/>;

Props

PropTypeDefaultDescription
agentsRelayAgent[]—Agents in relay order
resultReactNode—Custom content shown at the bottom of the summary card once everyone is done
autoPlaybooleantrueWhether the relay plays automatically; changing it syncs the playing state
lineIntervalnumber450Interval between log lines (ms); also written to --wb-agent-relay-line
handoffDelaynumber600Pause after a workspace finishes, before the handoff (ms)
accentstring—Accent color; falls back to --wb-agent-relay-accent (default #8b5cf6)
indexnumber—Controlled current agent index (0-based; agents.length means done and shows the summary card)
defaultIndexnumber0Initial agent index in uncontrolled mode
onIndexChange(index: number) => void—Called when the current agent index changes (including Restart going back to 0)
onComplete() => void—Called when the last agent finishes and the summary card appears
classNamestring—Passed through to the outermost container

RelayAgent

FieldTypeDefaultDescription
idstring—Unique identifier
namestring—Agent name, shown on the relay track and the workspace header
rolestring—Role description, e.g. "Reconciler"
iconReactNode—Avatar icon; falls back to a default bot icon
stepsstring[]—Steps for the workspace log, typed out one line at a time
outputstring—Output handed to the next agent, shown on the output capsule

RelayAgent and AgentRelayWorkspacesProps are also exported as named types.

How it works

  • Rhythm: a new log line appears every lineInterval. Its status dot spins until the next line appears, then turns into a check. Once every line is done the progress ring is full, and the component waits handoffDelay before handing off. One agent takes roughly (lines + 1) × lineInterval + handoffDelay
  • Flip transition: the stage has perspective: 1200px. The old card rotates rotateY 0 → -90° (ease-in) and the new card 90° → 0 (ease-out), split 280:320. The total duration is read from the CSS variable --wb-agent-relay-flip (default 600ms) so themes can override it
  • Handoff: the output capsule uses a shared layoutId animation (spring stiffness 260, damping 26). It flies from the bottom of the old card to the slot under the next avatar on the track, then drops into the new card's "Input" area once the new card has flipped in. Why three stages: a layoutId can only live in one place at a time, so switching stage by stage gives clean start and end points
  • Look back: clicking a finished agent on the track shows its workspace (in the finished state) and pauses autoplay; press Play, or click the current agent, to return to the running workspace
  • Controlled mode: pass index and onIndexChange to own which leg is running; when the index changes from outside, that agent's progress starts from the beginning
  • CSS variables: --wb-agent-relay-flip (total flip duration), --wb-agent-relay-accent (accent color), --wb-agent-relay-line (log and progress ring transition duration, written from lineInterval)

Accessibility

  • The relay track is a role="tablist"; each agent and the summary is a role="tab", with aria-selected marking the workspace on display. Arrow Left/Right, Home and End move between selectable tabs (roving tabindex); agents whose turn has not come yet are aria-disabled
  • The workspace is a role="tabpanel" linked to its tab with aria-labelledby; the log is role="log" with aria-live="polite", and each line carries screen reader text for done / in progress / waiting
  • Pause/Play and Restart buttons are provided (WCAG 2.2.2 Pause, Stop, Hide); all buttons are type="button" with a focus-visible ring
  • The flipping card uses backface-visibility: hidden, so its mirrored back face never shows
  • When the system "reduce motion" setting is on, workspaces switch with a short crossfade instead of a 3D flip, the output capsule appears directly in the new card instead of flying, and the log shows every step at once (status dots become static icons that still tick to checks at the normal rhythm)