Agent Work

Pro

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.

ScoutResearch
Done

Nothing in hand

2 of 2 done0 queued1 sub-agent

RelaySupport
Needs you

1 of 3 done0 queued

AtlasLead
Running

Keeping the release plan current

1 of 1 done0 queued7 sub-agents

PixelDesign
Running

1 of 2 done0 queued

ForgeEngineering
Idle

1 of 2 done1 queued1 sub-agent

QuillWriting
Running

0 of 5 done4 queued

LedgerAnalytics
Running

0 of 3 done2 queued

SentinelSecurity
Failed

1 of 2 done0 queued

Installation#

# One-time setup (tokens + lib helpers)npx koalaui-cli@latest init# Activate your Pro license (once per machine)npx koalaui-cli@latest login <key># Add this component (its dependencies come along)npx koalaui-cli@latest add agent-work

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.

This example is part of Koala UI Pro

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.

ScoutResearch
Done

Nothing in hand

2 of 2 done0 queued1 sub-agent

RelaySupport
Needs you

1 of 3 done0 queued

AtlasLead
Running

Keeping the release plan current

1 of 1 done0 queued7 sub-agents

PixelDesign
Running

1 of 2 done0 queued

ForgeEngineering
Idle

1 of 2 done1 queued1 sub-agent

QuillWriting
Running

0 of 5 done4 queued

LedgerAnalytics
Running

0 of 3 done2 queued

SentinelSecurity
Failed

1 of 2 done0 queued

With nest={false} every agent gets its own card, for a flat fleet without leads.

EchoInterviews
Needs you

0 of 1 done0 queued

RelaySupport
Needs you

1 of 3 done0 queued

AtlasLead
Running

Keeping the release plan current

1 of 1 done0 queued7 sub-agents

PixelDesign
Running

1 of 2 done0 queued

BoltPayments
Running

0 of 2 done1 queued

QuillWriting
Running

0 of 5 done4 queued

LedgerAnalytics
Running

0 of 3 done2 queued

SentinelSecurity
Failed

1 of 2 done0 queued

ForgeEngineering
Idle

1 of 2 done1 queued1 sub-agent

ScoutResearch
Done

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.

09:0009:1509:3009:4510:0010:1510:3010:4511:0011:1511:3011:45

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.

Work
Agent
Status
Progress
Launch the new checkout
Atlas, Scout, Pixel, Quill, Forge, Bolt
Working
4 of 9 done
Break the launch into tasks
Atlas
Done
Audit the current flow
Scout
Done
Redesign the payment step
Pixel, Quill
Working
1 of 3 done
Wireframe the card form
Pixel
Done
Wallet button states
Pixel
Working
Write the card error messages
Quill
Queued
Move to the new payments API
Forge, Bolt
Working
1 of 3 done
Map the old endpoints
Forge
Done
Write the API adapter
Bolt
Working
Cover refund edge cases
Bolt
Queued
Ship behind a flag
Forge
Queued
Fix the onboarding drop-off
Atlas, Scout, Echo, Quill
Needs you
1 of 3 done
Pull the funnel numbers
Scout
Done
Interview recent sign-ups
Echo
Needs you
Rewrite step two
Quill
Queued
Quarterly security review
Atlas, Sentinel, Quill
Failed
1 of 3 done
Scan the dependencies
Sentinel
Done
Rotate the stale keys
Sentinel
Failed
Write the review
Quill
Working
Refresh the pricing page
Atlas, Ledger, Quill, Relay
Needs you
0 of 4 done
Compare plan usage
Ledger
Working
Model the annual discount
Ledger
Queued
Draft the plan copy
Quill
Queued
Price change email
Relay
Needs you
Clear the support backlog
Atlas, Relay, Quill, Ledger
Working
1 of 4 done
Tag last week's tickets
Relay
Done
Answer billing tickets
Relay
Working
Write the refund macro
Quill
Queued
Weekly ticket report
Ledger
Queued

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.

