Skip to content
GitHub (opens in a new tab)
AgentsScreen

Agents list

Every agent in the workspace on one page: status, owner, recent runs and cost, with a drawer per agent.

What a screen is

A screen is a whole page exported from the kit, built only from kit components and tokens. Import it once, pass your data and callbacks, and render it as the page: it brings its own nav and <main>, and its loading and empty states are built in. A pattern is the copy-in version you own and change; a block is one area that sits inside your <main>.

When to use

  • a workspace's agents as their own page: how each is doing, who owns it, and turning one on or off
  • find an agent by status, owner or name, then open it to see its runs, a plan that waits and what it may do
  • you want the whole page done, with loading, empty and no-match states, and only need to pass data and callbacks

When not to use

  • the agent home with what needs you and what happened since your last visit — AgentOverview
  • one run in detail — RunHandoffsScreen or RunDetail
  • one plan before it runs — PlanReviewScreen
  • what each agent may do, edited level by level — start from the agent-permissions pattern

Usage

Every agent in the workspace on one page: a status filter with counts, search and owner, then each agent's status, owner, last run, success over 7 days and cost this month, with an on/off switch and a row menu. A row opens a detail drawer with its stats, recent runs, a plan that waits and what it may do, linking to Run / Handoffs, Plan review and Agent permissions. Import it once and pass the agents and your callbacks; the failing-agent alert, the no-match state, cards on phones, loading skeletons and the empty state come with it.

<AgentsListScreen agents={agents} onSelect={setOpenId} onToggle={(id, on) => setOn(id, on)} onCreate={(draft) => saveDraft(draft)} onAction={(id, action) => handle(id, action)} onNavigate={(to, detail) => go(to, detail)} workspace={{ name: "Northwind" }} user={{ name: "Alex Morgan", email: "alex@northwind.example" }} />
import { AgentsListScreen } from "agentic-ds-kit";

export default function AgentsPage({ agents, loading }) {
  // The screen renders its own app nav and <main>: don't wrap it in another main.
  return (
    <AgentsListScreen
      agents={agents}                          // { id, name, job, status, owner, lastRun?, successRate?, cost?, recentRuns?, pendingPlan?, permissions?, issue? }[]
      loading={loading}                        // Skeleton rows; the filters stay
      empty={agents?.length === 0}             // No agents yet, with New agent and Templates
      onToggle={(id, on) => setAgentOn(id, on)} // The row Switch, Pause and Resume
      onCreate={(draft) => saveDraft(draft)}  // Create agent: { templateId?, name, job, owner, model?, permissions? }
      onAction={(id, action) => handle(id, action)} // open | runs | permissions | pause | resume | duplicate | delete
      onNavigate={(to, detail) => {
        if (to === "run") router.push(`/runs/${detail.runId}`);           // Run / Handoffs
        else if (to === "plan") router.push(`/plans/${detail.planId}`);   // Plan review
        else if (to === "permissions") router.push(`/agents/${detail.agentId}/permissions`);
        else router.push(`/${to}`);
      }}
      workspace={{ name: "Northwind" }}
      user={{ name: "Alex Morgan", email: "alex@northwind.example" }}
    />
  );
}

Props

AgentsListScreen props, from the screen contract.
PropTypeDefaultNotes
agentsarray—{ id, name, job, icon?, status: "active" | "paused" | "needs-attention" | "draft", owner: { name, email?, src?, tone?: "neutral" | "info" | "success" | "warning" | "accent" }, model?, created?, lastRun?: { when, at, result: "succeeded" | "failed" | "running", runId? }, successRate?, cost?, stats?: { runs, avgTime }, recentRuns?: { id, title, when, result, duration? }[], pendingPlan?: { id, title, steps, proposedAt }, permissions?: { id, label, level: "auto" | "ask" | "never" }[], issue? }[] Every agent in the workspace. Active and Needs attention are on; Paused is off; a Draft's Switch is disabled. when is shown as given; at (epoch ms) sorts Last run. successRate is 0 to 100 over 7 days; cost is this month in US dollars. issue on a needs-attention agent puts a warning Alert above the list that names it, with Open <agent> and View runs. The screen keeps this visit's switches, duplicates and deletes on a working copy. Sample Northwind billing agents when omitted.
selectedIdstring—The agent open in the detail Drawer. Left out, the screen keeps it; null closes the Drawer.
onSelectfunction—(id | null) => void. A row's name, Open in its menu or a card opens the Drawer; Close, Escape or the overlay pass null.
onTogglefunction—(id, on) => void. The row Switch (named "<agent> on"), the Switch in the Drawer, and Pause / Resume.
onCreatefunction—(draft) => void. Create agent in the New agent setup Drawer hands over what the user typed: { templateId?, name, job, owner: { name, email?, src?, tone? }, model?, permissions?: { id, label, level }[] }. templateId is the starter it came from ("dunning", "collections", "refunds", "invoice-intake"), left out for Blank; job is "" when left empty; permissions are the starter's suggestions, left out for Blank. The flow: New agent (the page's one solid primary) opens the Start a new agent Modal with Blank first, Templates opens it with the starters first; a pick closes it and opens the setup Drawer on a new Draft, filled in from the starter (name, job, icon, model, suggested permissions) or empty for Blank. Create agent adds it to the list as a Draft and opens its detail Drawer; Cancel discards it.
onActionfunction—(id, action) => void. action is "open" | "runs" | "permissions" | "pause" | "resume" | "duplicate" | "delete" from the row menu (Pause in the Drawer too). Delete asks first in a kit AlertDialog and fires on Delete agent.
onNavigatefunction—(destination, detail?) => void. destination is an app nav row ("overview" | "agents" | "runs" | "workflows" | "tools"), or from the Drawer "run" ({ agentId, runId }: Run / Handoffs), "plan" ({ agentId, planId }: Plan review), "permissions" ({ agentId }: Agent permissions) and "runs" ({ agentId }: View runs).
filterenum—The status filter. Active counts every agent that is on, Needs attention included; a Draft shows under All only. Left out, the screen keeps it. Search and owner stay inside the screen.
onFilterChangefunction—(filter) => void
workspaceobject—{ name: string, icon?: KitIcon } App nav brand and the table caption. Same shape as SettingsPreferencesScreen. Example workspace when omitted.
userobject—{ name: string, email?: string, src?: string } Account menu at the foot of the app nav (kit DropdownMenu: the avatar on the rail, the account card in the Drawer, both with src as the photo and an online presence mark; the menu holds View profile, Account settings, Documentation, Switch account with a sample second account, Add account and Sign out, all samples that only close the menu except Account settings, which goes to a Settings row when the screen has one). Same shape as SettingsPreferencesScreen. Example person when omitted.
loadingbooleanfalseThe PageHeader title and the filters stay (disabled, without counts); the Table shows Skeleton rows (a list Skeleton below --grid-breakpoint-sm); main is aria-busy.
emptybooleanfalseKit Empty (first-use, lg) "No agents yet" with New agent and Templates, in place of the filters and list. Also shown when agents is [].
classNamestring—On the root layout-shell.

