# Agent Run Queue block

> Agent Run Queue with Collapsible Status Groups and Attention Filters

Triage table for agent runs in collapsible Running, Waiting, Failed, Completed groups with search, attention filter, density toggle, and per-row actions. ReUI DataGrid, Badge; shadcn Button, Avatar, Switch. For agent ops dashboards, run monitoring.

- Type: Pro block
- Category: [Agents](https://web.dev.reui.io/blocks/solutions/agents.md)
- Page: https://web.dev.reui.io/blocks/solutions/agents/solution-agents-2
- MCP: `get_block("solution-agents-2")`
- Built with: Avatar, Badge, Button, Data Grid, Dropdown Menu, Field, Input Group, Item, Popover, Select, Switch
- Installs with a ReUI Pro or Ultimate license; setup: https://web.dev.reui.io/docs/license-setup

## Best for

Runs folded into status groups with Escalated, Needs approval and Unassigned counters, owner avatar stacks and step progress rings

## Agent notes

- Sample runs live in `AGENT_RUNS`, grouped by `RUN_STATUS_GROUPS` with owners from `RUN_OWNERS`, replace them with your run feed
- `handleRunAction` and `handleNewRun` only fire a `toast`, apart from copy which writes the `runKey` to the clipboard
- Search and the Attention filter run in memory over `AGENT_RUNS`, and `manualPagination` keeps every run row rendered

## When not to use

- A queue that toggles between table rows and stage cards with hideable fields: use [Work Queue](https://web.dev.reui.io/blocks/data-grid/columns/data-grid-columns-3.md) (`get_block("data-grid-columns-3")`)
- A fleet overview with summary cards, a throughput chart and an incident timeline: use [Agent Fleet Overview](https://web.dev.reui.io/blocks/solutions/agents/solution-agents-1.md) (`get_block("solution-agents-1")`)

## Third-party libraries

- TanStack Table v9: [API reference](https://tanstack.com/table/v9/docs/framework/react/reference/index), [docs](https://tanstack.com/table/v9/docs/framework/react/quick-start)
- Sonner v2: [API reference](https://sonner.emilkowal.ski/toast), [docs](https://sonner.emilkowal.ski/getting-started)

## Install

```bash
npx shadcn@latest add @reui/solution-agents-2
```

## About Agents blocks

### When to use

- Run monitoring for a fleet of agents: a live overview, a run queue and failed run triage
- Human review of agent work: an approval inbox, one run's step trace and a nightly evaluation report
- Control pages for agent behavior: tool access, playbooks, run settings and stored memory

### When not to use

- One run narrated live to the person who started it, inside a chat or task view: use the [Agent Activity blocks](https://web.dev.reui.io/blocks/ai-agents/agent-activity.md)
- Model provider routing, prompt reviews, token spend and safety policies for LLM features: use the [AI Ops blocks](https://web.dev.reui.io/blocks/solutions/ai-ops.md)
- An account, workspace, notification or integration page of labeled switches and selects: use the [Settings blocks](https://web.dev.reui.io/blocks/application/settings.md)

### Agent notes

- Every block sets a `min-h-svh` wrapper with its own padding and max width in page.tsx, its root component or both; drop them inside an app shell
- No block mounts the `sonner` toaster, so every `toast` call stays invisible until your layout renders one
- No handler reaches a backend: actions change local `useState` and fire a `toast`, so wire each one to your agent API

Every ReUI item has a twin like this one; the index is https://web.dev.reui.io/llms.txt. Agents with the ReUI MCP (https://web.dev.reui.io/docs/mcp) get the same guidance from the getters named above.
