Screens
Agent Console
A team view of agents in production — background runs, a trace, eval results, usage and rate limits.
Preview
Installation
Copies the screen into components/ and installs every component it uses, with their dependencies and theme tokens.
pnpm dlx shadcn@latest add https://ui.tmih06.com/r/agent-console.jsonUsage
Pass your own data and wire the callbacks to your agent runtime.
import { AgentConsole } from "@/components/agent-console";
export function ConsoleScreen({ fleet }: { fleet: Fleet }) {
return (
<AgentConsole
data={{
title: "Agents",
environment: fleet.env,
team: fleet.agents.map((a) => ({ id: a.id, name: a.name, status: a.presence })),
stats: fleet.kpis, // StatGrid items
agents: fleet.runs, // BackgroundAgents items
run: { name: fleet.selected.name, spans: fleet.selected.spans, elapsedMs: fleet.selected.ms },
evals: fleet.latestEval, // EvalResults data
usage: fleet.usage, // UsageSummary data
limits: fleet.rateLimits, // RateLimits data
context: fleet.context, // ContextWindowMeter data
incident: fleet.incident && {
title: fleet.incident.title,
description: fleet.incident.summary,
approvals: fleet.incident.pendingActions, // ToolApprovalQueue items
},
}}
onSelectAgent={(agent) => openRun(agent.id)}
onDecide={(requests, decision, scope) => resolve(requests, decision, scope)}
onAcknowledge={() => acknowledge(fleet.incident.id)}
/>
);
}
// Mount nothing else for toasts: the screen renders its own Toaster, so
// toast("…") calls from anywhere show up inside the console.Props
| Prop | Type | Default | Description |
|---|---|---|---|
| data* | AgentConsoleData | — | Everything the console shows: nav team, KPIs, background runs, the selected run's spans, eval results, usage, rate limits, context and an optional incident. |
| section | "agents" | "runs" | "evals" | "usage" | "settings" | — | Active nav item. Uncontrolled by default. |
| onSectionChange | (section: ConsoleSection) => void | — | Called when a nav item is picked. |
| onSelectAgent | (agent: BackgroundAgent) => void | — | Open a background run, e.g. to load its trace. |
| onDecide | (requests, decision, scope) => void | — | Forwarded to the incident's ToolApprovalQueue. |
| onRetryLimits | () => void | — | Forwarded to RateLimits' Retry now. |
| onAcknowledge | () => void | — | The incident banner's Acknowledge button. |
| locale | string | — | Intl locale for numbers, money, dates and durations in the widgets. |
| labels | Partial<AgentConsoleLabels> | — | Your own UI strings (nav, sidebar, incident banner), plus `avatar`, `approvals`, `stats`, `agents`, `runTrace`, `evals`, `usage`, `limits`, `context` and `toasts` for the components inside, for translating. Right-to-left works under `dir="rtl"`: the nav and drawer move to the right, charts and code stay left to right. |
| className | string | — | Extra classes for the root. The screen fills its parent. |
type AgentConsoleData = {
title: string;
environment?: string;
team: { id: string; name: string; status?: "online" | "away" | "busy" | "working" }[];
stats: Stat[]; // from stat-grid
agents: BackgroundAgent[]; // from background-agents
run: { name: string; spans: TraceSpan[]; elapsedMs: number; failed?: boolean };
evals: EvalResultsProps["data"];
usage: UsageSummaryProps["data"];
limits: RateLimitsProps["data"];
context: { limit: number; segments: ContextSegment[]; model?: string };
incident?: { title: string; description: string; approvals: ToolApprovalRequest[] };
};