Agent Work
One plan of epics, tasks and sub-agents, seen five ways. Pick an agent or an item in one view and every other view follows.
Installation#
Usage#
Describe the work once, as a flat list of items that point at their parent, the agent that holds them and what they wait for. Each view is its own part, so a screen can show one, put several behind tabs, or set two side by side. They share the selected item and the focused agent through AgentWork.
The preview is yours to explore. Its code comes with a Pro license, paid once and used in every project.
Have a license? Unlock it here
Agents#
Who is doing what right now. Each card is the agent's face and status over one grey block with the item in hand, its epic and how long it has run. Agents that need you come first. Sub-agents sit inside their lead's card, so a team reads as a team.
Nothing in hand
2 of 2 done0 queued1 sub-agent
1 of 3 done0 queued
Keeping the release plan current
1 of 1 done0 queued7 sub-agents
1 of 2 done0 queued
1 of 2 done1 queued1 sub-agent
0 of 5 done4 queued
0 of 3 done2 queued
1 of 2 done0 queued
With nest={false} every agent gets its own card, for a flat fleet without leads.
0 of 1 done0 queued
1 of 3 done0 queued
Keeping the release plan current
1 of 1 done0 queued7 sub-agents
1 of 2 done0 queued
0 of 2 done1 queued
0 of 5 done4 queued
0 of 3 done2 queued
1 of 2 done0 queued
1 of 2 done1 queued1 sub-agent
Nothing in hand
2 of 2 done0 queued1 sub-agent
Board#
Tasks in columns by status, each with its epic, its subtasks as a count and the agents on it. When an agent moves a task on, the card glides to its new column instead of jumping.
Queued6
Working5
Needs you2
Done5
Failed1
Group by agent to see each agent's queue as a column, with sub-agents right after their lead. Use level="leaf" so every subtask is a card of its own.
AtlasLead1
ScoutResearch2
EchoInterviews1
PixelDesign2
ForgeEngineering2
BoltPayments2
QuillWriting5
SentinelSecurity2
LedgerAnalytics3
RelaySupport3
Timeline#
Every agent on its own lane over time, sub-agents under their lead. Running bars grow with the now line, and a thin line joins a piece of work to the one that waited for it, so handoffs between agents are visible at a glance.
Dependencies#
What blocks what. A lane per epic, tasks laid out left to right in the order they can happen. A line is solid once the work it starts from is done and dashed while it is still open. Selecting a task inks the lines in and out of it.
Outline#
The whole plan top-down: epics, tasks and subtasks with tree connectors, the agents on each and the progress rolled up. A folded row keeps its roll-up, so nothing is lost. Arrow keys move, open and fold rows.
Focus on one agent#
Focusing an agent fades everything it does not touch, in every view at once. A lead keeps its sub-agents' work lit, so focusing Forge also shows what Bolt does for it. Click a card in Agents, or pass focus from a select of your own.
Anatomy#
import {
AgentWork,
AgentWorkRoster,
AgentWorkBoard,
AgentWorkTimeline,
AgentWorkGraph,
AgentWorkOutline,
AgentWorkMark,
} from "@/components/ui/agent-work"
<AgentWork agents={agents} items={items} now={now}>
<AgentWorkRoster />
<AgentWorkBoard />
<AgentWorkTimeline />
<AgentWorkGraph />
<AgentWorkOutline />
</AgentWork>API Reference#
AgentWork
The data every view reads, and the two pieces of state they share: the selected item and the focused agent. Fetches nothing. Every part accepts className, merged last.
| Prop | Type | Default | Description |
|---|---|---|---|
| agents* | AgentWorkAgent[] | - | { id, name, role?, mark?, status?, lead?, now? }. lead makes it a sub-agent of another agent. mark is its face: a node, or (status) => node so the mascot follows its status. Without status, the agent's status comes from its items. |
| items* | AgentWorkItem[] | - | { id, title, parent?, agent?, status, start?, end?, dependsOn?, summary? }. Items without a parent are epics, their children tasks, anything deeper subtasks. A parent's status, progress and time roll up from its leaves. |
| now | number | - | The clock in epoch ms, for running timers and the timeline's now line. Pass it from your own clock or a server timestamp. |
| selected | string | null | - | The selected item, when you control it. |
| defaultSelected | string | null | null | The item selected on the first render. |
| onSelectedChange | (id: string | null) => void | - | An item was clicked in any view. |
| focus | string | null | - | The focused agent, when you control it. Every item it (or one of its sub-agents) does not touch fades in every view. |
| defaultFocus | string | null | null | The agent focused on the first render. |
| onFocusChange | (agent: string | null) => void | - | An agent was focused or released. |
| Data attribute | Description |
|---|---|
| data-focus | The focused agent's id. |
| data-selected | The selected item's id. |
AgentWorkRoster
The team: one card per agent with its face, its status and what it holds right now in one grey block, ordered by who needs you first. A new line rises in when an agent moves on. The card focuses that agent across every view; the line inside selects its item.
| Prop | Type | Default | Description |
|---|---|---|---|
| nest | boolean | true | Sub-agents sit inside their lead's card as rows with tree connectors. false gives each its own card. |
| agents | string[] | - | Which agents get a card, in this order. |
AgentWorkBoard
The work in columns. A card glides to its new column when its status changes. Waiting cards are the loud ones, by their mark and words, never a fill.
| Prop | Type | Default | Description |
|---|---|---|---|
| groupBy | "status" | "agent" | "status" | A column per status, or a column per agent with sub-agents after their lead. |
| level | "task" | "leaf" | "task" | task makes a card of each task with its subtasks as a count and a segmented bar. leaf makes a card of every piece of work. |
| statuses | AgentStatus[] | ["idle", "working", "waiting", "done", "failed"] | The status columns, in order. Failed only shows when something failed. |
| density | "comfortable" | "compact" | - | Card padding and gaps. Follows the DensityProvider. |
| animated | boolean | true | Turns the glide between columns off. |
| Data attribute | Description |
|---|---|
| data-group-by | On the root. |
| data-status / data-selected / data-dimmed | On each card. |
AgentWorkTimeline
Lanes over time, one per agent with its sub-agents under it on a tree connector. Each piece of work is a bar from its start to its end, or to the now line while it runs. Overlapping bars stack. Scrolls sideways inside itself and opens on the now line. Under a narrow width the lane labels keep only the face.
| Prop | Type | Default | Description |
|---|---|---|---|
| from | number | - | Where the window starts, in epoch ms. Defaults to just before the first start. |
| to | number | - | Where the window ends, in epoch ms. Defaults to a little after now or the last end. |
| pxPerMinute | number | 6 | The horizontal scale. |
| showHandoffs | boolean | true | Draws a line from each piece of work to the one that waited for it, dashed until the second one starts. |
| Data attribute | Description |
|---|---|
| data-status / data-selected / data-dimmed / data-open | On each bar. data-open while it runs with no end. |
AgentWorkGraph
What waits for what. A lane per epic, tasks in columns by how many steps of work come before them, lined up across lanes, each node listing its subtasks and the agents on it. Edges are step paths from Workflow Canvas.
| Prop | Type | Default | Description |
|---|---|---|---|
| columnGap | number | 64 | Pixels between columns. |
| nodeWidth | number | 208 | Pixels per node. |
| showSubtasks | boolean | true | Lists up to three subtasks in each node, then a count of the rest. |
| Data attribute | Description |
|---|---|
| data-status / data-selected / data-dimmed | On each node. |
| data-settled / data-active | On each edge: its source is done, or it touches the selected node. |
AgentWorkOutline
The whole plan top-down as a treegrid: tree connectors, the agents on each row, its status, progress rolled up from its leaves and its time. One Tab stop; arrows move, Right opens or enters, Left folds or goes to the parent, Enter selects. Under 40rem names give way to faces and the bar to its count; under 30rem the time goes.
| Prop | Type | Default | Description |
|---|---|---|---|
| expanded | string[] | - | The open rows, when you control them. |
| defaultExpanded | string[] | - | The rows open on the first render. Defaults to every epic and task with children. |
| onExpandedChange | (ids: string[]) => void | - | A row was opened or folded. |
| columns | Array<"agent" | "status" | "progress" | "time"> | all four | The columns after the title, in order. |
| headers | Partial<Record<"title" | "agent" | "status" | "progress" | "time", string>> | - | Column headings, for another language. |
| Data attribute | Description |
|---|---|
| data-kind / data-level / data-status / data-expanded / data-selected | On each row. |
AgentWorkMark
An agent's face, sized to the line it sits in, for views of your own.
| Prop | Type | Default | Description |
|---|---|---|---|
| agent* | string | - | The agent's id. |
| size | "xs" | "sm" | "md" | "xs" | 20, 28 or 40px. |
useAgentWork
Everything the views use, for a view of your own: items, agents, now, select, setFocus, childrenOf, rollup(id) ({ status, done, total, start, end }), agentStatus, agentCurrent, dimmed(id), elapsed(id) and more.
agentWorkVariants
The tv recipes behind every part, one per view: agentWorkBoardVariants, agentWorkTimelineVariants and so on.