States

  • page: default, loading, empty, drawer-open, needs-attention, filtered-empty, create-agent, new-agent-setup
  • agent: active (Badge Active, success tone, CircleCheck; Switch on; menu has Pause), needs attention (Badge Needs attention, warning tone, TriangleAlert; Switch on; with issue, the page Alert names it), paused (Badge Paused, neutral tone, CirclePause; Switch off; menu has Resume), draft (Badge Draft, neutral outline, CircleDashed; Switch disabled; Never run)
  • list: filtered empty (kit Empty no-results "No agents match" with Clear filters, in place of the Table), drawer open (the agent's summary, stats, recent runs, pending plan, permissions and owner), create agent (kit Modal "Start a new agent": a drill ListView of Dunning, Collections, Refunds, Invoice intake and Blank, with Cancel), new agent setup (the right Drawer on a Draft: a Draft Badge with its starter, Basics (Name, Job, Owner, Model) and Suggested permissions; footer Cancel and Create agent)
  • layout: every column (--grid-breakpoint-lg and wider), Success and Cost columns left out and Owner as the avatar (below --grid-breakpoint-lg, where the nav leaves the Table about 46rem at a 1024 viewport), the nav in a left Drawer (below --grid-breakpoint-md), a drill ListView of cards with a Sort Select; the detail Drawer fills the screen (below --grid-breakpoint-sm)

Accessibility

  • Renders its own <main> named Agents; the app SideNav is an aside named App. Don't wrap the screen in another main
  • PageHeader title is the page h1; the Drawer title is an h2 and its sections h3
  • The Table has a caption that names the workspace, the active filters and how many agents show; sortable headers (Agent, Last run, Success, Cost) are buttons and the th sets aria-sort
  • The agent name is a Button that opens the Drawer; each Switch is named "<agent> on"; the row menu is named "Actions for <agent>"
  • Status is a Badge with the word and an icon; the last run says Succeeded, Failed or Running in text, never colour alone
  • The row menu and the Drawer work by keyboard, close on Escape and return focus to the control that opened them
  • / moves focus to search when focus is not in a text field; the input has aria-keyshortcuts="/". No visible key chip
  • Start a new agent is a kit Modal: its title names the dialog, focus starts on the first starter row (Blank from New agent, Dunning from Templates), Escape, Cancel and the scrim close it, and focus returns to the button that opened it
  • New agent setup is a kit Drawer: focus starts in Name (empty for Blank), every field has a Field label, an empty Name on Create agent shows the Field error "Give the agent a name." and moves focus back to it, and Escape or Cancel discards the Draft
  • Delete asks first in a kit AlertDialog with Delete agent as the danger action
  • Below --grid-breakpoint-md the nav opens from an IconButton named Menu into a kit Drawer
  • loading sets aria-busy on main
  • No motion of its own

Responsive

  • Wide (--grid-breakpoint-lg and wider): SideNav on the canvas, the page on the inset panel, every column in the Table
  • Below --grid-breakpoint-lg: the Table leaves out Success and Cost (they stay in the Drawer) and Owner shows the avatar, named for screen readers
  • Below --grid-breakpoint-md: the nav moves into a left kit Drawer
  • Below --grid-breakpoint-sm: the Table becomes a drill ListView of cards (icon, name, job, status, last run with owner, and the row menu) with a Sort Select; the on/off Switch is in the Drawer, which fills the screen
  • Dark mode follows the root theme; semantic tokens only

Do not

  • Do not copy the screen's parts into a local cousin; change it through its props or compose the kit pieces yourself
  • Do not wrap it in an app shell or another main
  • Do not add a second solid primary Button; New agent is the only one
  • Do not show status or a run result by colour alone
  • Do not use raw hex

Built from

  • Block
    →

    Agent overview

    The first screen of an agent workspace: what needs you, every agent's status, and what changed since your last visit.

  • Screen
    →

    Run / Handoffs

    One multi-agent run as a whole page: a lane per agent, the handoffs between them, and the approval that needs you.

  • Block
    →

    Run detail

    One agent run on one screen: clock, cost, pending approval and every step, all following the step you pick.

  • Screen
    →

    Plan review

    Approve an agent's plan before it runs, step by step, as a whole page.