Showing Forge
Work
Agent
Status
Progress
Launch the new checkout
Atlas, Scout, Pixel, Quill, Forge, Bolt
Working
4 of 9 done
Break the launch into tasks
Atlas
Done
Audit the current flow
Scout
Done
Redesign the payment step
Pixel, Quill
Working
1 of 3 done
Wireframe the card form
Pixel
Done
Wallet button states
Pixel
Working
Write the card error messages
Quill
Queued
Move to the new payments API
Forge, Bolt
Working
1 of 3 done
Map the old endpoints
Forge
Done
Write the API adapter
Bolt
Working
Cover refund edge cases
Bolt
Queued
Ship behind a flag
Forge
Queued
Fix the onboarding drop-off
Atlas, Scout, Echo, Quill
Needs you
1 of 3 done
Pull the funnel numbers
Scout
Done
Interview recent sign-ups
Echo
Needs you
Rewrite step two
Quill
Queued
Quarterly security review
Atlas, Sentinel, Quill
Failed
1 of 3 done
Scan the dependencies
Sentinel
Done
Rotate the stale keys
Sentinel
Failed
Write the review
Quill
Working
Refresh the pricing page
Atlas, Ledger, Quill, Relay
Needs you
0 of 4 done
Compare plan usage
Ledger
Working
Model the annual discount
Ledger
Queued
Draft the plan copy
Quill
Queued
Price change email
Relay
Needs you
Clear the support backlog
Atlas, Relay, Quill, Ledger
Working
1 of 4 done
Tag last week's tickets
Relay
Done
Answer billing tickets
Relay
Working
Write the refund macro
Quill
Queued
Weekly ticket report
Ledger
Queued

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.

PropTypeDefaultDescription
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.
nownumber-The clock in epoch ms, for running timers and the timeline's now line. Pass it from your own clock or a server timestamp.
selectedstring | null-The selected item, when you control it.
defaultSelectedstring | nullnullThe item selected on the first render.
onSelectedChange(id: string | null) => void-An item was clicked in any view.
focusstring | null-The focused agent, when you control it. Every item it (or one of its sub-agents) does not touch fades in every view.
defaultFocusstring | nullnullThe agent focused on the first render.
onFocusChange(agent: string | null) => void-An agent was focused or released.
Data attributeDescription
data-focusThe focused agent's id.
data-selectedThe 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.

PropTypeDefaultDescription
nestbooleantrueSub-agents sit inside their lead's card as rows with tree connectors. false gives each its own card.
agentsstring[]-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.

PropTypeDefaultDescription
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.
statusesAgentStatus[]["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.
animatedbooleantrueTurns the glide between columns off.
Data attributeDescription
data-group-byOn the root.
data-status / data-selected / data-dimmedOn 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.

PropTypeDefaultDescription
fromnumber-Where the window starts, in epoch ms. Defaults to just before the first start.
tonumber-Where the window ends, in epoch ms. Defaults to a little after now or the last end.
pxPerMinutenumber6The horizontal scale.
showHandoffsbooleantrueDraws a line from each piece of work to the one that waited for it, dashed until the second one starts.
Data attributeDescription
data-status / data-selected / data-dimmed / data-openOn 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.

PropTypeDefaultDescription
columnGapnumber64Pixels between columns.
nodeWidthnumber208Pixels per node.
showSubtasksbooleantrueLists up to three subtasks in each node, then a count of the rest.
Data attributeDescription
data-status / data-selected / data-dimmedOn each node.
data-settled / data-activeOn 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.

PropTypeDefaultDescription
expandedstring[]-The open rows, when you control them.
defaultExpandedstring[]-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.
columnsArray<"agent" | "status" | "progress" | "time">all fourThe columns after the title, in order.
headersPartial<Record<"title" | "agent" | "status" | "progress" | "time", string>>-Column headings, for another language.
Data attributeDescription
data-kind / data-level / data-status / data-expanded / data-selectedOn each row.

AgentWorkMark

An agent's face, sized to the line it sits in, for views of your own.

PropTypeDefaultDescription
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.