affectUI › Screens › App screens

Agent / Agents

Your team of agents in one place – calm cards with each agent's pixel mark, role, status tag and the apps it may use, its model, runs and spend; an agent opens on the right with its runs, instructions, skills, apps and recent tasks, and New agent draws the mark as you type.

Part of affectUI Pro. Install: npx shadcn@latest add https://www.affectui.com/r/agents.json · Import from @/components/ui/agents

When to use

  • Showing every agent you run – who it is, what it does and what it is doing right now
  • Pausing an agent, messaging it, or checking what it may use before you trust it with more
  • Adding a new agent to the team

When not to use

  • The tasks the agents work on – use Agent / Inbox Board
  • What one agent may do in your apps – use Agent / Permissions
  • Spend across all agents over time – use Agent / Usage

Usage

import { AgentsScreen } from "@/components/ui/agents";

export default function Page() {
  const [agents, setAgents] = useState(initialAgents);
  return (
    <AgentsScreen
      agents={agents}                                   // working agents show what they do right now
      onPause={(agent, paused) => api.setPaused(agent.id, paused)}
      onMessage={(agent) => router.push(`/thread?agent=${agent.id}`)}
      onCreate={(agent) => api.createAgent(agent)}     // from New agent
      onNavigate={(label) => router.push(routes[label])}
    />
  );
}

Props

NameTypeDefaultDescription
agents{ id; name; role; color; model; status: "working" | "idle" | "paused"; doing?; lastRun?; runs; cost; daily?; owner?; instructions?; skills?; apps?; recent?: { title; state; at }[] }[]Every agent. doing is what a working agent does right now (shown on the right); apps the apps it may use – logos on the card; lastRun shows for idle and paused agents; runs and cost are this week's; daily the runs per day for the chart on the right. Pass a stable array (state)
defaultView"grid" | "list""grid"Grid or list when the screen starts
defaultOpenstring | null"builder"The agent open on the right when the screen starts
onPause(agent, paused) => voidCalled with Pause or Resume on the right
onMessage(agent) => voidCalled with Message – without it the screen calls onNavigate("Thread")
onCreate(agent) => voidCalled with an agent made in New agent – name, what it does, model (Claude, GPT, Gemini or Grok, each with its maker's logo) and color
loadingbooleanGray cards in place of the agents, and the panel as gray lines in its own layout
emptybooleanNo agents yet – one quiet note with New agent
onNavigate(label: string) => voidCalled with the label of a sidebar item – and with "Skills" and "Permissions" from the panel
classNamestringExtra class on the root

Keyboard

  • J / K / ← / → / ↑ / ↓: From agent to agent
  • Enter: Open the agent on the right
  • ← / →: On the tabs and on Grid / List: the next one
  • Esc / ⌘ Enter: In New agent: close, or create it

Accessibility

  • Each agent is a button named with its name, role and what it is doing; the one open on the right is marked current
  • A polite live region says how many agents work, idle and are paused
  • Grid and List carry their names for screen readers and in a tip; rings show for the keyboard only and sit on the card's edge

Responsive

  • The content is capped at 720px in the middle, cards in two columns – one on phones; the whole area scrolls, so no card edge or hover shadow is cut
  • List rows drop the role and model below 720px, the numbers below 560px
  • Below 560px the tools move above the tabs and New agent becomes a +
  • Touch targets grow to 36px on touch screens
  • Dark mode built in: switches when an ancestor (usually <html>) has the class dark or data-theme="dark"

Requirements

  • React 19
  • @hugeicons/react
  • @hugeicons/core-free-icons
  • App Shell (installed with it)

Related

  • Agent / Inbox Board – Every background task your agents work on, as a board – Needs you, Running, Done – with cards that open on the right to approve, retry or open, and glide to their new column when their state changes
  • Agent / Permissions – What your agent may do without asking – one choice on top (Careful, Balanced, Hands-off) said in plain words, the apps it works in, the red lines that always ask, and each app with its actions grouped Reads, Changes, Needs care
  • Agent / Skills – What your agent knows how to do – your skills as calm cards with a switch, filtered by what they're for; skills to discover below whose Install fills a ring and lands among yours; and each skill with two weeks of runs, when it steps in, its steps and what it needs
  • Agent / Usage – What your agent costs – the month added up day by day against the budget, where it lands at this pace in one plain line, money ticking up as runs finish, where it went by project or model, and what's worth a look