Agent inbox
ProBlockEverything your agents wait on in one queue: approvals, questions and failed runs, with bulk approve and reject, a kind filter and keyboard control.
npx shadcn@latest add @pixilui-pro/agent-inboxPreview
import { useState, type ReactNode } from "react";
import { IconChat } from "@/components/pixilui/icons/chat";
import { IconCost } from "@/components/pixilui/icons/cost";
import { IconInbox } from "@/components/pixilui/icons/inbox";
import { IconQuestion } from "@/components/pixilui/icons/question";
import { IconSubagent } from "@/components/pixilui/icons/subagent";
import { IconUsageTrend } from "@/components/pixilui/icons/usage-trend";
import { AgentInbox, type AgentInboxFilter } from "@/components/pixilui/agent-inbox/agent-inbox";
import { agentInboxSample } from "@/components/pixilui/agent-inbox/data";
export const knobs = {
filter: ["all", "approval", "question", "failed"],
queue: ["full", "empty"],
} as const;
const marks: Record<string, ReactNode> = {
"Billing agent": <IconInbox />,
"Finance close": <IconCost />,
"Analytics agent": <IconUsageTrend />,
"Release bot": <IconSubagent />,
"Support triage": <IconQuestion />,
};
const requests = agentInboxSample.map((request) => ({ ...request, icon: marks[request.agent] ?? <IconChat /> }));
const wait = (ms: number) => new Promise<void>((resolve) => setTimeout(resolve, ms));
export default function AgentInboxDemo({ filter = "all", queue = "full" }: KnobValues<typeof knobs>) {
const [current, setCurrent] = useState<AgentInboxFilter>(filter);
const [knob, setKnob] = useState(filter);
if (knob !== filter) {
setKnob(filter);
setCurrent(filter);
}
return (
<AgentInbox
key={queue}
className="max-w-4xl"
requests={queue === "empty" ? [] : requests}
filter={current}
onFilterChange={setCurrent}
onApprove={() => wait(900)}
onReject={() => wait(700)}
onAnswer={() => wait(800)}
onRetry={() => wait(900)}
onDismiss={() => wait(500)}
/>
);
}When to use
Use it when
- Several agents or runs can stop and wait for a person, and that person needs one place to clear them.
- An operations view where approvals arrive in batches and are approved ten at a time.
- A home for agent questions that would otherwise sit in chat threads.
Use something else when
- A single approval inside a run: use approval-card where the run is shown.
- A notification feed with nothing to decide: use a plain list.
- Human review of model outputs at scale (labelling): that needs a review queue with its own grading UI.
Installation
Join the waitlist and we'll email you when PixilUI launches. The preview, props and docs stay open until then.
Pro installs with the same CLI as the free items. One command adds agent-inbox.tsx, data.ts, agent-inbox-detail.tsx and agent-inbox-row.tsx and the free button.tsx, the free input.tsx and the free approval-card.tsx it uses; your license key goes in once, as in Installation.
npx shadcn@latest add @pixilui-pro/agent-inboxAdds agent-inbox.tsx, data.ts, agent-inbox-detail.tsx and agent-inbox-row.tsx with button.tsx, input.tsx and approval-card.tsx, and installs clsx and tailwind-merge. The CLI reads PIXILUI_TOKEN from .env.local; if this computer has not logged in yet, run npx pixilui@latest login once.
components/pixilui/agent-inbox/agent-inbox.tsxthe item, 527 linescomponents/pixilui/agent-inbox/data.ts94 linescomponents/pixilui/agent-inbox/parts/agent-inbox-detail.tsx167 linescomponents/pixilui/agent-inbox/parts/agent-inbox-row.tsx72 linescomponents/pixilui/button.tsxused inside, freecomponents/pixilui/input.tsxused inside, freecomponents/pixilui/approval-card.tsxused inside, freeIt uses Button, Input and Approval card: add them the same way. Then npm i clsx tailwind-merge, and add the foundation once per app, as in Installation.
Usage
import { AgentInbox } from "@/components/pixilui/agent-inbox/agent-inbox";
<AgentInbox
requests={requests}
onFilterChange={onFilterChange}
onApprove={onApprove}
/>Fills its container. The list and the open request sit side by side when there is room (about 600px) and stack below it, list first.
API reference
requestsRequiredAgentInboxRequest[]–The queue, newest first. Settled requests leave the list; remove them from this array whenever you like.filterAgentInboxFilter–Controlled kind filter.defaultFilterAgentInboxFilter"all"Starting filter when uncontrolled.onFilterChange(filter: AgentInboxFilter) => void–Runs when the filter changes.onApprove(ids: string[]) => void | Promise<void>–Approves one request (from its card) or many (bulk). Return a promise to show pending; throw to keep them waiting.onReject(ids: string[], note: string) => void | Promise<void>–Rejects one request with the note from its card, or many with an empty note.onAnswer(id: string, answer: string) => void | Promise<void>–Sends the person's answer to a question.onRetry(id: string) => void | Promise<void>–Starts a failed run again.onDismiss(id: string) => void | Promise<void>–Clears a failed run without retrying.labelsPartial<AgentInboxLabels>–Copy overrides, for translation and house verbs.Also takes every native <section> attribute except title, and a ref.
Keyboard
Accessibility
- The list is a multi-select listbox with aria-activedescendant, so focus stays on it while the cursor moves; ticked requests are aria-selected.
- The filter is a group of toggle buttons with aria-pressed and live counts.
- Bulk actions, approvals and answers use aria-busy while pending, never disabled, so focus stays put.
- Every settled request leaves a receipt with a status role; bulk results are announced the same way.
- The open request is a labeled region you can reach with Enter from the list.
Motion
- A settled request fades out of the list in 120ms, then its height closes on smooth, so the rows below slide up once it is gone.
- The filter's pill is one object that slides to the chosen kind on the snappy spring.
- Ticks draw their check; the bulk bar and its receipt fade through each other, and the receipt's check draws itself.
- The open request's approval folds into its receipt, as approval-card does.
- Reduced motion: rows go at once, the pill jumps, nothing draws.
Related
Questions
Yes, the agent inbox (Pro). It puts approvals, questions and failed runs from every agent in one queue, with a filter by kind, bulk approve and reject, answers to questions, retry for failed runs, and keyboard control. Approved requests fold out of the queue one after another.
Compare
Operator consoles for agent fleets, approvals and evals
Checked assistant-ui vs PixilUIA full chat runtime with adapters for many model backends
Checked