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.
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>"Playground
Tune the props live — the code snippet updates as you go, so you can dial in the look you want before copying it.
<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
| Prop | Type | Default | Description |
|---|---|---|---|
agents | RelayAgent[] | — | Agents in relay order |
result | ReactNode | — | Custom content shown at the bottom of the summary card once everyone is done |
autoPlay | boolean | true | Whether the relay plays automatically; changing it syncs the playing state |
lineInterval | number | 450 | Interval between log lines (ms); also written to --wb-agent-relay-line |
handoffDelay | number | 600 | Pause after a workspace finishes, before the handoff (ms) |
accent | string | — | Accent color; falls back to --wb-agent-relay-accent (default #8b5cf6) |
index | number | — | Controlled current agent index (0-based; agents.length means done and shows the summary card) |
defaultIndex | number | 0 | Initial 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 |
className | string | — | Passed through to the outermost container |
RelayAgent
| Field | Type | Default | Description |
|---|---|---|---|
id | string | — | Unique identifier |
name | string | — | Agent name, shown on the relay track and the workspace header |
role | string | — | Role description, e.g. "Reconciler" |
icon | ReactNode | — | Avatar icon; falls back to a default bot icon |
steps | string[] | — | Steps for the workspace log, typed out one line at a time |
output | string | — | 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 waitshandoffDelaybefore handing off. One agent takes roughly (lines + 1) ×lineInterval+handoffDelay - Flip transition: the stage has
perspective: 1200px. The old card rotatesrotateY0 → -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(default600ms) so themes can override it - Handoff: the output capsule uses a shared
layoutIdanimation (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: alayoutIdcan 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
indexandonIndexChangeto 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 fromlineInterval)
Accessibility
- The relay track is a
role="tablist"; each agent and the summary is arole="tab", witharia-selectedmarking the workspace on display. Arrow Left/Right, Home and End move between selectable tabs (roving tabindex); agents whose turn has not come yet arearia-disabled - The workspace is a
role="tabpanel"linked to its tab witharia-labelledby; the log isrole="log"witharia-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 afocus-visiblering - 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)
Generate-and-Pick Flow
Prompt, skeletons, then a row of generated results slides in for the user to pick one that expands for confirmation — the standard flow for image and video generators.
Tool Permission Card
A permission card for when an agent asks to run a tool: shows the tool name and a parameter summary with allow, deny and always-allow, then collapses into a one-line record once decided.