Run Summary
The receipt at the end: the outcome, what changed, what it made, the cost.
PROGet Run Summary and 168 other Pro components with pro lifetime — Get Pro
- Category
- AI Agent
- Access
- ProPro · unlocked
- Source
- 298 lines · one file
- States
- 4 drawn
The decision inside it
"What changed" is its own list
The summary is the agent's account; the changes are the facts. Keeping them apart lets someone check the emails sent and records touched without trusting the prose.
When to use it
Use Run Summary at the end of a run: the outcome, count-up stats, what changed and what it made, with copy, rerun and thumbs. It covers completed, partial, failed and cancelled runs.
Installation
How you get it
Paste this into Claude Code, Cursor, Codex or any coding agent. It installs the file and uses it as it is, instead of writing a new one.
Use Liro's Run Summary for this.
Install it: npx shadcn@latest add @liro/run-summary
(the @liro registry is set up in components.json, with LIRO_KEY in .env.local)
Import it from @/components/ui/run-summary.
Do not rewrite or restyle it. Pass my data through its props
and keep its built-in states.For the full brief with every prop and the mistakes assistants usually make, use Copy prompt above. Pro components install through the @liro registry with your CLI token: see the Namespaced tab.
Usage
import { RunSummary } from "@/components/ui/run-summary";
export function RunResult({ rerun }: { rerun: () => void }) {
return (
<RunSummary
title="Reminders sent"
status="completed"
summary="Both overdue customers were emailed."
stats={{ durationMs: 48_000, steps: 4, toolCalls: 3, tokens: 12_400, cost: 0.06 }}
changes={[{ label: "2 emails sent" }, { label: "1 invoice skipped", skipped: true }]}
outputs={[{ id: "o1", name: "Reminder to Vertically", kind: "email" }]}
onRerun={rerun}
/>
);
}API reference
“Copy prompt” above puts a full brief on your clipboard, install command, dependencies, props, and the mistakes an assistant usually makes with this component.
Props
Read from the component’s own TypeScript interface when the site is built, so this table cannot drift from the file you install.
| Type | Notes | ||
|---|---|---|---|
status | SummaryStatus | No | – |
title | React.ReactNode | Yes | The outcome in a few words. |
summary | React.ReactNode | No | A short account. A string is read as Markdown. |
error | React.ReactNode | No | Why it failed. Shown when `status` is `failed`. |
stats | RunStats | No | – |
changes | RunChange[] | No | – |
outputs | RunOutput[] | No | – |
onOpenOutput | (output: RunOutput) => void | No | Called when an output without an `href` is opened. |
onRerun | () => void | No | – |
onFeedback | (value: MessageFeedback, reason?: string) => void | No | Adds the thumbs. |
copyText | string | No | What Copy puts on the clipboard. Defaults to the summary when it is a string. |
currency | string | No | ISO 4217 code for the cost. Default "USD". |
look | Look | No | Layered sets it in a tray, the heading above the card and the status in the strip below. Flat is one card. |
Dependencies
npm packages
clsxframer-motionlucide-reacttailwind-mergeLiro foundations, installed alongside it
liro-themebuttonmessage-actionsstreaming-responsetooltipStates
All of them are drawn by the component. None is left for you to design.
- Completed
- Step skipped
- Failed
- Stopped
Accessibility
- Keyboard reachable throughout, in visual order
- Focus trapped in overlays, Escape closes them
- Focus returns to whatever opened it
- Live regions announce what changed, not that something did
- Honours prefers-reduced-motion
Responsive behavior
- Sizes to its container, not the viewport
- Usable from 320px up
- Pointer-based interaction, so trackpad and touch both work
- No hover-only affordances