affectUI › Screens › App screens

Agent / Workload

How busy every agent is, hour by hour – an activity map of each one's run limit with the hour now filling live, the busiest hour, the longest wait and every agent's load right now.

Part of affectUI Pro. Install: npx shadcn@latest add https://www.affectui.com/r/agent-workload.json · Import from @/components/ui/agent-workload

When to use

  • Seeing at a glance when each agent is busy, when it is quiet and when it runs into its limit of runs at once
  • Finding the hours where runs had to wait, and moving batch work or raising a limit before the next busy stretch

When not to use

  • Every single run on a timeline – use Agent / Executions
  • What the agents cost – use Agent / Usage

Usage

import { AgentWorkloadScreen } from "@/components/ui/agent-workload";

export default function Page() {
  return (
    <AgentWorkloadScreen
      agents={agents} // [{ id, name, color?, limit, load: [0–1 per hour up to now], forecast?, runs?: [per hour], waits?: [seconds per hour] }]
      runsYesterday={stats.runsYesterday}
    />
  );
}

Props

NameTypeDefaultDescription
titlestring"Workload"The page's title in the bar
agentsAwlAgent[]Every agent – id, name, the color of its mark, its limit of runs at once, today's load per hour from 00:00 up to the hour running now (0–1 of the limit), what to expect for the hours ahead, the runs and the longest wait in each hour. Left out, a sample that follows the clock
runsYesterdaynumberRuns yesterday up to the same time – the change under Runs today
nownumberWhere now stands, epoch ms – defaults to the clock
loadingbooleanGray map, numbers and agents
emptybooleanNo agent ran today

Keyboard

  • ← / → / ↑ / ↓: From square to square – the map is one stop in the tab order, the tip follows
  • Home / End: To the first or last half hour of the row
  • Esc: Hide the tip
  • ↑ / ↓: From agent to agent in Agents – the list is one stop in the tab order
  • Enter: Open the agent on the right – again on the open agent folds it away

Accessibility

  • The map is named as a whole; each square picked from the keyboard is announced with its agent, half hour and load
  • Each agent row is a button that reads its load now, its hours at the limit, its peak and its runs, and says whether it is open
  • The load is told by the shade and in numbers, never by color alone; rings show for the keyboard only

Responsive

  • Narrower screens put the numbers two by two and drop the runs column
  • On phones the map shows one square an hour, the three numbers sit tight side by side and the meters give way to the percent
  • An agent opens in the App Shell's work area – resizable, and it folds away: its numbers today, its day hour by hour and the stretches at its limit
  • Dark mode built in: switches when an ancestor (usually <html>) has the class dark or data-theme="dark"

Requirements

  • React 19
  • @hugeicons/react
  • @hugeicons/core-free-icons
  • App Shell (installed with it)

Related

  • Agent / Executions – Every run of a team of agents as one waterfall on a shared timeline, with a side panel to approve, retry or follow each run
  • Agent / Usage – What your agent costs – the month added up day by day against the budget, where it lands at this pace in one plain line, and where it went by project or model
  • Agent / Activity – What your agent did – every step as a sentence with its app's logo, who let it, grouped by day, and Undo while it can still be taken back
  • Agent / Schedules – What your agent does again and again – the hours around now on one line, each run a mark that fills while it runs, and every schedule with its rhythm, next run and a pause switch