Ballmac UI home

Agent Queue

New

What an agent has on its plate: tasks running in their slots and waiting ones in order, with real buttons to move, pause, prioritise and cancel (cancel asks first), moves shown at once and undone with the reason if they fail.

v1.0.0Updated Oct 25, 2026Ships with a test
What changed

Queue

2 running4 waiting

Running now

  • Reconcile March payouts

    64%
  • Send renewal reminders

    21%

Up next

  1. Chase 12 overdue invoices

    starts after the next slot frees
  2. Email April receipts

  3. Archive invoices older than 7 yearsPaused

  4. Rebuild the revenue report

Installation

$ pnpm dlx shadcn@latest add @ballmac/agent-queue

Usage

import { AgentQueue } from "@/components/ballmac/agent-queue"

The full example is in the Code tab above.

Examples

Nothing waiting

Queue

1 running0 waiting

Running now

  • Summarise yesterday's tickets

    82%

Up next

Nothing is waiting.

API reference

PropTypeDefault
tasks*QueueTask[]—
slots

How many tasks may run at once.

number3
titlestring—
onMove

Called to move a waiting task to a new place among the waiting ones (0 is first). Reject and it goes back with the message.

(id: string, toIndex: number) => void | Promise<void>—
onPause

Called to pause a task, or resume it when `paused` is false.

(id: string, paused: boolean) => void | Promise<void>—
onCancel

Called to cancel a task, after it has been confirmed.

(id: string) => void | Promise<void>—
onPriority

Called when the priority of a waiting task is changed.

(id: string, priority: QueuePriority) => void | Promise<void>—

Also accepts the standard attributes of its root element.

Accessibility

KeyAction
ReorderingMove up and Move down are real buttons named for the task, so it works from the keyboard and a screen reader; the first cannot move up and the last cannot move down
AnnouncementsEvery change is announced in a polite live region, such as 'Email receipts moved to position 1'
CancelA two-step confirmation in a labelled group: 'Cancel this task?' with 'Yes, cancel it' and 'Keep it'
ProgressRunning tasks have a progressbar named for the task
ErrorsA failed change is an alert on the task, and a failed move puts the task back

Use with AI

tasks is [{ id, title, state: running | queued | paused, priority?: high | normal | low, progress?, eta?, agent? }] (required); slots (default 3). Running tasks fill the slots; the rest wait in order. onMove(id, toIndex), onPause(id, paused), onCancel(id) (after the person confirms) and onPriority(id, priority) may be async: a move is shown at once and put back with the reason if it rejects. Each button only appears when its handler is given. With the shadcn MCP server set up (guide), ask your agent:

Add the Ballmac UI Agent Queue (@ballmac/agent-queue) to this project with the shadcn MCP, then use it where it fits.

Use it for

  • Letting a person see and reorder the work an agent will do next
  • A job queue with priorities, pause and cancel

Not for

  • Many parallel items of the same kind; use fan-out-grid
  • Steps of one plan; use plan-tracker
  • Scheduled recurring jobs; use cron-1

Registry JSON: https://ui.ballmac.com/r/agent-queue.json

Credits

Free to use in personal and commercial projects.

Ballmac UI Pro

Need the whole screen, not one piece?

150 premium blocks (dashboards, settings, calendars, mail, shops, onboarding), a private shadcn registry and Figma tokens. Blocks that show data come with loading, empty and error states built in.

Not ready? Try three Pro blocks free

Leave your email and the blocks appear right here, ready to copy. Yours to use in any project.