Agent Monitor

Pro

A live board of the agents you have running: what each one is doing right now, its tasks, a trace of its tool calls and the sub-agents it started.

Agents
koala-site
koala-api

Refresh the pricing page

Working

Tasks

  1. Read the current page
    Done
  2. Move the plans to the new cards
    In progress
  3. Run the checks
    Not started

Activity

  1. Editing plan-card.tsx12s
  2. Reading plans.ts48s
  3. Searching "PlanCard"1m

Try it yourself. This one is live, and its code is right below.

1Working0Needs you0Done0Failed
koala-site
koala-api

Refresh the pricing page

koala-site

Working

Tasks

0/4
  1. Read the current page
    In progress
  2. Split the work into two agents
    Not started
  3. Move the plans to the new cards
    Not started
  4. Run the checks
    Not started

Last minute

ReadEditRunSearchAgentOther

Log

  1. Reading pricing/page.tsx

Installation#

# One-time setup (tokens + lib helpers)npx koalaui-cli@latest init# Activate your Pro license (once per machine)npx koalaui-cli@latest login <key># Add this component (its dependencies come along)npx koalaui-cli@latest add agent-monitor

Usage#

The monitor draws what you give it and fetches nothing, so it works with any agent runtime. Keep your runs in state, from polling, a socket or a stream, and map each one to a row and a panel.

This example is part of Koala UI Pro

The preview is yours to explore. Its code comes with a Pro license, paid once and used in every project.

Have a license? Unlock it here

Anatomy#

import {  AgentMonitor,  AgentMonitorSummary,  AgentMonitorCount,  AgentList,  AgentFlow,  AgentBoard,  AgentBoardColumn,  AgentGroup,  AgentGroupLabel,  AgentRow,  AgentRowHead,  AgentRowFoot,  AgentParent,  AgentName,  AgentElapsed,  AgentActivity,  AgentTrace,  AgentDetail,  AgentDetailHeader,  AgentDetailHeading,  AgentDetailTitle,  AgentDetailDescription,  AgentStatusBadge,  AgentSection,  AgentSectionTitle,  AgentProgress,  AgentTasks,  AgentTraceLegend,  AgentLog,  AgentLogItem,  AgentEmpty,} from "@/components/ui/agent-monitor"

Diagram#

AgentFlow replaces the list with a tree of who started whom. First-level agents sit side by side, deeper ones hang below their parent, and any branch folds to a count.

You

Board#

AgentBoard sorts the same agents into columns by state, so the work that needs you is the first thing you see.

Needs you0
Working1
Done0
Failed0

States#

A row carries one of five states. Only a working agent pings and only one that needs you blinks, so the board stays calm and the eye goes where it is needed.

API reference#

AgentMonitor

The board and the context every part reads, built on Radix Tabs: arrow keys walk the rows and each row owns a detail panel. Takes value, defaultValue and onValueChange. Every part accepts className, merged last.

PropTypeDefaultDescription
variant"card" | "plain""card"A framed surface, or no chrome for a full page.
density"comfortable" | "compact"-Row and panel spacing. Reads DensityProvider when unset.

AgentMonitorCount

One figure in AgentMonitorSummary. Children replace the status label.

PropTypeDefaultDescription
status*"working" | "waiting" | "idle" | "done" | "failed"-Sets the dot and the default label.
count*number-The figure, in tabular numerals.

AgentRow

One agent in the list, and the tab that opens its AgentDetail. Compose AgentRowHead, AgentActivity and AgentTrace inside it.

PropTypeDefaultDescription
value*string-Matches the AgentDetail it opens.
status"working" | "waiting" | "idle" | "done" | "failed""idle"Drives the mark: a pinging dot, a blinking dot, a check or a warning.
depthnumber0Indents a sub-agent under the agent that started it.
statusLabelstring-The status as read by a screen reader. Use it to translate.
layout"row" | "card""row"A line for AgentList, or a lifted card for AgentBoard and AgentFlow.

AgentFlow

A diagram of who started whom, used in place of AgentList. It lays out the tree itself and draws the connectors, coloured by the state of the agent they lead to. A new connector draws itself from its parent. Each parent with sub-agents carries one fold chip on its connector, a caret and the count: the caret turns when the branch folds, and its cards tuck back into the parent from the bottom up while their connectors pull back. Forwards Radix Tabs List props.

PropTypeDefaultDescription
nodes*readonly AgentFlowNode[]-{ id, parentId?, status }. A node with no parent is a root.
renderNode*(node: AgentFlowPlacedNode) => ReactNode-Draws a node, usually a card AgentRow with h-full. Done and idle agents get a shorter slot and node.quiet, so draw only the head for them.
hubReactNode-A round node above the tree that every root hangs from, such as the person running the agents.
nodes[].compactboolean-Gives a node the short slot. Use it with AgentFlowGroup to group agents under a project.
collapsedreadonly string[]-Ids of folded branches, when you control them.
defaultCollapsedreadonly string[][]Ids folded on the first render.
onCollapsedChange(collapsed: string[]) => void-A branch was folded or opened.
animatedbooleantrueTurns the fold, draw and retract animations off. They can always be interrupted: folding again reverses a card from where it is.
foldLabel(node, folded, count) => string-Names the fold button for a screen reader. Use it to translate.

AgentBoard

A kanban board of AgentBoardColumn, used in place of AgentList. When an agent changes state its card travels to the new column. Forwards Radix Tabs List props.

AgentBoardColumn

One column of the board. Children are card AgentRows.

PropTypeDefaultDescription
status*"working" | "waiting" | "idle" | "done" | "failed"-Sets the dot and the default title.
countnumber-Shown at the end of the column head.
titleReactNode-Replaces the status label.

AgentActivity

The one line that says what the agent is on. When the text changes the old line leaves and the new one arrives in place.

PropTypeDefaultDescription
children*string-The current activity.

AgentElapsed

A running timer in tabular numerals. All timers on a page share one clock.

PropTypeDefaultDescription
since*number-Start time in epoch milliseconds.
untilnumber-Stops the timer at this time.

AgentProgress

Tasks finished, as pips and a count.

PropTypeDefaultDescription
done*number-Finished tasks.
total*number-All tasks. One pip each.

AgentTrace

A strip of the agent's tool calls over time, coloured by kind. Open calls grow until they get an end.

PropTypeDefaultDescription
spans*readonly AgentSpan[]-{ id, kind, start, end?, failed? }, with times in epoch milliseconds.
windownumber600000How far back the strip reaches, in milliseconds.
size"sm" | "md""sm"The thin strip for a row, or the taller one for a panel.

AgentTraceLegend

Names the colours of AgentTrace.

PropTypeDefaultDescription
labelsPartial<Record<AgentSpanKind, string>>-Replaces any label, to translate or rename.

AgentStatusBadge

The status as a Badge. Children replace the label.

PropTypeDefaultDescription
status*"working" | "waiting" | "idle" | "done" | "failed"-Sets the colour and the default label.

AgentTasks

The agent's to-dos, drawn with the steps of Plan.

PropTypeDefaultDescription
tasks*readonly AgentTask[]-{ id, title, status }, with the status of a PlanStep.

AgentLogItem

One line of AgentLog.

PropTypeDefaultDescription
kind"read" | "edit" | "run" | "search" | "agent" | "other""other"The colour of its dot, the same as in the trace.
failedbooleanfalseMarks the call as failed.
timeReactNode-Shown at the end of the line.

FAQ#

From you. The monitor has no connection of its own: pass it the state of your runs from whatever your agents report to, and it redraws when that state changes.