affectUI › Components › Agents
Agent Finder
A multi-agent run as a macOS Finder window – every agent a blue Mac folder with its pixel mark stamped on the front, every tool call a Mac document with the tool's logo on it. Double-click a folder to see its subagents and documents; Space opens Quick Look with what the tool was sent and what came back. Icons or a list with disclosure triangles, Finder tags for the status, a thin iCloud-style progress bar under running agents, and a preview of the selection with model, tokens and cost. Icons drag anywhere and stay there; a right-click opens a menu to pause, restart, duplicate or retry.
Part of affectUI Pro. Install: npx shadcn@latest add https://www.affectui.com/r/agent-finder.json · Import from @/components/ui/agent-finder
When to use
- Browsing a multi-agent run the way people browse files – every agent a folder, its subagents inside, every tool call a document
- Looking back at what each agent did: open a document and Quick Look shows what the tool was sent and what came back
- A run people want to arrange and act on themselves – drag folders where they like them, pause, restart or retry from a right-click
When not to use
- Who does what when, and where work is handed over – use Handoff Swimlanes or Agent Metro Map
- The hierarchy at a glance, all at once – use Agent Tree or Agent Org Chart
- Every message and tool call in time order – use Agent Sequence or Trace Waterfall
Usage
import { AgentFinder, type FinderAgent } from "@/components/ui/agent-finder";
const agents: FinderAgent[] = [
{
id: "planner", name: "Planner", status: "running", progress: 0.6,
model: "Claude Opus 5.5", logo: <ClaudeLogo />, task: "Ship v2.4", tokens: 48210, cost: 1.42, updated: "Now",
children: [
{
id: "researcher", name: "Researcher", status: "done", model: "Claude Sonnet 5.5", logo: <ClaudeLogo />,
files: [
{
id: "search", name: "search_code.json", logo: <GitHubLogo />, tool: "github.search_code",
size: "18 KB", duration: "1.2 s", updated: "Today, 09:04",
request: '{ "q": "round( path:billing/" }', response: '{ "total_count": 14 }',
},
],
},
],
},
];
export function Run() {
return <AgentFinder title="Launch v2.4" subtitle="Started today, 08:52" agents={agents} />;
}Props
| Name | Type | Default | Description |
|---|---|---|---|
agents | FinderAgent[] | The top folder's contents – { id, name, status?, model?, logo?, task?, tokens?, cost?, updated?, progress?, children?, files? } | |
status | "running" | "waiting" | "failed" | "done" | "idle" | The agent's Finder tag – blue, orange, red, green; idle has none | |
progress | number | 0–1 – the bar under a running agent's folder; without it the bar shimmers | |
children / files | FinderAgent[] / FinderFile[] | The folder's contents – subagents first, then documents, like Finder sorting folders on top | |
FinderFile | object | { id, name, type?, logo?, tool?, detail?, size?, duration?, updated?, failed?, request?, response? } – type defaults to the name's extension | |
title / subtitle | string | The top folder's name, and a line under it – when the run started, how long it took | |
defaultView | "icons" | "list" | Icons by default | |
onOpen / onOpenFile | (agent) => void / (file, agent) => void | An agent's folder or a document opened – with a double-click, Enter or the menu | |
onSelect | (agent | null, file?) => void | The selection changed – an agent, or a document and the agent it belongs to | |
onAction | (action, agent, file?) => void | Something picked in the right-click menu – open, info, quick-look, pause, start, restart, duplicate, copy-id, retry, copy-request, copy-response, remove | |
onArrange | (positions, folder | null) => void | Icons moved in a folder – where every icon in it now sits, { x, y } in pixels | |
className | string | An extra class on the root |
Accessibility
- The icon view is a listbox and the list a treegrid – one item is in the tab order, the arrows move between them
- In the icon view the arrows go to the nearest icon in that direction, wherever the icons were put; Home and End go to the first and last in reading order
- Enter opens a folder or a document, Space opens Quick Look, ⌘↑ or Backspace goes up, ⌘[ and ⌘] go back and forward; → and ← open and close folders in the list
- ⌥ and an arrow move the selected icon by one place – the keyboard's way to drag
- Shift F10 or the menu key opens the right-click menu; a long press does on a touch screen. The menu moves with the arrows, Home, End and first letters; Esc closes it and focus goes back
- Every item reads as its name, its status and what it holds – "Writer, Waiting, 2 subagents, 1 document" or "staging-login.log, Log file, failed"
- Quick Look and Get Info are dialogs that keep focus inside and give it back when they close
- A focus ring shows only for the keyboard
Responsive
- Fills its container's width; the preview shows from 800px – narrower, Get Info opens it as a sheet
- The list drops the model column first, then the tokens, so names keep their room
- On a phone the icons sit three to a row; touch long-press opens the menu
- Icons put somewhere stay there; when the window gets narrower they move in so none falls off the edge
- Long names wrap to two lines under an icon and end in … in the list; big token counts shorten to 2.4B there and show in full in the preview
- Dark mode built in: switches when an ancestor (usually <html>) has the class dark or data-theme="dark"
Requirements
- React 19
Related
- Agent Tree – Who started whom – an orchestrator and its sub-agents as a live tree, with status, cost and time on every card, costs rolling up each branch, and branches that fold to one line
- Agent Org Chart – An org chart of people and AI agents. People are cards with a photo, a name, a role and the agents they own; agents a card with their twinkling pixel mark, the model with its maker's logo and the logos of the tools they use. Reporting lines run from a hollow dot to an arrowhead, measured from the layout. Status stays quiet – Working shimmers, waiting is amber. An escalation travels up the lines as a light to the person who owns the agent, where it waits with Reply and Approve. Point at a card and its chain up to the top comes forward; click it for the details
- Trace Waterfall – Where the time and money of an agent run go – every LLM call, tool call and sub-agent as a bar on a live timeline, with tokens and cost per step, the slowest call marked and branches that fold into their parent
- Agent Sequence – One agent run as a sequence diagram – a column for you, every agent and every tool, and each message an arrow from one lifeline to the next: calls solid, replies dashed, every label a tag in its line's color, a bar on the lifeline while a participant works, parallel and retried messages in labelled frames; new messages draw themselves across with a light at the tip, and a click on a participant or a message opens its card