Run log
ProEvery agent run, one line each, newest first: status, what it was, who ran it, where, when, how long and what it cost. Filter to failures or what's running. A cost or duration not yet measured shows a dash.
Preview
Install
With the Candor CLI
First time? Get started sets up the registry and theme. Or with shadcn directly: npx shadcn@latest add @candor/run-log
Brings in: agent-avatar, chat, locale, relative-time, scale, status, status-dot, terms, utils
Usage
"use client"
import { RunLog, type RunLogEntry } from "@/components/run-log"
import type { AgentIdentity } from "@/lib/chat"
const dev: AgentIdentity = { id: "a-dev", name: "Dev agent", role: "dev" }
const qa: AgentIdentity = { id: "a-qa", name: "QA agent", role: "qa" }
const keel: AgentIdentity = { id: "a-keel", name: "Keel", role: "orchestrator" }
const ago = (minutes: number) => new Date(Date.now() - minutes * 60_000).toISOString()
const runs: RunLogEntry[] = [
{ id: "r1", title: "Add region to projects", agent: dev, environment: "Staging", status: "failed", startedAt: ago(48), duration: 431, cost: 2.37 },
{ id: "r2", title: "Audit API rate limits", agent: qa, environment: "Staging", status: "running", startedAt: ago(12) },
{ id: "r3", title: "Clean up stale flags", agent: keel, environment: "Production", status: "waiting", startedAt: ago(95) },
{ id: "r4", title: "Weekly schema hygiene report", agent: keel, environment: "Production", status: "succeeded", startedAt: ago(60 * 9), duration: 96, cost: 0.31 },
]
export default function Example() {
return <RunLog className="max-w-3xl" runs={runs} onOpen={() => {}} />
}<RunLog>
| Prop | Type | Default | Description |
|---|---|---|---|
| runsrequired | RunLogEntry[] | — | The runs to list; shown newest first. |
| onOpen | ((id: string) => void) | undefined | — | Makes each run's name a button; called with the run's id. |
| className | string | undefined | — | Extra classes for the outer element. |
Strings
The fixed words, in English by default. Change any of them under runLog in <LocaleProvider strings={{ … }}>; the table is exported as runLogStrings.
| Key | English |
|---|---|
| runs | Runs |
| show | Show |
| all | All |
| failed | Failed |
| running | Running |
| run | Run |
| agent | Agent |
| started | Started |
| took | Took |
| cost | Cost |
| noneMatch | No runs match. |
Types
- RunLogEntry
{ id: string title: string agent: AgentIdentity /** Where it ran, as shown. */ environment: string status: RunStatus startedAt: string /** Seconds; absent while running. */ duration?: number | undefined /** USD; absent until measured. */ cost?: number | undefined }